estree v2.6.0 ESTree.Tools.Builder
Functions to make building the Nodes easier
Summary
Functions
array_expression(elements, loc \\ nil)
array_expression([ESTree.Expression.t | nil], ESTree.SourceLocation.t | nil) :: ESTree.ArrayExpression.t
array_pattern(elements, loc \\ nil)
array_pattern([ESTree.Pattern.t | nil], ESTree.SourceLocation.t | nil) :: ESTree.ArrayPattern.t
arrow_function_expression(params, defaults, body, generator \\ false, expression \\ false, loc \\ nil)
arrow_function_expression([ESTree.Pattern.t], [ESTree.Expression.t], ESTree.BlockStatement.t | ESTree.Expression.t, boolean, boolean, ESTree.SourceLocation.t | nil) :: ESTree.ArrowFunctionExpression.t
assignment_expression(operator, left, right, loc \\ nil)
assignment_expression(ESTree.assignment_operator, ESTree.Pattern.t, ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.AssignmentExpression.t
assignment_property(value, loc \\ nil)
assignment_property(ESTree.Pattern.t, ESTree.SourceLocation.t | nil) :: ESTree.AssignmentProperty.t
await_expression(argument, all \\ false, loc \\ nil)
await_expression(ESTree.Expression.t | nil, boolean, ESTree.SourceLocation.t | nil) :: ESTree.AwaitExpression.t
binary_expression(operator, left, right, loc \\ nil)
binary_expression(ESTree.binary_operator, ESTree.Expression.t, ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.BinaryExpression.t
block_statement(body, loc \\ nil)
block_statement([ESTree.Statement.t], ESTree.SourceLocation.t | nil) :: ESTree.BlockStatement.t
break_statement(label \\ nil, loc \\ nil)
break_statement(ESTree.Identifier.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.BreakStatement.t
call_expression(callee, arguments, loc \\ nil)
call_expression(ESTree.Expression.t, [ESTree.Expression.t], ESTree.SourceLocation.t | nil) :: ESTree.CallExpression.t
catch_clause(param, body, loc \\ nil)
catch_clause(ESTree.Pattern.t, ESTree.BlockStatement.t, ESTree.SourceLocation.t | nil) :: ESTree.CatchClause.t
class_body(body, loc \\ nil)
class_body([ESTree.MethodDefinition.t], ESTree.SourceLocation.t | nil) :: ESTree.ClassBody.t
class_declaration(id, body, superClass \\ nil, loc \\ nil)
class_declaration(ESTree.Identifier.t, ESTree.ClassBody.t, ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ClassDeclaration.t
class_expression(body, superClass \\ nil, loc \\ nil)
class_expression(ESTree.ClassBody.t, ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ClassExpression.t
conditional_statement(test, alternate, consequent, loc \\ nil)
conditional_statement(ESTree.Expression.t, ESTree.Expression.t, ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.ConditionalStatement.t
continue_statement(label, loc \\ nil)
continue_statement(ESTree.Identifier.t, ESTree.SourceLocation.t | nil) :: ESTree.ContinueStatement.t
debugger_statement(loc \\ nil)
debugger_statement(ESTree.SourceLocation.t | nil) :: ESTree.DebuggerStatement.t
do_while_statement(body, test, loc \\ nil)
do_while_statement(ESTree.Statement.t, ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.DoWhileStatement.t
empty_expression(loc \\ nil)
empty_expression(ESTree.SourceLocation.t | nil) :: ESTree.EmptyExpression.t
empty_statement(loc \\ nil)
empty_statement(ESTree.SourceLocation.t | nil) :: ESTree.EmptyStatement.t
export_all_declaration(source \\ nil, loc \\ nil)
export_all_declaration(ESTree.Identifier.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ExportAllDeclaration.t
export_default_declaration(declaration \\ nil, loc \\ nil)
export_default_declaration(ESTree.Declaration.t | ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ExportDefaultDeclaration.t
export_named_declaration(declaration, specifiers \\ [], source \\ nil, loc \\ nil)
export_named_declaration(ESTree.Declaration.t | nil, [ESTree.ExportSpecifier], ESTree.Literal.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ExportNamedDeclaration.t
export_specifier(exported, local \\ nil, loc \\ nil)
export_specifier(ESTree.Identifier.t, ESTree.Identifier.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ExportSpecifier.t
expression_statement(expression, loc \\ nil)
expression_statement(ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.ExpressionStatement.t
for_in_statement(left, right, body, loc \\ nil)
for_in_statement(ESTree.VariableDeclaration.t | ESTree.Pattern.t, ESTree.Expression.t, ESTree.Statement.t, ESTree.SourceLocation.t | nil) :: ESTree.ForInStatement.t
for_of_statement(left, right, body, loc \\ nil)
for_of_statement(ESTree.VariableDeclaration.t | ESTree.Pattern.t, ESTree.Expression.t, ESTree.Statement.t, ESTree.SourceLocation.t | nil) :: ESTree.ForOfStatement.t
for_statement(init, test, update, body, loc \\ nil)
for_statement(ESTree.VariableDeclaration.t | ESTree.Expression.t, ESTree.Expression.t | nil, ESTree.Expression.t | nil, ESTree.Statement.t, ESTree.SourceLocation.t | nil) :: ESTree.ForStatement.t
function_declaration(id, params, defaults, body, generator \\ false, expression \\ false, async \\ false, loc \\ nil)
function_declaration(ESTree.Identifier.t, [ESTree.Pattern.t], [ESTree.Expression.t], ESTree.BlockStatement.t, boolean, boolean, boolean, ESTree.SourceLocation.t | nil) :: ESTree.FunctionDeclaration.t
function_expression(params, defaults, body, generator \\ false, expression \\ false, async \\ false, loc \\ nil)
function_expression([ESTree.Pattern.t], [ESTree.Expression.t], ESTree.BlockStatement.t, boolean, boolean, boolean, ESTree.SourceLocation.t | nil) :: ESTree.FunctionExpression.t
identifier(name, loc \\ nil)
identifier(binary, ESTree.SourceLocation.t | nil) :: ESTree.Identifier.t
if_statement(test, consequent, alternate \\ nil, loc \\ nil)
if_statement(ESTree.Expression.t, ESTree.Statement.t, ESTree.Statement.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.IfStatement.t
import_declaration(specifiers, source \\ nil, loc \\ nil)
import_declaration([ESTree.ImportSpecifier.t | ESTree.ImportNamespaceSpecifier.t | ESTree.ImportDefaultSpecifier.t], ESTree.Identifier.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ImportDeclaration.t
import_default_specifier(local, loc \\ nil)
import_default_specifier(ESTree.Identifier.t, ESTree.SourceLocation.t | nil) :: ESTree.ImportDefaultSpecifier.t
import_namespace_specifier(local, loc \\ nil)
import_namespace_specifier(ESTree.Identifier.t, ESTree.SourceLocation.t | nil) :: ESTree.ImportNamespaceSpecifier.t
import_specifier(imported, local \\ nil, loc \\ nil)
import_specifier(ESTree.Identifier.t, ESTree.Identifier.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ImportSpecifier.t
jsx_attribute(name, value \\ nil, loc \\ nil)
jsx_attribute(ESTree.JSXIdentifier.t | ESTree.JSXNamespacedName.t, ESTree.Literal.t | ESTree.JSXExpressionContainer.t | ESTree.JSXElement.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.JSXAttribute.t
jsx_closing_element(name, loc \\ nil)
jsx_closing_element(ESTree.JSXIdentifier.t | ESTree.JSXMemberExpression.t | ESTree.JSXNamespacedName.t, ESTree.SourceLocation.t | nil) :: ESTree.JSXClosingElement.t
jsx_element(openingElement, children \\ [], closingElement \\ nil, loc \\ nil)
jsx_element(ESTree.JSXOpeningElement.t, [ESTree.Literal.t | ESTree.JSXExpressionContainer.t | ESTree.JSXElement.t], ESTree.JSXClosingElement.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.JSXElement.t
jsx_empty_expression(loc \\ nil)
jsx_empty_expression(ESTree.SourceLocation.t | nil) :: ESTree.JSXEmptyExpression.t
jsx_expression_container(expression, loc \\ nil)
jsx_expression_container(ESTree.Expression.t | ESTree.JSXEmptyExpression.t, ESTree.SourceLocation.t | nil) :: ESTree.JSXExpressionContainer.t
jsx_identifier(name, loc \\ nil)
jsx_identifier(binary, ESTree.SourceLocation.t | nil) :: ESTree.JSXIdentifier.t
jsx_member_expression(object, property, loc \\ nil)
jsx_member_expression(ESTree.JSXMemberExpression.t | ESTree.JSXIdentifier.t, ESTree.JSXIdentifier.t, ESTree.SourceLocation.t | nil) :: ESTree.MemberExpression.t
jsx_namespaced_name(namespace, name, loc \\ nil)
jsx_namespaced_name(ESTree.JSXIdentifier.t, ESTree.JSXIdentifier.t, ESTree.SourceLocation.t | nil) :: ESTree.JSXNamespacedName.t
jsx_opening_element(name, attributes \\ [], selfClosing \\ false, loc \\ nil)
jsx_opening_element(ESTree.JSXIdentifier.t | ESTree.JSXMemberExpression.t | ESTree.JSXNamespacedName.t, [ESTree.JSXAttribute.t | ESTree.JSXSpreadAttribute.t], boolean, ESTree.SourceLocation.t | nil) :: ESTree.JSXOpeningElement.t
jsx_spread_attribute(argument, loc \\ nil)
jsx_spread_attribute(ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.SpreadElement.t
labeled_statement(label, body, loc \\ nil)
labeled_statement(ESTree.Identifier.t, ESTree.Statement.t, ESTree.SourceLocation.t | nil) :: ESTree.LabeledStatement.t
literal(value, regex \\ nil, loc \\ nil)
literal(binary | boolean | number | nil, ESTree.Regex.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.Literal.t
logical_expression(operator, left, right, loc \\ nil)
logical_expression(ESTree.logical_operator, ESTree.Expression.t, ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.LogicalExpression.t
member_expression(object, property, computed \\ false, loc \\ nil)
member_expression(ESTree.Expression.t | ESTree.Super.t, ESTree.Identifier.t | ESTree.Expression.t, boolean, ESTree.SourceLocation.t | nil) :: ESTree.MemberExpression.t
meta_property(meta, property, loc \\ nil)
meta_property(ESTree.Identifier.t, ESTree.Identifier.t, ESTree.SourceLocation.t | nil) :: ESTree.MetaProperty.t
method_definition(key, value, kind \\ :method, computed \\ false, static \\ false, loc \\ nil)
method_definition(ESTree.Identifier.t, ESTree.FunctionExpression.t, :constructor | :method | :get | :set, boolean, boolean, ESTree.SourceLocation.t | nil) :: ESTree.MethodDefinition.t
new_expression(callee, arguments, loc \\ nil)
new_expression(ESTree.Expression.t, [ESTree.Expression.t], ESTree.SourceLocation.t | nil) :: ESTree.NewExpression.t
object_expression(properties, loc \\ nil)
object_expression([ESTree.Property.t], ESTree.SourceLocation.t | nil) :: ESTree.ObjectExpression.t
object_pattern(properties, loc \\ nil)
object_pattern([ESTree.Property.t], ESTree.SourceLocation.t | nil) :: ESTree.ObjectPattern.t
program(body, sourceType \\ :script, loc \\ nil)
program([ESTree.Statement.t], :script | :module, ESTree.SourceLocation.t | nil) :: ESTree.Program.t
property(key, value, kind \\ :init, shorthand \\ false, method \\ false, computed \\ false, loc \\ nil)
property(ESTree.Expression.t, ESTree.Expression.t, :init | :get | :set, boolean, boolean, boolean, ESTree.SourceLocation.t | nil) :: ESTree.Property.t
rest_element(argument, loc \\ nil)
rest_element(ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.RestElement.t
return_statement(argument, loc \\ nil)
return_statement(ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.ReturnStatement.t
sequence_expression(expressions, loc \\ nil)
sequence_expression([ESTree.Expression.t], ESTree.SourceLocation.t | nil) :: ESTree.SequenceExpression.t
source_location(source, start, the_end)
source_location(binary | nil, ESTree.Position.t, ESTree.Position.t) :: ESTree.SourceLocation.t
spread_element(argument, loc \\ nil)
spread_element(ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.SpreadElement.t
switch_case(test, consequent, loc \\ nil)
switch_case(ESTree.Expression.t | nil, [ESTree.Statement.t], ESTree.SourceLocation.t | nil) :: ESTree.SwitchCase.t
switch_statement(discriminant, cases, loc \\ nil)
switch_statement(ESTree.Expression.t, [ESTree.SwitchCase.t], ESTree.SourceLocation.t | nil) :: ESTree.SwitchStatement.t
tagged_template_expression(tag, quasi, loc \\ nil)
tagged_template_expression(ESTree.Expression.t, ESTree.TemplateLiteral.t, ESTree.SourceLocation.t | nil) :: ESTree.TaggedTemplateExpression.t
template_element(raw, cooked_value, tail, loc \\ nil)
template_element(binary, binary, boolean, ESTree.SourceLocation.t | nil) :: ESTree.TemplateElement.t
template_literal(quasis, expressions, loc \\ nil)
template_literal([ESTree.TemplateElement.t], [ESTree.Expression.t], ESTree.SourceLocation.t | nil) :: ESTree.TemplateLiteral.t
this_expression(loc \\ nil)
this_expression(ESTree.SourceLocation.t | nil) :: ESTree.ThisExpression.t
throw_statement(argument, loc \\ nil)
throw_statement(ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.ThrowStatement.t
try_statement(block, handler, finalizer \\ nil, loc \\ nil)
try_statement(ESTree.BlockStatement.t, ESTree.CatchClause.t | nil, ESTree.BlockStatement.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.TryStatement.t
unary_expression(operator, prefix, argument, loc \\ nil)
unary_expression(ESTree.unary_operator, boolean, ESTree.Expression.t, ESTree.SourceLocation.t | nil) :: ESTree.UnaryExpression.t
update_expression(operator, argument, prefix, loc \\ nil)
update_expression(ESTree.update_operator, ESTree.Expression.t, boolean, ESTree.SourceLocation.t | nil) :: ESTree.UpdateExpression.t
variable_declaration(declarations, kind \\ :var, loc \\ nil)
variable_declaration([ESTree.VariableDeclarator.t], :var | :let | :const, ESTree.SourceLocation.t | nil) :: ESTree.VariableDeclaration.t
variable_declarator(id, init \\ nil, loc \\ nil)
variable_declarator(ESTree.Pattern.t, ESTree.Expression.t | nil, ESTree.SourceLocation.t | nil) :: ESTree.VariableDeclarator.t
while_statement(test, body, loc \\ nil)
while_statement(ESTree.Expression.t, ESTree.Statement.t, ESTree.SourceLocation.t | nil) :: ESTree.WhileStatement.t
with_statement(object, body, loc \\ nil)
with_statement(ESTree.Expression.t, ESTree.Statement.t, ESTree.SourceLocation.t | nil) :: ESTree.WithStatement.t
yield_expression(argument \\ nil, delegate \\ false, loc \\ nil)
yield_expression(ESTree.Expression.t | nil, boolean, ESTree.SourceLocation.t | nil) :: ESTree.YieldExpression.t