estree v2.7.0 ESTree View Source

Defines structs that represent the JavaScript AST nodes from the ESTree spec.

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]"

Link to this section Summary

Link to this section Types

Link to this type

assignment_operator() View Source
assignment_operator() ::
  :=
  | :"+="
  | :"-="
  | :"*="
  | :"/="
  | :"%="
  | :"<<="
  | :">>="
  | :">>>="
  | :"|="
  | :"^="
  | :"&="
  | :"**="

Link to this type

binary_operator() View Source
binary_operator() ::
  :==
  | :!=
  | :===
  | :!==
  | :<
  | :<=
  | :>
  | :>=
  | :"<<"
  | :">>"
  | :>>>
  | :+
  | :-
  | :*
  | :/
  | :%
  | :|
  | :^
  | :&
  | :in
  | :instanceof
  | :"**"

Link to this type

logical_operator() View Source
logical_operator() :: :|| | :&&

Link to this type

unary_operator() View Source
unary_operator() :: :- | :+ | :! | :"~" | :typeof | :void | :delete

Link to this type

update_operator() View Source
update_operator() :: :++ | :--