Add some infix math operators to javascript grammar
This commit is contained in:
parent
7be8d469b8
commit
52c338ed60
3 changed files with 9008 additions and 7087 deletions
|
|
@ -7,3 +7,15 @@ print(isDone() ? stuff : otherStuff);
|
|||
(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))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue