diff --git a/queries/lalrpop/folds.scm b/queries/lalrpop/folds.scm new file mode 100644 index 000000000..beeed9ba5 --- /dev/null +++ b/queries/lalrpop/folds.scm @@ -0,0 +1,5 @@ +[ + (grammar_item) + (use)+ + (action) +] @fold diff --git a/queries/lalrpop/highlights.scm b/queries/lalrpop/highlights.scm index 1295f3f61..046d39790 100644 --- a/queries/lalrpop/highlights.scm +++ b/queries/lalrpop/highlights.scm @@ -1,3 +1,5 @@ +(comment) @comment @spell + "grammar" @keyword [ @@ -8,6 +10,7 @@ [ "pub" "extern" + (mut) ] @keyword.modifier [ @@ -23,29 +26,26 @@ ; => "=>@L" "=>@R" + "=" + "&" ] @operator -(grammar_type_params - [ - "<" - ">" - ] @punctuation.bracket) - -(symbol - [ - "<" - ">" - ] @punctuation.bracket) - -(binding_symbol - [ - "<" - ">" - ] @punctuation.bracket) - (binding_symbol name: (identifier) @variable.parameter) +(annotation + "#" @punctuation.special) + +(grammar_parameter + (identifier) @variable.parameter) + +(associated_type + (identifier) @type) + +(parametrized_type + (path + (identifier) @type)) + (bare_symbol (macro (macro_id) @type.definition)) @@ -67,11 +67,17 @@ ")" "[" "]" + "}" + "{" + ">" + "<" ] @punctuation.bracket [ ";" ":" + "::" + "," ] @punctuation.delimiter (lifetime diff --git a/queries/lalrpop/injections.scm b/queries/lalrpop/injections.scm index b0c83a11a..17d0ace48 100644 --- a/queries/lalrpop/injections.scm +++ b/queries/lalrpop/injections.scm @@ -1,3 +1,6 @@ +((comment) @injection.content + (#set! injection.language "comment")) + ([ (normal_action) (failible_action)