Closed caioliberali closed 3 years ago
@caioliberali it's because negated patterns were added in the core tree-sitter library after v0.19.3 version and doesn't released yet even in the core library. Parsers in the playground were updated 5 days ago. but this nodejs binding was released only for v0.19.0 9 days ago.
In this situation you have one option to:
@ahlinc Thank you very much again!!
When using the Playground the query works normally but when using Node with C++ parser the same query causes an error ( if I remove the Negated Field it works ).
Example: https://tree-sitter.github.io/tree-sitter/playground
Code
Query
[ (declaration declarator: (function_declarator declarator: (identifier) @N)) @C (function_definition !type declarator: (function_declarator declarator: [ (identifier) @N (field_identifier) @N ] )) @C ]
!type is the keyword that is causing an error.
Can anybody help me? Thank you!