Closed giacomocavalieri closed 4 weeks ago
Specifying a left associativity made the tests pass for me:
diff --git a/grammar.js b/grammar.js
index f5b8e41..3d99544 100644
--- a/grammar.js
+++ b/grammar.js
@@ -21,7 +21,6 @@ module.exports = grammar({
[$.source_file],
[$._constant_value, $._case_clause_guard_unit],
[$.integer],
- [$.pipeline_echo, $.echo],
[$.echo],
],
rules: {
@@ -378,7 +377,7 @@ module.exports = grammar({
)
)
),
- pipeline_echo: (_$) => " echo",
+ pipeline_echo: (_$) => prec.left("echo"),
echo: ($) => seq("echo", $._expression),
tuple: ($) => seq("#", "(", optional(series_of($._expression, ",")), ")"),
list: ($) =>
That works, hero!!
Done!
This PR adds syntax highlight for the
echo
keyword. I'm having a problem with a test failing:I can't really understand why is that, it looks unrelated to the
echo
addition. By playing around it look like that it's that$.pipeline_echo
I've added in the|>
operator that's messing things up but I know too little about tree sitter to figure this out on my own