Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #158 from atom/b3-tree-sitter-scopes
Browse files Browse the repository at this point in the history
Add more scopes to the tree-sitter go grammar
  • Loading branch information
Ben3eeE authored Oct 29, 2018
2 parents bbd64c9 + 28e44c4 commit b4ac7f5
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 1 deletion.
36 changes: 36 additions & 0 deletions grammars/tree-sitter-go.cson
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,57 @@ scopes:
'"fallthrough"': 'keyword.control'
'"defer"': 'keyword.control'
'"range"': 'keyword.control'
'"go"': 'keyword.control'

'interpreted_string_literal': 'string.quoted.double'
'raw_string_literal': 'string.quoted.double'
'escape_sequence': 'constant.character.escape'
'rune_literal': 'constant.other.rune'
'int_literal': 'constant.numeric.integer'
'float_literal': 'constant.numeric.float'
'imaginary_literal': 'constant.numeric.integer'
'nil': 'constant.language.nil'
'false': 'constant.language.false'
'true': 'constant.language.true'

'call_expression > identifier': 'entity.name.function'
'function_declaration > identifier': 'entity.name.function'
'method_declaration > field_identifier': 'entity.name.function'
'call_expression > selector_expression > field_identifier': 'entity.name.function'

'"+"': 'keyword.operator'
'"-"': 'keyword.operator'
'"*"': 'keyword.operator'
'"/"': 'keyword.operator'
'"%"': 'keyword.operator'
'"++"': 'keyword.operator'
'"--"': 'keyword.operator'
'"=="': 'keyword.operator'
'"!="': 'keyword.operator'
'">"': 'keyword.operator'
'"<"': 'keyword.operator'
'">="': 'keyword.operator'
'"<="': 'keyword.operator'
'"!"': 'keyword.operator'
'"|"': 'keyword.operator'
'"^"': 'keyword.operator'
'"<<"': 'keyword.operator'
'">>"': 'keyword.operator'
'"="': 'keyword.operator'
'"+="': 'keyword.operator'
'"-="': 'keyword.operator'
'"*="': 'keyword.operator'
'"/="': 'keyword.operator'
'"%="': 'keyword.operator'
'"<<="': 'keyword.operator'
'">>="': 'keyword.operator'
'"&="': 'keyword.operator'
'"^="': 'keyword.operator'
'"|="': 'keyword.operator'
'":="': 'keyword.operator'
'"&"': 'keyword.operator'
'"*"': 'keyword.operator'
'"&&"': 'keyword.operator'
'"||"': 'keyword.operator'
'"..."': 'keyword.operator'
'"<-"': 'keyword.operator'
169 changes: 169 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/atom/language-go/issues"
},
"dependencies": {
"tree-sitter-go": "^0.13.1"
"tree-sitter-go": "^0.13.3"
},
"devDependencies": {
"coffeelint": "^1.10.1"
Expand Down

0 comments on commit b4ac7f5

Please sign in to comment.