tree-sitter-viml
tree-sitter-viml copied to clipboard
Support for method call syntax in call expressions
Currently doing something like
call GetThing()->takething()
is broken, it generates the following syntax tree
call_statement [0, 0] - [0, 15]
call_expression [0, 5] - [0, 15]
function: identifier [0, 5] - [0, 13]
ERROR [0, 15] - [0, 28]
keyword [0, 17] - [0, 26]
I tried fixing it by defining call_expression
as the following:
call_expression: ($) =>
prec(
PREC.CALL,
sep1(
seq(
field("function", $._expression),
"(",
commaSep($._expression),
")"
),
"->"
)
),
But that seems to only recognises two calls like call foo()->bar()
and not the ones after it in call foo()->bar()->baz()
->baz()
shows up as an ERROR
node.
Should be fixed by https://github.com/vigoux/tree-sitter-viml/pull/125.
Ah, I must've missed it