module SyntaxTree::DSL
This module provides shortcuts for creating AST nodes.
Public Instance Methods
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
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
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
Create a new ArgBlock
node.
# File lib/syntax_tree/dsl.rb, line 64 def ArgBlock(value) ArgBlock.new(value: value, location: Location.default) end
Create a new ArgParen
node.
# File lib/syntax_tree/dsl.rb, line 54 def ArgParen(arguments) ArgParen.new(arguments: arguments, location: Location.default) end
Create a new ArgStar
node.
# File lib/syntax_tree/dsl.rb, line 69 def ArgStar(value) ArgStar.new(value: value, location: Location.default) end
Create a new Args
node.
# File lib/syntax_tree/dsl.rb, line 59 def Args(parts) Args.new(parts: parts, location: Location.default) end
Create a new ArgsForward
node.
# File lib/syntax_tree/dsl.rb, line 74 def ArgsForward ArgsForward.new(location: Location.default) end
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
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
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
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
Create a new AssocSplat
node.
# File lib/syntax_tree/dsl.rb, line 109 def AssocSplat(value) AssocSplat.new(value: value, location: Location.default) end
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
Create a new Backref
node.
# File lib/syntax_tree/dsl.rb, line 114 def Backref(value) Backref.new(value: value, location: Location.default) end
Create a new Backtick
node.
# File lib/syntax_tree/dsl.rb, line 119 def Backtick(value) Backtick.new(value: value, location: Location.default) end
Create a new BareAssocHash
node.
# File lib/syntax_tree/dsl.rb, line 124 def BareAssocHash(assocs) BareAssocHash.new(assocs: assocs, location: Location.default) end
Create a new Begin
node.
# File lib/syntax_tree/dsl.rb, line 129 def Begin(bodystmt) Begin.new(bodystmt: bodystmt, location: Location.default) end
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
Create a new BlockArg
node.
# File lib/syntax_tree/dsl.rb, line 154 def BlockArg(name) BlockArg.new(name: name, location: Location.default) end
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
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
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
Create a new Break
node.
# File lib/syntax_tree/dsl.rb, line 177 def Break(arguments) Break.new(arguments: arguments, location: Location.default) end
Create a new CHAR
node.
# File lib/syntax_tree/dsl.rb, line 16 def CHAR(value) CHAR.new(value: value, location: Location.default) end
Create a new CVar
node.
# File lib/syntax_tree/dsl.rb, line 288 def CVar(value) CVar.new(value: value, location: Location.default) end
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
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
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
Create a new Comma
node.
# File lib/syntax_tree/dsl.rb, line 228 def Comma(value) Comma.new(value: value, location: Location.default) end
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
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
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
Create a new Const
node.
# File lib/syntax_tree/dsl.rb, line 260 def Const(value) Const.new(value: value, location: Location.default) end
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
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
Create a new ConstRef
node.
# File lib/syntax_tree/dsl.rb, line 283 def ConstRef(constant) ConstRef.new(constant: constant, location: Location.default) end
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
Create a new Defined
node.
# File lib/syntax_tree/dsl.rb, line 312 def Defined(value) Defined.new(value: value, location: Location.default) end
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
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
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
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
Create a new EmbDoc
node.
# File lib/syntax_tree/dsl.rb, line 361 def EmbDoc(value) EmbDoc.new(value: value, location: Location.default) end
Create a new EmbExprBeg
node.
# File lib/syntax_tree/dsl.rb, line 366 def EmbExprBeg(value) EmbExprBeg.new(value: value, location: Location.default) end
Create a new EmbExprEnd
node.
# File lib/syntax_tree/dsl.rb, line 371 def EmbExprEnd(value) EmbExprEnd.new(value: value, location: Location.default) end
Create a new EmbVar
node.
# File lib/syntax_tree/dsl.rb, line 376 def EmbVar(value) EmbVar.new(value: value, location: Location.default) end
Create a new EndContent
node.
# File lib/syntax_tree/dsl.rb, line 30 def EndContent(value) EndContent.new(value: value, location: Location.default) end
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
Create a new ExcessedComma
node.
# File lib/syntax_tree/dsl.rb, line 390 def ExcessedComma(value) ExcessedComma.new(value: value, location: Location.default) end
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
Create a new FloatLiteral
node.
# File lib/syntax_tree/dsl.rb, line 405 def FloatLiteral(value) FloatLiteral.new(value: value, location: Location.default) end
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
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
Create a new GVar
node.
# File lib/syntax_tree/dsl.rb, line 431 def GVar(value) GVar.new(value: value, location: Location.default) end
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
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
Create a new HeredocBeg
node.
# File lib/syntax_tree/dsl.rb, line 456 def HeredocBeg(value) HeredocBeg.new(value: value, location: Location.default) end
Create a new HeredocEnd
node.
# File lib/syntax_tree/dsl.rb, line 461 def HeredocEnd(value) HeredocEnd.new(value: value, location: Location.default) end
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
Create a new IVar
node.
# File lib/syntax_tree/dsl.rb, line 521 def IVar(value) IVar.new(value: value, location: Location.default) end
Create a new Ident
node.
# File lib/syntax_tree/dsl.rb, line 476 def Ident(value) Ident.new(value: value, location: Location.default) end
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
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
Create a new Imaginary
node.
# File lib/syntax_tree/dsl.rb, line 501 def Imaginary(value) Imaginary.new(value: value, location: Location.default) end
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
Create a new Int
node.
# File lib/syntax_tree/dsl.rb, line 516 def Int(value) Int.new(value: value, location: Location.default) end
Create a new Kw
node.
# File lib/syntax_tree/dsl.rb, line 526 def Kw(value) Kw.new(value: value, location: Location.default) end
Create a new KwRestParam
node.
# File lib/syntax_tree/dsl.rb, line 531 def KwRestParam(name) KwRestParam.new(name: name, location: Location.default) end
Create a new LBrace
node.
# File lib/syntax_tree/dsl.rb, line 560 def LBrace(value) LBrace.new(value: value, location: Location.default) end
Create a new LBracket
node.
# File lib/syntax_tree/dsl.rb, line 565 def LBracket(value) LBracket.new(value: value, location: Location.default) end
Create a new LParen
node.
# File lib/syntax_tree/dsl.rb, line 570 def LParen(value) LParen.new(value: value, location: Location.default) end
Create a new Label
node.
# File lib/syntax_tree/dsl.rb, line 536 def Label(value) Label.new(value: value, location: Location.default) end
Create a new LabelEnd
node.
# File lib/syntax_tree/dsl.rb, line 541 def LabelEnd(value) LabelEnd.new(value: value, location: Location.default) end
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
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
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
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
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
Create a new MRHS
node.
# File lib/syntax_tree/dsl.rb, line 608 def MRHS(parts) MRHS.new(parts: parts, location: Location.default) end
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
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
Create a new Next
node.
# File lib/syntax_tree/dsl.rb, line 613 def Next(arguments) Next.new(arguments: arguments, location: Location.default) end
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
Create a new Op
node.
# File lib/syntax_tree/dsl.rb, line 618 def Op(value) Op.new(value: value, location: Location.default) end
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
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
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
Create a new Period
node.
# File lib/syntax_tree/dsl.rb, line 652 def Period(value) Period.new(value: value, location: Location.default) end
Create a new PinnedBegin
node.
# File lib/syntax_tree/dsl.rb, line 134 def PinnedBegin(statement) PinnedBegin.new(statement: statement, location: Location.default) end
Create a new PinnedVarRef
node.
# File lib/syntax_tree/dsl.rb, line 944 def PinnedVarRef(value) PinnedVarRef.new(value: value, location: Location.default) end
Create a new Program
node.
# File lib/syntax_tree/dsl.rb, line 657 def Program(statements) Program.new(statements: statements, location: Location.default) end
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
Create a new QSymbolsBeg
node.
# File lib/syntax_tree/dsl.rb, line 671 def QSymbolsBeg(value) QSymbolsBeg.new(value: value, location: Location.default) end
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
Create a new QWordsBeg
node.
# File lib/syntax_tree/dsl.rb, line 685 def QWordsBeg(value) QWordsBeg.new(value: value, location: Location.default) end
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
Create a new RBrace
node.
# File lib/syntax_tree/dsl.rb, line 695 def RBrace(value) RBrace.new(value: value, location: Location.default) end
Create a new RBracket
node.
# File lib/syntax_tree/dsl.rb, line 700 def RBracket(value) RBracket.new(value: value, location: Location.default) end
Create a new RParen
node.
# File lib/syntax_tree/dsl.rb, line 783 def RParen(value) RParen.new(value: value, location: Location.default) end
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
Create a new RationalLiteral
node.
# File lib/syntax_tree/dsl.rb, line 690 def RationalLiteral(value) RationalLiteral.new(value: value, location: Location.default) end
Create a new Redo
node.
# File lib/syntax_tree/dsl.rb, line 705 def Redo Redo.new(location: Location.default) end
Create a new RegexpBeg
node.
# File lib/syntax_tree/dsl.rb, line 719 def RegexpBeg(value) RegexpBeg.new(value: value, location: Location.default) end
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
Create a new RegexpEnd
node.
# File lib/syntax_tree/dsl.rb, line 724 def RegexpEnd(value) RegexpEnd.new(value: value, location: Location.default) end
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
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
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
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
Create a new RestParam
node.
# File lib/syntax_tree/dsl.rb, line 768 def RestParam(name) RestParam.new(name: name, location: Location.default) end
Create a new Retry
node.
# File lib/syntax_tree/dsl.rb, line 773 def Retry Retry.new(location: Location.default) end
Create a new ReturnNode
node.
# File lib/syntax_tree/dsl.rb, line 778 def ReturnNode(arguments) ReturnNode.new(arguments: arguments, location: Location.default) end
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
Create a new Statements
node.
# File lib/syntax_tree/dsl.rb, line 793 def Statements(body) Statements.new(body: body, location: Location.default) end
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
Create a new StringContent
node.
# File lib/syntax_tree/dsl.rb, line 798 def StringContent(parts) StringContent.new(parts: parts, location: Location.default) end
Create a new StringDVar
node.
# File lib/syntax_tree/dsl.rb, line 808 def StringDVar(variable) StringDVar.new(variable: variable, location: Location.default) end
Create a new StringEmbExpr
node.
# File lib/syntax_tree/dsl.rb, line 813 def StringEmbExpr(statements) StringEmbExpr.new(statements: statements, location: Location.default) end
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
Create a new Super
node.
# File lib/syntax_tree/dsl.rb, line 823 def Super(arguments) Super.new(arguments: arguments, location: Location.default) end
Create a new SymBeg
node.
# File lib/syntax_tree/dsl.rb, line 828 def SymBeg(value) SymBeg.new(value: value, location: Location.default) end
Create a new SymbolContent
node.
# File lib/syntax_tree/dsl.rb, line 833 def SymbolContent(value) SymbolContent.new(value: value, location: Location.default) end
Create a new SymbolLiteral
node.
# File lib/syntax_tree/dsl.rb, line 838 def SymbolLiteral(value) SymbolLiteral.new(value: value, location: Location.default) end
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
Create a new SymbolsBeg
node.
# File lib/syntax_tree/dsl.rb, line 852 def SymbolsBeg(value) SymbolsBeg.new(value: value, location: Location.default) end
Create a new TLamBeg
node.
# File lib/syntax_tree/dsl.rb, line 862 def TLamBeg(value) TLamBeg.new(value: value, location: Location.default) end
Create a new TLambda
node.
# File lib/syntax_tree/dsl.rb, line 857 def TLambda(value) TLambda.new(value: value, location: Location.default) end
Create a new TStringBeg
node.
# File lib/syntax_tree/dsl.rb, line 877 def TStringBeg(value) TStringBeg.new(value: value, location: Location.default) end
Create a new TStringContent
node.
# File lib/syntax_tree/dsl.rb, line 882 def TStringContent(value) TStringContent.new(value: value, location: Location.default) end
Create a new TStringEnd
node.
# File lib/syntax_tree/dsl.rb, line 887 def TStringEnd(value) TStringEnd.new(value: value, location: Location.default) end
Create a new TopConstField
node.
# File lib/syntax_tree/dsl.rb, line 867 def TopConstField(constant) TopConstField.new(constant: constant, location: Location.default) end
Create a new TopConstRef
node.
# File lib/syntax_tree/dsl.rb, line 872 def TopConstRef(constant) TopConstRef.new(constant: constant, location: Location.default) end
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
Create a new Undef
node.
# File lib/syntax_tree/dsl.rb, line 910 def Undef(symbols) Undef.new(symbols: symbols, location: Location.default) end
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
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
Create a new VCall
node.
# File lib/syntax_tree/dsl.rb, line 949 def VCall(value) VCall.new(value: value, location: Location.default) end
Create a new VarField
node.
# File lib/syntax_tree/dsl.rb, line 934 def VarField(value) VarField.new(value: value, location: Location.default) end
Create a new VarRef
node.
# File lib/syntax_tree/dsl.rb, line 939 def VarRef(value) VarRef.new(value: value, location: Location.default) end
Create a new VoidStmt
node.
# File lib/syntax_tree/dsl.rb, line 954 def VoidStmt VoidStmt.new(location: Location.default) end
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
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
Create a new Word
node.
# File lib/syntax_tree/dsl.rb, line 978 def Word(parts) Word.new(parts: parts, location: Location.default) end
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
Create a new WordsBeg
node.
# File lib/syntax_tree/dsl.rb, line 992 def WordsBeg(value) WordsBeg.new(value: value, location: Location.default) end
Create a new XString
node.
# File lib/syntax_tree/dsl.rb, line 997 def XString(parts) XString.new(parts: parts, location: Location.default) end
Create a new XStringLiteral
node.
# File lib/syntax_tree/dsl.rb, line 1002 def XStringLiteral(parts) XStringLiteral.new(parts: parts, location: Location.default) end
Create a new YieldNode
node.
# File lib/syntax_tree/dsl.rb, line 1007 def YieldNode(arguments) YieldNode.new(arguments: arguments, location: Location.default) end
Create a new ZSuper
node.
# File lib/syntax_tree/dsl.rb, line 1012 def ZSuper ZSuper.new(location: Location.default) end