Right now, nested member expressions are parsed incorrectly.
a.b.c;
/*
is parsed as:
(module
(member_expression
(identifier)
(member_expression (identifier) (identifier))
)
)
---
instead of:
(module
(member_expression
(member_expression (identifier) (identifier))
(identifier)
)
)
*/
The second one is the correct interpretation. This can be verified by added parentheses to the expression:
(a.b).c; // this is valid haxe
a.(b.c); // this is invalid haxe
Solving this would also fix this problem:
|
; TODO: Figure out how to determined when "nested member call" is last ident. |
|
; apparently this is a known issue https://github.com/tree-sitter/tree-sitter/issues/880 |
|
(call_expression object: [ |
|
(_) @function |
|
(_ (identifier) @function .) |
|
; (_(_ (identifier) @function .)) |
|
; (_(_(_ (identifier) @function .))) |
|
; (_(_(_(_ (identifier) @function .)))) |
|
; (_(_(_(_(_ (identifier) @function .))))) |
|
]) |
Right now, nested member expressions are parsed incorrectly.
The second one is the correct interpretation. This can be verified by added parentheses to the expression:
Solving this would also fix this problem:
tree-sitter-haxe/queries/highlights.scm
Lines 56 to 65 in 5f7a2e0