From 9ceeea5a83270284b42813a128962ca5102b07f6 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 5 Jun 2023 08:40:48 -0500 Subject: [PATCH] Update tree-sitter-gleam and highlights This contains a few syntax fixes. The highlights have been updated as well for reserved identifiers and escape sequences --- languages.toml | 2 +- runtime/queries/gleam/highlights.scm | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/languages.toml b/languages.toml index 3e4084bf43c1..1653fbbcdf89 100644 --- a/languages.toml +++ b/languages.toml @@ -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" diff --git a/runtime/queries/gleam/highlights.scm b/runtime/queries/gleam/highlights.scm index 95a08141bd51..b40574b04fc2 100644 --- a/runtime/queries/gleam/highlights.scm +++ b/runtime/queries/gleam/highlights.scm @@ -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