estree v2.7.0 ESTree.Tools.Builder View Source

Functions to make building the Nodes easier

Link to this section Summary

Functions

Link to this section Functions

Link to this function

array_expression(elements, loc \\ nil) View Source
array_expression([ESTree.Expression.t() | nil], ESTree.SourceLocation.t() | nil) ::
  ESTree.ArrayExpression.t()

Link to this function

array_pattern(elements, loc \\ nil) View Source
array_pattern([ESTree.Pattern.t() | nil], ESTree.SourceLocation.t() | nil) ::
  ESTree.ArrayPattern.t()

Link to this function

arrow_function_expression(params, defaults, body, generator \\ false, expression \\ false, async \\ false, loc \\ nil) View Source

Link to this function

assignment_expression(operator, left, right, loc \\ nil) View Source

Link to this function

assignment_property(value, loc \\ nil) View Source

Link to this function

await_expression(argument, all \\ false, loc \\ nil) View Source
await_expression(
  ESTree.Expression.t() | nil,
  boolean(),
  ESTree.SourceLocation.t() | nil
) :: ESTree.AwaitExpression.t()

Link to this function

binary_expression(operator, left, right, loc \\ nil) View Source

Link to this function

block_statement(body, loc \\ nil) View Source

Link to this function

break_statement(label \\ nil, loc \\ nil) View Source

Link to this function

call_expression(callee, arguments, loc \\ nil) View Source

Link to this function

class_declaration(id, body, superClass \\ nil, loc \\ nil) View Source

Link to this function

class_expression(body, superClass \\ nil, loc \\ nil) View Source

Link to this function

conditional_statement(test, alternate, consequent, loc \\ nil) View Source

Link to this function

continue_statement(label, loc \\ nil) View Source

Link to this function

debugger_statement(loc \\ nil) View Source
debugger_statement(ESTree.SourceLocation.t() | nil) ::
  ESTree.DebuggerStatement.t()

Link to this function

do_while_statement(body, test, loc \\ nil) View Source

Link to this function

empty_expression(loc \\ nil) View Source
empty_expression(ESTree.SourceLocation.t() | nil) :: ESTree.EmptyExpression.t()

Link to this function

empty_statement(loc \\ nil) View Source
empty_statement(ESTree.SourceLocation.t() | nil) :: ESTree.EmptyStatement.t()

Link to this function

export_all_declaration(source \\ nil, loc \\ nil) View Source
export_all_declaration(
  ESTree.Identifier.t() | nil,
  ESTree.SourceLocation.t() | nil
) :: ESTree.ExportAllDeclaration.t()

Link to this function

export_default_declaration(declaration \\ nil, loc \\ nil) View Source

Link to this function

export_named_declaration(declaration, specifiers \\ [], source \\ nil, loc \\ nil) View Source
export_named_declaration(
  ESTree.Declaration.t() | nil,
  [ESTree.ExportSpecifier],
  ESTree.Literal.t() | nil,
  ESTree.SourceLocation.t() | nil
) :: ESTree.ExportNamedDeclaration.t()

Link to this function

export_specifier(exported, local \\ nil, loc \\ nil) View Source

Link to this function

expression_statement(expression, loc \\ nil) View Source

Link to this function

function_declaration(id, params, defaults, body, generator \\ false, expression \\ false, async \\ false, loc \\ nil) View Source

Link to this function

function_expression(params, defaults, body, generator \\ false, expression \\ false, async \\ false, loc \\ nil) View Source

Link to this function

identifier(name, loc \\ nil) View Source
identifier(binary(), ESTree.SourceLocation.t() | nil) :: ESTree.Identifier.t()

Link to this function

if_statement(test, consequent, alternate \\ nil, loc \\ nil) View Source

Link to this function

import_default_specifier(local, loc \\ nil) View Source

Link to this function

import_namespace_specifier(local, loc \\ nil) View Source
import_namespace_specifier(
  ESTree.Identifier.t(),
  ESTree.SourceLocation.t() | nil
) :: ESTree.ImportNamespaceSpecifier.t()

Link to this function

import_specifier(imported, local \\ nil, loc \\ nil) View Source

Link to this function

jsx_element(openingElement, children \\ [], closingElement \\ nil, loc \\ nil) View Source

Link to this function

jsx_empty_expression(loc \\ nil) View Source
jsx_empty_expression(ESTree.SourceLocation.t() | nil) ::
  ESTree.JSXEmptyExpression.t()

Link to this function

jsx_expression_container(expression, loc \\ nil) View Source

Link to this function

jsx_identifier(name, loc \\ nil) View Source
jsx_identifier(binary(), ESTree.SourceLocation.t() | nil) ::
  ESTree.JSXIdentifier.t()

Link to this function

jsx_member_expression(object, property, loc \\ nil) View Source

Link to this function

jsx_namespaced_name(namespace, name, loc \\ nil) View Source

Link to this function

jsx_opening_element(name, attributes \\ [], selfClosing \\ false, loc \\ nil) View Source

Link to this function

jsx_spread_attribute(argument, loc \\ nil) View Source
jsx_spread_attribute(
  ESTree.Expression.t() | nil,
  ESTree.SourceLocation.t() | nil
) :: ESTree.SpreadElement.t()

Link to this function

labeled_statement(label, body, loc \\ nil) View Source

Link to this function

literal(value, regex \\ nil, loc \\ nil) View Source
literal(
  binary() | boolean() | number() | nil,
  ESTree.Regex.t() | nil,
  ESTree.SourceLocation.t() | nil
) :: ESTree.Literal.t()

Link to this function

logical_expression(operator, left, right, loc \\ nil) View Source

Link to this function

member_expression(object, property, computed \\ false, loc \\ nil) View Source

Link to this function

meta_property(meta, property, loc \\ nil) View Source

Link to this function

method_definition(key, value, kind \\ :method, computed \\ false, static \\ false, loc \\ nil) View Source
method_definition(
  ESTree.Identifier.t(),
  ESTree.FunctionExpression.t(),
  :constructor | :method | :get | :set,
  boolean(),
  boolean(),
  ESTree.SourceLocation.t() | nil
) :: ESTree.MethodDefinition.t()

Link to this function

new_expression(callee, arguments, loc \\ nil) View Source

Link to this function

object_expression(properties, loc \\ nil) View Source

Link to this function

object_pattern(properties, loc \\ nil) View Source

Link to this function

program(body, sourceType \\ :script, loc \\ nil) View Source
program(
  [ESTree.Statement.t()],
  :script | :module,
  ESTree.SourceLocation.t() | nil
) :: ESTree.Program.t()

Link to this function

property(key, value, kind \\ :init, shorthand \\ false, method \\ false, computed \\ false, loc \\ nil) View Source
property(
  ESTree.Expression.t(),
  ESTree.Expression.t(),
  :init | :get | :set,
  boolean(),
  boolean(),
  boolean(),
  ESTree.SourceLocation.t() | nil
) :: ESTree.Property.t()

Link to this function

rest_element(argument, loc \\ nil) View Source

Link to this function

return_statement(argument, loc \\ nil) View Source
return_statement(ESTree.Expression.t() | nil, ESTree.SourceLocation.t() | nil) ::
  ESTree.ReturnStatement.t()

Link to this function

sequence_expression(expressions, loc \\ nil) View Source

Link to this function

source_location(source, start, the_end) View Source

Link to this function

spread_element(argument, loc \\ nil) View Source

Link to this function

switch_case(test, consequent, loc \\ nil) View Source

Link to this function

switch_statement(discriminant, cases, loc \\ nil) View Source

Link to this function

tagged_template_expression(tag, quasi, loc \\ nil) View Source

Link to this function

template_element(raw, cooked_value, tail, loc \\ nil) View Source
template_element(binary(), binary(), boolean(), ESTree.SourceLocation.t() | nil) ::
  ESTree.TemplateElement.t()

Link to this function

template_literal(quasis, expressions, loc \\ nil) View Source

Link to this function

this_expression(loc \\ nil) View Source
this_expression(ESTree.SourceLocation.t() | nil) :: ESTree.ThisExpression.t()

Link to this function

throw_statement(argument, loc \\ nil) View Source

Link to this function

try_statement(block, handler, finalizer \\ nil, loc \\ nil) View Source

Link to this function

unary_expression(operator, prefix, argument, loc \\ nil) View Source

Link to this function

update_expression(operator, argument, prefix, loc \\ nil) View Source

Link to this function

variable_declaration(declarations, kind \\ :var, loc \\ nil) View Source
variable_declaration(
  [ESTree.VariableDeclarator.t()],
  :var | :let | :const,
  ESTree.SourceLocation.t() | nil
) :: ESTree.VariableDeclaration.t()

Link to this function

variable_declarator(id, init \\ nil, loc \\ nil) View Source

Link to this function

while_statement(test, body, loc \\ nil) View Source

Link to this function

with_statement(object, body, loc \\ nil) View Source

Link to this function

yield_expression(argument \\ nil, delegate \\ false, loc \\ nil) View Source
yield_expression(
  ESTree.Expression.t() | nil,
  boolean(),
  ESTree.SourceLocation.t() | nil
) :: ESTree.YieldExpression.t()