ESTree
Defines structs that represent the JavaScript AST nodes from the ESTree spec.
Also includes a JavaScript AST to JavaScript code generator.
alias ESTree.Tools.Builder
alias ESTree.Tools.Generator
ast = Builder.array_expression([
Builder.literal(1),
Builder.identifier(:a)
])
Generator.generate(ast)
#"[1, a]"
Types ↑
unary_operator :: :- | :+ | :! | :"~" | :typeof | :void | :delete
binary_operator :: :== | :!= | :=== | :!== | :< | :<= | :> | :>= | :"<<" | :">>" | :>>> | :+ | :- | :* | :/ | :% | :| | :^ | :& | :in | :instanceof
logical_operator :: :|| | :&&
assignment_operator :: := | :"+=" | :"-=" | :"*=" | :"/=" | :"%=" | :"<<=" | :">>=" | :">>>=" | :"|=" | :"^=" | :"&="
update_operator :: :++ | :--