Documentation ¶
Index ¶
- type ArgumentPairExpression
- type ArrayExpression
- type AssignExpression
- type BaseNode
- func (b *BaseNode) IsArrayExpression(t *testing.T) *testableArrayExpression
- func (b *BaseNode) IsAssignExpression(t *testing.T) (ae *testableAssignExpression)
- func (b *BaseNode) IsBooleanExpression(t *testing.T) (ae *testableBooleanExpression)
- func (b *BaseNode) IsCallExpression(t *testing.T) (ce *testableCallExpression)
- func (b *BaseNode) IsClassStmt(t *testing.T) *testableClassStatement
- func (b *BaseNode) IsConditionalExpression(t *testing.T) *testableConditionalExpression
- func (b *BaseNode) IsConstant(t *testing.T) (c *testableConstant)
- func (b *BaseNode) IsDefStmt(t *testing.T) *testableDefStatement
- func (b *BaseNode) IsExp() bool
- func (b *BaseNode) IsExpression(t *testing.T) (te testableExpression)
- func (b *BaseNode) IsHashExpression(t *testing.T) *testableHashExpression
- func (b *BaseNode) IsIdentifier(t *testing.T) *testableIdentifier
- func (b *BaseNode) IsIfExpression(t *testing.T) *testableIfExpression
- func (b *BaseNode) IsInfixExpression(t *testing.T) (ie *testableInfixExpression)
- func (b *BaseNode) IsInstanceVariable(t *testing.T) (ie *testableInstanceVariable)
- func (b *BaseNode) IsIntegerLiteral(t *testing.T) (il *testableIntegerLiteral)
- func (b *BaseNode) IsModuleStmt(t *testing.T) *testableModuleStatement
- func (b *BaseNode) IsReturnStmt(t *testing.T) *testableReturnStatement
- func (b *BaseNode) IsSelfExpression(t *testing.T) (sl *testableSelfExpression)
- func (b *BaseNode) IsStmt() bool
- func (b *BaseNode) IsStringLiteral(t *testing.T) *testableStringLiteral
- func (b *BaseNode) IsWhileStmt(t *testing.T) (ws *testableWhileStatement)
- func (b *BaseNode) IsYieldExpression(t *testing.T) *testableYieldExpression
- func (b *BaseNode) Line() int
- func (b *BaseNode) MarkAsExp()
- func (b *BaseNode) MarkAsStmt()
- type BlockStatement
- type BooleanExpression
- type BreakStatement
- type CallExpression
- type ClassStatement
- type CodeBlock
- type ConditionalExpression
- type Constant
- type DefStatement
- type Expression
- type ExpressionStatement
- type FloatLiteral
- type GetBlockExpression
- type HashExpression
- type Identifier
- type IfExpression
- type InfixExpression
- type InstanceVariable
- type IntegerLiteral
- type ModuleStatement
- type MultiVariableExpression
- type NextStatement
- type NilExpression
- type PrefixExpression
- type Program
- type RangeExpression
- type ReturnStatement
- type SelfExpression
- type Statement
- type StringLiteral
- type TestableIdentifierValue
- type TestableStatement
- type Variable
- type WhileStatement
- type YieldExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentPairExpression ¶ added in v0.1.8
type ArgumentPairExpression struct { *BaseNode Key Expression Value Expression }
ArgumentPairExpression represents a key/value pair in method parameters or arguments
func (*ArgumentPairExpression) String ¶ added in v0.1.8
func (ape *ArgumentPairExpression) String() string
String .....
func (*ArgumentPairExpression) TokenLiteral ¶ added in v0.1.8
func (ape *ArgumentPairExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type ArrayExpression ¶
type ArrayExpression struct { *BaseNode Elements []Expression }
ArrayExpression defines the array expression literal which contains the node expression and its value
func (*ArrayExpression) IsArrayExpression ¶ added in v0.1.8
func (ae *ArrayExpression) IsArrayExpression(t *testing.T) *testableArrayExpression
IsArrayExpression returns pointer of the receiver array expression
func (*ArrayExpression) String ¶
func (ae *ArrayExpression) String() string
ArrayExpression.String gets the string format of the Array type token
func (*ArrayExpression) TokenLiteral ¶
func (ae *ArrayExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type AssignExpression ¶ added in v0.1.0
type AssignExpression struct { *BaseNode Variables []Expression Value Expression // Optioned attribute is only used when infix expression is local assignment in params. // For example: `foo(x = 10)`'s `x = 10` is an optioned assign expression // TODO: Remove this when we can put metadata inside bytecode. Optioned int }
AssignExpression represents variable assignment in Goby
func (*AssignExpression) IsAssignExpression ¶ added in v0.1.8
func (ae *AssignExpression) IsAssignExpression(t *testing.T) *testableAssignExpression
IsAssignExpression returns pointer of the receiver assign expression
func (*AssignExpression) String ¶ added in v0.1.0
func (ae *AssignExpression) String() string
func (*AssignExpression) TokenLiteral ¶ added in v0.1.0
func (ae *AssignExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal of assignment
type BaseNode ¶ added in v0.1.0
BaseNode holds the attribute every expression or statement should have
func (*BaseNode) IsArrayExpression ¶ added in v0.1.8
IsArrayExpression fails the test and returns nil by default
func (*BaseNode) IsAssignExpression ¶ added in v0.1.8
IsAssignExpression fails the test and returns nil by default
func (*BaseNode) IsBooleanExpression ¶ added in v0.1.8
IsBooleanExpression fails the test and returns nil by default
func (*BaseNode) IsCallExpression ¶ added in v0.1.8
IsCallExpression fails the test and returns nil by default
func (*BaseNode) IsClassStmt ¶ added in v0.1.8
IsClassStmt fails the test and returns nil by default
func (*BaseNode) IsConditionalExpression ¶ added in v0.1.8
IsConditionalExpression fails the test and returns nil by default
func (*BaseNode) IsConstant ¶ added in v0.1.8
IsConstant fails the test and returns nil by default
func (*BaseNode) IsExp ¶ added in v0.1.0
IsExp returns if current node should be considered as an expression
func (*BaseNode) IsExpression ¶ added in v0.1.8
IsExpression fails the test and returns nil by default
func (*BaseNode) IsHashExpression ¶ added in v0.1.8
IsHashExpression fails the test and returns nil by default
func (*BaseNode) IsIdentifier ¶ added in v0.1.8
IsIdentifier fails the test and returns nil by default
func (*BaseNode) IsIfExpression ¶ added in v0.1.8
IsIfExpression fails the test and returns nil by default
func (*BaseNode) IsInfixExpression ¶ added in v0.1.8
IsInfixExpression fails the test and returns nil by default
func (*BaseNode) IsInstanceVariable ¶ added in v0.1.8
IsInstanceVariable fails the test and returns nil by default
func (*BaseNode) IsIntegerLiteral ¶ added in v0.1.8
IsIntegerLiteral fails the test and returns nil by default
func (*BaseNode) IsModuleStmt ¶ added in v0.1.8
IsModuleStmt fails the test and returns nil by default
func (*BaseNode) IsReturnStmt ¶ added in v0.1.8
IsReturnStmt fails the test and returns nil by default
func (*BaseNode) IsSelfExpression ¶ added in v0.1.8
IsSelfExpression fails the test and returns nil by default
func (*BaseNode) IsStmt ¶ added in v0.1.0
IsStmt returns if current node should be considered as a statement
func (*BaseNode) IsStringLiteral ¶ added in v0.1.8
IsStringLiteral fails the test and returns nil by default
func (*BaseNode) IsWhileStmt ¶ added in v0.1.8
IsWhileStmt fails the test and returns nil by default
func (*BaseNode) IsYieldExpression ¶ added in v0.1.8
IsYieldExpression returns pointer of the receiver yield expression
func (*BaseNode) MarkAsExp ¶ added in v0.1.0
func (b *BaseNode) MarkAsExp()
MarkAsExp marks current node to be expression
func (*BaseNode) MarkAsStmt ¶ added in v0.1.0
func (b *BaseNode) MarkAsStmt()
MarkAsStmt marks current node to be statement
type BlockStatement ¶
BlockStatement represents a block statement
func (*BlockStatement) IsEmpty ¶ added in v0.1.3
func (bs *BlockStatement) IsEmpty() bool
IsEmpty checks if the statements in the block is empty
func (*BlockStatement) KeepLastValue ¶ added in v0.1.0
func (bs *BlockStatement) KeepLastValue()
KeepLastValue prevents block's last expression statement to be popped.
func (*BlockStatement) String ¶
func (bs *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (bs *BlockStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type BooleanExpression ¶
BooleanExpression defines the boolean expression literal which contains the node expression and its value
func (*BooleanExpression) IsBooleanExpression ¶ added in v0.1.8
func (be *BooleanExpression) IsBooleanExpression(t *testing.T) *testableBooleanExpression
IsBooleanExpression returns pointer of the receiver boolean expression
func (*BooleanExpression) String ¶
func (b *BooleanExpression) String() string
BooleanExpression.String gets the string format of the Boolean type token
func (*BooleanExpression) TokenLiteral ¶
func (b *BooleanExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal "true" "false"
type BreakStatement ¶ added in v0.1.0
type BreakStatement struct {
*BaseNode
}
BreakStatement represents "break" keyword
func (*BreakStatement) String ¶ added in v0.1.0
func (bs *BreakStatement) String() string
func (*BreakStatement) TokenLiteral ¶ added in v0.1.0
func (bs *BreakStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type CallExpression ¶
type CallExpression struct { *BaseNode Receiver Expression Method string Arguments []Expression Block *BlockStatement BlockArguments []*Identifier }
CallExpression represents an expression for calling a method
func (*CallExpression) IsCallExpression ¶ added in v0.1.8
func (ce *CallExpression) IsCallExpression(t *testing.T) *testableCallExpression
IsCallExpression returns pointer of the receiver call expression
func (*CallExpression) String ¶
func (tce *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (tce *CallExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal for a call expression
type ClassStatement ¶
type ClassStatement struct { *BaseNode Name *Constant Body *BlockStatement SuperClass Expression SuperClassName string }
ClassStatement represents a class node in AST
func (*ClassStatement) IsClassStmt ¶ added in v0.1.8
func (cs *ClassStatement) IsClassStmt(t *testing.T) *testableClassStatement
IsClassStmt fails the test and returns nil by default
func (*ClassStatement) String ¶
func (cs *ClassStatement) String() string
func (*ClassStatement) TokenLiteral ¶
func (cs *ClassStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type CodeBlock ¶ added in v0.1.8
type CodeBlock []TestableStatement
CodeBlock is a list of TestableStatement
func (CodeBlock) NthStmt ¶ added in v0.1.8
func (cb CodeBlock) NthStmt(n int) TestableStatement
NthStmt returns the trailing TestableStatement
type ConditionalExpression ¶ added in v0.1.0
type ConditionalExpression struct { *BaseNode Condition Expression Consequence *BlockStatement }
ConditionalExpression represents if or elsif expression
func (*ConditionalExpression) IsConditionalExpression ¶ added in v0.1.8
func (ce *ConditionalExpression) IsConditionalExpression(t *testing.T) *testableConditionalExpression
IsConditionalExpression returns pointer of the receiver conditional expression
func (*ConditionalExpression) String ¶ added in v0.1.0
func (ce *ConditionalExpression) String() string
func (*ConditionalExpression) TokenLiteral ¶ added in v0.1.0
func (ce *ConditionalExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal `if` or `elsif`
type Constant ¶
Constant represents a constant that may include namespace
func (*Constant) IsConstant ¶ added in v0.1.8
IsConstant returns pointer of the current receiver constant
func (*Constant) ReturnValue ¶
ReturnValue is a polymorphic method for returning a value
func (*Constant) TokenLiteral ¶
TokenLiteral returns an empty string
type DefStatement ¶
type DefStatement struct { *BaseNode Name *Identifier Receiver Expression Parameters []Expression BlockStatement *BlockStatement }
DefStatement represents a "def" keyword with block
func (*DefStatement) IsDefStmt ¶ added in v0.1.8
func (ds *DefStatement) IsDefStmt(t *testing.T) *testableDefStatement
IsDefStmt returns a pointer of the DefStatement
func (*DefStatement) String ¶
func (tds *DefStatement) String() string
func (*DefStatement) TokenLiteral ¶
func (tds *DefStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type Expression ¶
type Expression interface {
// contains filtered or unexported methods
}
Expression satisfies "node" and expressionNode
type ExpressionStatement ¶
type ExpressionStatement struct { *BaseNode Expression Expression }
ExpressionStatement represents an expression statement
func (*ExpressionStatement) IsExpression ¶ added in v0.1.8
func (ts *ExpressionStatement) IsExpression(t *testing.T) testableExpression
IsExpression returns ExpressionStatement itself
func (*ExpressionStatement) String ¶
func (es *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type FloatLiteral ¶ added in v0.1.6
FloatLiteral contains the node expression and its value
func (*FloatLiteral) String ¶ added in v0.1.6
func (il *FloatLiteral) String() string
FloatLiteral.String gets the string format of the Float type token
func (*FloatLiteral) TokenLiteral ¶ added in v0.1.6
func (il *FloatLiteral) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type GetBlockExpression ¶ added in v0.1.7
type GetBlockExpression struct {
*BaseNode
}
GetBlockExpression represents `get_block` call in the AST
func (*GetBlockExpression) String ¶ added in v0.1.7
func (gbe *GetBlockExpression) String() string
String ...
func (*GetBlockExpression) TokenLiteral ¶ added in v0.1.7
func (gbe *GetBlockExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal for "get_block"
type HashExpression ¶
type HashExpression struct { *BaseNode Data map[string]Expression }
HashExpression defines the hash expression literal which contains the node expression and its value
func (*HashExpression) IsHashExpression ¶ added in v0.1.8
func (he *HashExpression) IsHashExpression(t *testing.T) *testableHashExpression
IsHashExpression returns pointer of the receiver hash expression
func (*HashExpression) String ¶
func (he *HashExpression) String() string
HashExpression.String gets the string format of the Hash type token
func (*HashExpression) TokenLiteral ¶
func (he *HashExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type Identifier ¶
Identifier represents an identifier string
func (*Identifier) IsIdentifier ¶ added in v0.1.8
func (i *Identifier) IsIdentifier(t *testing.T) *testableIdentifier
IsIdentifier returns pointer of the receiver identifier
func (*Identifier) ReturnValue ¶
func (i *Identifier) ReturnValue() string
ReturnValue is a polymorphic method for returning a value
func (*Identifier) String ¶
func (i *Identifier) String() string
func (*Identifier) TokenLiteral ¶
func (i *Identifier) TokenLiteral() string
TokenLiteral returns an empty string
type IfExpression ¶
type IfExpression struct { *BaseNode Conditionals []*ConditionalExpression Alternative *BlockStatement }
IfExpression represents an "if" expression
func (*IfExpression) IsIfExpression ¶ added in v0.1.8
func (ie *IfExpression) IsIfExpression(t *testing.T) *testableIfExpression
IsIfExpression returns pointer of the receiver if expression
func (*IfExpression) String ¶
func (ie *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (ie *IfExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal "if"
type InfixExpression ¶
type InfixExpression struct { *BaseNode Left Expression Operator string Right Expression }
InfixExpression represents an expression with an infix
func (*InfixExpression) IsInfixExpression ¶ added in v0.1.8
func (ie *InfixExpression) IsInfixExpression(t *testing.T) *testableInfixExpression
IsInfixExpression returns pointer of the receiver infix expression
func (*InfixExpression) String ¶
func (ie *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (ie *InfixExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal of infix
type InstanceVariable ¶
InstanceVariable represents an instance variables
func (*InstanceVariable) IsInstanceVariable ¶ added in v0.1.8
func (iv *InstanceVariable) IsInstanceVariable(t *testing.T) *testableInstanceVariable
IsInstanceVariable returns pointer of the receiver instance variable
func (*InstanceVariable) ReturnValue ¶
func (iv *InstanceVariable) ReturnValue() string
ReturnValue is a polymorphic method for returning a value
func (*InstanceVariable) String ¶
func (iv *InstanceVariable) String() string
func (*InstanceVariable) TokenLiteral ¶
func (iv *InstanceVariable) TokenLiteral() string
TokenLiteral returns an empty string
type IntegerLiteral ¶
IntegerLiteral contains the node expression and its value
func (*IntegerLiteral) IsIntegerLiteral ¶ added in v0.1.8
func (il *IntegerLiteral) IsIntegerLiteral(t *testing.T) *testableIntegerLiteral
IsIntegerLiteral returns pointer of the receiver integer literal
func (*IntegerLiteral) String ¶
func (il *IntegerLiteral) String() string
String gets the string format of the Integer type token
func (*IntegerLiteral) TokenLiteral ¶
func (il *IntegerLiteral) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type ModuleStatement ¶
type ModuleStatement struct { *BaseNode Name *Constant Body *BlockStatement SuperClass *Constant }
ModuleStatement represents a module node in AST
func (*ModuleStatement) IsModuleStmt ¶ added in v0.1.8
func (ms *ModuleStatement) IsModuleStmt(t *testing.T) *testableModuleStatement
IsModuleStmt returns a pointer of the module statement
func (*ModuleStatement) String ¶
func (ms *ModuleStatement) String() string
func (*ModuleStatement) TokenLiteral ¶
func (ms *ModuleStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type MultiVariableExpression ¶ added in v0.1.0
type MultiVariableExpression struct { *BaseNode Variables []Expression }
MultiVariableExpression is not really an expression, it's just a container that holds multiple Variables
func (*MultiVariableExpression) String ¶ added in v0.1.0
func (m *MultiVariableExpression) String() string
func (*MultiVariableExpression) TokenLiteral ¶ added in v0.1.0
func (m *MultiVariableExpression) TokenLiteral() string
TokenLiteral returns an empty string
type NextStatement ¶
type NextStatement struct {
*BaseNode
}
NextStatement represents "next" keyword
func (*NextStatement) String ¶
func (ns *NextStatement) String() string
func (*NextStatement) TokenLiteral ¶
func (ns *NextStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type NilExpression ¶
type NilExpression struct {
*BaseNode
}
NilExpression represents nil node
func (*NilExpression) TokenLiteral ¶
func (n *NilExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal "nil"
type PrefixExpression ¶
type PrefixExpression struct { *BaseNode Operator string Right Expression }
PrefixExpression represents an expression with a prefix
func (*PrefixExpression) String ¶
func (pe *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal of prefix
type Program ¶
type Program struct {
Statements []Statement
}
Program is the root node of entire AST
func (*Program) FirstStmt ¶ added in v0.1.8
func (p *Program) FirstStmt() TestableStatement
FirstStmt returns program's first statement as a TestStatement
func (*Program) NthStmt ¶ added in v0.1.8
func (p *Program) NthStmt(nth int) TestableStatement
NthStmt returns program's nth statement as a TestStatement
func (*Program) TokenLiteral ¶
TokenLiteral returns a token literal of the statement
type RangeExpression ¶
type RangeExpression struct { *BaseNode Start Expression End Expression }
RangeExpression defines the range expression literal which contains the node expression and its start/end value
func (*RangeExpression) String ¶
func (re *RangeExpression) String() string
RangeExpression.String gets the string format of the Range type token
func (*RangeExpression) TokenLiteral ¶
func (re *RangeExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal for Range
type ReturnStatement ¶
type ReturnStatement struct { *BaseNode ReturnValue Expression }
ReturnStatement represents an expression as a return value
func (*ReturnStatement) IsReturnStmt ¶ added in v0.1.8
func (rs *ReturnStatement) IsReturnStmt(t *testing.T) (trs *testableReturnStatement)
IsReturnStmt returns a pointer of the ReturnStatement
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type SelfExpression ¶
type SelfExpression struct {
*BaseNode
}
SelfExpression represents a "self" expression
func (*SelfExpression) IsSelfExpression ¶ added in v0.1.8
func (se *SelfExpression) IsSelfExpression(t *testing.T) *testableSelfExpression
IsSelfExpression returns pointer of the receiver self expression
func (*SelfExpression) String ¶
func (se *SelfExpression) String() string
func (*SelfExpression) TokenLiteral ¶
func (se *SelfExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal for "self"
type Statement ¶
type Statement interface {
// contains filtered or unexported methods
}
Statement satisfies "node" and statementNode
type StringLiteral ¶
StringLiteral contains the node expression and its value
func (*StringLiteral) IsStringLiteral ¶ added in v0.1.8
func (sl *StringLiteral) IsStringLiteral(t *testing.T) *testableStringLiteral
IsStringLiteral returns pointer of the receiver string literal
func (*StringLiteral) String ¶
func (sl *StringLiteral) String() string
TokenLiteral is a polymorphic function to return a token literal
func (*StringLiteral) TokenLiteral ¶
func (sl *StringLiteral) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type TestableIdentifierValue ¶ added in v0.1.8
type TestableIdentifierValue string
TestableIdentifierValue for marking a string as an identifier's value for test
type TestableStatement ¶ added in v0.1.8
type TestableStatement interface { Statement // Test Helpers IsClassStmt(t *testing.T) *testableClassStatement IsDefStmt(t *testing.T) *testableDefStatement IsExpression(t *testing.T) testableExpression IsModuleStmt(t *testing.T) *testableModuleStatement IsReturnStmt(t *testing.T) *testableReturnStatement IsWhileStmt(t *testing.T) *testableWhileStatement }
TestableStatement holds predicate functions for checking statements
type Variable ¶ added in v0.1.0
type Variable interface { ReturnValue() string Expression // contains filtered or unexported methods }
Variable interface represents assignable nodes in Goby, currently are Identifier, InstanceVariable and Constant
type WhileStatement ¶
type WhileStatement struct { *BaseNode Condition Expression Body *BlockStatement }
WhileStatement represents a "while" keyword with a block
func (*WhileStatement) IsWhileStmt ¶ added in v0.1.8
func (ws *WhileStatement) IsWhileStmt(t *testing.T) *testableWhileStatement
IsWhileStmt returns the pointer of current while statement
func (*WhileStatement) String ¶
func (ws *WhileStatement) String() string
func (*WhileStatement) TokenLiteral ¶
func (ws *WhileStatement) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal
type YieldExpression ¶
type YieldExpression struct { *BaseNode Arguments []Expression }
YieldExpression represents a "yield" expression
func (*YieldExpression) IsYieldExpression ¶ added in v0.1.8
func (ye *YieldExpression) IsYieldExpression(t *testing.T) *testableYieldExpression
IsYieldExpression returns pointer of the receiver yield expression
func (*YieldExpression) String ¶
func (ye *YieldExpression) String() string
func (*YieldExpression) TokenLiteral ¶
func (ye *YieldExpression) TokenLiteral() string
TokenLiteral is a polymorphic function to return a token literal for "yield"