Open MXfive opened 3 weeks ago
There is also a similar issue with binary_operation
.
=====
attribute as conditional expression
=====
foo = local.bar == local.baz
-----
(config_file
(body
(attribute
(identifier)
(expression
(operation
(binary_operation
(variable_expr
(identifier))
(get_attr
(identifier))
(variable_expr
(identifier))
(get_attr
(identifier))))))))
Looking a the behaviour of binary_operation
, I think the proper way of resolving that would be something like in tree-sitter-go, where each side of the binary operation is set as field, rather than just a normal child node. This also maps to unary_operation
quite nicely too.
Also would be a nice addition to capture the operator as a field also.
Describe the bug
Incorrect parsing leading to missing highlights of variables within unary operations.
To Reproduce
Expected behavior
The test case should pass
Screenshots