diff options
author | Frederick Schwalbe | 2023-12-05 13:54:00 +0000 |
---|---|---|
committer | GitHub | 2023-12-05 13:54:00 +0000 |
commit | c3cb1795bfd2bfe1c01badd71ac101b0c8fdd379 (patch) | |
tree | 8371f22bbefa1775cd461e0a555de471ce80fda6 /runtime | |
parent | 4c2bd4905e8cf1c3be8b80ee1095ab0ece61ef1b (diff) |
Update gleam grammar and queries (#9003)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/queries/gleam/highlights.scm | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/runtime/queries/gleam/highlights.scm b/runtime/queries/gleam/highlights.scm index 56222b8f..95a08141 100644 --- a/runtime/queries/gleam/highlights.scm +++ b/runtime/queries/gleam/highlights.scm @@ -21,6 +21,8 @@ ; Functions (unqualified_import (identifier) @function) +(unqualified_import "type" (type_identifier) @type) +(unqualified_import (type_identifier) @constructor) (function name: (identifier) @function) (external_function @@ -43,6 +45,13 @@ (tuple_access index: (integer) @variable.other.member) +; Attributes +(attribute + "@" @attribute + name: (identifier) @attribute) + +(attribute_value (identifier) @constant) + ; Type names (remote_type_identifier) @type (type_identifier) @type @@ -60,10 +69,6 @@ (identifier) @variable (discard) @comment.unused -; Operators -(binary_expression - operator: _ @operator) - ; Keywords [ (visibility_modifier) ; "pub" @@ -72,6 +77,7 @@ "assert" "case" "const" + ; DEPRECATED: 'external' was removed in v0.30. "external" "fn" "if" @@ -79,11 +85,16 @@ "let" "panic" "todo" - "try" "type" "use" ] @keyword +; Operators +(binary_expression + operator: _ @operator) +(boolean_negation "!" @operator) +(integer_negation "-" @operator) + ; Punctuation [ "(" |