You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
your parser.c code is not up to date, that's the issue. it is currently using binaryOperator - see the diff of me generating using 0.20.6:
Also - I recommend not aliasing a choice of many operators under one uniform named node - it makes checking for the text/querying for specific kinds of operators a bit more annoying, it's better to tie them to a field called operator (which you already have), but leave it as-is as a terminal/token
Problem
I've defined an alias here: https://github.com/JoranHonig/tree-sitter-solidity/blob/master/grammar.js#L791
I'd expect to be able to query for binary_operator nodes as such:
Steps to reproduce
git clone git@github.com:JoranHonig/tree-sitter-solidity.git
tree-sitter generate
cat " (binary_operator) @operator" > example.scm
touch sample.sol
tree-sitter-query example.scm sample.sol
Expected behavior
No query error
Tree-sitter version (tree-sitter --version)
tree-sitter 0.22.4
Operating system/version
=
The text was updated successfully, but these errors were encountered: