Closed csmoe closed 2 years ago
Yep, the precedence of each infix operator is specifed here:
https://github.com/titzer/virgil/blob/master/aeneas/src/v3/V3Infix.v3
The parser uses those constants directly, so that definition is canonical.
Thanks for doing this!
Also note there is a vim mode in bin/dev/virgil-vim.
Going to close this, as I think the above answers the original question. Feel free to submit a PR if you succeed at making a grammar for tree-sitter. Thanks.
Is there any material specifies the precedence of virgil syntax?
I'm trying to write the virgil's
grammar.js
for tree-sitter, which will bring syntax highlight and basic code navigation for virgil in common editors like vim, vscode etc.cc the rust precedence table https://github.com/tree-sitter/tree-sitter-rust/blob/0f14a10011ac6e56f309fb99a94829c3312b743a/grammar.js#L1