diff options
Diffstat (limited to 'runtime/queries/_javascript/locals.scm')
-rw-r--r-- | runtime/queries/_javascript/locals.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/queries/_javascript/locals.scm b/runtime/queries/_javascript/locals.scm new file mode 100644 index 00000000..94356616 --- /dev/null +++ b/runtime/queries/_javascript/locals.scm @@ -0,0 +1,14 @@ +; Definitions +;------------ +; Javascript and Typescript Treesitter grammars deviate when defining the +; tree structure for parameters, so we need to address them in each specific +; language instead of ecma. + +; (i) +(formal_parameters + (identifier) @local.definition) + +; (i = 1) +(formal_parameters + (assignment_pattern + left: (identifier) @local.definition)) |