diff --git a/packages/language-c/grammars/tree-sitter-cpp/highlights.scm b/packages/language-c/grammars/tree-sitter-cpp/highlights.scm index c819911905..778e294889 100644 --- a/packages/language-c/grammars/tree-sitter-cpp/highlights.scm +++ b/packages/language-c/grammars/tree-sitter-cpp/highlights.scm @@ -150,10 +150,10 @@ ; ((identifier) @variable.other.readwrite.member.cpp ; (#match? @variable.other.readwrite.member.cpp "^(f|m)[A-Z]\\w*$")) -; The "foo" in `int &foo` with in a parameter list. -(parameter_declaration - declarator: (reference_declarator - (identifier) @variable.parameter.cpp)) +; The "foo" in `const char *foo` within a parameter list. +; (Should work no matter how many pointers deep we are.) +(reference_declarator (identifier) @variable.parameter.cpp + (#is? test.descendantOfType "parameter_declaration")) ; KEYWORDS diff --git a/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson b/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson index 7977a53691..ebd8738380 100644 --- a/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson +++ b/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson @@ -5,6 +5,6 @@ parser: 'tree-sitter-hyperlink' injectionRegex: 'hyperlink' treeSitter: - parserSource: 'github:savetheclocktower/tree-sitter-hyperlink#04c3a667ba432236578ac99bbacd0412f88d6fac' + parserSource: 'github:savetheclocktower/tree-sitter-hyperlink#0704b3e5a72892495dd13b85a5064582414cb39a' grammar: 'ts/tree-sitter-hyperlink.wasm' highlightsQuery: 'ts/highlights.scm' diff --git a/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm b/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm index 723c2ae6bd..21a144fb89 100755 Binary files a/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm and b/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm differ diff --git a/packages/language-shellscript/grammars/tree-sitter/highlights.scm b/packages/language-shellscript/grammars/tree-sitter/highlights.scm index 031507a766..8c8549738f 100644 --- a/packages/language-shellscript/grammars/tree-sitter/highlights.scm +++ b/packages/language-shellscript/grammars/tree-sitter/highlights.scm @@ -134,7 +134,15 @@ (binary_expression ["&&" "||"] @keyword.operator.logical.shell) (pipeline "|" @keyword.operator.pipe.shell) -(expansion operator: "#" @keyword.operator.expansion.shell) + +; Any expansion operator, including all `#`s and `%`s in the following examples: +; +; foo="${bar#*.}" +; foo="${bar##*.}" +; foo="${bar%*.}" +; foo="${bar%%*.}" +; +(expansion operator: _ @keyword.operator.expansion.shell) ; "*" @keyword.operator.glob.shell