tree-sitter/spec/runtime/languages/javascript/operators.txt

22 lines
623 B
Text
Raw Normal View History

==========================================
parses ternary expressions
==========================================
print(isDone() ? stuff : otherStuff);
---
(program (expression_statement
(function_call
(identifier)
(ternary (function_call (identifier)) (identifier) (identifier)))))
==========================================
parses mathematical operators
==========================================
a + b * c - d / e
---
(program (expression_statement
(math_op
(identifier)
(math_op
(math_op (identifier) (identifier))
(math_op (identifier) (identifier))))))