Skip to content

Commit

Permalink
Update tree-sitter-gleam and highlights
Browse files Browse the repository at this point in the history
This contains a few syntax fixes. The highlights have been updated as
well for reserved identifiers and escape sequences
  • Loading branch information
the-mikedavis authored and archseer committed Mar 21, 2024
1 parent fdcd461 commit 9ceeea5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ auto-format = true

[[grammar]]
name = "gleam"
source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "b2afa4fd6bb41a7bf912b034c653c90af7ae5122" }
source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "bcf9c45b56cbe46e9dac5eee0aee75df270000ac" }

[[language]]
name = "ron"
Expand Down
7 changes: 7 additions & 0 deletions runtime/queries/gleam/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,17 @@

; Literals
(string) @string
((escape_sequence) @warning
(#eq? @warning "\\e")) ; deprecated escape sequence
(escape_sequence) @constant.character.escape
(bit_string_segment_option) @function.builtin
(integer) @constant.numeric.integer
(float) @constant.numeric.float

; Reserved identifiers
((identifier) @error
(#any-of? @error "auto" "delegate" "derive" "else" "implement" "macro" "test" "echo"))

; Variables
(identifier) @variable
(discard) @comment.unused
Expand Down

0 comments on commit 9ceeea5

Please sign in to comment.