Add finally, instance of, typeof, in to js grammar
This commit is contained in:
parent
c91c5cb730
commit
4ad6278334
8 changed files with 47167 additions and 21103 deletions
|
|
@ -29,4 +29,21 @@ parses boolean operators
|
|||
(bool_op
|
||||
(bool_op (identifier))
|
||||
(bool_op
|
||||
(expression (bool_op (identifier) (identifier)))))))
|
||||
(expression (bool_op (identifier) (identifier)))))))
|
||||
|
||||
===========================================
|
||||
parses the type operators
|
||||
===========================================
|
||||
print((x instanceof Array) || (typeof x == "string"))
|
||||
---
|
||||
(program (expression_statement (function_call (identifier)
|
||||
(bool_op
|
||||
(expression (instanceof_expression (identifier) (identifier)))
|
||||
(expression (typeof_expression (bool_op (identifier) (string))))))))
|
||||
|
||||
============================================
|
||||
parses the 'in' operator
|
||||
===========================================
|
||||
print(x in y)
|
||||
---
|
||||
(program (expression_statement (function_call (identifier) (in_expression (identifier) (identifier)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue