module SyntaxTree::DSL

This module provides shortcuts for creating AST nodes.

Public Instance Methods

ARef(collection, index) click to toggle source

Create a new ARef node.

# File lib/syntax_tree/dsl.rb, line 40
def ARef(collection, index)
  ARef.new(collection: collection, index: index, location: Location.default)
end
ARefField(collection, index) click to toggle source

Create a new ARefField node.

# File lib/syntax_tree/dsl.rb, line 45
def ARefField(collection, index)
  ARefField.new(
    collection: collection,
    index: index,
    location: Location.default
  )
end
AliasNode(left, right) click to toggle source

Create a new AliasNode node.

# File lib/syntax_tree/dsl.rb, line 35
def AliasNode(left, right)
  AliasNode.new(left: left, right: right, location: Location.default)
end
ArgBlock(value) click to toggle source

Create a new ArgBlock node.

# File lib/syntax_tree/dsl.rb, line 64
def ArgBlock(value)
  ArgBlock.new(value: value, location: Location.default)
end
ArgParen(arguments) click to toggle source

Create a new ArgParen node.

# File lib/syntax_tree/dsl.rb, line 54
def ArgParen(arguments)
  ArgParen.new(arguments: arguments, location: Location.default)
end
ArgStar(value) click to toggle source

Create a new ArgStar node.

# File lib/syntax_tree/dsl.rb, line 69
def ArgStar(value)
  ArgStar.new(value: value, location: Location.default)
end
Args(parts) click to toggle source

Create a new Args node.

# File lib/syntax_tree/dsl.rb, line 59
def Args(parts)
  Args.new(parts: parts, location: Location.default)
end
ArgsForward() click to toggle source

Create a new ArgsForward node.

# File lib/syntax_tree/dsl.rb, line 74
def ArgsForward
  ArgsForward.new(location: Location.default)
end
ArrayLiteral(lbracket, contents) click to toggle source

Create a new ArrayLiteral node.

# File lib/syntax_tree/dsl.rb, line 79
def ArrayLiteral(lbracket, contents)
  ArrayLiteral.new(
    lbracket: lbracket,
    contents: contents,
    location: Location.default
  )
end
AryPtn(constant, requireds, rest, posts) click to toggle source

Create a new AryPtn node.

# File lib/syntax_tree/dsl.rb, line 88
def AryPtn(constant, requireds, rest, posts)
  AryPtn.new(
    constant: constant,
    requireds: requireds,
    rest: rest,
    posts: posts,
    location: Location.default
  )
end
Assign(target, value) click to toggle source

Create a new Assign node.

# File lib/syntax_tree/dsl.rb, line 99
def Assign(target, value)
  Assign.new(target: target, value: value, location: Location.default)
end
Assoc(key, value) click to toggle source

Create a new Assoc node.

# File lib/syntax_tree/dsl.rb, line 104
def Assoc(key, value)
  Assoc.new(key: key, value: value, location: Location.default)
end
AssocSplat(value) click to toggle source

Create a new AssocSplat node.

# File lib/syntax_tree/dsl.rb, line 109
def AssocSplat(value)
  AssocSplat.new(value: value, location: Location.default)
end
BEGINBlock(lbrace, statements) click to toggle source

Create a new BEGINBlock node.

# File lib/syntax_tree/dsl.rb, line 7
def BEGINBlock(lbrace, statements)
  BEGINBlock.new(
    lbrace: lbrace,
    statements: statements,
    location: Location.default
  )
end
Backref(value) click to toggle source

Create a new Backref node.

# File lib/syntax_tree/dsl.rb, line 114
def Backref(value)
  Backref.new(value: value, location: Location.default)
end
Backtick(value) click to toggle source

Create a new Backtick node.

# File lib/syntax_tree/dsl.rb, line 119
def Backtick(value)
  Backtick.new(value: value, location: Location.default)
end
BareAssocHash(assocs) click to toggle source

Create a new BareAssocHash node.

# File lib/syntax_tree/dsl.rb, line 124
def BareAssocHash(assocs)
  BareAssocHash.new(assocs: assocs, location: Location.default)
end
Begin(bodystmt) click to toggle source

Create a new Begin node.

# File lib/syntax_tree/dsl.rb, line 129
def Begin(bodystmt)
  Begin.new(bodystmt: bodystmt, location: Location.default)
end
Binary(left, operator, right) click to toggle source

Create a new Binary node.

# File lib/syntax_tree/dsl.rb, line 139
def Binary(left, operator, right)
  Binary.new(
    left: left,
    operator: operator,
    right: right,
    location: Location.default
  )
end
BlockArg(name) click to toggle source

Create a new BlockArg node.

# File lib/syntax_tree/dsl.rb, line 154
def BlockArg(name)
  BlockArg.new(name: name, location: Location.default)
end
BlockNode(opening, block_var, bodystmt) click to toggle source

Create a new BlockNode node.

# File lib/syntax_tree/dsl.rb, line 317
def BlockNode(opening, block_var, bodystmt)
  BlockNode.new(
    opening: opening,
    block_var: block_var,
    bodystmt: bodystmt,
    location: Location.default
  )
end
BlockVar(params, locals) click to toggle source

Create a new BlockVar node.

# File lib/syntax_tree/dsl.rb, line 149
def BlockVar(params, locals)
  BlockVar.new(params: params, locals: locals, location: Location.default)
end
BodyStmt( statements, rescue_clause, else_keyword, else_clause, ensure_clause ) click to toggle source

Create a new BodyStmt node.

# File lib/syntax_tree/dsl.rb, line 159
def BodyStmt(
  statements,
  rescue_clause,
  else_keyword,
  else_clause,
  ensure_clause
)
  BodyStmt.new(
    statements: statements,
    rescue_clause: rescue_clause,
    else_keyword: else_keyword,
    else_clause: else_clause,
    ensure_clause: ensure_clause,
    location: Location.default
  )
end
Break(arguments) click to toggle source

Create a new Break node.

# File lib/syntax_tree/dsl.rb, line 177
def Break(arguments)
  Break.new(arguments: arguments, location: Location.default)
end
CHAR(value) click to toggle source

Create a new CHAR node.

# File lib/syntax_tree/dsl.rb, line 16
def CHAR(value)
  CHAR.new(value: value, location: Location.default)
end
CVar(value) click to toggle source

Create a new CVar node.

# File lib/syntax_tree/dsl.rb, line 288
def CVar(value)
  CVar.new(value: value, location: Location.default)
end
CallNode(receiver, operator, message, arguments) click to toggle source

Create a new CallNode node.

# File lib/syntax_tree/dsl.rb, line 182
def CallNode(receiver, operator, message, arguments)
  CallNode.new(
    receiver: receiver,
    operator: operator,
    message: message,
    arguments: arguments,
    location: Location.default
  )
end
Case(keyword, value, consequent) click to toggle source

Create a new Case node.

# File lib/syntax_tree/dsl.rb, line 193
def Case(keyword, value, consequent)
  Case.new(
    keyword: keyword,
    value: value,
    consequent: consequent,
    location: Location.default
  )
end
ClassDeclaration( constant, superclass, bodystmt, location = Location.default ) click to toggle source

Create a new ClassDeclaration node.

# File lib/syntax_tree/dsl.rb, line 213
def ClassDeclaration(
  constant,
  superclass,
  bodystmt,
  location = Location.default
)
  ClassDeclaration.new(
    constant: constant,
    superclass: superclass,
    bodystmt: bodystmt,
    location: location
  )
end
Comma(value) click to toggle source

Create a new Comma node.

# File lib/syntax_tree/dsl.rb, line 228
def Comma(value)
  Comma.new(value: value, location: Location.default)
end
Command(message, arguments, block, location = Location.default) click to toggle source

Create a new Command node.

# File lib/syntax_tree/dsl.rb, line 233
def Command(message, arguments, block, location = Location.default)
  Command.new(
    message: message,
    arguments: arguments,
    block: block,
    location: location
  )
end
CommandCall(receiver, operator, message, arguments, block) click to toggle source

Create a new CommandCall node.

# File lib/syntax_tree/dsl.rb, line 243
def CommandCall(receiver, operator, message, arguments, block)
  CommandCall.new(
    receiver: receiver,
    operator: operator,
    message: message,
    arguments: arguments,
    block: block,
    location: Location.default
  )
end
Comment(value, inline, location = Location.default) click to toggle source

Create a new Comment node.

# File lib/syntax_tree/dsl.rb, line 255
def Comment(value, inline, location = Location.default)
  Comment.new(value: value, inline: inline, location: location)
end
Const(value) click to toggle source

Create a new Const node.

# File lib/syntax_tree/dsl.rb, line 260
def Const(value)
  Const.new(value: value, location: Location.default)
end
ConstPathField(parent, constant) click to toggle source

Create a new ConstPathField node.

# File lib/syntax_tree/dsl.rb, line 265
def ConstPathField(parent, constant)
  ConstPathField.new(
    parent: parent,
    constant: constant,
    location: Location.default
  )
end
ConstPathRef(parent, constant) click to toggle source

Create a new ConstPathRef node.

# File lib/syntax_tree/dsl.rb, line 274
def ConstPathRef(parent, constant)
  ConstPathRef.new(
    parent: parent,
    constant: constant,
    location: Location.default
  )
end
ConstRef(constant) click to toggle source

Create a new ConstRef node.

# File lib/syntax_tree/dsl.rb, line 283
def ConstRef(constant)
  ConstRef.new(constant: constant, location: Location.default)
end
DefNode( target, operator, name, params, bodystmt, location = Location.default ) click to toggle source

Create a new DefNode node.

# File lib/syntax_tree/dsl.rb, line 293
def DefNode(
  target,
  operator,
  name,
  params,
  bodystmt,
  location = Location.default
)
  DefNode.new(
    target: target,
    operator: operator,
    name: name,
    params: params,
    bodystmt: bodystmt,
    location: location
  )
end
Defined(value) click to toggle source

Create a new Defined node.

# File lib/syntax_tree/dsl.rb, line 312
def Defined(value)
  Defined.new(value: value, location: Location.default)
end
DynaSymbol(parts, quote) click to toggle source

Create a new DynaSymbol node.

# File lib/syntax_tree/dsl.rb, line 337
def DynaSymbol(parts, quote)
  DynaSymbol.new(parts: parts, quote: quote, location: Location.default)
end
ENDBlock(lbrace, statements) click to toggle source

Create a new ENDBlock node.

# File lib/syntax_tree/dsl.rb, line 21
def ENDBlock(lbrace, statements)
  ENDBlock.new(
    lbrace: lbrace,
    statements: statements,
    location: Location.default
  )
end
Else(keyword, statements) click to toggle source

Create a new Else node.

# File lib/syntax_tree/dsl.rb, line 342
def Else(keyword, statements)
  Else.new(
    keyword: keyword,
    statements: statements,
    location: Location.default
  )
end
Elsif(predicate, statements, consequent) click to toggle source

Create a new Elsif node.

# File lib/syntax_tree/dsl.rb, line 351
def Elsif(predicate, statements, consequent)
  Elsif.new(
    predicate: predicate,
    statements: statements,
    consequent: consequent,
    location: Location.default
  )
end
EmbDoc(value) click to toggle source

Create a new EmbDoc node.

# File lib/syntax_tree/dsl.rb, line 361
def EmbDoc(value)
  EmbDoc.new(value: value, location: Location.default)
end
EmbExprBeg(value) click to toggle source

Create a new EmbExprBeg node.

# File lib/syntax_tree/dsl.rb, line 366
def EmbExprBeg(value)
  EmbExprBeg.new(value: value, location: Location.default)
end
EmbExprEnd(value) click to toggle source

Create a new EmbExprEnd node.

# File lib/syntax_tree/dsl.rb, line 371
def EmbExprEnd(value)
  EmbExprEnd.new(value: value, location: Location.default)
end
EmbVar(value) click to toggle source

Create a new EmbVar node.

# File lib/syntax_tree/dsl.rb, line 376
def EmbVar(value)
  EmbVar.new(value: value, location: Location.default)
end
EndContent(value) click to toggle source

Create a new EndContent node.

# File lib/syntax_tree/dsl.rb, line 30
def EndContent(value)
  EndContent.new(value: value, location: Location.default)
end
Ensure(keyword, statements) click to toggle source

Create a new Ensure node.

# File lib/syntax_tree/dsl.rb, line 381
def Ensure(keyword, statements)
  Ensure.new(
    keyword: keyword,
    statements: statements,
    location: Location.default
  )
end
ExcessedComma(value) click to toggle source

Create a new ExcessedComma node.

# File lib/syntax_tree/dsl.rb, line 390
def ExcessedComma(value)
  ExcessedComma.new(value: value, location: Location.default)
end
Field(parent, operator, name) click to toggle source

Create a new Field node.

# File lib/syntax_tree/dsl.rb, line 395
def Field(parent, operator, name)
  Field.new(
    parent: parent,
    operator: operator,
    name: name,
    location: Location.default
  )
end
FloatLiteral(value) click to toggle source

Create a new FloatLiteral node.

# File lib/syntax_tree/dsl.rb, line 405
def FloatLiteral(value)
  FloatLiteral.new(value: value, location: Location.default)
end
FndPtn(constant, left, values, right) click to toggle source

Create a new FndPtn node.

# File lib/syntax_tree/dsl.rb, line 410
def FndPtn(constant, left, values, right)
  FndPtn.new(
    constant: constant,
    left: left,
    values: values,
    right: right,
    location: Location.default
  )
end
For(index, collection, statements) click to toggle source

Create a new For node.

# File lib/syntax_tree/dsl.rb, line 421
def For(index, collection, statements)
  For.new(
    index: index,
    collection: collection,
    statements: statements,
    location: Location.default
  )
end
GVar(value) click to toggle source

Create a new GVar node.

# File lib/syntax_tree/dsl.rb, line 431
def GVar(value)
  GVar.new(value: value, location: Location.default)
end
HashLiteral(lbrace, assocs) click to toggle source

Create a new HashLiteral node.

# File lib/syntax_tree/dsl.rb, line 436
def HashLiteral(lbrace, assocs)
  HashLiteral.new(
    lbrace: lbrace,
    assocs: assocs,
    location: Location.default
  )
end
Heredoc(beginning, ending, dedent, parts) click to toggle source

Create a new Heredoc node.

# File lib/syntax_tree/dsl.rb, line 445
def Heredoc(beginning, ending, dedent, parts)
  Heredoc.new(
    beginning: beginning,
    ending: ending,
    dedent: dedent,
    parts: parts,
    location: Location.default
  )
end
HeredocBeg(value) click to toggle source

Create a new HeredocBeg node.

# File lib/syntax_tree/dsl.rb, line 456
def HeredocBeg(value)
  HeredocBeg.new(value: value, location: Location.default)
end
HeredocEnd(value) click to toggle source

Create a new HeredocEnd node.

# File lib/syntax_tree/dsl.rb, line 461
def HeredocEnd(value)
  HeredocEnd.new(value: value, location: Location.default)
end
HshPtn(constant, keywords, keyword_rest) click to toggle source

Create a new HshPtn node.

# File lib/syntax_tree/dsl.rb, line 466
def HshPtn(constant, keywords, keyword_rest)
  HshPtn.new(
    constant: constant,
    keywords: keywords,
    keyword_rest: keyword_rest,
    location: Location.default
  )
end
IVar(value) click to toggle source

Create a new IVar node.

# File lib/syntax_tree/dsl.rb, line 521
def IVar(value)
  IVar.new(value: value, location: Location.default)
end
Ident(value) click to toggle source

Create a new Ident node.

# File lib/syntax_tree/dsl.rb, line 476
def Ident(value)
  Ident.new(value: value, location: Location.default)
end
IfNode(predicate, statements, consequent) click to toggle source

Create a new IfNode node.

# File lib/syntax_tree/dsl.rb, line 481
def IfNode(predicate, statements, consequent)
  IfNode.new(
    predicate: predicate,
    statements: statements,
    consequent: consequent,
    location: Location.default
  )
end
IfOp(predicate, truthy, falsy) click to toggle source

Create a new IfOp node.

# File lib/syntax_tree/dsl.rb, line 491
def IfOp(predicate, truthy, falsy)
  IfOp.new(
    predicate: predicate,
    truthy: truthy,
    falsy: falsy,
    location: Location.default
  )
end
Imaginary(value) click to toggle source

Create a new Imaginary node.

# File lib/syntax_tree/dsl.rb, line 501
def Imaginary(value)
  Imaginary.new(value: value, location: Location.default)
end
In(pattern, statements, consequent) click to toggle source

Create a new In node.

# File lib/syntax_tree/dsl.rb, line 506
def In(pattern, statements, consequent)
  In.new(
    pattern: pattern,
    statements: statements,
    consequent: consequent,
    location: Location.default
  )
end
Int(value) click to toggle source

Create a new Int node.

# File lib/syntax_tree/dsl.rb, line 516
def Int(value)
  Int.new(value: value, location: Location.default)
end
Kw(value) click to toggle source

Create a new Kw node.

# File lib/syntax_tree/dsl.rb, line 526
def Kw(value)
  Kw.new(value: value, location: Location.default)
end
KwRestParam(name) click to toggle source

Create a new KwRestParam node.

# File lib/syntax_tree/dsl.rb, line 531
def KwRestParam(name)
  KwRestParam.new(name: name, location: Location.default)
end
LBrace(value) click to toggle source

Create a new LBrace node.

# File lib/syntax_tree/dsl.rb, line 560
def LBrace(value)
  LBrace.new(value: value, location: Location.default)
end
LBracket(value) click to toggle source

Create a new LBracket node.

# File lib/syntax_tree/dsl.rb, line 565
def LBracket(value)
  LBracket.new(value: value, location: Location.default)
end
LParen(value) click to toggle source

Create a new LParen node.

# File lib/syntax_tree/dsl.rb, line 570
def LParen(value)
  LParen.new(value: value, location: Location.default)
end
Label(value) click to toggle source

Create a new Label node.

# File lib/syntax_tree/dsl.rb, line 536
def Label(value)
  Label.new(value: value, location: Location.default)
end
LabelEnd(value) click to toggle source

Create a new LabelEnd node.

# File lib/syntax_tree/dsl.rb, line 541
def LabelEnd(value)
  LabelEnd.new(value: value, location: Location.default)
end
Lambda(params, statements) click to toggle source

Create a new Lambda node.

# File lib/syntax_tree/dsl.rb, line 546
def Lambda(params, statements)
  Lambda.new(
    params: params,
    statements: statements,
    location: Location.default
  )
end
LambdaVar(params, locals) click to toggle source

Create a new LambdaVar node.

# File lib/syntax_tree/dsl.rb, line 555
def LambdaVar(params, locals)
  LambdaVar.new(params: params, locals: locals, location: Location.default)
end
MAssign(target, value) click to toggle source

Create a new MAssign node.

# File lib/syntax_tree/dsl.rb, line 575
def MAssign(target, value)
  MAssign.new(target: target, value: value, location: Location.default)
end
MLHS(parts, comma) click to toggle source

Create a new MLHS node.

# File lib/syntax_tree/dsl.rb, line 585
def MLHS(parts, comma)
  MLHS.new(parts: parts, comma: comma, location: Location.default)
end
MLHSParen(contents, comma) click to toggle source

Create a new MLHSParen node.

# File lib/syntax_tree/dsl.rb, line 590
def MLHSParen(contents, comma)
  MLHSParen.new(
    contents: contents,
    comma: comma,
    location: Location.default
  )
end
MRHS(parts) click to toggle source

Create a new MRHS node.

# File lib/syntax_tree/dsl.rb, line 608
def MRHS(parts)
  MRHS.new(parts: parts, location: Location.default)
end
MethodAddBlock(call, block, location = Location.default) click to toggle source

Create a new MethodAddBlock node.

# File lib/syntax_tree/dsl.rb, line 580
def MethodAddBlock(call, block, location = Location.default)
  MethodAddBlock.new(call: call, block: block, location: location)
end
ModuleDeclaration(constant, bodystmt) click to toggle source

Create a new ModuleDeclaration node.

# File lib/syntax_tree/dsl.rb, line 599
def ModuleDeclaration(constant, bodystmt)
  ModuleDeclaration.new(
    constant: constant,
    bodystmt: bodystmt,
    location: Location.default
  )
end
Next(arguments) click to toggle source

Create a new Next node.

# File lib/syntax_tree/dsl.rb, line 613
def Next(arguments)
  Next.new(arguments: arguments, location: Location.default)
end
Not(statement, parentheses) click to toggle source

Create a new Not node.

# File lib/syntax_tree/dsl.rb, line 892
def Not(statement, parentheses)
  Not.new(
    statement: statement,
    parentheses: parentheses,
    location: Location.default
  )
end
Op(value) click to toggle source

Create a new Op node.

# File lib/syntax_tree/dsl.rb, line 618
def Op(value)
  Op.new(value: value, location: Location.default)
end
OpAssign(target, operator, value) click to toggle source

Create a new OpAssign node.

# File lib/syntax_tree/dsl.rb, line 623
def OpAssign(target, operator, value)
  OpAssign.new(
    target: target,
    operator: operator,
    value: value,
    location: Location.default
  )
end
Params(requireds, optionals, rest, posts, keywords, keyword_rest, block) click to toggle source

Create a new Params node.

# File lib/syntax_tree/dsl.rb, line 633
def Params(requireds, optionals, rest, posts, keywords, keyword_rest, block)
  Params.new(
    requireds: requireds,
    optionals: optionals,
    rest: rest,
    posts: posts,
    keywords: keywords,
    keyword_rest: keyword_rest,
    block: block,
    location: Location.default
  )
end
Paren(lparen, contents) click to toggle source

Create a new Paren node.

# File lib/syntax_tree/dsl.rb, line 647
def Paren(lparen, contents)
  Paren.new(lparen: lparen, contents: contents, location: Location.default)
end
Period(value) click to toggle source

Create a new Period node.

# File lib/syntax_tree/dsl.rb, line 652
def Period(value)
  Period.new(value: value, location: Location.default)
end
PinnedBegin(statement) click to toggle source

Create a new PinnedBegin node.

# File lib/syntax_tree/dsl.rb, line 134
def PinnedBegin(statement)
  PinnedBegin.new(statement: statement, location: Location.default)
end
PinnedVarRef(value) click to toggle source

Create a new PinnedVarRef node.

# File lib/syntax_tree/dsl.rb, line 944
def PinnedVarRef(value)
  PinnedVarRef.new(value: value, location: Location.default)
end
Program(statements) click to toggle source

Create a new Program node.

# File lib/syntax_tree/dsl.rb, line 657
def Program(statements)
  Program.new(statements: statements, location: Location.default)
end
QSymbols(beginning, elements) click to toggle source

Create a new QSymbols node.

# File lib/syntax_tree/dsl.rb, line 662
def QSymbols(beginning, elements)
  QSymbols.new(
    beginning: beginning,
    elements: elements,
    location: Location.default
  )
end
QSymbolsBeg(value) click to toggle source

Create a new QSymbolsBeg node.

# File lib/syntax_tree/dsl.rb, line 671
def QSymbolsBeg(value)
  QSymbolsBeg.new(value: value, location: Location.default)
end
QWords(beginning, elements) click to toggle source

Create a new QWords node.

# File lib/syntax_tree/dsl.rb, line 676
def QWords(beginning, elements)
  QWords.new(
    beginning: beginning,
    elements: elements,
    location: Location.default
  )
end
QWordsBeg(value) click to toggle source

Create a new QWordsBeg node.

# File lib/syntax_tree/dsl.rb, line 685
def QWordsBeg(value)
  QWordsBeg.new(value: value, location: Location.default)
end
RAssign(value, operator, pattern) click to toggle source

Create a new RAssign node.

# File lib/syntax_tree/dsl.rb, line 203
def RAssign(value, operator, pattern)
  RAssign.new(
    value: value,
    operator: operator,
    pattern: pattern,
    location: Location.default
  )
end
RBrace(value) click to toggle source

Create a new RBrace node.

# File lib/syntax_tree/dsl.rb, line 695
def RBrace(value)
  RBrace.new(value: value, location: Location.default)
end
RBracket(value) click to toggle source

Create a new RBracket node.

# File lib/syntax_tree/dsl.rb, line 700
def RBracket(value)
  RBracket.new(value: value, location: Location.default)
end
RParen(value) click to toggle source

Create a new RParen node.

# File lib/syntax_tree/dsl.rb, line 783
def RParen(value)
  RParen.new(value: value, location: Location.default)
end
RangeNode(left, operator, right) click to toggle source

Create a new RangeNode node.

# File lib/syntax_tree/dsl.rb, line 327
def RangeNode(left, operator, right)
  RangeNode.new(
    left: left,
    operator: operator,
    right: right,
    location: Location.default
  )
end
RationalLiteral(value) click to toggle source

Create a new RationalLiteral node.

# File lib/syntax_tree/dsl.rb, line 690
def RationalLiteral(value)
  RationalLiteral.new(value: value, location: Location.default)
end
Redo() click to toggle source

Create a new Redo node.

# File lib/syntax_tree/dsl.rb, line 705
def Redo
  Redo.new(location: Location.default)
end
RegexpBeg(value) click to toggle source

Create a new RegexpBeg node.

# File lib/syntax_tree/dsl.rb, line 719
def RegexpBeg(value)
  RegexpBeg.new(value: value, location: Location.default)
end
RegexpContent(beginning, parts) click to toggle source

Create a new RegexpContent node.

# File lib/syntax_tree/dsl.rb, line 710
def RegexpContent(beginning, parts)
  RegexpContent.new(
    beginning: beginning,
    parts: parts,
    location: Location.default
  )
end
RegexpEnd(value) click to toggle source

Create a new RegexpEnd node.

# File lib/syntax_tree/dsl.rb, line 724
def RegexpEnd(value)
  RegexpEnd.new(value: value, location: Location.default)
end
RegexpLiteral(beginning, ending, parts) click to toggle source

Create a new RegexpLiteral node.

# File lib/syntax_tree/dsl.rb, line 729
def RegexpLiteral(beginning, ending, parts)
  RegexpLiteral.new(
    beginning: beginning,
    ending: ending,
    parts: parts,
    location: Location.default
  )
end
Rescue(keyword, exception, statements, consequent) click to toggle source

Create a new Rescue node.

# File lib/syntax_tree/dsl.rb, line 748
def Rescue(keyword, exception, statements, consequent)
  Rescue.new(
    keyword: keyword,
    exception: exception,
    statements: statements,
    consequent: consequent,
    location: Location.default
  )
end
RescueEx(exceptions, variable) click to toggle source

Create a new RescueEx node.

# File lib/syntax_tree/dsl.rb, line 739
def RescueEx(exceptions, variable)
  RescueEx.new(
    exceptions: exceptions,
    variable: variable,
    location: Location.default
  )
end
RescueMod(statement, value) click to toggle source

Create a new RescueMod node.

# File lib/syntax_tree/dsl.rb, line 759
def RescueMod(statement, value)
  RescueMod.new(
    statement: statement,
    value: value,
    location: Location.default
  )
end
RestParam(name) click to toggle source

Create a new RestParam node.

# File lib/syntax_tree/dsl.rb, line 768
def RestParam(name)
  RestParam.new(name: name, location: Location.default)
end
Retry() click to toggle source

Create a new Retry node.

# File lib/syntax_tree/dsl.rb, line 773
def Retry
  Retry.new(location: Location.default)
end
ReturnNode(arguments) click to toggle source

Create a new ReturnNode node.

# File lib/syntax_tree/dsl.rb, line 778
def ReturnNode(arguments)
  ReturnNode.new(arguments: arguments, location: Location.default)
end
SClass(target, bodystmt) click to toggle source

Create a new SClass node.

# File lib/syntax_tree/dsl.rb, line 788
def SClass(target, bodystmt)
  SClass.new(target: target, bodystmt: bodystmt, location: Location.default)
end
Statements(body) click to toggle source

Create a new Statements node.

# File lib/syntax_tree/dsl.rb, line 793
def Statements(body)
  Statements.new(body: body, location: Location.default)
end
StringConcat(left, right) click to toggle source

Create a new StringConcat node.

# File lib/syntax_tree/dsl.rb, line 803
def StringConcat(left, right)
  StringConcat.new(left: left, right: right, location: Location.default)
end
StringContent(parts) click to toggle source

Create a new StringContent node.

# File lib/syntax_tree/dsl.rb, line 798
def StringContent(parts)
  StringContent.new(parts: parts, location: Location.default)
end
StringDVar(variable) click to toggle source

Create a new StringDVar node.

# File lib/syntax_tree/dsl.rb, line 808
def StringDVar(variable)
  StringDVar.new(variable: variable, location: Location.default)
end
StringEmbExpr(statements) click to toggle source

Create a new StringEmbExpr node.

# File lib/syntax_tree/dsl.rb, line 813
def StringEmbExpr(statements)
  StringEmbExpr.new(statements: statements, location: Location.default)
end
StringLiteral(parts, quote) click to toggle source

Create a new StringLiteral node.

# File lib/syntax_tree/dsl.rb, line 818
def StringLiteral(parts, quote)
  StringLiteral.new(parts: parts, quote: quote, location: Location.default)
end
Super(arguments) click to toggle source

Create a new Super node.

# File lib/syntax_tree/dsl.rb, line 823
def Super(arguments)
  Super.new(arguments: arguments, location: Location.default)
end
SymBeg(value) click to toggle source

Create a new SymBeg node.

# File lib/syntax_tree/dsl.rb, line 828
def SymBeg(value)
  SymBeg.new(value: value, location: Location.default)
end
SymbolContent(value) click to toggle source

Create a new SymbolContent node.

# File lib/syntax_tree/dsl.rb, line 833
def SymbolContent(value)
  SymbolContent.new(value: value, location: Location.default)
end
SymbolLiteral(value) click to toggle source

Create a new SymbolLiteral node.

# File lib/syntax_tree/dsl.rb, line 838
def SymbolLiteral(value)
  SymbolLiteral.new(value: value, location: Location.default)
end
Symbols(beginning, elements) click to toggle source

Create a new Symbols node.

# File lib/syntax_tree/dsl.rb, line 843
def Symbols(beginning, elements)
  Symbols.new(
    beginning: beginning,
    elements: elements,
    location: Location.default
  )
end
SymbolsBeg(value) click to toggle source

Create a new SymbolsBeg node.

# File lib/syntax_tree/dsl.rb, line 852
def SymbolsBeg(value)
  SymbolsBeg.new(value: value, location: Location.default)
end
TLamBeg(value) click to toggle source

Create a new TLamBeg node.

# File lib/syntax_tree/dsl.rb, line 862
def TLamBeg(value)
  TLamBeg.new(value: value, location: Location.default)
end
TLambda(value) click to toggle source

Create a new TLambda node.

# File lib/syntax_tree/dsl.rb, line 857
def TLambda(value)
  TLambda.new(value: value, location: Location.default)
end
TStringBeg(value) click to toggle source

Create a new TStringBeg node.

# File lib/syntax_tree/dsl.rb, line 877
def TStringBeg(value)
  TStringBeg.new(value: value, location: Location.default)
end
TStringContent(value) click to toggle source

Create a new TStringContent node.

# File lib/syntax_tree/dsl.rb, line 882
def TStringContent(value)
  TStringContent.new(value: value, location: Location.default)
end
TStringEnd(value) click to toggle source

Create a new TStringEnd node.

# File lib/syntax_tree/dsl.rb, line 887
def TStringEnd(value)
  TStringEnd.new(value: value, location: Location.default)
end
TopConstField(constant) click to toggle source

Create a new TopConstField node.

# File lib/syntax_tree/dsl.rb, line 867
def TopConstField(constant)
  TopConstField.new(constant: constant, location: Location.default)
end
TopConstRef(constant) click to toggle source

Create a new TopConstRef node.

# File lib/syntax_tree/dsl.rb, line 872
def TopConstRef(constant)
  TopConstRef.new(constant: constant, location: Location.default)
end
Unary(operator, statement) click to toggle source

Create a new Unary node.

# File lib/syntax_tree/dsl.rb, line 901
def Unary(operator, statement)
  Unary.new(
    operator: operator,
    statement: statement,
    location: Location.default
  )
end
Undef(symbols) click to toggle source

Create a new Undef node.

# File lib/syntax_tree/dsl.rb, line 910
def Undef(symbols)
  Undef.new(symbols: symbols, location: Location.default)
end
UnlessNode(predicate, statements, consequent) click to toggle source

Create a new UnlessNode node.

# File lib/syntax_tree/dsl.rb, line 915
def UnlessNode(predicate, statements, consequent)
  UnlessNode.new(
    predicate: predicate,
    statements: statements,
    consequent: consequent,
    location: Location.default
  )
end
UntilNode(predicate, statements) click to toggle source

Create a new UntilNode node.

# File lib/syntax_tree/dsl.rb, line 925
def UntilNode(predicate, statements)
  UntilNode.new(
    predicate: predicate,
    statements: statements,
    location: Location.default
  )
end
VCall(value) click to toggle source

Create a new VCall node.

# File lib/syntax_tree/dsl.rb, line 949
def VCall(value)
  VCall.new(value: value, location: Location.default)
end
VarField(value) click to toggle source

Create a new VarField node.

# File lib/syntax_tree/dsl.rb, line 934
def VarField(value)
  VarField.new(value: value, location: Location.default)
end
VarRef(value) click to toggle source

Create a new VarRef node.

# File lib/syntax_tree/dsl.rb, line 939
def VarRef(value)
  VarRef.new(value: value, location: Location.default)
end
VoidStmt() click to toggle source

Create a new VoidStmt node.

# File lib/syntax_tree/dsl.rb, line 954
def VoidStmt
  VoidStmt.new(location: Location.default)
end
When(arguments, statements, consequent) click to toggle source

Create a new When node.

# File lib/syntax_tree/dsl.rb, line 959
def When(arguments, statements, consequent)
  When.new(
    arguments: arguments,
    statements: statements,
    consequent: consequent,
    location: Location.default
  )
end
WhileNode(predicate, statements) click to toggle source

Create a new WhileNode node.

# File lib/syntax_tree/dsl.rb, line 969
def WhileNode(predicate, statements)
  WhileNode.new(
    predicate: predicate,
    statements: statements,
    location: Location.default
  )
end
Word(parts) click to toggle source

Create a new Word node.

# File lib/syntax_tree/dsl.rb, line 978
def Word(parts)
  Word.new(parts: parts, location: Location.default)
end
Words(beginning, elements) click to toggle source

Create a new Words node.

# File lib/syntax_tree/dsl.rb, line 983
def Words(beginning, elements)
  Words.new(
    beginning: beginning,
    elements: elements,
    location: Location.default
  )
end
WordsBeg(value) click to toggle source

Create a new WordsBeg node.

# File lib/syntax_tree/dsl.rb, line 992
def WordsBeg(value)
  WordsBeg.new(value: value, location: Location.default)
end
XString(parts) click to toggle source

Create a new XString node.

# File lib/syntax_tree/dsl.rb, line 997
def XString(parts)
  XString.new(parts: parts, location: Location.default)
end
XStringLiteral(parts) click to toggle source

Create a new XStringLiteral node.

# File lib/syntax_tree/dsl.rb, line 1002
def XStringLiteral(parts)
  XStringLiteral.new(parts: parts, location: Location.default)
end
YieldNode(arguments) click to toggle source

Create a new YieldNode node.

# File lib/syntax_tree/dsl.rb, line 1007
def YieldNode(arguments)
  YieldNode.new(arguments: arguments, location: Location.default)
end
ZSuper() click to toggle source

Create a new ZSuper node.

# File lib/syntax_tree/dsl.rb, line 1012
def ZSuper
  ZSuper.new(location: Location.default)
end