Documentation
¶
Overview ¶
Package ast defines types used by the Elk parser.
All the nodes of the Abstract Syntax Tree constructed by the Elk parser are defined in this package.
Index ¶
- Constants
- Variables
- func ExpressionPrecedence(expr ExpressionNode) uint8
- func IdentifierToString(ident IdentifierNode) string
- func IsComplexConstant(node Node) bool
- func IsConstant(node Node) bool
- func IsNamedRestParam(p ParameterNode) bool
- func IsPositionalRestParam(p ParameterNode) bool
- func IsValidAssignmentTarget(node Node) bool
- func IsValidDeclarationTarget(node Node) bool
- func IsValidPipeExpressionTarget(node Node) bool
- func IsValidRangePatternElement(node Node) bool
- func Iter(node Node) iter.Seq[Node]
- func MethodNameIsSetter(methodNameNode IdentifierNode) bool
- func MethodNameIsSubscriptSetter(methodNameNode IdentifierNode) bool
- func NewNodeIterator(node Node) *value.ArrayTupleIterator
- func PatternDeclaresVariables(pattern PatternNode) bool
- func PatternPrecedence(expr PatternNode) uint8
- func SpliceSlice[N Node](slice []N, loc *position.Location, args *[]Node, unquote bool) []N
- func StatementPrecedence(stmt StatementNode) uint8
- func Traverse(node Node, enter func(node, parent Node) TraverseOption, ...)
- func TypePrecedence(expr TypeNode) uint8
- type AliasDeclarationEntry
- func (*AliasDeclarationEntry) Class() *value.Class
- func (*AliasDeclarationEntry) DirectClass() *value.Class
- func (n *AliasDeclarationEntry) Equal(other value.Value) bool
- func (n *AliasDeclarationEntry) Error() string
- func (n *AliasDeclarationEntry) Inspect() string
- func (*AliasDeclarationEntry) IsStatic() bool
- func (n *AliasDeclarationEntry) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AliasDeclarationEntry) String() string
- type AliasDeclarationNode
- func (*AliasDeclarationNode) Class() *value.Class
- func (*AliasDeclarationNode) DirectClass() *value.Class
- func (n *AliasDeclarationNode) Equal(other value.Value) bool
- func (n *AliasDeclarationNode) Error() string
- func (n *AliasDeclarationNode) Inspect() string
- func (*AliasDeclarationNode) IsStatic() bool
- func (n *AliasDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AliasDeclarationNode) String() string
- type AnyTypeNode
- func (*AnyTypeNode) Class() *value.Class
- func (*AnyTypeNode) DirectClass() *value.Class
- func (n *AnyTypeNode) Equal(other value.Value) bool
- func (n *AnyTypeNode) Error() string
- func (n *AnyTypeNode) Inspect() string
- func (*AnyTypeNode) IsStatic() bool
- func (n *AnyTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AnyTypeNode) String() string
- func (*AnyTypeNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type ArrayListLiteralNode
- func (*ArrayListLiteralNode) Class() *value.Class
- func (*ArrayListLiteralNode) DirectClass() *value.Class
- func (n *ArrayListLiteralNode) Equal(other value.Value) bool
- func (n *ArrayListLiteralNode) Error() string
- func (n *ArrayListLiteralNode) Inspect() string
- func (l *ArrayListLiteralNode) IsStatic() bool
- func (n *ArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ArrayListLiteralNode) String() string
- type ArrayTupleLiteralNode
- func (*ArrayTupleLiteralNode) Class() *value.Class
- func (*ArrayTupleLiteralNode) DirectClass() *value.Class
- func (n *ArrayTupleLiteralNode) Equal(other value.Value) bool
- func (n *ArrayTupleLiteralNode) Error() string
- func (n *ArrayTupleLiteralNode) Inspect() string
- func (t *ArrayTupleLiteralNode) IsStatic() bool
- func (n *ArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ArrayTupleLiteralNode) String() string
- type AsExpressionNode
- func (*AsExpressionNode) Class() *value.Class
- func (*AsExpressionNode) DirectClass() *value.Class
- func (n *AsExpressionNode) Equal(other value.Value) bool
- func (n *AsExpressionNode) Error() string
- func (n *AsExpressionNode) Inspect() string
- func (*AsExpressionNode) IsStatic() bool
- func (n *AsExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AsExpressionNode) String() string
- type AsPatternNode
- func (*AsPatternNode) Class() *value.Class
- func (*AsPatternNode) DirectClass() *value.Class
- func (n *AsPatternNode) Equal(other value.Value) bool
- func (n *AsPatternNode) Error() string
- func (n *AsPatternNode) Inspect() string
- func (*AsPatternNode) IsStatic() bool
- func (n *AsPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AsPatternNode) String() string
- type AssignmentExpressionNode
- func (*AssignmentExpressionNode) Class() *value.Class
- func (*AssignmentExpressionNode) DirectClass() *value.Class
- func (n *AssignmentExpressionNode) Equal(other value.Value) bool
- func (p *AssignmentExpressionNode) Error() string
- func (n *AssignmentExpressionNode) Inspect() string
- func (*AssignmentExpressionNode) IsStatic() bool
- func (n *AssignmentExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AssignmentExpressionNode) String() string
- type Associativity
- type AttrDeclarationNode
- func (*AttrDeclarationNode) Class() *value.Class
- func (*AttrDeclarationNode) DirectClass() *value.Class
- func (n *AttrDeclarationNode) Equal(other value.Value) bool
- func (n *AttrDeclarationNode) Error() string
- func (n *AttrDeclarationNode) Inspect() string
- func (*AttrDeclarationNode) IsStatic() bool
- func (n *AttrDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AttrDeclarationNode) String() string
- type AttributeAccessNode
- func (*AttributeAccessNode) Class() *value.Class
- func (*AttributeAccessNode) DirectClass() *value.Class
- func (n *AttributeAccessNode) Equal(other value.Value) bool
- func (n *AttributeAccessNode) Error() string
- func (n *AttributeAccessNode) Inspect() string
- func (*AttributeAccessNode) IsStatic() bool
- func (n *AttributeAccessNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AttributeAccessNode) String() string
- type AttributeParameterNode
- func (*AttributeParameterNode) Class() *value.Class
- func (*AttributeParameterNode) DirectClass() *value.Class
- func (n *AttributeParameterNode) Equal(other value.Value) bool
- func (n *AttributeParameterNode) Error() string
- func (n *AttributeParameterNode) Inspect() string
- func (a *AttributeParameterNode) IsOptional() bool
- func (*AttributeParameterNode) IsStatic() bool
- func (n *AttributeParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AttributeParameterNode) String() string
- type AwaitExpressionNode
- func (*AwaitExpressionNode) Class() *value.Class
- func (*AwaitExpressionNode) DirectClass() *value.Class
- func (n *AwaitExpressionNode) Equal(other value.Value) bool
- func (n *AwaitExpressionNode) Error() string
- func (n *AwaitExpressionNode) Inspect() string
- func (*AwaitExpressionNode) IsStatic() bool
- func (n *AwaitExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *AwaitExpressionNode) String() string
- type BigFloatLiteralNode
- func (*BigFloatLiteralNode) Class() *value.Class
- func (*BigFloatLiteralNode) DirectClass() *value.Class
- func (n *BigFloatLiteralNode) Equal(other value.Value) bool
- func (n *BigFloatLiteralNode) Error() string
- func (n *BigFloatLiteralNode) Inspect() string
- func (*BigFloatLiteralNode) IsStatic() bool
- func (n *BigFloatLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BigFloatLiteralNode) String() string
- type BinArrayListLiteralNode
- func (*BinArrayListLiteralNode) Class() *value.Class
- func (*BinArrayListLiteralNode) DirectClass() *value.Class
- func (n *BinArrayListLiteralNode) Equal(other value.Value) bool
- func (n *BinArrayListLiteralNode) Error() string
- func (n *BinArrayListLiteralNode) Inspect() string
- func (b *BinArrayListLiteralNode) IsStatic() bool
- func (n *BinArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BinArrayListLiteralNode) String() string
- type BinArrayTupleLiteralNode
- func (*BinArrayTupleLiteralNode) Class() *value.Class
- func (*BinArrayTupleLiteralNode) DirectClass() *value.Class
- func (n *BinArrayTupleLiteralNode) Equal(other value.Value) bool
- func (n *BinArrayTupleLiteralNode) Error() string
- func (n *BinArrayTupleLiteralNode) Inspect() string
- func (*BinArrayTupleLiteralNode) IsStatic() bool
- func (n *BinArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BinArrayTupleLiteralNode) String() string
- type BinHashSetLiteralNode
- func (*BinHashSetLiteralNode) Class() *value.Class
- func (*BinHashSetLiteralNode) DirectClass() *value.Class
- func (n *BinHashSetLiteralNode) Equal(other value.Value) bool
- func (n *BinHashSetLiteralNode) Error() string
- func (n *BinHashSetLiteralNode) Inspect() string
- func (b *BinHashSetLiteralNode) IsStatic() bool
- func (n *BinHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BinHashSetLiteralNode) String() string
- type BinaryExpressionNode
- func (*BinaryExpressionNode) Class() *value.Class
- func (*BinaryExpressionNode) DirectClass() *value.Class
- func (n *BinaryExpressionNode) Equal(other value.Value) bool
- func (n *BinaryExpressionNode) Error() string
- func (n *BinaryExpressionNode) Inspect() string
- func (b *BinaryExpressionNode) IsStatic() bool
- func (n *BinaryExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BinaryExpressionNode) String() string
- type BinaryPatternNode
- func (*BinaryPatternNode) Class() *value.Class
- func (*BinaryPatternNode) DirectClass() *value.Class
- func (n *BinaryPatternNode) Equal(other value.Value) bool
- func (n *BinaryPatternNode) Error() string
- func (n *BinaryPatternNode) Inspect() string
- func (*BinaryPatternNode) IsStatic() bool
- func (n *BinaryPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BinaryPatternNode) String() string
- type BinaryTypeNode
- func (*BinaryTypeNode) Class() *value.Class
- func (*BinaryTypeNode) DirectClass() *value.Class
- func (n *BinaryTypeNode) Equal(other value.Value) bool
- func (n *BinaryTypeNode) Error() string
- func (n *BinaryTypeNode) Inspect() string
- func (*BinaryTypeNode) IsStatic() bool
- func (n *BinaryTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BinaryTypeNode) String() string
- type BoolLiteralNode
- func (*BoolLiteralNode) Class() *value.Class
- func (*BoolLiteralNode) DirectClass() *value.Class
- func (n *BoolLiteralNode) Equal(other value.Value) bool
- func (n *BoolLiteralNode) Error() string
- func (n *BoolLiteralNode) Inspect() string
- func (*BoolLiteralNode) IsStatic() bool
- func (n *BoolLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BoolLiteralNode) String() string
- func (*BoolLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type BoxOfExpressionNode
- func (*BoxOfExpressionNode) Class() *value.Class
- func (*BoxOfExpressionNode) DirectClass() *value.Class
- func (n *BoxOfExpressionNode) Equal(other value.Value) bool
- func (n *BoxOfExpressionNode) Error() string
- func (n *BoxOfExpressionNode) Inspect() string
- func (*BoxOfExpressionNode) IsStatic() bool
- func (n *BoxOfExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BoxOfExpressionNode) String() string
- type BoxTypeNode
- func (*BoxTypeNode) Class() *value.Class
- func (*BoxTypeNode) DirectClass() *value.Class
- func (n *BoxTypeNode) Equal(other value.Value) bool
- func (n *BoxTypeNode) Error() string
- func (n *BoxTypeNode) Inspect() string
- func (*BoxTypeNode) IsStatic() bool
- func (n *BoxTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BoxTypeNode) String() string
- type BreakExpressionNode
- func (*BreakExpressionNode) Class() *value.Class
- func (*BreakExpressionNode) DirectClass() *value.Class
- func (n *BreakExpressionNode) Equal(other value.Value) bool
- func (n *BreakExpressionNode) Error() string
- func (n *BreakExpressionNode) Inspect() string
- func (*BreakExpressionNode) IsStatic() bool
- func (n *BreakExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *BreakExpressionNode) String() string
- func (*BreakExpressionNode) Type(*types.GlobalEnvironment) types.Type
- type CallNode
- func (*CallNode) Class() *value.Class
- func (*CallNode) DirectClass() *value.Class
- func (n *CallNode) Equal(other value.Value) bool
- func (n *CallNode) Error() string
- func (n *CallNode) Inspect() string
- func (*CallNode) IsStatic() bool
- func (n *CallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *CallNode) String() string
- type CallableTypeNode
- func (*CallableTypeNode) Class() *value.Class
- func (*CallableTypeNode) DirectClass() *value.Class
- func (n *CallableTypeNode) Equal(other value.Value) bool
- func (n *CallableTypeNode) Error() string
- func (n *CallableTypeNode) Inspect() string
- func (*CallableTypeNode) IsStatic() bool
- func (n *CallableTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *CallableTypeNode) String() string
- type CaseNode
- func (*CaseNode) Class() *value.Class
- func (*CaseNode) DirectClass() *value.Class
- func (n *CaseNode) Equal(other value.Value) bool
- func (n *CaseNode) Error() string
- func (n *CaseNode) Inspect() string
- func (*CaseNode) IsStatic() bool
- func (n *CaseNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *CaseNode) String() string
- type CatchNode
- func (*CatchNode) Class() *value.Class
- func (*CatchNode) DirectClass() *value.Class
- func (n *CatchNode) Equal(other value.Value) bool
- func (n *CatchNode) Error() string
- func (n *CatchNode) Inspect() string
- func (*CatchNode) IsStatic() bool
- func (n *CatchNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *CatchNode) String() string
- type CharLiteralNode
- func (*CharLiteralNode) Class() *value.Class
- func (*CharLiteralNode) DirectClass() *value.Class
- func (n *CharLiteralNode) Equal(other value.Value) bool
- func (n *CharLiteralNode) Error() string
- func (n *CharLiteralNode) Inspect() string
- func (*CharLiteralNode) IsStatic() bool
- func (n *CharLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *CharLiteralNode) String() string
- type ClassDeclarationNode
- func (*ClassDeclarationNode) Class() *value.Class
- func (*ClassDeclarationNode) DirectClass() *value.Class
- func (n *ClassDeclarationNode) Equal(other value.Value) bool
- func (n *ClassDeclarationNode) Error() string
- func (n *ClassDeclarationNode) Inspect() string
- func (*ClassDeclarationNode) IsStatic() bool
- func (n *ClassDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*ClassDeclarationNode) SkipTypechecking() bool
- func (n *ClassDeclarationNode) String() string
- type ClosureLiteralNode
- func (*ClosureLiteralNode) Class() *value.Class
- func (*ClosureLiteralNode) DirectClass() *value.Class
- func (n *ClosureLiteralNode) Equal(other value.Value) bool
- func (n *ClosureLiteralNode) Error() string
- func (n *ClosureLiteralNode) Inspect() string
- func (*ClosureLiteralNode) IsStatic() bool
- func (n *ClosureLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ClosureLiteralNode) String() string
- type ComplexConstantNode
- type ConstantAsNode
- func (*ConstantAsNode) Class() *value.Class
- func (*ConstantAsNode) DirectClass() *value.Class
- func (n *ConstantAsNode) Equal(other value.Value) bool
- func (n *ConstantAsNode) Error() string
- func (n *ConstantAsNode) Inspect() string
- func (*ConstantAsNode) IsStatic() bool
- func (n *ConstantAsNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ConstantAsNode) String() string
- type ConstantDeclarationNode
- func (*ConstantDeclarationNode) Class() *value.Class
- func (*ConstantDeclarationNode) DirectClass() *value.Class
- func (n *ConstantDeclarationNode) Equal(other value.Value) bool
- func (n *ConstantDeclarationNode) Error() string
- func (n *ConstantDeclarationNode) Inspect() string
- func (*ConstantDeclarationNode) IsStatic() bool
- func (n *ConstantDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ConstantDeclarationNode) String() string
- type ConstantLookupNode
- func (*ConstantLookupNode) Class() *value.Class
- func (*ConstantLookupNode) DirectClass() *value.Class
- func (n *ConstantLookupNode) Equal(other value.Value) bool
- func (n *ConstantLookupNode) Error() string
- func (n *ConstantLookupNode) Inspect() string
- func (*ConstantLookupNode) IsStatic() bool
- func (n *ConstantLookupNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ConstantLookupNode) String() string
- type ConstantNode
- type ConstructorCallNode
- func (*ConstructorCallNode) Class() *value.Class
- func (*ConstructorCallNode) DirectClass() *value.Class
- func (n *ConstructorCallNode) Equal(other value.Value) bool
- func (n *ConstructorCallNode) Error() string
- func (n *ConstructorCallNode) Inspect() string
- func (*ConstructorCallNode) IsStatic() bool
- func (n *ConstructorCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ConstructorCallNode) String() string
- type ContinueExpressionNode
- func (*ContinueExpressionNode) Class() *value.Class
- func (*ContinueExpressionNode) DirectClass() *value.Class
- func (n *ContinueExpressionNode) Equal(other value.Value) bool
- func (n *ContinueExpressionNode) Error() string
- func (n *ContinueExpressionNode) Inspect() string
- func (*ContinueExpressionNode) IsStatic() bool
- func (n *ContinueExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ContinueExpressionNode) String() string
- func (*ContinueExpressionNode) Type(*types.GlobalEnvironment) types.Type
- type DoExpressionNode
- func (*DoExpressionNode) Class() *value.Class
- func (*DoExpressionNode) DirectClass() *value.Class
- func (n *DoExpressionNode) Equal(other value.Value) bool
- func (n *DoExpressionNode) Error() string
- func (n *DoExpressionNode) HasSingleScope() bool
- func (n *DoExpressionNode) HasSingleStatement() bool
- func (n *DoExpressionNode) Inspect() string
- func (*DoExpressionNode) IsStatic() bool
- func (n *DoExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *DoExpressionNode) String() string
- type DocCommentableNode
- type DocCommentableNodeBase
- type DoubleQuotedStringLiteralNode
- func (*DoubleQuotedStringLiteralNode) Class() *value.Class
- func (*DoubleQuotedStringLiteralNode) DirectClass() *value.Class
- func (n *DoubleQuotedStringLiteralNode) Equal(other value.Value) bool
- func (n *DoubleQuotedStringLiteralNode) Error() string
- func (n *DoubleQuotedStringLiteralNode) Inspect() string
- func (*DoubleQuotedStringLiteralNode) IsStatic() bool
- func (n *DoubleQuotedStringLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *DoubleQuotedStringLiteralNode) String() string
- type DoubleSplatExpressionNode
- func (*DoubleSplatExpressionNode) Class() *value.Class
- func (*DoubleSplatExpressionNode) DirectClass() *value.Class
- func (n *DoubleSplatExpressionNode) Equal(other value.Value) bool
- func (n *DoubleSplatExpressionNode) Error() string
- func (n *DoubleSplatExpressionNode) Inspect() string
- func (*DoubleSplatExpressionNode) IsStatic() bool
- func (n *DoubleSplatExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *DoubleSplatExpressionNode) String() string
- type EmptyStatementNode
- func (e *EmptyStatementNode) Class() *value.Class
- func (e *EmptyStatementNode) DirectClass() *value.Class
- func (n *EmptyStatementNode) Equal(other value.Value) bool
- func (e *EmptyStatementNode) Error() string
- func (e *EmptyStatementNode) Inspect() string
- func (*EmptyStatementNode) IsStatic() bool
- func (n *EmptyStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *EmptyStatementNode) String() string
- type ExpressionNode
- func NewArrayListLiteralNodeI(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) ExpressionNode
- func NewArrayTupleLiteralNodeI(loc *position.Location, elements []ExpressionNode) ExpressionNode
- func NewBinArrayListLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode, ...) ExpressionNode
- func NewBinArrayTupleLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode) ExpressionNode
- func NewBinHashSetLiteralNodeI(loc *position.Location, elements []IntCollectionContentNode, ...) ExpressionNode
- func NewBinaryExpressionNodeI(loc *position.Location, op *token.Token, left, right ExpressionNode) ExpressionNode
- func NewHashMapLiteralNodeI(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) ExpressionNode
- func NewHashRecordLiteralNodeI(loc *position.Location, elements []ExpressionNode) ExpressionNode
- func NewHashSetLiteralNodeI(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) ExpressionNode
- func NewHexArrayListLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode, ...) ExpressionNode
- func NewHexArrayTupleLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode) ExpressionNode
- func NewHexHashSetLiteralNodeI(loc *position.Location, elements []IntCollectionContentNode, ...) ExpressionNode
- func NewInvalidExpressionNode(loc *position.Location, tok *token.Token) ExpressionNode
- func NewLogicalExpressionNodeI(loc *position.Location, op *token.Token, left, right ExpressionNode) ExpressionNode
- func NewSymbolArrayListLiteralExpressionNode(loc *position.Location, elements []SymbolCollectionContentNode, ...) ExpressionNode
- func NewSymbolArrayTupleLiteralExpressionNode(loc *position.Location, elements []SymbolCollectionContentNode) ExpressionNode
- func NewSymbolHashSetLiteralNodeI(loc *position.Location, elements []SymbolCollectionContentNode, ...) ExpressionNode
- func NewWordArrayListLiteralExpressionNode(loc *position.Location, elements []WordCollectionContentNode, ...) ExpressionNode
- func NewWordArrayTupleLiteralExpressionNode(loc *position.Location, elements []WordCollectionContentNode) ExpressionNode
- func NewWordHashSetLiteralNodeI(loc *position.Location, elements []WordCollectionContentNode, ...) ExpressionNode
- type ExpressionStatementNode
- func (e *ExpressionStatementNode) Class() *value.Class
- func (e *ExpressionStatementNode) DirectClass() *value.Class
- func (e *ExpressionStatementNode) Equal(other value.Value) bool
- func (e *ExpressionStatementNode) Error() string
- func (n *ExpressionStatementNode) Inspect() string
- func (e *ExpressionStatementNode) IsStatic() bool
- func (n *ExpressionStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (e *ExpressionStatementNode) String() string
- type ExtendWhereBlockExpressionNode
- func (*ExtendWhereBlockExpressionNode) Class() *value.Class
- func (*ExtendWhereBlockExpressionNode) DirectClass() *value.Class
- func (n *ExtendWhereBlockExpressionNode) Equal(other value.Value) bool
- func (n *ExtendWhereBlockExpressionNode) Error() string
- func (n *ExtendWhereBlockExpressionNode) Inspect() string
- func (*ExtendWhereBlockExpressionNode) IsStatic() bool
- func (n *ExtendWhereBlockExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*ExtendWhereBlockExpressionNode) SkipTypechecking() bool
- func (n *ExtendWhereBlockExpressionNode) String() string
- type FalseLiteralNode
- func (*FalseLiteralNode) Class() *value.Class
- func (*FalseLiteralNode) DirectClass() *value.Class
- func (n *FalseLiteralNode) Equal(other value.Value) bool
- func (n *FalseLiteralNode) Error() string
- func (n *FalseLiteralNode) Inspect() string
- func (*FalseLiteralNode) IsStatic() bool
- func (n *FalseLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *FalseLiteralNode) String() string
- func (*FalseLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type Float32LiteralNode
- func (*Float32LiteralNode) Class() *value.Class
- func (*Float32LiteralNode) DirectClass() *value.Class
- func (n *Float32LiteralNode) Equal(other value.Value) bool
- func (n *Float32LiteralNode) Error() string
- func (n *Float32LiteralNode) Inspect() string
- func (*Float32LiteralNode) IsStatic() bool
- func (n *Float32LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *Float32LiteralNode) String() string
- type Float64LiteralNode
- func (*Float64LiteralNode) Class() *value.Class
- func (*Float64LiteralNode) DirectClass() *value.Class
- func (n *Float64LiteralNode) Equal(other value.Value) bool
- func (n *Float64LiteralNode) Error() string
- func (n *Float64LiteralNode) Inspect() string
- func (*Float64LiteralNode) IsStatic() bool
- func (n *Float64LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *Float64LiteralNode) String() string
- type FloatLiteralNode
- func (*FloatLiteralNode) Class() *value.Class
- func (*FloatLiteralNode) DirectClass() *value.Class
- func (n *FloatLiteralNode) Equal(other value.Value) bool
- func (n *FloatLiteralNode) Error() string
- func (n *FloatLiteralNode) Inspect() string
- func (*FloatLiteralNode) IsStatic() bool
- func (n *FloatLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *FloatLiteralNode) String() string
- type ForInExpressionNode
- func (*ForInExpressionNode) Class() *value.Class
- func (*ForInExpressionNode) DirectClass() *value.Class
- func (n *ForInExpressionNode) Equal(other value.Value) bool
- func (n *ForInExpressionNode) Error() string
- func (n *ForInExpressionNode) Inspect() string
- func (*ForInExpressionNode) IsStatic() bool
- func (n *ForInExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ForInExpressionNode) String() string
- type FormalParameterNode
- func (*FormalParameterNode) Class() *value.Class
- func (*FormalParameterNode) DirectClass() *value.Class
- func (n *FormalParameterNode) Equal(other value.Value) bool
- func (n *FormalParameterNode) Error() string
- func (n *FormalParameterNode) Inspect() string
- func (f *FormalParameterNode) IsOptional() bool
- func (*FormalParameterNode) IsStatic() bool
- func (n *FormalParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (f *FormalParameterNode) String() string
- type GenericConstantNode
- func (*GenericConstantNode) Class() *value.Class
- func (*GenericConstantNode) DirectClass() *value.Class
- func (n *GenericConstantNode) Equal(other value.Value) bool
- func (n *GenericConstantNode) Error() string
- func (n *GenericConstantNode) Inspect() string
- func (*GenericConstantNode) IsStatic() bool
- func (n *GenericConstantNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *GenericConstantNode) String() string
- type GenericConstructorCallNode
- func (*GenericConstructorCallNode) Class() *value.Class
- func (*GenericConstructorCallNode) DirectClass() *value.Class
- func (n *GenericConstructorCallNode) Equal(other value.Value) bool
- func (n *GenericConstructorCallNode) Error() string
- func (n *GenericConstructorCallNode) Inspect() string
- func (*GenericConstructorCallNode) IsStatic() bool
- func (n *GenericConstructorCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *GenericConstructorCallNode) String() string
- type GenericMethodCallNode
- func (*GenericMethodCallNode) Class() *value.Class
- func (*GenericMethodCallNode) DirectClass() *value.Class
- func (n *GenericMethodCallNode) Equal(other value.Value) bool
- func (n *GenericMethodCallNode) Error() string
- func (n *GenericMethodCallNode) Inspect() string
- func (*GenericMethodCallNode) IsStatic() bool
- func (n *GenericMethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *GenericMethodCallNode) String() string
- type GenericReceiverlessMethodCallNode
- func (*GenericReceiverlessMethodCallNode) Class() *value.Class
- func (*GenericReceiverlessMethodCallNode) DirectClass() *value.Class
- func (n *GenericReceiverlessMethodCallNode) Equal(other value.Value) bool
- func (n *GenericReceiverlessMethodCallNode) Error() string
- func (n *GenericReceiverlessMethodCallNode) Inspect() string
- func (*GenericReceiverlessMethodCallNode) IsStatic() bool
- func (n *GenericReceiverlessMethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *GenericReceiverlessMethodCallNode) String() string
- type GenericTypeDefinitionNode
- func (*GenericTypeDefinitionNode) Class() *value.Class
- func (*GenericTypeDefinitionNode) DirectClass() *value.Class
- func (n *GenericTypeDefinitionNode) Equal(other value.Value) bool
- func (n *GenericTypeDefinitionNode) Error() string
- func (n *GenericTypeDefinitionNode) Inspect() string
- func (*GenericTypeDefinitionNode) IsStatic() bool
- func (n *GenericTypeDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *GenericTypeDefinitionNode) String() string
- type GetterDeclarationNode
- func (*GetterDeclarationNode) Class() *value.Class
- func (*GetterDeclarationNode) DirectClass() *value.Class
- func (n *GetterDeclarationNode) Equal(other value.Value) bool
- func (n *GetterDeclarationNode) Error() string
- func (n *GetterDeclarationNode) Inspect() string
- func (*GetterDeclarationNode) IsStatic() bool
- func (n *GetterDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *GetterDeclarationNode) String() string
- type GoExpressionNode
- func (*GoExpressionNode) Class() *value.Class
- func (*GoExpressionNode) DirectClass() *value.Class
- func (n *GoExpressionNode) Equal(other value.Value) bool
- func (n *GoExpressionNode) Error() string
- func (n *GoExpressionNode) Inspect() string
- func (*GoExpressionNode) IsStatic() bool
- func (n *GoExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *GoExpressionNode) String() string
- type HashMapLiteralNode
- func (*HashMapLiteralNode) Class() *value.Class
- func (*HashMapLiteralNode) DirectClass() *value.Class
- func (n *HashMapLiteralNode) Equal(other value.Value) bool
- func (n *HashMapLiteralNode) Error() string
- func (n *HashMapLiteralNode) Inspect() string
- func (m *HashMapLiteralNode) IsStatic() bool
- func (n *HashMapLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *HashMapLiteralNode) String() string
- type HashRecordLiteralNode
- func (*HashRecordLiteralNode) Class() *value.Class
- func (*HashRecordLiteralNode) DirectClass() *value.Class
- func (n *HashRecordLiteralNode) Equal(other value.Value) bool
- func (n *HashRecordLiteralNode) Error() string
- func (n *HashRecordLiteralNode) Inspect() string
- func (r *HashRecordLiteralNode) IsStatic() bool
- func (n *HashRecordLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *HashRecordLiteralNode) String() string
- type HashSetLiteralNode
- func (*HashSetLiteralNode) Class() *value.Class
- func (*HashSetLiteralNode) DirectClass() *value.Class
- func (n *HashSetLiteralNode) Equal(other value.Value) bool
- func (n *HashSetLiteralNode) Error() string
- func (n *HashSetLiteralNode) Inspect() string
- func (s *HashSetLiteralNode) IsStatic() bool
- func (n *HashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *HashSetLiteralNode) String() string
- type HexArrayListLiteralNode
- func (*HexArrayListLiteralNode) Class() *value.Class
- func (*HexArrayListLiteralNode) DirectClass() *value.Class
- func (n *HexArrayListLiteralNode) Equal(other value.Value) bool
- func (n *HexArrayListLiteralNode) Error() string
- func (n *HexArrayListLiteralNode) Inspect() string
- func (h *HexArrayListLiteralNode) IsStatic() bool
- func (n *HexArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *HexArrayListLiteralNode) String() string
- type HexArrayTupleLiteralNode
- func (*HexArrayTupleLiteralNode) Class() *value.Class
- func (*HexArrayTupleLiteralNode) DirectClass() *value.Class
- func (n *HexArrayTupleLiteralNode) Equal(other value.Value) bool
- func (n *HexArrayTupleLiteralNode) Error() string
- func (n *HexArrayTupleLiteralNode) Inspect() string
- func (*HexArrayTupleLiteralNode) IsStatic() bool
- func (n *HexArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *HexArrayTupleLiteralNode) String() string
- type HexHashSetLiteralNode
- func (*HexHashSetLiteralNode) Class() *value.Class
- func (*HexHashSetLiteralNode) DirectClass() *value.Class
- func (n *HexHashSetLiteralNode) Equal(other value.Value) bool
- func (n *HexHashSetLiteralNode) Error() string
- func (n *HexHashSetLiteralNode) Inspect() string
- func (h *HexHashSetLiteralNode) IsStatic() bool
- func (n *HexHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *HexHashSetLiteralNode) String() string
- type IdentifierNode
- type IfExpressionNode
- func (*IfExpressionNode) Class() *value.Class
- func (*IfExpressionNode) DirectClass() *value.Class
- func (n *IfExpressionNode) Equal(other value.Value) bool
- func (n *IfExpressionNode) Error() string
- func (n *IfExpressionNode) Inspect() string
- func (*IfExpressionNode) IsStatic() bool
- func (n *IfExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *IfExpressionNode) String() string
- type ImplementExpressionNode
- func (*ImplementExpressionNode) Class() *value.Class
- func (*ImplementExpressionNode) DirectClass() *value.Class
- func (n *ImplementExpressionNode) Equal(other value.Value) bool
- func (n *ImplementExpressionNode) Error() string
- func (n *ImplementExpressionNode) Inspect() string
- func (*ImplementExpressionNode) IsStatic() bool
- func (n *ImplementExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*ImplementExpressionNode) SkipTypechecking() bool
- func (n *ImplementExpressionNode) String() string
- type ImportStatementNode
- func (e *ImportStatementNode) Class() *value.Class
- func (e *ImportStatementNode) DirectClass() *value.Class
- func (n *ImportStatementNode) Equal(other value.Value) bool
- func (e *ImportStatementNode) Error() string
- func (e *ImportStatementNode) Inspect() string
- func (i *ImportStatementNode) IsStatic() bool
- func (n *ImportStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ImportStatementNode) String() string
- type IncludeExpressionNode
- func (*IncludeExpressionNode) Class() *value.Class
- func (*IncludeExpressionNode) DirectClass() *value.Class
- func (n *IncludeExpressionNode) Equal(other value.Value) bool
- func (n *IncludeExpressionNode) Error() string
- func (n *IncludeExpressionNode) Inspect() string
- func (*IncludeExpressionNode) IsStatic() bool
- func (n *IncludeExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*IncludeExpressionNode) SkipTypechecking() bool
- func (n *IncludeExpressionNode) String() string
- type InitDefinitionNode
- func (*InitDefinitionNode) Class() *value.Class
- func (*InitDefinitionNode) DirectClass() *value.Class
- func (n *InitDefinitionNode) Equal(other value.Value) bool
- func (n *InitDefinitionNode) Error() string
- func (n *InitDefinitionNode) Inspect() string
- func (*InitDefinitionNode) IsStatic() bool
- func (n *InitDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *InitDefinitionNode) String() string
- type InstanceMethodLookupNode
- func (*InstanceMethodLookupNode) Class() *value.Class
- func (*InstanceMethodLookupNode) DirectClass() *value.Class
- func (n *InstanceMethodLookupNode) Equal(other value.Value) bool
- func (n *InstanceMethodLookupNode) Error() string
- func (n *InstanceMethodLookupNode) Inspect() string
- func (*InstanceMethodLookupNode) IsStatic() bool
- func (n *InstanceMethodLookupNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *InstanceMethodLookupNode) String() string
- type InstanceOfTypeNode
- func (*InstanceOfTypeNode) Class() *value.Class
- func (*InstanceOfTypeNode) DirectClass() *value.Class
- func (n *InstanceOfTypeNode) Equal(other value.Value) bool
- func (n *InstanceOfTypeNode) Error() string
- func (n *InstanceOfTypeNode) Inspect() string
- func (*InstanceOfTypeNode) IsStatic() bool
- func (n *InstanceOfTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *InstanceOfTypeNode) String() string
- type InstanceVariableDeclarationNode
- func (*InstanceVariableDeclarationNode) Class() *value.Class
- func (*InstanceVariableDeclarationNode) DirectClass() *value.Class
- func (n *InstanceVariableDeclarationNode) Equal(other value.Value) bool
- func (p *InstanceVariableDeclarationNode) Error() string
- func (n *InstanceVariableDeclarationNode) Inspect() string
- func (*InstanceVariableDeclarationNode) IsStatic() bool
- func (n *InstanceVariableDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *InstanceVariableDeclarationNode) String() string
- type InstanceVariableNode
- type Int8LiteralNode
- func (*Int8LiteralNode) Class() *value.Class
- func (*Int8LiteralNode) DirectClass() *value.Class
- func (n *Int8LiteralNode) Equal(other value.Value) bool
- func (n *Int8LiteralNode) Error() string
- func (n *Int8LiteralNode) Inspect() string
- func (*Int8LiteralNode) IsStatic() bool
- func (n *Int8LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *Int8LiteralNode) String() string
- type Int16LiteralNode
- func (*Int16LiteralNode) Class() *value.Class
- func (*Int16LiteralNode) DirectClass() *value.Class
- func (n *Int16LiteralNode) Equal(other value.Value) bool
- func (n *Int16LiteralNode) Error() string
- func (n *Int16LiteralNode) Inspect() string
- func (*Int16LiteralNode) IsStatic() bool
- func (n *Int16LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *Int16LiteralNode) String() string
- type Int32LiteralNode
- func (*Int32LiteralNode) Class() *value.Class
- func (*Int32LiteralNode) DirectClass() *value.Class
- func (n *Int32LiteralNode) Equal(other value.Value) bool
- func (n *Int32LiteralNode) Error() string
- func (n *Int32LiteralNode) Inspect() string
- func (*Int32LiteralNode) IsStatic() bool
- func (n *Int32LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *Int32LiteralNode) String() string
- type Int64LiteralNode
- func (*Int64LiteralNode) Class() *value.Class
- func (*Int64LiteralNode) DirectClass() *value.Class
- func (n *Int64LiteralNode) Equal(other value.Value) bool
- func (n *Int64LiteralNode) Error() string
- func (n *Int64LiteralNode) Inspect() string
- func (*Int64LiteralNode) IsStatic() bool
- func (n *Int64LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *Int64LiteralNode) String() string
- type IntCollectionContentNode
- type IntLiteralNode
- func (*IntLiteralNode) Class() *value.Class
- func (*IntLiteralNode) DirectClass() *value.Class
- func (n *IntLiteralNode) Equal(other value.Value) bool
- func (n *IntLiteralNode) Error() string
- func (n *IntLiteralNode) Inspect() string
- func (*IntLiteralNode) IsStatic() bool
- func (n *IntLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *IntLiteralNode) String() string
- type InterfaceDeclarationNode
- func (*InterfaceDeclarationNode) Class() *value.Class
- func (*InterfaceDeclarationNode) DirectClass() *value.Class
- func (n *InterfaceDeclarationNode) Equal(other value.Value) bool
- func (n *InterfaceDeclarationNode) Error() string
- func (n *InterfaceDeclarationNode) Inspect() string
- func (*InterfaceDeclarationNode) IsStatic() bool
- func (n *InterfaceDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*InterfaceDeclarationNode) SkipTypechecking() bool
- func (n *InterfaceDeclarationNode) String() string
- type InterpolatedRegexLiteralNode
- func (*InterpolatedRegexLiteralNode) Class() *value.Class
- func (*InterpolatedRegexLiteralNode) DirectClass() *value.Class
- func (n *InterpolatedRegexLiteralNode) Equal(other value.Value) bool
- func (n *InterpolatedRegexLiteralNode) Error() string
- func (n *InterpolatedRegexLiteralNode) Inspect() string
- func (r *InterpolatedRegexLiteralNode) IsASCII() bool
- func (r *InterpolatedRegexLiteralNode) IsCaseInsensitive() bool
- func (r *InterpolatedRegexLiteralNode) IsDotAll() bool
- func (r *InterpolatedRegexLiteralNode) IsExtended() bool
- func (r *InterpolatedRegexLiteralNode) IsMultiline() bool
- func (*InterpolatedRegexLiteralNode) IsStatic() bool
- func (r *InterpolatedRegexLiteralNode) IsUngreedy() bool
- func (n *InterpolatedRegexLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (r *InterpolatedRegexLiteralNode) SetASCII() *InterpolatedRegexLiteralNode
- func (r *InterpolatedRegexLiteralNode) SetCaseInsensitive() *InterpolatedRegexLiteralNode
- func (r *InterpolatedRegexLiteralNode) SetDotAll() *InterpolatedRegexLiteralNode
- func (r *InterpolatedRegexLiteralNode) SetExtended() *InterpolatedRegexLiteralNode
- func (r *InterpolatedRegexLiteralNode) SetMultiline() *InterpolatedRegexLiteralNode
- func (r *InterpolatedRegexLiteralNode) SetUngreedy() *InterpolatedRegexLiteralNode
- func (n *InterpolatedRegexLiteralNode) String() string
- func (*InterpolatedRegexLiteralNode) Type(env *types.GlobalEnvironment) types.Type
- type InterpolatedStringLiteralNode
- func (*InterpolatedStringLiteralNode) Class() *value.Class
- func (*InterpolatedStringLiteralNode) DirectClass() *value.Class
- func (n *InterpolatedStringLiteralNode) Equal(other value.Value) bool
- func (n *InterpolatedStringLiteralNode) Error() string
- func (n *InterpolatedStringLiteralNode) Inspect() string
- func (*InterpolatedStringLiteralNode) IsStatic() bool
- func (n *InterpolatedStringLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *InterpolatedStringLiteralNode) String() string
- func (*InterpolatedStringLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type InterpolatedSymbolLiteralNode
- func (*InterpolatedSymbolLiteralNode) Class() *value.Class
- func (*InterpolatedSymbolLiteralNode) DirectClass() *value.Class
- func (n *InterpolatedSymbolLiteralNode) Equal(other value.Value) bool
- func (n *InterpolatedSymbolLiteralNode) Error() string
- func (n *InterpolatedSymbolLiteralNode) Inspect() string
- func (*InterpolatedSymbolLiteralNode) IsStatic() bool
- func (n *InterpolatedSymbolLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *InterpolatedSymbolLiteralNode) String() string
- func (*InterpolatedSymbolLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type IntersectionTypeNode
- func (*IntersectionTypeNode) Class() *value.Class
- func (*IntersectionTypeNode) DirectClass() *value.Class
- func (n *IntersectionTypeNode) Equal(other value.Value) bool
- func (n *IntersectionTypeNode) Error() string
- func (n *IntersectionTypeNode) Inspect() string
- func (*IntersectionTypeNode) IsStatic() bool
- func (n *IntersectionTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *IntersectionTypeNode) String() string
- type InvalidNode
- func (*InvalidNode) Class() *value.Class
- func (*InvalidNode) DirectClass() *value.Class
- func (n *InvalidNode) Equal(other value.Value) bool
- func (p *InvalidNode) Error() string
- func (n *InvalidNode) Inspect() string
- func (*InvalidNode) IsOptional() bool
- func (*InvalidNode) IsStatic() bool
- func (n *InvalidNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*InvalidNode) SetType(types.Type)
- func (n *InvalidNode) String() string
- type KeyValueExpressionNode
- func (*KeyValueExpressionNode) Class() *value.Class
- func (*KeyValueExpressionNode) DirectClass() *value.Class
- func (n *KeyValueExpressionNode) Equal(other value.Value) bool
- func (n *KeyValueExpressionNode) Error() string
- func (n *KeyValueExpressionNode) Inspect() string
- func (k *KeyValueExpressionNode) IsStatic() bool
- func (n *KeyValueExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *KeyValueExpressionNode) String() string
- type KeyValuePatternNode
- func (*KeyValuePatternNode) Class() *value.Class
- func (*KeyValuePatternNode) DirectClass() *value.Class
- func (n *KeyValuePatternNode) Equal(other value.Value) bool
- func (n *KeyValuePatternNode) Error() string
- func (n *KeyValuePatternNode) Inspect() string
- func (k *KeyValuePatternNode) IsStatic() bool
- func (n *KeyValuePatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *KeyValuePatternNode) String() string
- type LabeledExpressionNode
- func (*LabeledExpressionNode) Class() *value.Class
- func (*LabeledExpressionNode) DirectClass() *value.Class
- func (n *LabeledExpressionNode) Equal(other value.Value) bool
- func (n *LabeledExpressionNode) Error() string
- func (n *LabeledExpressionNode) Inspect() string
- func (l *LabeledExpressionNode) IsStatic() bool
- func (n *LabeledExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *LabeledExpressionNode) String() string
- func (l *LabeledExpressionNode) Type(env *types.GlobalEnvironment) types.Type
- type ListPatternNode
- func (*ListPatternNode) Class() *value.Class
- func (*ListPatternNode) DirectClass() *value.Class
- func (n *ListPatternNode) Equal(other value.Value) bool
- func (n *ListPatternNode) Error() string
- func (n *ListPatternNode) Inspect() string
- func (l *ListPatternNode) IsStatic() bool
- func (n *ListPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ListPatternNode) String() string
- type LiteralPatternNode
- func NewBinArrayListLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
- func NewBinArrayTupleLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
- func NewBinHashSetLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
- func NewHexArrayListLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
- func NewHexArrayTupleLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
- func NewHexHashSetLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
- func NewInvalidLiteralPatternNode(loc *position.Location, tok *token.Token) LiteralPatternNode
- func NewSymbolArrayListLiteralPatternNode(loc *position.Location, elements []SymbolCollectionContentNode) LiteralPatternNode
- func NewSymbolArrayTupleLiteralPatternNode(loc *position.Location, elements []SymbolCollectionContentNode) LiteralPatternNode
- func NewSymbolHashSetLiteralPatternNode(loc *position.Location, elements []SymbolCollectionContentNode) LiteralPatternNode
- func NewWordArrayListLiteralPatternNode(loc *position.Location, elements []WordCollectionContentNode) LiteralPatternNode
- func NewWordArrayTupleLiteralPatternNode(loc *position.Location, elements []WordCollectionContentNode) LiteralPatternNode
- func NewWordHashSetLiteralPatternNode(loc *position.Location, elements []WordCollectionContentNode) LiteralPatternNode
- type LogicalExpressionNode
- func (*LogicalExpressionNode) Class() *value.Class
- func (*LogicalExpressionNode) DirectClass() *value.Class
- func (n *LogicalExpressionNode) Equal(other value.Value) bool
- func (n *LogicalExpressionNode) Error() string
- func (n *LogicalExpressionNode) Inspect() string
- func (l *LogicalExpressionNode) IsStatic() bool
- func (n *LogicalExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *LogicalExpressionNode) String() string
- type LoopExpressionNode
- func (*LoopExpressionNode) Class() *value.Class
- func (*LoopExpressionNode) DirectClass() *value.Class
- func (n *LoopExpressionNode) Equal(other value.Value) bool
- func (n *LoopExpressionNode) Error() string
- func (n *LoopExpressionNode) Inspect() string
- func (*LoopExpressionNode) IsStatic() bool
- func (n *LoopExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *LoopExpressionNode) String() string
- type MacroBoundaryNode
- func (*MacroBoundaryNode) Class() *value.Class
- func (*MacroBoundaryNode) DirectClass() *value.Class
- func (n *MacroBoundaryNode) Equal(other value.Value) bool
- func (n *MacroBoundaryNode) Error() string
- func (n *MacroBoundaryNode) Inspect() string
- func (m *MacroBoundaryNode) IsStatic() bool
- func (n *MacroBoundaryNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MacroBoundaryNode) String() string
- type MacroCallNode
- func (*MacroCallNode) Class() *value.Class
- func (*MacroCallNode) DirectClass() *value.Class
- func (n *MacroCallNode) Equal(other value.Value) bool
- func (n *MacroCallNode) Error() string
- func (n *MacroCallNode) Inspect() string
- func (*MacroCallNode) IsStatic() bool
- func (n *MacroCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MacroCallNode) String() string
- type MacroDefinitionNode
- func (*MacroDefinitionNode) Class() *value.Class
- func (*MacroDefinitionNode) DirectClass() *value.Class
- func (n *MacroDefinitionNode) Equal(other value.Value) bool
- func (p *MacroDefinitionNode) Error() string
- func (n *MacroDefinitionNode) Inspect() string
- func (m *MacroDefinitionNode) IsSealed() bool
- func (*MacroDefinitionNode) IsStatic() bool
- func (n *MacroDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (m *MacroDefinitionNode) SetSealed()
- func (n *MacroDefinitionNode) String() string
- type MacroKind
- type MacroNameNode
- func (*MacroNameNode) Class() *value.Class
- func (*MacroNameNode) DirectClass() *value.Class
- func (n *MacroNameNode) Equal(other value.Value) bool
- func (n *MacroNameNode) Error() string
- func (n *MacroNameNode) Inspect() string
- func (*MacroNameNode) IsStatic() bool
- func (n *MacroNameNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MacroNameNode) String() string
- type MapPatternNode
- func (*MapPatternNode) Class() *value.Class
- func (*MapPatternNode) DirectClass() *value.Class
- func (n *MapPatternNode) Equal(other value.Value) bool
- func (n *MapPatternNode) Error() string
- func (n *MapPatternNode) Inspect() string
- func (m *MapPatternNode) IsStatic() bool
- func (n *MapPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MapPatternNode) String() string
- type MatchExpressionNode
- func (*MatchExpressionNode) Class() *value.Class
- func (*MatchExpressionNode) DirectClass() *value.Class
- func (n *MatchExpressionNode) Equal(other value.Value) bool
- func (n *MatchExpressionNode) Error() string
- func (n *MatchExpressionNode) Inspect() string
- func (b *MatchExpressionNode) IsStatic() bool
- func (n *MatchExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MatchExpressionNode) String() string
- type MethodCallNode
- func (*MethodCallNode) Class() *value.Class
- func (*MethodCallNode) DirectClass() *value.Class
- func (n *MethodCallNode) Equal(other value.Value) bool
- func (n *MethodCallNode) Error() string
- func (n *MethodCallNode) Inspect() string
- func (*MethodCallNode) IsStatic() bool
- func (n *MethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MethodCallNode) String() string
- type MethodDefinitionNode
- func (*MethodDefinitionNode) Class() *value.Class
- func (*MethodDefinitionNode) DirectClass() *value.Class
- func (n *MethodDefinitionNode) Equal(other value.Value) bool
- func (p *MethodDefinitionNode) Error() string
- func (n *MethodDefinitionNode) Inspect() string
- func (m *MethodDefinitionNode) IsAbstract() bool
- func (m *MethodDefinitionNode) IsAsync() bool
- func (m *MethodDefinitionNode) IsGenerator() bool
- func (m *MethodDefinitionNode) IsOverload() bool
- func (m *MethodDefinitionNode) IsSealed() bool
- func (m *MethodDefinitionNode) IsSetter() bool
- func (*MethodDefinitionNode) IsStatic() bool
- func (n *MethodDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (m *MethodDefinitionNode) SetAbstract()
- func (m *MethodDefinitionNode) SetAsync()
- func (m *MethodDefinitionNode) SetGenerator()
- func (m *MethodDefinitionNode) SetOverload()
- func (m *MethodDefinitionNode) SetSealed()
- func (n *MethodDefinitionNode) String() string
- type MethodLookupAsNode
- func (*MethodLookupAsNode) Class() *value.Class
- func (*MethodLookupAsNode) DirectClass() *value.Class
- func (n *MethodLookupAsNode) Equal(other value.Value) bool
- func (n *MethodLookupAsNode) Error() string
- func (n *MethodLookupAsNode) Inspect() string
- func (n *MethodLookupAsNode) IsMacro() bool
- func (*MethodLookupAsNode) IsStatic() bool
- func (n *MethodLookupAsNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MethodLookupAsNode) String() string
- type MethodLookupNode
- func (*MethodLookupNode) Class() *value.Class
- func (*MethodLookupNode) DirectClass() *value.Class
- func (n *MethodLookupNode) Equal(other value.Value) bool
- func (n *MethodLookupNode) Error() string
- func (n *MethodLookupNode) Inspect() string
- func (n *MethodLookupNode) IsMacro() bool
- func (*MethodLookupNode) IsStatic() bool
- func (n *MethodLookupNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MethodLookupNode) String() string
- type MethodParameterNode
- func (*MethodParameterNode) Class() *value.Class
- func (*MethodParameterNode) DirectClass() *value.Class
- func (n *MethodParameterNode) Equal(other value.Value) bool
- func (n *MethodParameterNode) Error() string
- func (n *MethodParameterNode) Inspect() string
- func (f *MethodParameterNode) IsOptional() bool
- func (*MethodParameterNode) IsStatic() bool
- func (n *MethodParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MethodParameterNode) String() string
- type MethodSignatureDefinitionNode
- func (*MethodSignatureDefinitionNode) Class() *value.Class
- func (*MethodSignatureDefinitionNode) DirectClass() *value.Class
- func (n *MethodSignatureDefinitionNode) Equal(other value.Value) bool
- func (n *MethodSignatureDefinitionNode) Error() string
- func (n *MethodSignatureDefinitionNode) Inspect() string
- func (*MethodSignatureDefinitionNode) IsStatic() bool
- func (n *MethodSignatureDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MethodSignatureDefinitionNode) String() string
- type MixinDeclarationNode
- func (*MixinDeclarationNode) Class() *value.Class
- func (*MixinDeclarationNode) DirectClass() *value.Class
- func (n *MixinDeclarationNode) Equal(other value.Value) bool
- func (n *MixinDeclarationNode) Error() string
- func (n *MixinDeclarationNode) Inspect() string
- func (*MixinDeclarationNode) IsStatic() bool
- func (n *MixinDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*MixinDeclarationNode) SkipTypechecking() bool
- func (n *MixinDeclarationNode) String() string
- type ModifierForInNode
- func (*ModifierForInNode) Class() *value.Class
- func (*ModifierForInNode) DirectClass() *value.Class
- func (n *ModifierForInNode) Equal(other value.Value) bool
- func (m *ModifierForInNode) Error() string
- func (n *ModifierForInNode) Inspect() string
- func (*ModifierForInNode) IsStatic() bool
- func (n *ModifierForInNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ModifierForInNode) String() string
- type ModifierIfElseNode
- func (*ModifierIfElseNode) Class() *value.Class
- func (*ModifierIfElseNode) DirectClass() *value.Class
- func (n *ModifierIfElseNode) Equal(other value.Value) bool
- func (m *ModifierIfElseNode) Error() string
- func (n *ModifierIfElseNode) Inspect() string
- func (*ModifierIfElseNode) IsStatic() bool
- func (n *ModifierIfElseNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ModifierIfElseNode) String() string
- type ModifierNode
- func (*ModifierNode) Class() *value.Class
- func (*ModifierNode) DirectClass() *value.Class
- func (n *ModifierNode) Equal(other value.Value) bool
- func (m *ModifierNode) Error() string
- func (n *ModifierNode) Inspect() string
- func (*ModifierNode) IsStatic() bool
- func (n *ModifierNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ModifierNode) String() string
- type ModuleDeclarationNode
- func (*ModuleDeclarationNode) Class() *value.Class
- func (*ModuleDeclarationNode) DirectClass() *value.Class
- func (n *ModuleDeclarationNode) Equal(other value.Value) bool
- func (n *ModuleDeclarationNode) Error() string
- func (n *ModuleDeclarationNode) Inspect() string
- func (*ModuleDeclarationNode) IsStatic() bool
- func (n *ModuleDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*ModuleDeclarationNode) SkipTypechecking() bool
- func (n *ModuleDeclarationNode) String() string
- type MustExpressionNode
- func (*MustExpressionNode) Class() *value.Class
- func (*MustExpressionNode) DirectClass() *value.Class
- func (n *MustExpressionNode) Equal(other value.Value) bool
- func (n *MustExpressionNode) Error() string
- func (n *MustExpressionNode) Inspect() string
- func (*MustExpressionNode) IsStatic() bool
- func (n *MustExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *MustExpressionNode) String() string
- type NamedArgumentNode
- type NamedCallArgumentNode
- func (*NamedCallArgumentNode) Class() *value.Class
- func (*NamedCallArgumentNode) DirectClass() *value.Class
- func (n *NamedCallArgumentNode) Equal(other value.Value) bool
- func (n *NamedCallArgumentNode) Error() string
- func (n *NamedCallArgumentNode) Inspect() string
- func (*NamedCallArgumentNode) IsStatic() bool
- func (n *NamedCallArgumentNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *NamedCallArgumentNode) String() string
- type NeverTypeNode
- func (*NeverTypeNode) Class() *value.Class
- func (*NeverTypeNode) DirectClass() *value.Class
- func (n *NeverTypeNode) Equal(other value.Value) bool
- func (n *NeverTypeNode) Error() string
- func (n *NeverTypeNode) Inspect() string
- func (*NeverTypeNode) IsStatic() bool
- func (n *NeverTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *NeverTypeNode) String() string
- func (*NeverTypeNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type NewExpressionNode
- func (*NewExpressionNode) Class() *value.Class
- func (*NewExpressionNode) DirectClass() *value.Class
- func (n *NewExpressionNode) Equal(other value.Value) bool
- func (n *NewExpressionNode) Error() string
- func (n *NewExpressionNode) Inspect() string
- func (*NewExpressionNode) IsStatic() bool
- func (n *NewExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *NewExpressionNode) String() string
- type NilLiteralNode
- func (*NilLiteralNode) Class() *value.Class
- func (*NilLiteralNode) DirectClass() *value.Class
- func (n *NilLiteralNode) Equal(other value.Value) bool
- func (n *NilLiteralNode) Error() string
- func (n *NilLiteralNode) Inspect() string
- func (*NilLiteralNode) IsStatic() bool
- func (n *NilLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*NilLiteralNode) SetType(types.Type)
- func (n *NilLiteralNode) String() string
- func (*NilLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type NilSafeSubscriptExpressionNode
- func (*NilSafeSubscriptExpressionNode) Class() *value.Class
- func (*NilSafeSubscriptExpressionNode) DirectClass() *value.Class
- func (n *NilSafeSubscriptExpressionNode) Equal(other value.Value) bool
- func (n *NilSafeSubscriptExpressionNode) Error() string
- func (n *NilSafeSubscriptExpressionNode) Inspect() string
- func (s *NilSafeSubscriptExpressionNode) IsStatic() bool
- func (n *NilSafeSubscriptExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *NilSafeSubscriptExpressionNode) String() string
- type NilableTypeNode
- func (*NilableTypeNode) Class() *value.Class
- func (*NilableTypeNode) DirectClass() *value.Class
- func (n *NilableTypeNode) Equal(other value.Value) bool
- func (n *NilableTypeNode) Error() string
- func (n *NilableTypeNode) Inspect() string
- func (*NilableTypeNode) IsStatic() bool
- func (n *NilableTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *NilableTypeNode) String() string
- type Node
- type NodeBase
- func (n *NodeBase) Class() *value.Class
- func (n *NodeBase) Copy() value.Reference
- func (n *NodeBase) DirectClass() *value.Class
- func (n *NodeBase) Error() string
- func (n *NodeBase) Inspect() string
- func (n *NodeBase) InstanceVariables() *value.InstanceVariables
- func (n *NodeBase) Location() *position.Location
- func (n *NodeBase) SetLocation(loc *position.Location)
- func (t *NodeBase) SetSpan(span *position.Span)
- func (*NodeBase) SetType(types.Type)
- func (n *NodeBase) SingletonClass() *value.Class
- func (t *NodeBase) SkipTypechecking() bool
- func (t *NodeBase) Span() *position.Span
- func (*NodeBase) Type(globalEnv *types.GlobalEnvironment) types.Type
- type NotTypeNode
- func (*NotTypeNode) Class() *value.Class
- func (*NotTypeNode) DirectClass() *value.Class
- func (n *NotTypeNode) Equal(other value.Value) bool
- func (n *NotTypeNode) Error() string
- func (n *NotTypeNode) Inspect() string
- func (*NotTypeNode) IsStatic() bool
- func (n *NotTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *NotTypeNode) String() string
- type NumericForExpressionNode
- func (*NumericForExpressionNode) Class() *value.Class
- func (*NumericForExpressionNode) DirectClass() *value.Class
- func (n *NumericForExpressionNode) Equal(other value.Value) bool
- func (n *NumericForExpressionNode) Error() string
- func (n *NumericForExpressionNode) Inspect() string
- func (*NumericForExpressionNode) IsStatic() bool
- func (n *NumericForExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *NumericForExpressionNode) String() string
- type ObjectPatternNode
- func (*ObjectPatternNode) Class() *value.Class
- func (*ObjectPatternNode) DirectClass() *value.Class
- func (n *ObjectPatternNode) Equal(other value.Value) bool
- func (n *ObjectPatternNode) Error() string
- func (n *ObjectPatternNode) Inspect() string
- func (m *ObjectPatternNode) IsStatic() bool
- func (n *ObjectPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ObjectPatternNode) String() string
- type ParameterKind
- type ParameterNode
- type ParameterStatementNode
- func (*ParameterStatementNode) Class() *value.Class
- func (*ParameterStatementNode) DirectClass() *value.Class
- func (n *ParameterStatementNode) Equal(other value.Value) bool
- func (e *ParameterStatementNode) Error() string
- func (n *ParameterStatementNode) Inspect() string
- func (*ParameterStatementNode) IsStatic() bool
- func (n *ParameterStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ParameterStatementNode) String() string
- type PatternExpressionNode
- func (*PatternExpressionNode) Class() *value.Class
- func (*PatternExpressionNode) DirectClass() *value.Class
- func (n *PatternExpressionNode) Equal(other value.Value) bool
- func (n *PatternExpressionNode) Error() string
- func (n *PatternExpressionNode) Inspect() string
- func (*PatternExpressionNode) IsStatic() bool
- func (n *PatternExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PatternExpressionNode) String() string
- type PatternNode
- func NewBinaryPatternNodeI(loc *position.Location, op *token.Token, left, right PatternNode) PatternNode
- func NewInvalidPatternNode(loc *position.Location, tok *token.Token) PatternNode
- func NewListPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
- func NewMapPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
- func NewRecordPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
- func NewSetPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
- func NewTuplePatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
- type PatternStatementNode
- func (*PatternStatementNode) Class() *value.Class
- func (*PatternStatementNode) DirectClass() *value.Class
- func (n *PatternStatementNode) Equal(other value.Value) bool
- func (e *PatternStatementNode) Error() string
- func (n *PatternStatementNode) Inspect() string
- func (*PatternStatementNode) IsStatic() bool
- func (n *PatternStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PatternStatementNode) String() string
- type PatternTypeExpressionNode
- type PostfixExpressionNode
- func (*PostfixExpressionNode) Class() *value.Class
- func (*PostfixExpressionNode) DirectClass() *value.Class
- func (n *PostfixExpressionNode) Equal(other value.Value) bool
- func (p *PostfixExpressionNode) Error() string
- func (n *PostfixExpressionNode) Inspect() string
- func (i *PostfixExpressionNode) IsStatic() bool
- func (n *PostfixExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PostfixExpressionNode) String() string
- type PrivateConstantNode
- func (*PrivateConstantNode) Class() *value.Class
- func (*PrivateConstantNode) DirectClass() *value.Class
- func (n *PrivateConstantNode) Equal(other value.Value) bool
- func (n *PrivateConstantNode) Error() string
- func (n *PrivateConstantNode) Inspect() string
- func (*PrivateConstantNode) IsStatic() bool
- func (n *PrivateConstantNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PrivateConstantNode) String() string
- type PrivateIdentifierNode
- func (*PrivateIdentifierNode) Class() *value.Class
- func (*PrivateIdentifierNode) DirectClass() *value.Class
- func (n *PrivateIdentifierNode) Equal(other value.Value) bool
- func (n *PrivateIdentifierNode) Error() string
- func (n *PrivateIdentifierNode) Inspect() string
- func (*PrivateIdentifierNode) IsStatic() bool
- func (n *PrivateIdentifierNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PrivateIdentifierNode) String() string
- type ProgramNode
- func (*ProgramNode) Class() *value.Class
- func (*ProgramNode) DirectClass() *value.Class
- func (n *ProgramNode) Equal(other value.Value) bool
- func (p *ProgramNode) Error() string
- func (n *ProgramNode) Inspect() string
- func (*ProgramNode) IsStatic() bool
- func (n *ProgramNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ProgramNode) String() string
- type ProgramState
- type PublicConstantAsNode
- func (*PublicConstantAsNode) Class() *value.Class
- func (*PublicConstantAsNode) DirectClass() *value.Class
- func (n *PublicConstantAsNode) Equal(other value.Value) bool
- func (n *PublicConstantAsNode) Error() string
- func (n *PublicConstantAsNode) Inspect() string
- func (*PublicConstantAsNode) IsStatic() bool
- func (n *PublicConstantAsNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PublicConstantAsNode) String() string
- type PublicConstantNode
- func (*PublicConstantNode) Class() *value.Class
- func (*PublicConstantNode) DirectClass() *value.Class
- func (n *PublicConstantNode) Equal(other value.Value) bool
- func (n *PublicConstantNode) Error() string
- func (n *PublicConstantNode) Inspect() string
- func (*PublicConstantNode) IsStatic() bool
- func (n *PublicConstantNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PublicConstantNode) String() string
- type PublicIdentifierNode
- func (*PublicIdentifierNode) Class() *value.Class
- func (*PublicIdentifierNode) DirectClass() *value.Class
- func (n *PublicIdentifierNode) Equal(other value.Value) bool
- func (n *PublicIdentifierNode) Error() string
- func (n *PublicIdentifierNode) Inspect() string
- func (*PublicIdentifierNode) IsStatic() bool
- func (n *PublicIdentifierNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PublicIdentifierNode) String() string
- type PublicInstanceVariableNode
- func (*PublicInstanceVariableNode) Class() *value.Class
- func (*PublicInstanceVariableNode) DirectClass() *value.Class
- func (n *PublicInstanceVariableNode) Equal(other value.Value) bool
- func (p *PublicInstanceVariableNode) Error() string
- func (i *PublicInstanceVariableNode) Inspect() string
- func (*PublicInstanceVariableNode) IsStatic() bool
- func (n *PublicInstanceVariableNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *PublicInstanceVariableNode) String() string
- type QuoteExpressionNode
- func (*QuoteExpressionNode) Class() *value.Class
- func (*QuoteExpressionNode) DirectClass() *value.Class
- func (n *QuoteExpressionNode) Equal(other value.Value) bool
- func (n *QuoteExpressionNode) Error() string
- func (n *QuoteExpressionNode) Inspect() string
- func (*QuoteExpressionNode) IsStatic() bool
- func (n *QuoteExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *QuoteExpressionNode) SingleExpression() ExpressionNode
- func (n *QuoteExpressionNode) String() string
- type QuoteKind
- type RangeLiteralNode
- func (*RangeLiteralNode) Class() *value.Class
- func (*RangeLiteralNode) DirectClass() *value.Class
- func (n *RangeLiteralNode) Equal(other value.Value) bool
- func (n *RangeLiteralNode) Error() string
- func (n *RangeLiteralNode) Inspect() string
- func (r *RangeLiteralNode) IsStatic() bool
- func (n *RangeLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *RangeLiteralNode) String() string
- type RawCharLiteralNode
- func (*RawCharLiteralNode) Class() *value.Class
- func (*RawCharLiteralNode) DirectClass() *value.Class
- func (n *RawCharLiteralNode) Equal(other value.Value) bool
- func (n *RawCharLiteralNode) Error() string
- func (n *RawCharLiteralNode) Inspect() string
- func (*RawCharLiteralNode) IsStatic() bool
- func (n *RawCharLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *RawCharLiteralNode) String() string
- type RawStringLiteralNode
- func (*RawStringLiteralNode) Class() *value.Class
- func (*RawStringLiteralNode) DirectClass() *value.Class
- func (n *RawStringLiteralNode) Equal(other value.Value) bool
- func (n *RawStringLiteralNode) Error() string
- func (n *RawStringLiteralNode) Inspect() string
- func (*RawStringLiteralNode) IsStatic() bool
- func (n *RawStringLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *RawStringLiteralNode) String() string
- type ReceiverlessMacroCallNode
- func (*ReceiverlessMacroCallNode) Class() *value.Class
- func (*ReceiverlessMacroCallNode) DirectClass() *value.Class
- func (n *ReceiverlessMacroCallNode) Equal(other value.Value) bool
- func (n *ReceiverlessMacroCallNode) Error() string
- func (n *ReceiverlessMacroCallNode) Inspect() string
- func (*ReceiverlessMacroCallNode) IsStatic() bool
- func (n *ReceiverlessMacroCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ReceiverlessMacroCallNode) String() string
- type ReceiverlessMethodCallNode
- func (*ReceiverlessMethodCallNode) Class() *value.Class
- func (*ReceiverlessMethodCallNode) DirectClass() *value.Class
- func (n *ReceiverlessMethodCallNode) Equal(other value.Value) bool
- func (n *ReceiverlessMethodCallNode) Error() string
- func (n *ReceiverlessMethodCallNode) Inspect() string
- func (*ReceiverlessMethodCallNode) IsStatic() bool
- func (n *ReceiverlessMethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ReceiverlessMethodCallNode) String() string
- type RecordPatternNode
- func (*RecordPatternNode) Class() *value.Class
- func (*RecordPatternNode) DirectClass() *value.Class
- func (n *RecordPatternNode) Equal(other value.Value) bool
- func (n *RecordPatternNode) Error() string
- func (n *RecordPatternNode) Inspect() string
- func (m *RecordPatternNode) IsStatic() bool
- func (n *RecordPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *RecordPatternNode) String() string
- type RegexInterpolationNode
- func (*RegexInterpolationNode) Class() *value.Class
- func (*RegexInterpolationNode) DirectClass() *value.Class
- func (n *RegexInterpolationNode) Equal(other value.Value) bool
- func (n *RegexInterpolationNode) Error() string
- func (n *RegexInterpolationNode) Inspect() string
- func (*RegexInterpolationNode) IsStatic() bool
- func (n *RegexInterpolationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *RegexInterpolationNode) String() string
- type RegexLiteralContentNode
- type RegexLiteralContentSectionNode
- func (*RegexLiteralContentSectionNode) Class() *value.Class
- func (*RegexLiteralContentSectionNode) DirectClass() *value.Class
- func (n *RegexLiteralContentSectionNode) Equal(other value.Value) bool
- func (n *RegexLiteralContentSectionNode) Error() string
- func (n *RegexLiteralContentSectionNode) Inspect() string
- func (*RegexLiteralContentSectionNode) IsStatic() bool
- func (n *RegexLiteralContentSectionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *RegexLiteralContentSectionNode) String() string
- type RegexLiteralNode
- type RestPatternNode
- func (*RestPatternNode) Class() *value.Class
- func (*RestPatternNode) DirectClass() *value.Class
- func (n *RestPatternNode) Equal(other value.Value) bool
- func (n *RestPatternNode) Error() string
- func (n *RestPatternNode) Inspect() string
- func (r *RestPatternNode) IsStatic() bool
- func (n *RestPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *RestPatternNode) String() string
- type ReturnExpressionNode
- func (*ReturnExpressionNode) Class() *value.Class
- func (*ReturnExpressionNode) DirectClass() *value.Class
- func (n *ReturnExpressionNode) Equal(other value.Value) bool
- func (n *ReturnExpressionNode) Error() string
- func (n *ReturnExpressionNode) Inspect() string
- func (*ReturnExpressionNode) IsStatic() bool
- func (n *ReturnExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ReturnExpressionNode) String() string
- func (*ReturnExpressionNode) Type(*types.GlobalEnvironment) types.Type
- type ScopedMacroCallNode
- func (*ScopedMacroCallNode) Class() *value.Class
- func (*ScopedMacroCallNode) DirectClass() *value.Class
- func (n *ScopedMacroCallNode) Equal(other value.Value) bool
- func (n *ScopedMacroCallNode) Error() string
- func (n *ScopedMacroCallNode) Inspect() string
- func (*ScopedMacroCallNode) IsStatic() bool
- func (n *ScopedMacroCallNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ScopedMacroCallNode) String() string
- type SelfLiteralNode
- func (*SelfLiteralNode) Class() *value.Class
- func (*SelfLiteralNode) DirectClass() *value.Class
- func (n *SelfLiteralNode) Equal(other value.Value) bool
- func (n *SelfLiteralNode) Error() string
- func (n *SelfLiteralNode) Inspect() string
- func (*SelfLiteralNode) IsStatic() bool
- func (n *SelfLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SelfLiteralNode) String() string
- type SetPatternNode
- func (*SetPatternNode) Class() *value.Class
- func (*SetPatternNode) DirectClass() *value.Class
- func (n *SetPatternNode) Equal(other value.Value) bool
- func (n *SetPatternNode) Error() string
- func (n *SetPatternNode) Inspect() string
- func (s *SetPatternNode) IsStatic() bool
- func (n *SetPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SetPatternNode) String() string
- type SetterDeclarationNode
- func (*SetterDeclarationNode) Class() *value.Class
- func (*SetterDeclarationNode) DirectClass() *value.Class
- func (n *SetterDeclarationNode) Equal(other value.Value) bool
- func (n *SetterDeclarationNode) Error() string
- func (n *SetterDeclarationNode) Inspect() string
- func (*SetterDeclarationNode) IsStatic() bool
- func (n *SetterDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SetterDeclarationNode) String() string
- type SignatureParameterNode
- func (*SignatureParameterNode) Class() *value.Class
- func (*SignatureParameterNode) DirectClass() *value.Class
- func (n *SignatureParameterNode) Equal(other value.Value) bool
- func (n *SignatureParameterNode) Error() string
- func (n *SignatureParameterNode) Inspect() string
- func (f *SignatureParameterNode) IsOptional() bool
- func (*SignatureParameterNode) IsStatic() bool
- func (n *SignatureParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SignatureParameterNode) String() string
- type SimpleStringLiteralNode
- type SimpleSymbolLiteralNode
- func (*SimpleSymbolLiteralNode) Class() *value.Class
- func (*SimpleSymbolLiteralNode) DirectClass() *value.Class
- func (n *SimpleSymbolLiteralNode) Equal(other value.Value) bool
- func (n *SimpleSymbolLiteralNode) Error() string
- func (n *SimpleSymbolLiteralNode) Inspect() string
- func (*SimpleSymbolLiteralNode) IsStatic() bool
- func (n *SimpleSymbolLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SimpleSymbolLiteralNode) String() string
- type SingletonBlockExpressionNode
- func (*SingletonBlockExpressionNode) Class() *value.Class
- func (*SingletonBlockExpressionNode) DirectClass() *value.Class
- func (n *SingletonBlockExpressionNode) Equal(other value.Value) bool
- func (n *SingletonBlockExpressionNode) Error() string
- func (n *SingletonBlockExpressionNode) Inspect() string
- func (*SingletonBlockExpressionNode) IsStatic() bool
- func (n *SingletonBlockExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*SingletonBlockExpressionNode) SkipTypechecking() bool
- func (n *SingletonBlockExpressionNode) String() string
- type SingletonTypeNode
- func (*SingletonTypeNode) Class() *value.Class
- func (*SingletonTypeNode) DirectClass() *value.Class
- func (n *SingletonTypeNode) Equal(other value.Value) bool
- func (n *SingletonTypeNode) Error() string
- func (n *SingletonTypeNode) Inspect() string
- func (*SingletonTypeNode) IsStatic() bool
- func (n *SingletonTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SingletonTypeNode) String() string
- type SplatExpressionNode
- func (*SplatExpressionNode) Class() *value.Class
- func (*SplatExpressionNode) DirectClass() *value.Class
- func (n *SplatExpressionNode) Equal(other value.Value) bool
- func (n *SplatExpressionNode) Error() string
- func (n *SplatExpressionNode) Inspect() string
- func (*SplatExpressionNode) IsStatic() bool
- func (n *SplatExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SplatExpressionNode) String() string
- type StatementNode
- func ExpressionToStatement(expr ExpressionNode) StatementNode
- func ExpressionToStatements(expr ExpressionNode) []StatementNode
- func NewExpressionStatementNodeI(loc *position.Location, expr ExpressionNode) StatementNode
- func PatternToStatement(pattern PatternNode) StatementNode
- func PatternToStatements(pattern PatternNode) []StatementNode
- func TypeToStatement(typ TypeNode) StatementNode
- func TypeToStatements(typ TypeNode) []StatementNode
- type StringInspectInterpolationNode
- func (*StringInspectInterpolationNode) Class() *value.Class
- func (*StringInspectInterpolationNode) DirectClass() *value.Class
- func (n *StringInspectInterpolationNode) Equal(other value.Value) bool
- func (n *StringInspectInterpolationNode) Error() string
- func (n *StringInspectInterpolationNode) Inspect() string
- func (*StringInspectInterpolationNode) IsStatic() bool
- func (n *StringInspectInterpolationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *StringInspectInterpolationNode) String() string
- type StringInterpolationNode
- func (*StringInterpolationNode) Class() *value.Class
- func (*StringInterpolationNode) DirectClass() *value.Class
- func (n *StringInterpolationNode) Equal(other value.Value) bool
- func (n *StringInterpolationNode) Error() string
- func (n *StringInterpolationNode) Inspect() string
- func (*StringInterpolationNode) IsStatic() bool
- func (n *StringInterpolationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *StringInterpolationNode) String() string
- type StringLiteralContentNode
- type StringLiteralContentSectionNode
- func (*StringLiteralContentSectionNode) Class() *value.Class
- func (*StringLiteralContentSectionNode) DirectClass() *value.Class
- func (n *StringLiteralContentSectionNode) Equal(other value.Value) bool
- func (n *StringLiteralContentSectionNode) Error() string
- func (n *StringLiteralContentSectionNode) Inspect() string
- func (*StringLiteralContentSectionNode) IsStatic() bool
- func (n *StringLiteralContentSectionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *StringLiteralContentSectionNode) String() string
- type StringLiteralNode
- type StringOrSymbolLiteralNode
- type StringOrSymbolTypeNode
- type StringTypeNode
- type StructBodyStatementNode
- type StructDeclarationNode
- func (*StructDeclarationNode) Class() *value.Class
- func (*StructDeclarationNode) DirectClass() *value.Class
- func (n *StructDeclarationNode) Equal(other value.Value) bool
- func (n *StructDeclarationNode) Error() string
- func (n *StructDeclarationNode) Inspect() string
- func (*StructDeclarationNode) IsStatic() bool
- func (n *StructDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *StructDeclarationNode) String() string
- type SubscriptExpressionNode
- func (*SubscriptExpressionNode) Class() *value.Class
- func (*SubscriptExpressionNode) DirectClass() *value.Class
- func (n *SubscriptExpressionNode) Equal(other value.Value) bool
- func (n *SubscriptExpressionNode) Error() string
- func (n *SubscriptExpressionNode) Inspect() string
- func (s *SubscriptExpressionNode) IsStatic() bool
- func (n *SubscriptExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SubscriptExpressionNode) String() string
- type SwitchExpressionNode
- func (*SwitchExpressionNode) Class() *value.Class
- func (*SwitchExpressionNode) DirectClass() *value.Class
- func (n *SwitchExpressionNode) Equal(other value.Value) bool
- func (n *SwitchExpressionNode) Error() string
- func (n *SwitchExpressionNode) Inspect() string
- func (*SwitchExpressionNode) IsStatic() bool
- func (n *SwitchExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SwitchExpressionNode) String() string
- type SymbolArrayListLiteralNode
- func (*SymbolArrayListLiteralNode) Class() *value.Class
- func (*SymbolArrayListLiteralNode) DirectClass() *value.Class
- func (n *SymbolArrayListLiteralNode) Equal(other value.Value) bool
- func (n *SymbolArrayListLiteralNode) Error() string
- func (n *SymbolArrayListLiteralNode) Inspect() string
- func (s *SymbolArrayListLiteralNode) IsStatic() bool
- func (n *SymbolArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SymbolArrayListLiteralNode) String() string
- type SymbolArrayTupleLiteralNode
- func (*SymbolArrayTupleLiteralNode) Class() *value.Class
- func (*SymbolArrayTupleLiteralNode) DirectClass() *value.Class
- func (n *SymbolArrayTupleLiteralNode) Equal(other value.Value) bool
- func (n *SymbolArrayTupleLiteralNode) Error() string
- func (n *SymbolArrayTupleLiteralNode) Inspect() string
- func (*SymbolArrayTupleLiteralNode) IsStatic() bool
- func (n *SymbolArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SymbolArrayTupleLiteralNode) String() string
- type SymbolCollectionContentNode
- type SymbolHashSetLiteralNode
- func (*SymbolHashSetLiteralNode) Class() *value.Class
- func (*SymbolHashSetLiteralNode) DirectClass() *value.Class
- func (n *SymbolHashSetLiteralNode) Equal(other value.Value) bool
- func (n *SymbolHashSetLiteralNode) Error() string
- func (n *SymbolHashSetLiteralNode) Inspect() string
- func (s *SymbolHashSetLiteralNode) IsStatic() bool
- func (n *SymbolHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SymbolHashSetLiteralNode) String() string
- type SymbolKeyValueExpressionNode
- func (*SymbolKeyValueExpressionNode) Class() *value.Class
- func (*SymbolKeyValueExpressionNode) DirectClass() *value.Class
- func (n *SymbolKeyValueExpressionNode) Equal(other value.Value) bool
- func (n *SymbolKeyValueExpressionNode) Error() string
- func (n *SymbolKeyValueExpressionNode) Inspect() string
- func (s *SymbolKeyValueExpressionNode) IsStatic() bool
- func (n *SymbolKeyValueExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SymbolKeyValueExpressionNode) String() string
- type SymbolKeyValuePatternNode
- func (*SymbolKeyValuePatternNode) Class() *value.Class
- func (*SymbolKeyValuePatternNode) DirectClass() *value.Class
- func (n *SymbolKeyValuePatternNode) Equal(other value.Value) bool
- func (n *SymbolKeyValuePatternNode) Error() string
- func (n *SymbolKeyValuePatternNode) Inspect() string
- func (s *SymbolKeyValuePatternNode) IsStatic() bool
- func (n *SymbolKeyValuePatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *SymbolKeyValuePatternNode) String() string
- type SymbolLiteralNode
- type ThrowExpressionNode
- func (*ThrowExpressionNode) Class() *value.Class
- func (*ThrowExpressionNode) DirectClass() *value.Class
- func (n *ThrowExpressionNode) Equal(other value.Value) bool
- func (n *ThrowExpressionNode) Error() string
- func (n *ThrowExpressionNode) Inspect() string
- func (*ThrowExpressionNode) IsStatic() bool
- func (n *ThrowExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ThrowExpressionNode) String() string
- func (*ThrowExpressionNode) Type(*types.GlobalEnvironment) types.Type
- type TraverseOption
- type TrueLiteralNode
- func (*TrueLiteralNode) Class() *value.Class
- func (*TrueLiteralNode) DirectClass() *value.Class
- func (n *TrueLiteralNode) Equal(other value.Value) bool
- func (n *TrueLiteralNode) Error() string
- func (n *TrueLiteralNode) Inspect() string
- func (*TrueLiteralNode) IsStatic() bool
- func (n *TrueLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *TrueLiteralNode) String() string
- func (*TrueLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
- type TryExpressionNode
- func (*TryExpressionNode) Class() *value.Class
- func (*TryExpressionNode) DirectClass() *value.Class
- func (n *TryExpressionNode) Equal(other value.Value) bool
- func (n *TryExpressionNode) Error() string
- func (n *TryExpressionNode) Inspect() string
- func (*TryExpressionNode) IsStatic() bool
- func (n *TryExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *TryExpressionNode) String() string
- type TuplePatternNode
- func (*TuplePatternNode) Class() *value.Class
- func (*TuplePatternNode) DirectClass() *value.Class
- func (n *TuplePatternNode) Equal(other value.Value) bool
- func (n *TuplePatternNode) Error() string
- func (n *TuplePatternNode) Inspect() string
- func (l *TuplePatternNode) IsStatic() bool
- func (n *TuplePatternNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *TuplePatternNode) String() string
- type TypeDefinitionNode
- func (*TypeDefinitionNode) Class() *value.Class
- func (*TypeDefinitionNode) DirectClass() *value.Class
- func (n *TypeDefinitionNode) Equal(other value.Value) bool
- func (n *TypeDefinitionNode) Error() string
- func (n *TypeDefinitionNode) Inspect() string
- func (*TypeDefinitionNode) IsStatic() bool
- func (n *TypeDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *TypeDefinitionNode) String() string
- type TypeExpressionNode
- func (*TypeExpressionNode) Class() *value.Class
- func (*TypeExpressionNode) DirectClass() *value.Class
- func (n *TypeExpressionNode) Equal(other value.Value) bool
- func (n *TypeExpressionNode) Error() string
- func (n *TypeExpressionNode) Inspect() string
- func (*TypeExpressionNode) IsStatic() bool
- func (n *TypeExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *TypeExpressionNode) String() string
- type TypeNode
- type TypeParameterNode
- type TypeStatementNode
- func (*TypeStatementNode) Class() *value.Class
- func (*TypeStatementNode) DirectClass() *value.Class
- func (n *TypeStatementNode) Equal(other value.Value) bool
- func (e *TypeStatementNode) Error() string
- func (n *TypeStatementNode) Inspect() string
- func (*TypeStatementNode) IsStatic() bool
- func (n *TypeStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *TypeStatementNode) String() string
- type TypedNodeBase
- func (t *TypedNodeBase) Class() *value.Class
- func (t *TypedNodeBase) Copy() value.Reference
- func (t *TypedNodeBase) DirectClass() *value.Class
- func (t *TypedNodeBase) Error() string
- func (t *TypedNodeBase) Inspect() string
- func (t *TypedNodeBase) InstanceVariables() *value.InstanceVariables
- func (t *TypedNodeBase) Location() *position.Location
- func (t *TypedNodeBase) SetLocation(loc *position.Location)
- func (t *TypedNodeBase) SetSpan(span *position.Span)
- func (t *TypedNodeBase) SetType(typ types.Type)
- func (t *TypedNodeBase) SingletonClass() *value.Class
- func (t *TypedNodeBase) SkipTypechecking() bool
- func (t *TypedNodeBase) Span() *position.Span
- func (t *TypedNodeBase) Type(*types.GlobalEnvironment) types.Type
- type TypeofExpressionNode
- func (*TypeofExpressionNode) Class() *value.Class
- func (*TypeofExpressionNode) DirectClass() *value.Class
- func (n *TypeofExpressionNode) Equal(other value.Value) bool
- func (n *TypeofExpressionNode) Error() string
- func (n *TypeofExpressionNode) Inspect() string
- func (*TypeofExpressionNode) IsStatic() bool
- func (n *TypeofExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *TypeofExpressionNode) String() string
- type UInt8LiteralNode
- func (*UInt8LiteralNode) Class() *value.Class
- func (*UInt8LiteralNode) DirectClass() *value.Class
- func (n *UInt8LiteralNode) Equal(other value.Value) bool
- func (n *UInt8LiteralNode) Error() string
- func (n *UInt8LiteralNode) Inspect() string
- func (*UInt8LiteralNode) IsStatic() bool
- func (n *UInt8LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UInt8LiteralNode) String() string
- type UInt16LiteralNode
- func (*UInt16LiteralNode) Class() *value.Class
- func (*UInt16LiteralNode) DirectClass() *value.Class
- func (n *UInt16LiteralNode) Equal(other value.Value) bool
- func (n *UInt16LiteralNode) Error() string
- func (n *UInt16LiteralNode) Inspect() string
- func (*UInt16LiteralNode) IsStatic() bool
- func (n *UInt16LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UInt16LiteralNode) String() string
- type UInt32LiteralNode
- func (*UInt32LiteralNode) Class() *value.Class
- func (*UInt32LiteralNode) DirectClass() *value.Class
- func (n *UInt32LiteralNode) Equal(other value.Value) bool
- func (n *UInt32LiteralNode) Error() string
- func (n *UInt32LiteralNode) Inspect() string
- func (*UInt32LiteralNode) IsStatic() bool
- func (n *UInt32LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UInt32LiteralNode) String() string
- type UInt64LiteralNode
- func (*UInt64LiteralNode) Class() *value.Class
- func (*UInt64LiteralNode) DirectClass() *value.Class
- func (n *UInt64LiteralNode) Equal(other value.Value) bool
- func (n *UInt64LiteralNode) Error() string
- func (n *UInt64LiteralNode) Inspect() string
- func (*UInt64LiteralNode) IsStatic() bool
- func (n *UInt64LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UInt64LiteralNode) String() string
- type UIntLiteralNode
- func (*UIntLiteralNode) Class() *value.Class
- func (*UIntLiteralNode) DirectClass() *value.Class
- func (n *UIntLiteralNode) Equal(other value.Value) bool
- func (n *UIntLiteralNode) Error() string
- func (n *UIntLiteralNode) Inspect() string
- func (*UIntLiteralNode) IsStatic() bool
- func (n *UIntLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UIntLiteralNode) String() string
- type UnaryExpressionNode
- func (*UnaryExpressionNode) Class() *value.Class
- func (*UnaryExpressionNode) DirectClass() *value.Class
- func (n *UnaryExpressionNode) Equal(other value.Value) bool
- func (n *UnaryExpressionNode) Error() string
- func (n *UnaryExpressionNode) Inspect() string
- func (u *UnaryExpressionNode) IsStatic() bool
- func (n *UnaryExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UnaryExpressionNode) String() string
- type UnaryTypeNode
- func (*UnaryTypeNode) Class() *value.Class
- func (*UnaryTypeNode) DirectClass() *value.Class
- func (n *UnaryTypeNode) Equal(other value.Value) bool
- func (n *UnaryTypeNode) Error() string
- func (n *UnaryTypeNode) Inspect() string
- func (u *UnaryTypeNode) IsStatic() bool
- func (n *UnaryTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UnaryTypeNode) String() string
- type UndefinedLiteralNode
- func (*UndefinedLiteralNode) Class() *value.Class
- func (*UndefinedLiteralNode) DirectClass() *value.Class
- func (n *UndefinedLiteralNode) Equal(other value.Value) bool
- func (n *UndefinedLiteralNode) Error() string
- func (n *UndefinedLiteralNode) Inspect() string
- func (*UndefinedLiteralNode) IsStatic() bool
- func (n *UndefinedLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UndefinedLiteralNode) String() string
- type UnhygienicNode
- func (*UnhygienicNode) Class() *value.Class
- func (*UnhygienicNode) DirectClass() *value.Class
- func (n *UnhygienicNode) Equal(other value.Value) bool
- func (n *UnhygienicNode) Error() string
- func (n *UnhygienicNode) Inspect() string
- func (n *UnhygienicNode) IsStatic() bool
- func (n *UnhygienicNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UnhygienicNode) String() string
- type UninterpolatedRegexLiteralNode
- func (*UninterpolatedRegexLiteralNode) Class() *value.Class
- func (*UninterpolatedRegexLiteralNode) DirectClass() *value.Class
- func (n *UninterpolatedRegexLiteralNode) Equal(other value.Value) bool
- func (n *UninterpolatedRegexLiteralNode) Error() string
- func (n *UninterpolatedRegexLiteralNode) Inspect() string
- func (r *UninterpolatedRegexLiteralNode) IsASCII() bool
- func (r *UninterpolatedRegexLiteralNode) IsCaseInsensitive() bool
- func (r *UninterpolatedRegexLiteralNode) IsDotAll() bool
- func (r *UninterpolatedRegexLiteralNode) IsExtended() bool
- func (r *UninterpolatedRegexLiteralNode) IsMultiline() bool
- func (*UninterpolatedRegexLiteralNode) IsStatic() bool
- func (r *UninterpolatedRegexLiteralNode) IsUngreedy() bool
- func (n *UninterpolatedRegexLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (r *UninterpolatedRegexLiteralNode) SetASCII() *UninterpolatedRegexLiteralNode
- func (r *UninterpolatedRegexLiteralNode) SetCaseInsensitive() *UninterpolatedRegexLiteralNode
- func (r *UninterpolatedRegexLiteralNode) SetDotAll() *UninterpolatedRegexLiteralNode
- func (r *UninterpolatedRegexLiteralNode) SetExtended() *UninterpolatedRegexLiteralNode
- func (r *UninterpolatedRegexLiteralNode) SetMultiline() *UninterpolatedRegexLiteralNode
- func (r *UninterpolatedRegexLiteralNode) SetUngreedy() *UninterpolatedRegexLiteralNode
- func (n *UninterpolatedRegexLiteralNode) String() string
- func (*UninterpolatedRegexLiteralNode) Type(env *types.GlobalEnvironment) types.Type
- type UnionTypeNode
- func (*UnionTypeNode) Class() *value.Class
- func (*UnionTypeNode) DirectClass() *value.Class
- func (n *UnionTypeNode) Equal(other value.Value) bool
- func (n *UnionTypeNode) Error() string
- func (n *UnionTypeNode) Inspect() string
- func (*UnionTypeNode) IsStatic() bool
- func (n *UnionTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UnionTypeNode) String() string
- type UnlessExpressionNode
- func (*UnlessExpressionNode) Class() *value.Class
- func (*UnlessExpressionNode) DirectClass() *value.Class
- func (n *UnlessExpressionNode) Equal(other value.Value) bool
- func (n *UnlessExpressionNode) Error() string
- func (n *UnlessExpressionNode) Inspect() string
- func (*UnlessExpressionNode) IsStatic() bool
- func (n *UnlessExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UnlessExpressionNode) String() string
- type UnquoteKind
- type UnquoteNode
- func (*UnquoteNode) Class() *value.Class
- func (*UnquoteNode) DirectClass() *value.Class
- func (n *UnquoteNode) Equal(other value.Value) bool
- func (n *UnquoteNode) Error() string
- func (n *UnquoteNode) Inspect() string
- func (*UnquoteNode) IsStatic() bool
- func (n *UnquoteNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UnquoteNode) String() string
- type UnquoteOrInvalidNode
- type UntilExpressionNode
- func (*UntilExpressionNode) Class() *value.Class
- func (*UntilExpressionNode) DirectClass() *value.Class
- func (n *UntilExpressionNode) Equal(other value.Value) bool
- func (n *UntilExpressionNode) Error() string
- func (n *UntilExpressionNode) Inspect() string
- func (*UntilExpressionNode) IsStatic() bool
- func (n *UntilExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UntilExpressionNode) String() string
- type UsingAllEntryNode
- func (*UsingAllEntryNode) Class() *value.Class
- func (*UsingAllEntryNode) DirectClass() *value.Class
- func (n *UsingAllEntryNode) Equal(other value.Value) bool
- func (n *UsingAllEntryNode) Error() string
- func (n *UsingAllEntryNode) Inspect() string
- func (*UsingAllEntryNode) IsStatic() bool
- func (n *UsingAllEntryNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UsingAllEntryNode) String() string
- type UsingEntryNode
- type UsingEntryWithSubentriesNode
- func (*UsingEntryWithSubentriesNode) Class() *value.Class
- func (*UsingEntryWithSubentriesNode) DirectClass() *value.Class
- func (n *UsingEntryWithSubentriesNode) Equal(other value.Value) bool
- func (n *UsingEntryWithSubentriesNode) Error() string
- func (n *UsingEntryWithSubentriesNode) Inspect() string
- func (*UsingEntryWithSubentriesNode) IsStatic() bool
- func (n *UsingEntryWithSubentriesNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UsingEntryWithSubentriesNode) String() string
- type UsingExpressionNode
- func (*UsingExpressionNode) Class() *value.Class
- func (*UsingExpressionNode) DirectClass() *value.Class
- func (n *UsingExpressionNode) Equal(other value.Value) bool
- func (n *UsingExpressionNode) Error() string
- func (n *UsingExpressionNode) Inspect() string
- func (*UsingExpressionNode) IsStatic() bool
- func (n *UsingExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (*UsingExpressionNode) SkipTypechecking() bool
- func (n *UsingExpressionNode) String() string
- type UsingSubentryAsNode
- func (*UsingSubentryAsNode) Class() *value.Class
- func (*UsingSubentryAsNode) DirectClass() *value.Class
- func (n *UsingSubentryAsNode) Equal(other value.Value) bool
- func (n *UsingSubentryAsNode) Error() string
- func (n *UsingSubentryAsNode) Inspect() string
- func (n *UsingSubentryAsNode) IsMacro() bool
- func (*UsingSubentryAsNode) IsStatic() bool
- func (n *UsingSubentryAsNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *UsingSubentryAsNode) String() string
- type UsingSubentryNode
- type ValueDeclarationNode
- func (*ValueDeclarationNode) Class() *value.Class
- func (*ValueDeclarationNode) DirectClass() *value.Class
- func (n *ValueDeclarationNode) Equal(other value.Value) bool
- func (v *ValueDeclarationNode) Error() string
- func (n *ValueDeclarationNode) Inspect() string
- func (*ValueDeclarationNode) IsStatic() bool
- func (n *ValueDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ValueDeclarationNode) String() string
- type ValuePatternDeclarationNode
- func (*ValuePatternDeclarationNode) Class() *value.Class
- func (*ValuePatternDeclarationNode) DirectClass() *value.Class
- func (n *ValuePatternDeclarationNode) Equal(other value.Value) bool
- func (v *ValuePatternDeclarationNode) Error() string
- func (n *ValuePatternDeclarationNode) Inspect() string
- func (*ValuePatternDeclarationNode) IsStatic() bool
- func (n *ValuePatternDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *ValuePatternDeclarationNode) String() string
- type VariableDeclarationNode
- func (*VariableDeclarationNode) Class() *value.Class
- func (*VariableDeclarationNode) DirectClass() *value.Class
- func (n *VariableDeclarationNode) Equal(other value.Value) bool
- func (v *VariableDeclarationNode) Error() string
- func (n *VariableDeclarationNode) Inspect() string
- func (*VariableDeclarationNode) IsStatic() bool
- func (n *VariableDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *VariableDeclarationNode) String() string
- type VariablePatternDeclarationNode
- func (*VariablePatternDeclarationNode) Class() *value.Class
- func (*VariablePatternDeclarationNode) DirectClass() *value.Class
- func (n *VariablePatternDeclarationNode) Equal(other value.Value) bool
- func (v *VariablePatternDeclarationNode) Error() string
- func (n *VariablePatternDeclarationNode) Inspect() string
- func (*VariablePatternDeclarationNode) IsStatic() bool
- func (n *VariablePatternDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *VariablePatternDeclarationNode) String() string
- type Variance
- type VariantTypeParameterNode
- func (*VariantTypeParameterNode) Class() *value.Class
- func (*VariantTypeParameterNode) DirectClass() *value.Class
- func (n *VariantTypeParameterNode) Equal(other value.Value) bool
- func (n *VariantTypeParameterNode) Error() string
- func (n *VariantTypeParameterNode) Inspect() string
- func (*VariantTypeParameterNode) IsStatic() bool
- func (n *VariantTypeParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *VariantTypeParameterNode) String() string
- type VoidTypeNode
- func (*VoidTypeNode) Class() *value.Class
- func (*VoidTypeNode) DirectClass() *value.Class
- func (n *VoidTypeNode) Equal(other value.Value) bool
- func (n *VoidTypeNode) Error() string
- func (n *VoidTypeNode) Inspect() string
- func (*VoidTypeNode) IsStatic() bool
- func (n *VoidTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *VoidTypeNode) String() string
- type WhileExpressionNode
- func (*WhileExpressionNode) Class() *value.Class
- func (*WhileExpressionNode) DirectClass() *value.Class
- func (n *WhileExpressionNode) Equal(other value.Value) bool
- func (n *WhileExpressionNode) Error() string
- func (n *WhileExpressionNode) Inspect() string
- func (*WhileExpressionNode) IsStatic() bool
- func (n *WhileExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *WhileExpressionNode) String() string
- type WordArrayListLiteralNode
- func (*WordArrayListLiteralNode) Class() *value.Class
- func (*WordArrayListLiteralNode) DirectClass() *value.Class
- func (n *WordArrayListLiteralNode) Equal(other value.Value) bool
- func (n *WordArrayListLiteralNode) Error() string
- func (n *WordArrayListLiteralNode) Inspect() string
- func (w *WordArrayListLiteralNode) IsStatic() bool
- func (n *WordArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *WordArrayListLiteralNode) String() string
- type WordArrayTupleLiteralNode
- func (*WordArrayTupleLiteralNode) Class() *value.Class
- func (*WordArrayTupleLiteralNode) DirectClass() *value.Class
- func (n *WordArrayTupleLiteralNode) Equal(other value.Value) bool
- func (n *WordArrayTupleLiteralNode) Error() string
- func (n *WordArrayTupleLiteralNode) Inspect() string
- func (*WordArrayTupleLiteralNode) IsStatic() bool
- func (n *WordArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *WordArrayTupleLiteralNode) String() string
- type WordCollectionContentNode
- type WordHashSetLiteralNode
- func (*WordHashSetLiteralNode) Class() *value.Class
- func (*WordHashSetLiteralNode) DirectClass() *value.Class
- func (n *WordHashSetLiteralNode) Equal(other value.Value) bool
- func (n *WordHashSetLiteralNode) Error() string
- func (n *WordHashSetLiteralNode) Inspect() string
- func (w *WordHashSetLiteralNode) IsStatic() bool
- func (n *WordHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *WordHashSetLiteralNode) String() string
- type YieldExpressionNode
- func (*YieldExpressionNode) Class() *value.Class
- func (*YieldExpressionNode) DirectClass() *value.Class
- func (n *YieldExpressionNode) Equal(other value.Value) bool
- func (n *YieldExpressionNode) Error() string
- func (n *YieldExpressionNode) Inspect() string
- func (*YieldExpressionNode) IsStatic() bool
- func (n *YieldExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
- func (n *YieldExpressionNode) String() string
Constants ¶
const ( METHOD_ABSTRACT_FLAG bitfield.BitFlag8 = 1 << iota METHOD_SEALED_FLAG METHOD_GENERATOR_FLAG METHOD_ASYNC_FLAG METHOD_OVERLOAD_FLAG )
Variables ¶
var IdentifierRegexp = regexp.MustCompile(`^\p{Ll}[\p{L}\p{N}_]*$`)
var PrefixedIdentifierRegexp = regexp.MustCompile(`^[\p{L}\p{N}_]+$`)
var PrivateConstantRegexp = regexp.MustCompile(`^_\p{Lu}[\p{L}\p{N}_]*$`)
var PrivateIdentifierRegexp = regexp.MustCompile(`^_[\p{L}\p{N}_]*$`)
var PublicConstantRegexp = regexp.MustCompile(`^\p{Lu}[\p{L}\p{N}_]*$`)
Functions ¶
func ExpressionPrecedence ¶
func ExpressionPrecedence(expr ExpressionNode) uint8
func IdentifierToString ¶
func IdentifierToString(ident IdentifierNode) string
func IsComplexConstant ¶
Check whether the node is a complex constant.
func IsNamedRestParam ¶
func IsNamedRestParam(p ParameterNode) bool
checks whether the given parameter is a named rest parameter.
func IsPositionalRestParam ¶
func IsPositionalRestParam(p ParameterNode) bool
checks whether the given parameter is a positional rest parameter.
func IsValidAssignmentTarget ¶
Check whether the node can be used as a left value in an assignment expression.
func IsValidDeclarationTarget ¶
Check whether the node can be used as a left value in a variable/constant declaration.
func IsValidPipeExpressionTarget ¶
Check whether the node is a valid right operand of the pipe operator `|>`.
func IsValidRangePatternElement ¶
Check whether the node can be used as a range pattern element.
func MethodNameIsSetter ¶
func MethodNameIsSetter(methodNameNode IdentifierNode) bool
Whether the method is a setter.
func MethodNameIsSubscriptSetter ¶
func MethodNameIsSubscriptSetter(methodNameNode IdentifierNode) bool
Whether the method is a setter.
func NewNodeIterator ¶
func NewNodeIterator(node Node) *value.ArrayTupleIterator
func PatternDeclaresVariables ¶
func PatternDeclaresVariables(pattern PatternNode) bool
func PatternPrecedence ¶
func PatternPrecedence(expr PatternNode) uint8
func SpliceSlice ¶
func StatementPrecedence ¶
func StatementPrecedence(stmt StatementNode) uint8
func Traverse ¶
func Traverse(node Node, enter func(node, parent Node) TraverseOption, leave func(node, parent Node) TraverseOption)
func TypePrecedence ¶
Types ¶
type AliasDeclarationEntry ¶
type AliasDeclarationEntry struct {
NodeBase
NewName IdentifierNode
OldName IdentifierNode
}
A single alias entry eg. `new_name old_name`
func NewAliasDeclarationEntry ¶
func NewAliasDeclarationEntry(loc *position.Location, newName, oldName IdentifierNode) *AliasDeclarationEntry
Create an alias alias entry eg. `new_name old_name`
func (*AliasDeclarationEntry) Class ¶
func (*AliasDeclarationEntry) Class() *value.Class
func (*AliasDeclarationEntry) DirectClass ¶
func (*AliasDeclarationEntry) DirectClass() *value.Class
func (*AliasDeclarationEntry) Error ¶
func (n *AliasDeclarationEntry) Error() string
func (*AliasDeclarationEntry) Inspect ¶
func (n *AliasDeclarationEntry) Inspect() string
func (*AliasDeclarationEntry) IsStatic ¶
func (*AliasDeclarationEntry) IsStatic() bool
func (*AliasDeclarationEntry) MacroType ¶
func (n *AliasDeclarationEntry) MacroType(env *types.GlobalEnvironment) types.Type
func (*AliasDeclarationEntry) String ¶
func (n *AliasDeclarationEntry) String() string
type AliasDeclarationNode ¶
type AliasDeclarationNode struct {
TypedNodeBase
Entries []*AliasDeclarationEntry
}
Represents a new alias declaration eg. `alias push append, add plus`
func NewAliasDeclarationNode ¶
func NewAliasDeclarationNode(loc *position.Location, entries []*AliasDeclarationEntry) *AliasDeclarationNode
Create an alias declaration node eg. `alias push append, add plus`
func (*AliasDeclarationNode) Class ¶
func (*AliasDeclarationNode) Class() *value.Class
func (*AliasDeclarationNode) DirectClass ¶
func (*AliasDeclarationNode) DirectClass() *value.Class
func (*AliasDeclarationNode) Error ¶
func (n *AliasDeclarationNode) Error() string
func (*AliasDeclarationNode) Inspect ¶
func (n *AliasDeclarationNode) Inspect() string
func (*AliasDeclarationNode) IsStatic ¶
func (*AliasDeclarationNode) IsStatic() bool
func (*AliasDeclarationNode) MacroType ¶
func (n *AliasDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AliasDeclarationNode) String ¶
func (n *AliasDeclarationNode) String() string
type AnyTypeNode ¶
type AnyTypeNode struct {
NodeBase
}
`any` type.
func NewAnyTypeNode ¶
func NewAnyTypeNode(loc *position.Location) *AnyTypeNode
Create a new `any` type node.
func (*AnyTypeNode) Class ¶
func (*AnyTypeNode) Class() *value.Class
func (*AnyTypeNode) DirectClass ¶
func (*AnyTypeNode) DirectClass() *value.Class
func (*AnyTypeNode) Error ¶
func (n *AnyTypeNode) Error() string
func (*AnyTypeNode) Inspect ¶
func (n *AnyTypeNode) Inspect() string
func (*AnyTypeNode) IsStatic ¶
func (*AnyTypeNode) IsStatic() bool
func (*AnyTypeNode) MacroType ¶
func (n *AnyTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AnyTypeNode) String ¶
func (n *AnyTypeNode) String() string
func (*AnyTypeNode) Type ¶
func (*AnyTypeNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type ArrayListLiteralNode ¶
type ArrayListLiteralNode struct {
TypedNodeBase
Elements []ExpressionNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a ArrayList literal eg. `[1, 5, -6]`
func NewArrayListLiteralNode ¶
func NewArrayListLiteralNode(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) *ArrayListLiteralNode
Create a ArrayList literal node eg. `[1, 5, -6]`
func (*ArrayListLiteralNode) Class ¶
func (*ArrayListLiteralNode) Class() *value.Class
func (*ArrayListLiteralNode) DirectClass ¶
func (*ArrayListLiteralNode) DirectClass() *value.Class
func (*ArrayListLiteralNode) Error ¶
func (n *ArrayListLiteralNode) Error() string
func (*ArrayListLiteralNode) Inspect ¶
func (n *ArrayListLiteralNode) Inspect() string
func (*ArrayListLiteralNode) IsStatic ¶
func (l *ArrayListLiteralNode) IsStatic() bool
func (*ArrayListLiteralNode) MacroType ¶
func (n *ArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ArrayListLiteralNode) String ¶
func (n *ArrayListLiteralNode) String() string
type ArrayTupleLiteralNode ¶
type ArrayTupleLiteralNode struct {
TypedNodeBase
Elements []ExpressionNode
// contains filtered or unexported fields
}
Represents a ArrayTuple literal eg. `%[1, 5, -6]`
func NewArrayTupleLiteralNode ¶
func NewArrayTupleLiteralNode(loc *position.Location, elements []ExpressionNode) *ArrayTupleLiteralNode
Create a ArrayTuple literal node eg. `%[1, 5, -6]`
func (*ArrayTupleLiteralNode) Class ¶
func (*ArrayTupleLiteralNode) Class() *value.Class
func (*ArrayTupleLiteralNode) DirectClass ¶
func (*ArrayTupleLiteralNode) DirectClass() *value.Class
func (*ArrayTupleLiteralNode) Error ¶
func (n *ArrayTupleLiteralNode) Error() string
func (*ArrayTupleLiteralNode) Inspect ¶
func (n *ArrayTupleLiteralNode) Inspect() string
func (*ArrayTupleLiteralNode) IsStatic ¶
func (t *ArrayTupleLiteralNode) IsStatic() bool
func (*ArrayTupleLiteralNode) MacroType ¶
func (n *ArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ArrayTupleLiteralNode) String ¶
func (n *ArrayTupleLiteralNode) String() string
type AsExpressionNode ¶
type AsExpressionNode struct {
TypedNodeBase
Value ExpressionNode
RuntimeType ComplexConstantNode
}
Represents an as type downcast eg. `foo as String`
func NewAsExpressionNode ¶
func NewAsExpressionNode(loc *position.Location, val ExpressionNode, runtimeType ComplexConstantNode) *AsExpressionNode
Create a new private constant node eg. `_Foo`.
func (*AsExpressionNode) Class ¶
func (*AsExpressionNode) Class() *value.Class
func (*AsExpressionNode) DirectClass ¶
func (*AsExpressionNode) DirectClass() *value.Class
func (*AsExpressionNode) Error ¶
func (n *AsExpressionNode) Error() string
func (*AsExpressionNode) Inspect ¶
func (n *AsExpressionNode) Inspect() string
func (*AsExpressionNode) IsStatic ¶
func (*AsExpressionNode) IsStatic() bool
func (*AsExpressionNode) MacroType ¶
func (n *AsExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AsExpressionNode) String ¶
func (n *AsExpressionNode) String() string
type AsPatternNode ¶
type AsPatternNode struct {
NodeBase
Pattern PatternNode
Name IdentifierNode
}
Represents an as pattern eg. `> 5 && < 20 as foo`
func NewAsPatternNode ¶
func NewAsPatternNode(loc *position.Location, pattern PatternNode, name IdentifierNode) *AsPatternNode
Create an Object pattern node eg. `Foo(foo: 5, bar: a, c)`
func (*AsPatternNode) Class ¶
func (*AsPatternNode) Class() *value.Class
func (*AsPatternNode) DirectClass ¶
func (*AsPatternNode) DirectClass() *value.Class
func (*AsPatternNode) Error ¶
func (n *AsPatternNode) Error() string
func (*AsPatternNode) Inspect ¶
func (n *AsPatternNode) Inspect() string
func (*AsPatternNode) IsStatic ¶
func (*AsPatternNode) IsStatic() bool
func (*AsPatternNode) MacroType ¶
func (n *AsPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AsPatternNode) String ¶
func (n *AsPatternNode) String() string
type AssignmentExpressionNode ¶
type AssignmentExpressionNode struct {
TypedNodeBase
Op *token.Token // operator
Left ExpressionNode // left hand side
Right ExpressionNode // right hand side
}
Assignment with the specified operator.
func NewAssignmentExpressionNode ¶
func NewAssignmentExpressionNode(loc *position.Location, op *token.Token, left, right ExpressionNode) *AssignmentExpressionNode
Create a new assignment expression node eg. `foo = 3`
func (*AssignmentExpressionNode) Class ¶
func (*AssignmentExpressionNode) Class() *value.Class
func (*AssignmentExpressionNode) DirectClass ¶
func (*AssignmentExpressionNode) DirectClass() *value.Class
func (*AssignmentExpressionNode) Equal ¶
func (n *AssignmentExpressionNode) Equal(other value.Value) bool
func (*AssignmentExpressionNode) Error ¶
func (p *AssignmentExpressionNode) Error() string
func (*AssignmentExpressionNode) Inspect ¶
func (n *AssignmentExpressionNode) Inspect() string
func (*AssignmentExpressionNode) IsStatic ¶
func (*AssignmentExpressionNode) IsStatic() bool
func (*AssignmentExpressionNode) MacroType ¶
func (n *AssignmentExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AssignmentExpressionNode) String ¶
func (n *AssignmentExpressionNode) String() string
type Associativity ¶
type Associativity uint8
const ( NON_ASSOCIATIVE Associativity = iota LEFT_ASSOCIATIVE RIGHT_ASSOCIATIVE )
func ExpressionAssociativity ¶
func ExpressionAssociativity(expr ExpressionNode) Associativity
func PatternAssociativity ¶
func PatternAssociativity(expr PatternNode) Associativity
func TypeAssociativity ¶
func TypeAssociativity(expr TypeNode) Associativity
type AttrDeclarationNode ¶
type AttrDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Entries []ParameterNode
}
Represents a new setter declaration eg. `attr foo: String`
func NewAttrDeclarationNode ¶
func NewAttrDeclarationNode(loc *position.Location, docComment string, entries []ParameterNode) *AttrDeclarationNode
Create an attribute declaration node eg. `attr foo: String`
func (*AttrDeclarationNode) Class ¶
func (*AttrDeclarationNode) Class() *value.Class
func (*AttrDeclarationNode) DirectClass ¶
func (*AttrDeclarationNode) DirectClass() *value.Class
func (*AttrDeclarationNode) Error ¶
func (n *AttrDeclarationNode) Error() string
func (*AttrDeclarationNode) Inspect ¶
func (n *AttrDeclarationNode) Inspect() string
func (*AttrDeclarationNode) IsStatic ¶
func (*AttrDeclarationNode) IsStatic() bool
func (*AttrDeclarationNode) MacroType ¶
func (n *AttrDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AttrDeclarationNode) String ¶
func (n *AttrDeclarationNode) String() string
type AttributeAccessNode ¶
type AttributeAccessNode struct {
TypedNodeBase
Receiver ExpressionNode
AttributeName IdentifierNode
}
Represents attribute access eg. `foo.bar`
func NewAttributeAccessNode ¶
func NewAttributeAccessNode(loc *position.Location, recv ExpressionNode, attrName IdentifierNode) *AttributeAccessNode
Create an attribute access node eg. `foo.bar`
func (*AttributeAccessNode) Class ¶
func (*AttributeAccessNode) Class() *value.Class
func (*AttributeAccessNode) DirectClass ¶
func (*AttributeAccessNode) DirectClass() *value.Class
func (*AttributeAccessNode) Error ¶
func (n *AttributeAccessNode) Error() string
func (*AttributeAccessNode) Inspect ¶
func (n *AttributeAccessNode) Inspect() string
func (*AttributeAccessNode) IsStatic ¶
func (*AttributeAccessNode) IsStatic() bool
func (*AttributeAccessNode) MacroType ¶
func (n *AttributeAccessNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AttributeAccessNode) String ¶
func (n *AttributeAccessNode) String() string
type AttributeParameterNode ¶
type AttributeParameterNode struct {
TypedNodeBase
Name IdentifierNode // name of the variable
TypeNode TypeNode // type of the variable
Initialiser ExpressionNode // value assigned to the variable
}
Represents an attribute declaration in getters, setters and accessors eg. `foo: String`
func NewAttributeParameterNode ¶
func NewAttributeParameterNode(loc *position.Location, name IdentifierNode, typ TypeNode, init ExpressionNode) *AttributeParameterNode
Create a new attribute declaration in getters, setters and accessors eg. `foo: String`
func (*AttributeParameterNode) Class ¶
func (*AttributeParameterNode) Class() *value.Class
func (*AttributeParameterNode) DirectClass ¶
func (*AttributeParameterNode) DirectClass() *value.Class
func (*AttributeParameterNode) Equal ¶
func (n *AttributeParameterNode) Equal(other value.Value) bool
func (*AttributeParameterNode) Error ¶
func (n *AttributeParameterNode) Error() string
func (*AttributeParameterNode) Inspect ¶
func (n *AttributeParameterNode) Inspect() string
func (*AttributeParameterNode) IsOptional ¶
func (a *AttributeParameterNode) IsOptional() bool
func (*AttributeParameterNode) IsStatic ¶
func (*AttributeParameterNode) IsStatic() bool
func (*AttributeParameterNode) MacroType ¶
func (n *AttributeParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AttributeParameterNode) String ¶
func (n *AttributeParameterNode) String() string
type AwaitExpressionNode ¶
type AwaitExpressionNode struct {
TypedNodeBase
Value ExpressionNode
Sync bool
}
Represents an `await` expression eg. `await foo()`
func NewAwaitExpressionNode ¶
func NewAwaitExpressionNode(loc *position.Location, val ExpressionNode, sync bool) *AwaitExpressionNode
Create a new `await` expression node eg. `await foo()`
func (*AwaitExpressionNode) Class ¶
func (*AwaitExpressionNode) Class() *value.Class
func (*AwaitExpressionNode) DirectClass ¶
func (*AwaitExpressionNode) DirectClass() *value.Class
func (*AwaitExpressionNode) Error ¶
func (n *AwaitExpressionNode) Error() string
func (*AwaitExpressionNode) Inspect ¶
func (n *AwaitExpressionNode) Inspect() string
func (*AwaitExpressionNode) IsStatic ¶
func (*AwaitExpressionNode) IsStatic() bool
func (*AwaitExpressionNode) MacroType ¶
func (n *AwaitExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*AwaitExpressionNode) String ¶
func (n *AwaitExpressionNode) String() string
type BigFloatLiteralNode ¶
type BigFloatLiteralNode struct {
TypedNodeBase
Value string
}
BigFloat literal eg. `5.2bf`, `.5bf`, `45e20bf`
func NewBigFloatLiteralNode ¶
func NewBigFloatLiteralNode(loc *position.Location, val string) *BigFloatLiteralNode
Create a new BigFloat literal node eg. `5.2bf`, `.5bf`, `45e20bf`
func (*BigFloatLiteralNode) Class ¶
func (*BigFloatLiteralNode) Class() *value.Class
func (*BigFloatLiteralNode) DirectClass ¶
func (*BigFloatLiteralNode) DirectClass() *value.Class
func (*BigFloatLiteralNode) Error ¶
func (n *BigFloatLiteralNode) Error() string
func (*BigFloatLiteralNode) Inspect ¶
func (n *BigFloatLiteralNode) Inspect() string
func (*BigFloatLiteralNode) IsStatic ¶
func (*BigFloatLiteralNode) IsStatic() bool
func (*BigFloatLiteralNode) MacroType ¶
func (n *BigFloatLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BigFloatLiteralNode) String ¶
func (n *BigFloatLiteralNode) String() string
type BinArrayListLiteralNode ¶
type BinArrayListLiteralNode struct {
TypedNodeBase
Elements []IntCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a bin ArrayList literal eg. `\b[11 10]`
func NewBinArrayListLiteralNode ¶
func NewBinArrayListLiteralNode(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) *BinArrayListLiteralNode
Create a bin ArrayList literal node eg. `\b[11 10]`
func (*BinArrayListLiteralNode) Class ¶
func (*BinArrayListLiteralNode) Class() *value.Class
func (*BinArrayListLiteralNode) DirectClass ¶
func (*BinArrayListLiteralNode) DirectClass() *value.Class
func (*BinArrayListLiteralNode) Equal ¶
func (n *BinArrayListLiteralNode) Equal(other value.Value) bool
func (*BinArrayListLiteralNode) Error ¶
func (n *BinArrayListLiteralNode) Error() string
func (*BinArrayListLiteralNode) Inspect ¶
func (n *BinArrayListLiteralNode) Inspect() string
func (*BinArrayListLiteralNode) IsStatic ¶
func (b *BinArrayListLiteralNode) IsStatic() bool
func (*BinArrayListLiteralNode) MacroType ¶
func (n *BinArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BinArrayListLiteralNode) String ¶
func (n *BinArrayListLiteralNode) String() string
type BinArrayTupleLiteralNode ¶
type BinArrayTupleLiteralNode struct {
TypedNodeBase
Elements []IntCollectionContentNode
}
Represents a bin ArrayTuple literal eg. `%b[11 10]`
func NewBinArrayTupleLiteralNode ¶
func NewBinArrayTupleLiteralNode(loc *position.Location, elements []IntCollectionContentNode) *BinArrayTupleLiteralNode
Create a bin ArrayList literal node eg. `%b[11 10]`
func (*BinArrayTupleLiteralNode) Class ¶
func (*BinArrayTupleLiteralNode) Class() *value.Class
func (*BinArrayTupleLiteralNode) DirectClass ¶
func (*BinArrayTupleLiteralNode) DirectClass() *value.Class
func (*BinArrayTupleLiteralNode) Equal ¶
func (n *BinArrayTupleLiteralNode) Equal(other value.Value) bool
func (*BinArrayTupleLiteralNode) Error ¶
func (n *BinArrayTupleLiteralNode) Error() string
func (*BinArrayTupleLiteralNode) Inspect ¶
func (n *BinArrayTupleLiteralNode) Inspect() string
func (*BinArrayTupleLiteralNode) IsStatic ¶
func (*BinArrayTupleLiteralNode) IsStatic() bool
func (*BinArrayTupleLiteralNode) MacroType ¶
func (n *BinArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BinArrayTupleLiteralNode) String ¶
func (n *BinArrayTupleLiteralNode) String() string
type BinHashSetLiteralNode ¶
type BinHashSetLiteralNode struct {
TypedNodeBase
Elements []IntCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a bin HashSet literal eg. `^b[11 10]`
func NewBinHashSetLiteralNode ¶
func NewBinHashSetLiteralNode(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) *BinHashSetLiteralNode
Create a bin HashSet literal node eg. `^b[11 10]`
func (*BinHashSetLiteralNode) Class ¶
func (*BinHashSetLiteralNode) Class() *value.Class
func (*BinHashSetLiteralNode) DirectClass ¶
func (*BinHashSetLiteralNode) DirectClass() *value.Class
func (*BinHashSetLiteralNode) Error ¶
func (n *BinHashSetLiteralNode) Error() string
func (*BinHashSetLiteralNode) Inspect ¶
func (n *BinHashSetLiteralNode) Inspect() string
func (*BinHashSetLiteralNode) IsStatic ¶
func (b *BinHashSetLiteralNode) IsStatic() bool
func (*BinHashSetLiteralNode) MacroType ¶
func (n *BinHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BinHashSetLiteralNode) String ¶
func (n *BinHashSetLiteralNode) String() string
type BinaryExpressionNode ¶
type BinaryExpressionNode struct {
TypedNodeBase
Op *token.Token // operator
Left ExpressionNode // left hand side
Right ExpressionNode // right hand side
// contains filtered or unexported fields
}
Expression of an operator with two operands eg. `2 + 5`, `foo > bar`
func NewBinaryExpressionNode ¶
func NewBinaryExpressionNode(loc *position.Location, op *token.Token, left, right ExpressionNode) *BinaryExpressionNode
Create a new binary expression node.
func (*BinaryExpressionNode) Class ¶
func (*BinaryExpressionNode) Class() *value.Class
func (*BinaryExpressionNode) DirectClass ¶
func (*BinaryExpressionNode) DirectClass() *value.Class
func (*BinaryExpressionNode) Error ¶
func (n *BinaryExpressionNode) Error() string
func (*BinaryExpressionNode) Inspect ¶
func (n *BinaryExpressionNode) Inspect() string
func (*BinaryExpressionNode) IsStatic ¶
func (b *BinaryExpressionNode) IsStatic() bool
func (*BinaryExpressionNode) MacroType ¶
func (n *BinaryExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BinaryExpressionNode) String ¶
func (n *BinaryExpressionNode) String() string
type BinaryPatternNode ¶
type BinaryPatternNode struct {
TypedNodeBase
Op *token.Token // operator
Left PatternNode // left hand side
Right PatternNode // right hand side
}
Pattern with two operands eg. `> 10 && < 50`
func NewBinaryPatternNode ¶
func NewBinaryPatternNode(loc *position.Location, op *token.Token, left, right PatternNode) *BinaryPatternNode
Create a new binary pattern node eg. `> 10 && < 50`
func (*BinaryPatternNode) Class ¶
func (*BinaryPatternNode) Class() *value.Class
func (*BinaryPatternNode) DirectClass ¶
func (*BinaryPatternNode) DirectClass() *value.Class
func (*BinaryPatternNode) Error ¶
func (n *BinaryPatternNode) Error() string
func (*BinaryPatternNode) Inspect ¶
func (n *BinaryPatternNode) Inspect() string
func (*BinaryPatternNode) IsStatic ¶
func (*BinaryPatternNode) IsStatic() bool
func (*BinaryPatternNode) MacroType ¶
func (n *BinaryPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BinaryPatternNode) String ¶
func (n *BinaryPatternNode) String() string
type BinaryTypeNode ¶
type BinaryTypeNode struct {
TypedNodeBase
Op *token.Token // operator
Left TypeNode // left hand side
Right TypeNode // right hand side
}
Type expression of an operator with two operands eg. `String | Int`
func NewBinaryTypeNode ¶
func NewBinaryTypeNode(loc *position.Location, op *token.Token, left, right TypeNode) *BinaryTypeNode
Create a new binary type expression node eg. `String | Int`
func (*BinaryTypeNode) Class ¶
func (*BinaryTypeNode) Class() *value.Class
func (*BinaryTypeNode) DirectClass ¶
func (*BinaryTypeNode) DirectClass() *value.Class
func (*BinaryTypeNode) Error ¶
func (n *BinaryTypeNode) Error() string
func (*BinaryTypeNode) Inspect ¶
func (n *BinaryTypeNode) Inspect() string
func (*BinaryTypeNode) IsStatic ¶
func (*BinaryTypeNode) IsStatic() bool
func (*BinaryTypeNode) MacroType ¶
func (n *BinaryTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BinaryTypeNode) String ¶
func (n *BinaryTypeNode) String() string
type BoolLiteralNode ¶
type BoolLiteralNode struct {
NodeBase
}
`bool` literal.
func NewBoolLiteralNode ¶
func NewBoolLiteralNode(loc *position.Location) *BoolLiteralNode
Create a new `bool` literal node.
func (*BoolLiteralNode) Class ¶
func (*BoolLiteralNode) Class() *value.Class
func (*BoolLiteralNode) DirectClass ¶
func (*BoolLiteralNode) DirectClass() *value.Class
func (*BoolLiteralNode) Error ¶
func (n *BoolLiteralNode) Error() string
func (*BoolLiteralNode) Inspect ¶
func (n *BoolLiteralNode) Inspect() string
func (*BoolLiteralNode) IsStatic ¶
func (*BoolLiteralNode) IsStatic() bool
func (*BoolLiteralNode) MacroType ¶
func (n *BoolLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BoolLiteralNode) String ¶
func (n *BoolLiteralNode) String() string
func (*BoolLiteralNode) Type ¶
func (*BoolLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type BoxOfExpressionNode ¶
type BoxOfExpressionNode struct {
TypedNodeBase
Expression ExpressionNode // right hand side
}
Represents a box of expression eg. `&a`
func NewBoxOfExpressionNode ¶
func NewBoxOfExpressionNode(loc *position.Location, expr ExpressionNode) *BoxOfExpressionNode
Create a new box of expression node eg. `&a`
func (*BoxOfExpressionNode) Class ¶
func (*BoxOfExpressionNode) Class() *value.Class
func (*BoxOfExpressionNode) DirectClass ¶
func (*BoxOfExpressionNode) DirectClass() *value.Class
func (*BoxOfExpressionNode) Equal ¶
func (n *BoxOfExpressionNode) Equal(other value.Value) bool
Equal checks if this node equals the other node.
func (*BoxOfExpressionNode) Error ¶
func (n *BoxOfExpressionNode) Error() string
func (*BoxOfExpressionNode) Inspect ¶
func (n *BoxOfExpressionNode) Inspect() string
func (*BoxOfExpressionNode) IsStatic ¶
func (*BoxOfExpressionNode) IsStatic() bool
func (*BoxOfExpressionNode) MacroType ¶
func (n *BoxOfExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BoxOfExpressionNode) String ¶
func (n *BoxOfExpressionNode) String() string
String returns the string representation of this node.
type BoxTypeNode ¶
type BoxTypeNode struct {
TypedNodeBase
Immutable bool
TypeNode TypeNode // right hand side
}
Represents a box type eg. `^Int`, `*Int`
func NewBoxTypeNode ¶
func NewBoxTypeNode(loc *position.Location, typ TypeNode, immutable bool) *BoxTypeNode
Create a new box type node eg. `^Int`
func (*BoxTypeNode) Class ¶
func (*BoxTypeNode) Class() *value.Class
func (*BoxTypeNode) DirectClass ¶
func (*BoxTypeNode) DirectClass() *value.Class
func (*BoxTypeNode) Equal ¶
func (n *BoxTypeNode) Equal(other value.Value) bool
Equal checks if this node equals the other node.
func (*BoxTypeNode) Error ¶
func (n *BoxTypeNode) Error() string
func (*BoxTypeNode) Inspect ¶
func (n *BoxTypeNode) Inspect() string
func (*BoxTypeNode) IsStatic ¶
func (*BoxTypeNode) IsStatic() bool
func (*BoxTypeNode) MacroType ¶
func (n *BoxTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BoxTypeNode) String ¶
func (n *BoxTypeNode) String() string
String returns the string representation of this node.
type BreakExpressionNode ¶
type BreakExpressionNode struct {
NodeBase
Label IdentifierNode
Value ExpressionNode
}
Represents a `break` expression eg. `break`, `break false`
func NewBreakExpressionNode ¶
func NewBreakExpressionNode(loc *position.Location, label IdentifierNode, val ExpressionNode) *BreakExpressionNode
Create a new `break` expression node eg. `break`
func (*BreakExpressionNode) Class ¶
func (*BreakExpressionNode) Class() *value.Class
func (*BreakExpressionNode) DirectClass ¶
func (*BreakExpressionNode) DirectClass() *value.Class
func (*BreakExpressionNode) Error ¶
func (n *BreakExpressionNode) Error() string
func (*BreakExpressionNode) Inspect ¶
func (n *BreakExpressionNode) Inspect() string
func (*BreakExpressionNode) IsStatic ¶
func (*BreakExpressionNode) IsStatic() bool
func (*BreakExpressionNode) MacroType ¶
func (n *BreakExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*BreakExpressionNode) String ¶
func (n *BreakExpressionNode) String() string
func (*BreakExpressionNode) Type ¶
func (*BreakExpressionNode) Type(*types.GlobalEnvironment) types.Type
type CallNode ¶
type CallNode struct {
TypedNodeBase
Receiver ExpressionNode
NilSafe bool
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
}
Represents a method call eg. `'123'.()`
func NewCallNode ¶
func NewCallNode(loc *position.Location, recv ExpressionNode, nilSafe bool, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *CallNode
Create a method call node eg. `'123'.to_int()`
func (*CallNode) DirectClass ¶
type CallableTypeNode ¶
type CallableTypeNode struct {
TypedNodeBase
Parameters []ParameterNode // formal parameters of the callable separated by semicolons
ReturnType TypeNode
ThrowType TypeNode
IsClosure bool
}
Represents a callable type eg. `|i: Int|: String`
func NewCallableTypeNode ¶
func NewCallableTypeNode(loc *position.Location, params []ParameterNode, retType TypeNode, throwType TypeNode, closure bool) *CallableTypeNode
Create a new closure type node eg. `|i: Int|: String`
func (*CallableTypeNode) Class ¶
func (*CallableTypeNode) Class() *value.Class
func (*CallableTypeNode) DirectClass ¶
func (*CallableTypeNode) DirectClass() *value.Class
func (*CallableTypeNode) Equal ¶
func (n *CallableTypeNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*CallableTypeNode) Error ¶
func (n *CallableTypeNode) Error() string
func (*CallableTypeNode) Inspect ¶
func (n *CallableTypeNode) Inspect() string
func (*CallableTypeNode) IsStatic ¶
func (*CallableTypeNode) IsStatic() bool
func (*CallableTypeNode) MacroType ¶
func (n *CallableTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*CallableTypeNode) String ¶
func (n *CallableTypeNode) String() string
Return a string representation of the node.
type CaseNode ¶
type CaseNode struct {
NodeBase
Pattern PatternNode
Body []StatementNode
}
Represents a `case` node eg. `case 3 then println("eureka!")`
func NewCaseNode ¶
func NewCaseNode(loc *position.Location, pattern PatternNode, body []StatementNode) *CaseNode
Create a new `case` node
func (*CaseNode) DirectClass ¶
type CatchNode ¶
type CatchNode struct {
NodeBase
Pattern PatternNode
StackTraceVar IdentifierNode
Body []StatementNode // do expression body
}
Represents a `catch` eg.
catch SomeError(message)
print("awesome!")
end
func NewCatchNode ¶
func NewCatchNode(loc *position.Location, pattern PatternNode, stackTraceVar IdentifierNode, body []StatementNode) *CatchNode
Create a new `catch` node eg.
catch SomeError(message)
print("awesome!")
end
func (*CatchNode) DirectClass ¶
type CharLiteralNode ¶
type CharLiteralNode struct {
TypedNodeBase
Value rune // value of the string literal
}
Char literal eg. `a`
func NewCharLiteralNode ¶
func NewCharLiteralNode(loc *position.Location, val rune) *CharLiteralNode
Create a new char literal node eg. `c"a"`
func (*CharLiteralNode) Class ¶
func (*CharLiteralNode) Class() *value.Class
func (*CharLiteralNode) DirectClass ¶
func (*CharLiteralNode) DirectClass() *value.Class
func (*CharLiteralNode) Error ¶
func (n *CharLiteralNode) Error() string
func (*CharLiteralNode) Inspect ¶
func (n *CharLiteralNode) Inspect() string
func (*CharLiteralNode) IsStatic ¶
func (*CharLiteralNode) IsStatic() bool
func (*CharLiteralNode) MacroType ¶
func (n *CharLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*CharLiteralNode) String ¶
func (n *CharLiteralNode) String() string
type ClassDeclarationNode ¶
type ClassDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Abstract bool
Sealed bool
Primitive bool
NoInit bool
Constant ExpressionNode // The constant that will hold the class value
TypeParameters []TypeParameterNode // Generic type variable definitions
Superclass ExpressionNode // the super/parent class of this class
Body []StatementNode // body of the class
Bytecode value.Method
}
Represents a class declaration eg. `class Foo; end`
func NewClassDeclarationNode ¶
func NewClassDeclarationNode( loc *position.Location, docComment string, abstract bool, sealed bool, primitive bool, noinit bool, constant ExpressionNode, typeParams []TypeParameterNode, superclass ExpressionNode, body []StatementNode, ) *ClassDeclarationNode
Create a new class declaration node eg. `class Foo; end`
func (*ClassDeclarationNode) Class ¶
func (*ClassDeclarationNode) Class() *value.Class
func (*ClassDeclarationNode) DirectClass ¶
func (*ClassDeclarationNode) DirectClass() *value.Class
func (*ClassDeclarationNode) Error ¶
func (n *ClassDeclarationNode) Error() string
func (*ClassDeclarationNode) Inspect ¶
func (n *ClassDeclarationNode) Inspect() string
func (*ClassDeclarationNode) IsStatic ¶
func (*ClassDeclarationNode) IsStatic() bool
func (*ClassDeclarationNode) MacroType ¶
func (n *ClassDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ClassDeclarationNode) SkipTypechecking ¶
func (*ClassDeclarationNode) SkipTypechecking() bool
func (*ClassDeclarationNode) String ¶
func (n *ClassDeclarationNode) String() string
type ClosureLiteralNode ¶
type ClosureLiteralNode struct {
TypedNodeBase
Parameters []ParameterNode // formal parameters of the closure separated by semicolons
ReturnType TypeNode
ThrowType TypeNode
Body []StatementNode // body of the closure
Lambda bool
}
Represents a closure eg. `|i| -> println(i)`, `|i| ~> println(i)`
func NewClosureLiteralNode ¶
func NewClosureLiteralNode(loc *position.Location, params []ParameterNode, retType TypeNode, throwType TypeNode, body []StatementNode, lambda bool) *ClosureLiteralNode
Create a new closure expression node eg. `|i| -> println(i)`
func (*ClosureLiteralNode) Class ¶
func (*ClosureLiteralNode) Class() *value.Class
func (*ClosureLiteralNode) DirectClass ¶
func (*ClosureLiteralNode) DirectClass() *value.Class
func (*ClosureLiteralNode) Error ¶
func (n *ClosureLiteralNode) Error() string
func (*ClosureLiteralNode) Inspect ¶
func (n *ClosureLiteralNode) Inspect() string
func (*ClosureLiteralNode) IsStatic ¶
func (*ClosureLiteralNode) IsStatic() bool
func (*ClosureLiteralNode) MacroType ¶
func (n *ClosureLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ClosureLiteralNode) String ¶
func (n *ClosureLiteralNode) String() string
type ComplexConstantNode ¶
type ComplexConstantNode interface {
Node
TypeNode
ExpressionNode
PatternNode
LiteralPatternNode
UsingEntryNode
// contains filtered or unexported methods
}
All nodes that should be valid in constant lookups should implement this interface.
type ConstantAsNode ¶
type ConstantAsNode struct {
NodeBase
Constant ComplexConstantNode
AsName string
}
Represents a constant with as in using declarations eg. `Foo::Bar as Bar`.
func NewConstantAsNode ¶
func NewConstantAsNode(loc *position.Location, constant ComplexConstantNode, as string) *ConstantAsNode
Create a new identifier with as eg. `Foo::Bar as Bar`.
func (*ConstantAsNode) Class ¶
func (*ConstantAsNode) Class() *value.Class
func (*ConstantAsNode) DirectClass ¶
func (*ConstantAsNode) DirectClass() *value.Class
func (*ConstantAsNode) Equal ¶
func (n *ConstantAsNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ConstantAsNode) Error ¶
func (n *ConstantAsNode) Error() string
func (*ConstantAsNode) Inspect ¶
func (n *ConstantAsNode) Inspect() string
func (*ConstantAsNode) IsStatic ¶
func (*ConstantAsNode) IsStatic() bool
func (*ConstantAsNode) MacroType ¶
func (n *ConstantAsNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ConstantAsNode) String ¶
func (n *ConstantAsNode) String() string
Return a string representation of the node.
type ConstantDeclarationNode ¶
type ConstantDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Constant ExpressionNode // name of the constant
TypeNode TypeNode // type of the constant
Initialiser ExpressionNode // value assigned to the constant
}
Represents a constant declaration eg. `const Foo: ArrayList[String] = ["foo", "bar"]`
func NewConstantDeclarationNode ¶
func NewConstantDeclarationNode(loc *position.Location, docComment string, constant ExpressionNode, typ TypeNode, init ExpressionNode) *ConstantDeclarationNode
Create a new constant declaration node eg. `const Foo: ArrayList[String] = ["foo", "bar"]`
func (*ConstantDeclarationNode) Class ¶
func (*ConstantDeclarationNode) Class() *value.Class
func (*ConstantDeclarationNode) DirectClass ¶
func (*ConstantDeclarationNode) DirectClass() *value.Class
func (*ConstantDeclarationNode) Equal ¶
func (n *ConstantDeclarationNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ConstantDeclarationNode) Error ¶
func (n *ConstantDeclarationNode) Error() string
func (*ConstantDeclarationNode) Inspect ¶
func (n *ConstantDeclarationNode) Inspect() string
func (*ConstantDeclarationNode) IsStatic ¶
func (*ConstantDeclarationNode) IsStatic() bool
func (*ConstantDeclarationNode) MacroType ¶
func (n *ConstantDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ConstantDeclarationNode) String ¶
func (n *ConstantDeclarationNode) String() string
Return a string representation of the node.
type ConstantLookupNode ¶
type ConstantLookupNode struct {
TypedNodeBase
Left ExpressionNode // left hand side
Right ComplexConstantNode // right hand side
}
Represents a constant lookup expressions eg. `Foo::Bar`
func NewConstantLookupNode ¶
func NewConstantLookupNode(loc *position.Location, left ExpressionNode, right ComplexConstantNode) *ConstantLookupNode
Create a new constant lookup expression node eg. `Foo::Bar`
func (*ConstantLookupNode) Class ¶
func (*ConstantLookupNode) Class() *value.Class
func (*ConstantLookupNode) DirectClass ¶
func (*ConstantLookupNode) DirectClass() *value.Class
func (*ConstantLookupNode) Equal ¶
func (n *ConstantLookupNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ConstantLookupNode) Error ¶
func (n *ConstantLookupNode) Error() string
func (*ConstantLookupNode) Inspect ¶
func (n *ConstantLookupNode) Inspect() string
func (*ConstantLookupNode) IsStatic ¶
func (*ConstantLookupNode) IsStatic() bool
func (*ConstantLookupNode) MacroType ¶
func (n *ConstantLookupNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ConstantLookupNode) String ¶
func (n *ConstantLookupNode) String() string
Return a string representation of the node.
type ConstantNode ¶
type ConstantNode interface {
Node
TypeNode
ExpressionNode
UsingEntryNode
ComplexConstantNode
// contains filtered or unexported methods
}
All nodes that should be valid constants should implement this interface.
type ConstructorCallNode ¶
type ConstructorCallNode struct {
TypedNodeBase
ClassNode ComplexConstantNode // class that is being instantiated
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
}
Represents a constructor call eg. `String(123)`
func NewConstructorCallNode ¶
func NewConstructorCallNode(loc *position.Location, class ComplexConstantNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *ConstructorCallNode
Create a constructor call node eg. `String(123)`
func (*ConstructorCallNode) Class ¶
func (*ConstructorCallNode) Class() *value.Class
func (*ConstructorCallNode) DirectClass ¶
func (*ConstructorCallNode) DirectClass() *value.Class
func (*ConstructorCallNode) Equal ¶
func (n *ConstructorCallNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ConstructorCallNode) Error ¶
func (n *ConstructorCallNode) Error() string
func (*ConstructorCallNode) Inspect ¶
func (n *ConstructorCallNode) Inspect() string
func (*ConstructorCallNode) IsStatic ¶
func (*ConstructorCallNode) IsStatic() bool
func (*ConstructorCallNode) MacroType ¶
func (n *ConstructorCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ConstructorCallNode) String ¶
func (n *ConstructorCallNode) String() string
Return a string representation of the node.
type ContinueExpressionNode ¶
type ContinueExpressionNode struct {
NodeBase
Label IdentifierNode
Value ExpressionNode
}
Represents a `continue` expression eg. `continue`, `continue "foo"`
func NewContinueExpressionNode ¶
func NewContinueExpressionNode(loc *position.Location, label IdentifierNode, val ExpressionNode) *ContinueExpressionNode
Create a new `continue` expression node eg. `continue`, `continue "foo"`
func (*ContinueExpressionNode) Class ¶
func (*ContinueExpressionNode) Class() *value.Class
func (*ContinueExpressionNode) DirectClass ¶
func (*ContinueExpressionNode) DirectClass() *value.Class
func (*ContinueExpressionNode) Equal ¶
func (n *ContinueExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ContinueExpressionNode) Error ¶
func (n *ContinueExpressionNode) Error() string
func (*ContinueExpressionNode) Inspect ¶
func (n *ContinueExpressionNode) Inspect() string
func (*ContinueExpressionNode) IsStatic ¶
func (*ContinueExpressionNode) IsStatic() bool
func (*ContinueExpressionNode) MacroType ¶
func (n *ContinueExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ContinueExpressionNode) String ¶
func (n *ContinueExpressionNode) String() string
Return a string representation of the node.
func (*ContinueExpressionNode) Type ¶
func (*ContinueExpressionNode) Type(*types.GlobalEnvironment) types.Type
type DoExpressionNode ¶
type DoExpressionNode struct {
TypedNodeBase
Body []StatementNode // do expression body
Catches []*CatchNode
Finally []StatementNode
}
Represents a `do` expression eg.
do
print("awesome!")
end
func NewDoExpressionNode ¶
func NewDoExpressionNode(loc *position.Location, body []StatementNode, catches []*CatchNode, finally []StatementNode) *DoExpressionNode
Create a new `do` expression node eg.
do
print("awesome!")
end
func (*DoExpressionNode) Class ¶
func (*DoExpressionNode) Class() *value.Class
func (*DoExpressionNode) DirectClass ¶
func (*DoExpressionNode) DirectClass() *value.Class
func (*DoExpressionNode) Equal ¶
func (n *DoExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*DoExpressionNode) Error ¶
func (n *DoExpressionNode) Error() string
func (*DoExpressionNode) HasSingleScope ¶
func (n *DoExpressionNode) HasSingleScope() bool
func (*DoExpressionNode) HasSingleStatement ¶
func (n *DoExpressionNode) HasSingleStatement() bool
func (*DoExpressionNode) Inspect ¶
func (n *DoExpressionNode) Inspect() string
func (*DoExpressionNode) IsStatic ¶
func (*DoExpressionNode) IsStatic() bool
func (*DoExpressionNode) MacroType ¶
func (n *DoExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*DoExpressionNode) String ¶
func (n *DoExpressionNode) String() string
Return a string representation of the node.
type DocCommentableNode ¶
type DocCommentableNodeBase ¶
type DocCommentableNodeBase struct {
// contains filtered or unexported fields
}
func (*DocCommentableNodeBase) DocComment ¶
func (d *DocCommentableNodeBase) DocComment() string
func (*DocCommentableNodeBase) SetDocComment ¶
func (d *DocCommentableNodeBase) SetDocComment(comment string)
type DoubleQuotedStringLiteralNode ¶
type DoubleQuotedStringLiteralNode struct {
TypedNodeBase
Value string
}
Represents a simple double quoted string literal eg. `"foo baz"`
func NewDoubleQuotedStringLiteralNode ¶
func NewDoubleQuotedStringLiteralNode(loc *position.Location, val string) *DoubleQuotedStringLiteralNode
Create a new double quoted string literal node eg. `"foo baz"`
func (*DoubleQuotedStringLiteralNode) Class ¶
func (*DoubleQuotedStringLiteralNode) Class() *value.Class
func (*DoubleQuotedStringLiteralNode) DirectClass ¶
func (*DoubleQuotedStringLiteralNode) DirectClass() *value.Class
func (*DoubleQuotedStringLiteralNode) Equal ¶
func (n *DoubleQuotedStringLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*DoubleQuotedStringLiteralNode) Error ¶
func (n *DoubleQuotedStringLiteralNode) Error() string
func (*DoubleQuotedStringLiteralNode) Inspect ¶
func (n *DoubleQuotedStringLiteralNode) Inspect() string
func (*DoubleQuotedStringLiteralNode) IsStatic ¶
func (*DoubleQuotedStringLiteralNode) IsStatic() bool
func (*DoubleQuotedStringLiteralNode) MacroType ¶
func (n *DoubleQuotedStringLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*DoubleQuotedStringLiteralNode) String ¶
func (n *DoubleQuotedStringLiteralNode) String() string
Return a string representation of the node.
type DoubleSplatExpressionNode ¶
type DoubleSplatExpressionNode struct {
TypedNodeBase
Value ExpressionNode
}
Represents a double splat expression eg. `**foo`
func NewDoubleSplatExpressionNode ¶
func NewDoubleSplatExpressionNode(loc *position.Location, val ExpressionNode) *DoubleSplatExpressionNode
Create a double splat expression node eg. `**foo`
func (*DoubleSplatExpressionNode) Class ¶
func (*DoubleSplatExpressionNode) Class() *value.Class
func (*DoubleSplatExpressionNode) DirectClass ¶
func (*DoubleSplatExpressionNode) DirectClass() *value.Class
func (*DoubleSplatExpressionNode) Equal ¶
func (n *DoubleSplatExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*DoubleSplatExpressionNode) Error ¶
func (n *DoubleSplatExpressionNode) Error() string
func (*DoubleSplatExpressionNode) Inspect ¶
func (n *DoubleSplatExpressionNode) Inspect() string
func (*DoubleSplatExpressionNode) IsStatic ¶
func (*DoubleSplatExpressionNode) IsStatic() bool
func (*DoubleSplatExpressionNode) MacroType ¶
func (n *DoubleSplatExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*DoubleSplatExpressionNode) String ¶
func (n *DoubleSplatExpressionNode) String() string
Return a string representation of the node.
type EmptyStatementNode ¶
type EmptyStatementNode struct {
NodeBase
}
Represents an empty statement eg. a statement with only a semicolon or a newline.
func NewEmptyStatementNode ¶
func NewEmptyStatementNode(loc *position.Location) *EmptyStatementNode
Create a new empty statement node.
func (*EmptyStatementNode) Class ¶
func (e *EmptyStatementNode) Class() *value.Class
func (*EmptyStatementNode) DirectClass ¶
func (e *EmptyStatementNode) DirectClass() *value.Class
func (*EmptyStatementNode) Equal ¶
func (n *EmptyStatementNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*EmptyStatementNode) Error ¶
func (e *EmptyStatementNode) Error() string
func (*EmptyStatementNode) Inspect ¶
func (e *EmptyStatementNode) Inspect() string
func (*EmptyStatementNode) IsStatic ¶
func (*EmptyStatementNode) IsStatic() bool
func (*EmptyStatementNode) MacroType ¶
func (n *EmptyStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*EmptyStatementNode) String ¶
func (n *EmptyStatementNode) String() string
Return a string representation of the node.
type ExpressionNode ¶
type ExpressionNode interface {
Node
// contains filtered or unexported methods
}
All expression nodes implement this interface.
func NewArrayListLiteralNodeI ¶
func NewArrayListLiteralNodeI(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) ExpressionNode
Same as NewArrayListLiteralNode but returns an interface
func NewArrayTupleLiteralNodeI ¶
func NewArrayTupleLiteralNodeI(loc *position.Location, elements []ExpressionNode) ExpressionNode
Same as NewArrayTupleLiteralNode but returns an interface
func NewBinArrayListLiteralExpressionNode ¶
func NewBinArrayListLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewBinArrayListLiteralNode but returns an interface.
func NewBinArrayTupleLiteralExpressionNode ¶
func NewBinArrayTupleLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode) ExpressionNode
Same as NewBinArrayTupleLiteralNode but returns an interface.
func NewBinHashSetLiteralNodeI ¶
func NewBinHashSetLiteralNodeI(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewBinHashSetLiteralNode but returns an interface.
func NewBinaryExpressionNodeI ¶
func NewBinaryExpressionNodeI(loc *position.Location, op *token.Token, left, right ExpressionNode) ExpressionNode
Same as NewBinaryExpressionNode but returns an interface
func NewHashMapLiteralNodeI ¶
func NewHashMapLiteralNodeI(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) ExpressionNode
Same as NewHashMapLiteralNode but returns an interface
func NewHashRecordLiteralNodeI ¶
func NewHashRecordLiteralNodeI(loc *position.Location, elements []ExpressionNode) ExpressionNode
Same as NewHashRecordLiteralNode but returns an interface
func NewHashSetLiteralNodeI ¶
func NewHashSetLiteralNodeI(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) ExpressionNode
Same as NewHashSetLiteralNode but returns an interface
func NewHexArrayListLiteralExpressionNode ¶
func NewHexArrayListLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewHexArrayListLiteralNode but returns an interface.
func NewHexArrayTupleLiteralExpressionNode ¶
func NewHexArrayTupleLiteralExpressionNode(loc *position.Location, elements []IntCollectionContentNode) ExpressionNode
Same as NewHexArrayTupleLiteralNode but returns an interface.
func NewHexHashSetLiteralNodeI ¶
func NewHexHashSetLiteralNodeI(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewHexHashSetLiteralNode but returns an interface.
func NewInvalidExpressionNode ¶
func NewInvalidExpressionNode(loc *position.Location, tok *token.Token) ExpressionNode
func NewLogicalExpressionNodeI ¶
func NewLogicalExpressionNodeI(loc *position.Location, op *token.Token, left, right ExpressionNode) ExpressionNode
Same as NewLogicalExpressionNode but returns an interface
func NewSymbolArrayListLiteralExpressionNode ¶
func NewSymbolArrayListLiteralExpressionNode(loc *position.Location, elements []SymbolCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewSymbolArrayListLiteralNode but returns an interface.
func NewSymbolArrayTupleLiteralExpressionNode ¶
func NewSymbolArrayTupleLiteralExpressionNode(loc *position.Location, elements []SymbolCollectionContentNode) ExpressionNode
Same as NewSymbolArrayTupleLiteralNode but returns an interface.
func NewSymbolHashSetLiteralNodeI ¶
func NewSymbolHashSetLiteralNodeI(loc *position.Location, elements []SymbolCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewSymbolHashSetLiteralNode but returns an interface.
func NewWordArrayListLiteralExpressionNode ¶
func NewWordArrayListLiteralExpressionNode(loc *position.Location, elements []WordCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewWordArrayListLiteralNode but returns an interface.
func NewWordArrayTupleLiteralExpressionNode ¶
func NewWordArrayTupleLiteralExpressionNode(loc *position.Location, elements []WordCollectionContentNode) ExpressionNode
Same as NewWordArrayTupleLiteralNode but returns an interface.
func NewWordHashSetLiteralNodeI ¶
func NewWordHashSetLiteralNodeI(loc *position.Location, elements []WordCollectionContentNode, capacity ExpressionNode) ExpressionNode
Same as NewWordHashSetLiteralNode but returns an interface.
type ExpressionStatementNode ¶
type ExpressionStatementNode struct {
NodeBase
Expression ExpressionNode
}
Expression optionally terminated with a newline or a semicolon.
func NewExpressionStatementNode ¶
func NewExpressionStatementNode(loc *position.Location, expr ExpressionNode) *ExpressionStatementNode
Create a new expression statement node eg. `5 * 2\n`
func (*ExpressionStatementNode) Class ¶
func (e *ExpressionStatementNode) Class() *value.Class
func (*ExpressionStatementNode) DirectClass ¶
func (e *ExpressionStatementNode) DirectClass() *value.Class
func (*ExpressionStatementNode) Equal ¶
func (e *ExpressionStatementNode) Equal(other value.Value) bool
func (*ExpressionStatementNode) Error ¶
func (e *ExpressionStatementNode) Error() string
func (*ExpressionStatementNode) Inspect ¶
func (n *ExpressionStatementNode) Inspect() string
func (*ExpressionStatementNode) IsStatic ¶
func (e *ExpressionStatementNode) IsStatic() bool
func (*ExpressionStatementNode) MacroType ¶
func (n *ExpressionStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ExpressionStatementNode) String ¶
func (e *ExpressionStatementNode) String() string
Return a string representation of the node.
type ExtendWhereBlockExpressionNode ¶
type ExtendWhereBlockExpressionNode struct {
TypedNodeBase
Body []StatementNode
Where []TypeParameterNode
}
Represents an `extend where` block expression eg.
extend where T < Foo
def hello then println("awesome!")
end
func NewExtendWhereBlockExpressionNode ¶
func NewExtendWhereBlockExpressionNode(loc *position.Location, body []StatementNode, where []TypeParameterNode) *ExtendWhereBlockExpressionNode
Create a new `singleton` block expression node eg.
singleton
def hello then println("awesome!")
end
func (*ExtendWhereBlockExpressionNode) Class ¶
func (*ExtendWhereBlockExpressionNode) Class() *value.Class
func (*ExtendWhereBlockExpressionNode) DirectClass ¶
func (*ExtendWhereBlockExpressionNode) DirectClass() *value.Class
func (*ExtendWhereBlockExpressionNode) Equal ¶
func (n *ExtendWhereBlockExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ExtendWhereBlockExpressionNode) Error ¶
func (n *ExtendWhereBlockExpressionNode) Error() string
func (*ExtendWhereBlockExpressionNode) Inspect ¶
func (n *ExtendWhereBlockExpressionNode) Inspect() string
func (*ExtendWhereBlockExpressionNode) IsStatic ¶
func (*ExtendWhereBlockExpressionNode) IsStatic() bool
func (*ExtendWhereBlockExpressionNode) MacroType ¶
func (n *ExtendWhereBlockExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ExtendWhereBlockExpressionNode) SkipTypechecking ¶
func (*ExtendWhereBlockExpressionNode) SkipTypechecking() bool
func (*ExtendWhereBlockExpressionNode) String ¶
func (n *ExtendWhereBlockExpressionNode) String() string
Return a string representation of the node.
type FalseLiteralNode ¶
type FalseLiteralNode struct {
NodeBase
}
`false` literal.
func NewFalseLiteralNode ¶
func NewFalseLiteralNode(loc *position.Location) *FalseLiteralNode
Create a new `false` literal node.
func (*FalseLiteralNode) Class ¶
func (*FalseLiteralNode) Class() *value.Class
func (*FalseLiteralNode) DirectClass ¶
func (*FalseLiteralNode) DirectClass() *value.Class
func (*FalseLiteralNode) Error ¶
func (n *FalseLiteralNode) Error() string
func (*FalseLiteralNode) Inspect ¶
func (n *FalseLiteralNode) Inspect() string
func (*FalseLiteralNode) IsStatic ¶
func (*FalseLiteralNode) IsStatic() bool
func (*FalseLiteralNode) MacroType ¶
func (n *FalseLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*FalseLiteralNode) String ¶
func (n *FalseLiteralNode) String() string
func (*FalseLiteralNode) Type ¶
func (*FalseLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type Float32LiteralNode ¶
type Float32LiteralNode struct {
TypedNodeBase
Value string
}
Float32 literal eg. `5.2f32`, `.5f32`, `45e20f32`
func NewFloat32LiteralNode ¶
func NewFloat32LiteralNode(loc *position.Location, val string) *Float32LiteralNode
Create a new Float32 literal node eg. `5.2f32`, `.5f32`, `45e20f32`
func (*Float32LiteralNode) Class ¶
func (*Float32LiteralNode) Class() *value.Class
func (*Float32LiteralNode) DirectClass ¶
func (*Float32LiteralNode) DirectClass() *value.Class
func (*Float32LiteralNode) Error ¶
func (n *Float32LiteralNode) Error() string
func (*Float32LiteralNode) Inspect ¶
func (n *Float32LiteralNode) Inspect() string
func (*Float32LiteralNode) IsStatic ¶
func (*Float32LiteralNode) IsStatic() bool
func (*Float32LiteralNode) MacroType ¶
func (n *Float32LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*Float32LiteralNode) String ¶
func (n *Float32LiteralNode) String() string
type Float64LiteralNode ¶
type Float64LiteralNode struct {
TypedNodeBase
Value string
}
Float64 literal eg. `5.2f64`, `.5f64`, `45e20f64`
func NewFloat64LiteralNode ¶
func NewFloat64LiteralNode(loc *position.Location, val string) *Float64LiteralNode
Create a new Float64 literal node eg. `5.2f64`, `.5f64`, `45e20f64`
func (*Float64LiteralNode) Class ¶
func (*Float64LiteralNode) Class() *value.Class
func (*Float64LiteralNode) DirectClass ¶
func (*Float64LiteralNode) DirectClass() *value.Class
func (*Float64LiteralNode) Error ¶
func (n *Float64LiteralNode) Error() string
func (*Float64LiteralNode) Inspect ¶
func (n *Float64LiteralNode) Inspect() string
func (*Float64LiteralNode) IsStatic ¶
func (*Float64LiteralNode) IsStatic() bool
func (*Float64LiteralNode) MacroType ¶
func (n *Float64LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*Float64LiteralNode) String ¶
func (n *Float64LiteralNode) String() string
type FloatLiteralNode ¶
type FloatLiteralNode struct {
TypedNodeBase
Value string
}
Float literal eg. `5.2`, `.5`, `45e20`
func NewFloatLiteralNode ¶
func NewFloatLiteralNode(loc *position.Location, val string) *FloatLiteralNode
Create a new float literal node eg. `5.2`, `.5`, `45e20`
func (*FloatLiteralNode) Class ¶
func (*FloatLiteralNode) Class() *value.Class
func (*FloatLiteralNode) DirectClass ¶
func (*FloatLiteralNode) DirectClass() *value.Class
func (*FloatLiteralNode) Error ¶
func (n *FloatLiteralNode) Error() string
func (*FloatLiteralNode) Inspect ¶
func (n *FloatLiteralNode) Inspect() string
func (*FloatLiteralNode) IsStatic ¶
func (*FloatLiteralNode) IsStatic() bool
func (*FloatLiteralNode) MacroType ¶
func (n *FloatLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*FloatLiteralNode) String ¶
func (n *FloatLiteralNode) String() string
type ForInExpressionNode ¶
type ForInExpressionNode struct {
TypedNodeBase
Pattern PatternNode
InExpression ExpressionNode // expression that will be iterated through
ThenBody []StatementNode // then expression body
}
Represents a `for in` expression eg. `for i in 5..15 then println(i)`
func NewForInExpressionNode ¶
func NewForInExpressionNode(loc *position.Location, pattern PatternNode, inExpr ExpressionNode, then []StatementNode) *ForInExpressionNode
Create a new `for in` expression node eg. `for i in 5..15 then println(i)`
func (*ForInExpressionNode) Class ¶
func (*ForInExpressionNode) Class() *value.Class
func (*ForInExpressionNode) DirectClass ¶
func (*ForInExpressionNode) DirectClass() *value.Class
func (*ForInExpressionNode) Error ¶
func (n *ForInExpressionNode) Error() string
func (*ForInExpressionNode) Inspect ¶
func (n *ForInExpressionNode) Inspect() string
func (*ForInExpressionNode) IsStatic ¶
func (*ForInExpressionNode) IsStatic() bool
func (*ForInExpressionNode) MacroType ¶
func (n *ForInExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ForInExpressionNode) String ¶
func (n *ForInExpressionNode) String() string
type FormalParameterNode ¶
type FormalParameterNode struct {
TypedNodeBase
Name IdentifierNode // name of the variable
TypeNode TypeNode // type of the variable
Initialiser ExpressionNode // value assigned to the variable
Kind ParameterKind
}
Represents a formal parameter in function or struct declarations eg. `foo: String = 'bar'`
func NewFormalParameterNode ¶
func NewFormalParameterNode(loc *position.Location, name IdentifierNode, typ TypeNode, init ExpressionNode, kind ParameterKind) *FormalParameterNode
Create a new formal parameter node eg. `foo: String = 'bar'`
func (*FormalParameterNode) Class ¶
func (*FormalParameterNode) Class() *value.Class
func (*FormalParameterNode) DirectClass ¶
func (*FormalParameterNode) DirectClass() *value.Class
func (*FormalParameterNode) Equal ¶
func (n *FormalParameterNode) Equal(other value.Value) bool
Equal checks if the given FormalParameterNode is equal to another value.
func (*FormalParameterNode) Error ¶
func (n *FormalParameterNode) Error() string
func (*FormalParameterNode) Inspect ¶
func (n *FormalParameterNode) Inspect() string
func (*FormalParameterNode) IsOptional ¶
func (f *FormalParameterNode) IsOptional() bool
func (*FormalParameterNode) IsStatic ¶
func (*FormalParameterNode) IsStatic() bool
func (*FormalParameterNode) MacroType ¶
func (n *FormalParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*FormalParameterNode) String ¶
func (f *FormalParameterNode) String() string
String returns a string representation of the FormalParameterNode.
type GenericConstantNode ¶
type GenericConstantNode struct {
TypedNodeBase
Constant ComplexConstantNode
TypeArguments []TypeNode
}
Represents a generic constant in type annotations eg. `ArrayList[String]`
func NewGenericConstantNode ¶
func NewGenericConstantNode(loc *position.Location, constant ComplexConstantNode, args []TypeNode) *GenericConstantNode
Create a generic constant node eg. `ArrayList[String]`
func (*GenericConstantNode) Class ¶
func (*GenericConstantNode) Class() *value.Class
func (*GenericConstantNode) DirectClass ¶
func (*GenericConstantNode) DirectClass() *value.Class
func (*GenericConstantNode) Equal ¶
func (n *GenericConstantNode) Equal(other value.Value) bool
Equal checks if the given GenericConstantNode is equal to another value.
func (*GenericConstantNode) Error ¶
func (n *GenericConstantNode) Error() string
func (*GenericConstantNode) Inspect ¶
func (n *GenericConstantNode) Inspect() string
func (*GenericConstantNode) IsStatic ¶
func (*GenericConstantNode) IsStatic() bool
func (*GenericConstantNode) MacroType ¶
func (n *GenericConstantNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*GenericConstantNode) String ¶
func (n *GenericConstantNode) String() string
String returns a string representation of the GenericConstantNode.
type GenericConstructorCallNode ¶
type GenericConstructorCallNode struct {
TypedNodeBase
ClassNode ComplexConstantNode // class that is being instantiated
TypeArguments []TypeNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
}
Represents a constructor call eg. `ArrayList::[Int](1, 2, 3)`
func NewGenericConstructorCallNode ¶
func NewGenericConstructorCallNode(loc *position.Location, class ComplexConstantNode, typeArgs []TypeNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *GenericConstructorCallNode
Create a constructor call node eg. `ArrayList::[Int](1, 2, 3)`
func (*GenericConstructorCallNode) Class ¶
func (*GenericConstructorCallNode) Class() *value.Class
func (*GenericConstructorCallNode) DirectClass ¶
func (*GenericConstructorCallNode) DirectClass() *value.Class
func (*GenericConstructorCallNode) Equal ¶
func (n *GenericConstructorCallNode) Equal(other value.Value) bool
Equal checks if the given GenericConstructorCallNode is equal to another value.
func (*GenericConstructorCallNode) Error ¶
func (n *GenericConstructorCallNode) Error() string
func (*GenericConstructorCallNode) Inspect ¶
func (n *GenericConstructorCallNode) Inspect() string
func (*GenericConstructorCallNode) IsStatic ¶
func (*GenericConstructorCallNode) IsStatic() bool
func (*GenericConstructorCallNode) MacroType ¶
func (n *GenericConstructorCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*GenericConstructorCallNode) String ¶
func (n *GenericConstructorCallNode) String() string
String returns a string representation of the GenericConstructorCallNode.
type GenericMethodCallNode ¶
type GenericMethodCallNode struct {
TypedNodeBase
Receiver ExpressionNode
Op *token.Token
MethodName IdentifierNode
TypeArguments []TypeNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
TailCall bool
}
Represents a method call eg. `foo.bar::[String](a)`
func NewGenericMethodCallNode ¶
func NewGenericMethodCallNode(loc *position.Location, recv ExpressionNode, op *token.Token, methodName IdentifierNode, typeArgs []TypeNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *GenericMethodCallNode
Create a method call node eg. `foo.bar::[String](a)`
func (*GenericMethodCallNode) Class ¶
func (*GenericMethodCallNode) Class() *value.Class
func (*GenericMethodCallNode) DirectClass ¶
func (*GenericMethodCallNode) DirectClass() *value.Class
func (*GenericMethodCallNode) Equal ¶
func (n *GenericMethodCallNode) Equal(other value.Value) bool
Equal checks if the given GenericMethodCallNode is equal to another value.
func (*GenericMethodCallNode) Error ¶
func (n *GenericMethodCallNode) Error() string
func (*GenericMethodCallNode) Inspect ¶
func (n *GenericMethodCallNode) Inspect() string
func (*GenericMethodCallNode) IsStatic ¶
func (*GenericMethodCallNode) IsStatic() bool
func (*GenericMethodCallNode) MacroType ¶
func (n *GenericMethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*GenericMethodCallNode) String ¶
func (n *GenericMethodCallNode) String() string
String returns a string representation of the GenericMethodCallNode.
type GenericReceiverlessMethodCallNode ¶
type GenericReceiverlessMethodCallNode struct {
TypedNodeBase
MethodName IdentifierNode
TypeArguments []TypeNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
TailCall bool
}
Represents a generic function-like call eg. `foo::[Int](123)`
func NewGenericReceiverlessMethodCallNode ¶
func NewGenericReceiverlessMethodCallNode(loc *position.Location, methodName IdentifierNode, typeArgs []TypeNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *GenericReceiverlessMethodCallNode
Create a generic function call node eg. `foo::[Int](123)`
func (*GenericReceiverlessMethodCallNode) Class ¶
func (*GenericReceiverlessMethodCallNode) Class() *value.Class
func (*GenericReceiverlessMethodCallNode) DirectClass ¶
func (*GenericReceiverlessMethodCallNode) DirectClass() *value.Class
func (*GenericReceiverlessMethodCallNode) Equal ¶
func (n *GenericReceiverlessMethodCallNode) Equal(other value.Value) bool
Equal checks if the given GenericReceiverlessMethodCallNode is equal to another value.
func (*GenericReceiverlessMethodCallNode) Error ¶
func (n *GenericReceiverlessMethodCallNode) Error() string
func (*GenericReceiverlessMethodCallNode) Inspect ¶
func (n *GenericReceiverlessMethodCallNode) Inspect() string
func (*GenericReceiverlessMethodCallNode) IsStatic ¶
func (*GenericReceiverlessMethodCallNode) IsStatic() bool
func (*GenericReceiverlessMethodCallNode) MacroType ¶
func (n *GenericReceiverlessMethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*GenericReceiverlessMethodCallNode) String ¶
func (n *GenericReceiverlessMethodCallNode) String() string
String returns a string representation of the GenericReceiverlessMethodCallNode.
type GenericTypeDefinitionNode ¶
type GenericTypeDefinitionNode struct {
TypedNodeBase
DocCommentableNodeBase
TypeParameters []TypeParameterNode // Generic type variable definitions
Constant ComplexConstantNode // new name of the type
TypeNode TypeNode // the type
}
Represents a new generic type definition eg. `typedef Nilable[T] = T | nil`
func NewGenericTypeDefinitionNode ¶
func NewGenericTypeDefinitionNode(loc *position.Location, docComment string, constant ComplexConstantNode, typeVars []TypeParameterNode, typ TypeNode) *GenericTypeDefinitionNode
Create a generic type definition node eg. `typedef Nilable[T] = T | nil`
func (*GenericTypeDefinitionNode) Class ¶
func (*GenericTypeDefinitionNode) Class() *value.Class
func (*GenericTypeDefinitionNode) DirectClass ¶
func (*GenericTypeDefinitionNode) DirectClass() *value.Class
func (*GenericTypeDefinitionNode) Equal ¶
func (n *GenericTypeDefinitionNode) Equal(other value.Value) bool
Equal compares this node to another value for equality.
func (*GenericTypeDefinitionNode) Error ¶
func (n *GenericTypeDefinitionNode) Error() string
func (*GenericTypeDefinitionNode) Inspect ¶
func (n *GenericTypeDefinitionNode) Inspect() string
func (*GenericTypeDefinitionNode) IsStatic ¶
func (*GenericTypeDefinitionNode) IsStatic() bool
func (*GenericTypeDefinitionNode) MacroType ¶
func (n *GenericTypeDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*GenericTypeDefinitionNode) String ¶
func (n *GenericTypeDefinitionNode) String() string
String returns a string representation of the GenericTypeDefinitionNode.
type GetterDeclarationNode ¶
type GetterDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Entries []ParameterNode
}
Represents a new getter declaration eg. `getter foo: String`
func NewGetterDeclarationNode ¶
func NewGetterDeclarationNode(loc *position.Location, docComment string, entries []ParameterNode) *GetterDeclarationNode
Create a getter declaration node eg. `getter foo: String`
func (*GetterDeclarationNode) Class ¶
func (*GetterDeclarationNode) Class() *value.Class
func (*GetterDeclarationNode) DirectClass ¶
func (*GetterDeclarationNode) DirectClass() *value.Class
func (*GetterDeclarationNode) Equal ¶
func (n *GetterDeclarationNode) Equal(other value.Value) bool
Equal checks if this node equals the other node.
func (*GetterDeclarationNode) Error ¶
func (n *GetterDeclarationNode) Error() string
func (*GetterDeclarationNode) Inspect ¶
func (n *GetterDeclarationNode) Inspect() string
func (*GetterDeclarationNode) IsStatic ¶
func (*GetterDeclarationNode) IsStatic() bool
func (*GetterDeclarationNode) MacroType ¶
func (n *GetterDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*GetterDeclarationNode) String ¶
func (n *GetterDeclarationNode) String() string
String returns the string representation of this node.
type GoExpressionNode ¶
type GoExpressionNode struct {
TypedNodeBase
Body []StatementNode
}
Represents a `go` expression eg. `go foo()`, `go; foo(); end`
func NewGoExpressionNode ¶
func NewGoExpressionNode(loc *position.Location, body []StatementNode) *GoExpressionNode
Create a new `go` expression node eg. `go foo()`, `go; foo(); end`
func (*GoExpressionNode) Class ¶
func (*GoExpressionNode) Class() *value.Class
func (*GoExpressionNode) DirectClass ¶
func (*GoExpressionNode) DirectClass() *value.Class
func (*GoExpressionNode) Equal ¶
func (n *GoExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*GoExpressionNode) Error ¶
func (n *GoExpressionNode) Error() string
func (*GoExpressionNode) Inspect ¶
func (n *GoExpressionNode) Inspect() string
func (*GoExpressionNode) IsStatic ¶
func (*GoExpressionNode) IsStatic() bool
func (*GoExpressionNode) MacroType ¶
func (n *GoExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*GoExpressionNode) String ¶
func (n *GoExpressionNode) String() string
Return a string representation of the node.
type HashMapLiteralNode ¶
type HashMapLiteralNode struct {
TypedNodeBase
Elements []ExpressionNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a HashMap literal eg. `{ foo: 1, 'bar' => 5, baz }`
func NewHashMapLiteralNode ¶
func NewHashMapLiteralNode(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) *HashMapLiteralNode
Create a HashMap literal node eg. `{ foo: 1, 'bar' => 5, baz }`
func (*HashMapLiteralNode) Class ¶
func (*HashMapLiteralNode) Class() *value.Class
func (*HashMapLiteralNode) DirectClass ¶
func (*HashMapLiteralNode) DirectClass() *value.Class
func (*HashMapLiteralNode) Equal ¶
func (n *HashMapLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*HashMapLiteralNode) Error ¶
func (n *HashMapLiteralNode) Error() string
func (*HashMapLiteralNode) Inspect ¶
func (n *HashMapLiteralNode) Inspect() string
func (*HashMapLiteralNode) IsStatic ¶
func (m *HashMapLiteralNode) IsStatic() bool
func (*HashMapLiteralNode) MacroType ¶
func (n *HashMapLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*HashMapLiteralNode) String ¶
func (n *HashMapLiteralNode) String() string
Return a string representation of the node.
type HashRecordLiteralNode ¶
type HashRecordLiteralNode struct {
TypedNodeBase
Elements []ExpressionNode
// contains filtered or unexported fields
}
Represents a Record literal eg. `%{ foo: 1, 'bar' => 5, baz }`
func NewHashRecordLiteralNode ¶
func NewHashRecordLiteralNode(loc *position.Location, elements []ExpressionNode) *HashRecordLiteralNode
Create a Record literal node eg. `%{ foo: 1, 'bar' => 5, baz }`
func (*HashRecordLiteralNode) Class ¶
func (*HashRecordLiteralNode) Class() *value.Class
func (*HashRecordLiteralNode) DirectClass ¶
func (*HashRecordLiteralNode) DirectClass() *value.Class
func (*HashRecordLiteralNode) Equal ¶
func (n *HashRecordLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*HashRecordLiteralNode) Error ¶
func (n *HashRecordLiteralNode) Error() string
func (*HashRecordLiteralNode) Inspect ¶
func (n *HashRecordLiteralNode) Inspect() string
func (*HashRecordLiteralNode) IsStatic ¶
func (r *HashRecordLiteralNode) IsStatic() bool
func (*HashRecordLiteralNode) MacroType ¶
func (n *HashRecordLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*HashRecordLiteralNode) String ¶
func (n *HashRecordLiteralNode) String() string
Return a string representation of the node.
type HashSetLiteralNode ¶
type HashSetLiteralNode struct {
TypedNodeBase
Elements []ExpressionNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a HashSet literal eg. `^[1, 5, -6]`
func NewHashSetLiteralNode ¶
func NewHashSetLiteralNode(loc *position.Location, elements []ExpressionNode, capacity ExpressionNode) *HashSetLiteralNode
Create a HashSet literal node eg. `^[1, 5, -6]`
func (*HashSetLiteralNode) Class ¶
func (*HashSetLiteralNode) Class() *value.Class
func (*HashSetLiteralNode) DirectClass ¶
func (*HashSetLiteralNode) DirectClass() *value.Class
func (*HashSetLiteralNode) Equal ¶
func (n *HashSetLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*HashSetLiteralNode) Error ¶
func (n *HashSetLiteralNode) Error() string
func (*HashSetLiteralNode) Inspect ¶
func (n *HashSetLiteralNode) Inspect() string
func (*HashSetLiteralNode) IsStatic ¶
func (s *HashSetLiteralNode) IsStatic() bool
func (*HashSetLiteralNode) MacroType ¶
func (n *HashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*HashSetLiteralNode) String ¶
func (n *HashSetLiteralNode) String() string
Return a string representation of the node.
type HexArrayListLiteralNode ¶
type HexArrayListLiteralNode struct {
TypedNodeBase
Elements []IntCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a hex ArrayList literal eg. `\x[ff ee]`
func NewHexArrayListLiteralNode ¶
func NewHexArrayListLiteralNode(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) *HexArrayListLiteralNode
Create a hex ArrayList literal node eg. `\x[ff ee]`
func (*HexArrayListLiteralNode) Class ¶
func (*HexArrayListLiteralNode) Class() *value.Class
func (*HexArrayListLiteralNode) DirectClass ¶
func (*HexArrayListLiteralNode) DirectClass() *value.Class
func (*HexArrayListLiteralNode) Equal ¶
func (n *HexArrayListLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*HexArrayListLiteralNode) Error ¶
func (n *HexArrayListLiteralNode) Error() string
func (*HexArrayListLiteralNode) Inspect ¶
func (n *HexArrayListLiteralNode) Inspect() string
func (*HexArrayListLiteralNode) IsStatic ¶
func (h *HexArrayListLiteralNode) IsStatic() bool
func (*HexArrayListLiteralNode) MacroType ¶
func (n *HexArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*HexArrayListLiteralNode) String ¶
func (n *HexArrayListLiteralNode) String() string
Return a string representation of the node.
type HexArrayTupleLiteralNode ¶
type HexArrayTupleLiteralNode struct {
TypedNodeBase
Elements []IntCollectionContentNode
}
Represents a hex ArrayTuple literal eg. `%x[ff ee]`
func NewHexArrayTupleLiteralNode ¶
func NewHexArrayTupleLiteralNode(loc *position.Location, elements []IntCollectionContentNode) *HexArrayTupleLiteralNode
Create a hex ArrayTuple literal node eg. `%x[ff ee]`
func (*HexArrayTupleLiteralNode) Class ¶
func (*HexArrayTupleLiteralNode) Class() *value.Class
func (*HexArrayTupleLiteralNode) DirectClass ¶
func (*HexArrayTupleLiteralNode) DirectClass() *value.Class
func (*HexArrayTupleLiteralNode) Equal ¶
func (n *HexArrayTupleLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*HexArrayTupleLiteralNode) Error ¶
func (n *HexArrayTupleLiteralNode) Error() string
func (*HexArrayTupleLiteralNode) Inspect ¶
func (n *HexArrayTupleLiteralNode) Inspect() string
func (*HexArrayTupleLiteralNode) IsStatic ¶
func (*HexArrayTupleLiteralNode) IsStatic() bool
func (*HexArrayTupleLiteralNode) MacroType ¶
func (n *HexArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*HexArrayTupleLiteralNode) String ¶
func (n *HexArrayTupleLiteralNode) String() string
Return a string representation of the node.
type HexHashSetLiteralNode ¶
type HexHashSetLiteralNode struct {
TypedNodeBase
Elements []IntCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a hex HashSet literal eg. `^x[ff ee]`
func NewHexHashSetLiteralNode ¶
func NewHexHashSetLiteralNode(loc *position.Location, elements []IntCollectionContentNode, capacity ExpressionNode) *HexHashSetLiteralNode
Create a hex HashSet literal node eg. `^x[ff ee]`
func (*HexHashSetLiteralNode) Class ¶
func (*HexHashSetLiteralNode) Class() *value.Class
func (*HexHashSetLiteralNode) DirectClass ¶
func (*HexHashSetLiteralNode) DirectClass() *value.Class
func (*HexHashSetLiteralNode) Equal ¶
func (n *HexHashSetLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*HexHashSetLiteralNode) Error ¶
func (n *HexHashSetLiteralNode) Error() string
func (*HexHashSetLiteralNode) Inspect ¶
func (n *HexHashSetLiteralNode) Inspect() string
func (*HexHashSetLiteralNode) IsStatic ¶
func (h *HexHashSetLiteralNode) IsStatic() bool
func (*HexHashSetLiteralNode) MacroType ¶
func (n *HexHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*HexHashSetLiteralNode) String ¶
func (n *HexHashSetLiteralNode) String() string
Return a string representation of the node.
type IdentifierNode ¶
type IdentifierNode interface {
Node
LiteralPatternNode
// contains filtered or unexported methods
}
All nodes that should be valid identifiers should implement this interface.
type IfExpressionNode ¶
type IfExpressionNode struct {
TypedNodeBase
Condition ExpressionNode // if condition
ThenBody []StatementNode // then expression body
ElseBody []StatementNode // else expression body
}
Represents an `if` expression eg. `if foo then println("bar")`
func NewIfExpressionNode ¶
func NewIfExpressionNode(loc *position.Location, cond ExpressionNode, then, els []StatementNode) *IfExpressionNode
Create a new `if` expression node eg. `if foo then println("bar")`
func (*IfExpressionNode) Class ¶
func (*IfExpressionNode) Class() *value.Class
func (*IfExpressionNode) DirectClass ¶
func (*IfExpressionNode) DirectClass() *value.Class
func (*IfExpressionNode) Equal ¶
func (n *IfExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*IfExpressionNode) Error ¶
func (n *IfExpressionNode) Error() string
func (*IfExpressionNode) Inspect ¶
func (n *IfExpressionNode) Inspect() string
func (*IfExpressionNode) IsStatic ¶
func (*IfExpressionNode) IsStatic() bool
func (*IfExpressionNode) MacroType ¶
func (n *IfExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*IfExpressionNode) String ¶
func (n *IfExpressionNode) String() string
Return a string representation of the node.
type ImplementExpressionNode ¶
type ImplementExpressionNode struct {
TypedNodeBase
Constants []ComplexConstantNode
}
Represents an enhance expression eg. `implement Enumerable[V]`
func NewImplementExpressionNode ¶
func NewImplementExpressionNode(loc *position.Location, consts []ComplexConstantNode) *ImplementExpressionNode
Create an enhance expression node eg. `implement Enumerable[V]`
func (*ImplementExpressionNode) Class ¶
func (*ImplementExpressionNode) Class() *value.Class
func (*ImplementExpressionNode) DirectClass ¶
func (*ImplementExpressionNode) DirectClass() *value.Class
func (*ImplementExpressionNode) Equal ¶
func (n *ImplementExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ImplementExpressionNode) Error ¶
func (n *ImplementExpressionNode) Error() string
func (*ImplementExpressionNode) Inspect ¶
func (n *ImplementExpressionNode) Inspect() string
func (*ImplementExpressionNode) IsStatic ¶
func (*ImplementExpressionNode) IsStatic() bool
func (*ImplementExpressionNode) MacroType ¶
func (n *ImplementExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ImplementExpressionNode) SkipTypechecking ¶
func (*ImplementExpressionNode) SkipTypechecking() bool
func (*ImplementExpressionNode) String ¶
func (n *ImplementExpressionNode) String() string
Return a string representation of the node.
type ImportStatementNode ¶
type ImportStatementNode struct {
NodeBase
Path StringLiteralNode
FsPaths []string // resolved file system paths
}
Represents an import statement eg. `import "./foo/bar.elk"`
func NewImportStatementNode ¶
func NewImportStatementNode(loc *position.Location, path StringLiteralNode) *ImportStatementNode
Create a new import statement node eg. `import "foo"`
func (*ImportStatementNode) Class ¶
func (e *ImportStatementNode) Class() *value.Class
func (*ImportStatementNode) DirectClass ¶
func (e *ImportStatementNode) DirectClass() *value.Class
func (*ImportStatementNode) Equal ¶
func (n *ImportStatementNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*ImportStatementNode) Error ¶
func (e *ImportStatementNode) Error() string
func (*ImportStatementNode) Inspect ¶
func (e *ImportStatementNode) Inspect() string
func (*ImportStatementNode) IsStatic ¶
func (i *ImportStatementNode) IsStatic() bool
func (*ImportStatementNode) MacroType ¶
func (n *ImportStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ImportStatementNode) String ¶
func (n *ImportStatementNode) String() string
Return a string representation of the node.
type IncludeExpressionNode ¶
type IncludeExpressionNode struct {
TypedNodeBase
Constants []ComplexConstantNode
}
Represents an include expression eg. `include Enumerable[V]`
func NewIncludeExpressionNode ¶
func NewIncludeExpressionNode(loc *position.Location, consts []ComplexConstantNode) *IncludeExpressionNode
Create an include expression node eg. `include Enumerable[V]`
func (*IncludeExpressionNode) Class ¶
func (*IncludeExpressionNode) Class() *value.Class
func (*IncludeExpressionNode) DirectClass ¶
func (*IncludeExpressionNode) DirectClass() *value.Class
func (*IncludeExpressionNode) Equal ¶
func (n *IncludeExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*IncludeExpressionNode) Error ¶
func (n *IncludeExpressionNode) Error() string
func (*IncludeExpressionNode) Inspect ¶
func (n *IncludeExpressionNode) Inspect() string
func (*IncludeExpressionNode) IsStatic ¶
func (*IncludeExpressionNode) IsStatic() bool
func (*IncludeExpressionNode) MacroType ¶
func (n *IncludeExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*IncludeExpressionNode) SkipTypechecking ¶
func (*IncludeExpressionNode) SkipTypechecking() bool
func (*IncludeExpressionNode) String ¶
func (n *IncludeExpressionNode) String() string
Return a string representation of the node.
type InitDefinitionNode ¶
type InitDefinitionNode struct {
TypedNodeBase
DocCommentableNodeBase
Parameters []ParameterNode // formal parameters
ThrowType TypeNode
Body []StatementNode // body of the method
}
Represents a constructor definition eg. `init then 'hello world'`
func NewInitDefinitionNode ¶
func NewInitDefinitionNode(loc *position.Location, params []ParameterNode, throwType TypeNode, body []StatementNode) *InitDefinitionNode
Create a constructor definition node eg. `init then 'hello world'`
func (*InitDefinitionNode) Class ¶
func (*InitDefinitionNode) Class() *value.Class
func (*InitDefinitionNode) DirectClass ¶
func (*InitDefinitionNode) DirectClass() *value.Class
func (*InitDefinitionNode) Equal ¶
func (n *InitDefinitionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*InitDefinitionNode) Error ¶
func (n *InitDefinitionNode) Error() string
func (*InitDefinitionNode) Inspect ¶
func (n *InitDefinitionNode) Inspect() string
func (*InitDefinitionNode) IsStatic ¶
func (*InitDefinitionNode) IsStatic() bool
func (*InitDefinitionNode) MacroType ¶
func (n *InitDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InitDefinitionNode) String ¶
func (n *InitDefinitionNode) String() string
Return a string representation of the node.
type InstanceMethodLookupNode ¶
type InstanceMethodLookupNode struct {
TypedNodeBase
Receiver ExpressionNode
Name IdentifierNode
}
Represents an instance method lookup expression eg. `Foo.:bar`
func NewInstanceMethodLookupNode ¶
func NewInstanceMethodLookupNode(loc *position.Location, receiver ExpressionNode, name IdentifierNode) *InstanceMethodLookupNode
Create a new method lookup expression node eg. `Foo::bar`, `a::c`
func (*InstanceMethodLookupNode) Class ¶
func (*InstanceMethodLookupNode) Class() *value.Class
func (*InstanceMethodLookupNode) DirectClass ¶
func (*InstanceMethodLookupNode) DirectClass() *value.Class
func (*InstanceMethodLookupNode) Equal ¶
func (n *InstanceMethodLookupNode) Equal(other value.Value) bool
func (*InstanceMethodLookupNode) Error ¶
func (n *InstanceMethodLookupNode) Error() string
func (*InstanceMethodLookupNode) Inspect ¶
func (n *InstanceMethodLookupNode) Inspect() string
func (*InstanceMethodLookupNode) IsStatic ¶
func (*InstanceMethodLookupNode) IsStatic() bool
func (*InstanceMethodLookupNode) MacroType ¶
func (n *InstanceMethodLookupNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InstanceMethodLookupNode) String ¶
func (n *InstanceMethodLookupNode) String() string
type InstanceOfTypeNode ¶
type InstanceOfTypeNode struct {
TypedNodeBase
TypeNode TypeNode // right hand side
}
Represents an instance type eg. `%self`
func NewInstanceOfTypeNode ¶
func NewInstanceOfTypeNode(loc *position.Location, typ TypeNode) *InstanceOfTypeNode
Create a new instance of type node eg. `%self`
func (*InstanceOfTypeNode) Class ¶
func (*InstanceOfTypeNode) Class() *value.Class
func (*InstanceOfTypeNode) DirectClass ¶
func (*InstanceOfTypeNode) DirectClass() *value.Class
func (*InstanceOfTypeNode) Equal ¶
func (n *InstanceOfTypeNode) Equal(other value.Value) bool
Equal checks if this node equals the other node.
func (*InstanceOfTypeNode) Error ¶
func (n *InstanceOfTypeNode) Error() string
func (*InstanceOfTypeNode) Inspect ¶
func (n *InstanceOfTypeNode) Inspect() string
func (*InstanceOfTypeNode) IsStatic ¶
func (*InstanceOfTypeNode) IsStatic() bool
func (*InstanceOfTypeNode) MacroType ¶
func (n *InstanceOfTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InstanceOfTypeNode) String ¶
func (n *InstanceOfTypeNode) String() string
String returns the string representation of this node.
type InstanceVariableDeclarationNode ¶
type InstanceVariableDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Name InstanceVariableNode // name of the variable
TypeNode TypeNode // type of the variable
}
Represents an instance variable declaration eg. `var @foo: String`
func NewInstanceVariableDeclarationNode ¶
func NewInstanceVariableDeclarationNode(loc *position.Location, docComment string, name InstanceVariableNode, typ TypeNode) *InstanceVariableDeclarationNode
Create a new instance variable declaration node eg. `var @foo: String`
func (*InstanceVariableDeclarationNode) Class ¶
func (*InstanceVariableDeclarationNode) Class() *value.Class
func (*InstanceVariableDeclarationNode) DirectClass ¶
func (*InstanceVariableDeclarationNode) DirectClass() *value.Class
func (*InstanceVariableDeclarationNode) Equal ¶
func (n *InstanceVariableDeclarationNode) Equal(other value.Value) bool
func (*InstanceVariableDeclarationNode) Error ¶
func (p *InstanceVariableDeclarationNode) Error() string
func (*InstanceVariableDeclarationNode) Inspect ¶
func (n *InstanceVariableDeclarationNode) Inspect() string
func (*InstanceVariableDeclarationNode) IsStatic ¶
func (*InstanceVariableDeclarationNode) IsStatic() bool
func (*InstanceVariableDeclarationNode) MacroType ¶
func (n *InstanceVariableDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InstanceVariableDeclarationNode) String ¶
func (n *InstanceVariableDeclarationNode) String() string
type InstanceVariableNode ¶
type InstanceVariableNode interface {
Node
ExpressionNode
// contains filtered or unexported methods
}
All nodes that should be valid instance variables should implement this interface.
type Int8LiteralNode ¶
type Int8LiteralNode struct {
TypedNodeBase
Value string
}
Int8 literal eg. `5i8`, `1_20i8`, `0xffi8`
func NewInt8LiteralNode ¶
func NewInt8LiteralNode(loc *position.Location, val string) *Int8LiteralNode
Create a new Int8 literal node eg. `5i8`, `1_20i8`, `0xffi8`
func (*Int8LiteralNode) Class ¶
func (*Int8LiteralNode) Class() *value.Class
func (*Int8LiteralNode) DirectClass ¶
func (*Int8LiteralNode) DirectClass() *value.Class
func (*Int8LiteralNode) Error ¶
func (n *Int8LiteralNode) Error() string
func (*Int8LiteralNode) Inspect ¶
func (n *Int8LiteralNode) Inspect() string
func (*Int8LiteralNode) IsStatic ¶
func (*Int8LiteralNode) IsStatic() bool
func (*Int8LiteralNode) MacroType ¶
func (n *Int8LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*Int8LiteralNode) String ¶
func (n *Int8LiteralNode) String() string
type Int16LiteralNode ¶
type Int16LiteralNode struct {
TypedNodeBase
Value string
}
Int16 literal eg. `5i16`, `1_20i16`, `0xffi16`
func NewInt16LiteralNode ¶
func NewInt16LiteralNode(loc *position.Location, val string) *Int16LiteralNode
Create a new Int16 literal node eg. `5i16`, `1_20i16`, `0xffi16`
func (*Int16LiteralNode) Class ¶
func (*Int16LiteralNode) Class() *value.Class
func (*Int16LiteralNode) DirectClass ¶
func (*Int16LiteralNode) DirectClass() *value.Class
func (*Int16LiteralNode) Error ¶
func (n *Int16LiteralNode) Error() string
func (*Int16LiteralNode) Inspect ¶
func (n *Int16LiteralNode) Inspect() string
func (*Int16LiteralNode) IsStatic ¶
func (*Int16LiteralNode) IsStatic() bool
func (*Int16LiteralNode) MacroType ¶
func (n *Int16LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*Int16LiteralNode) String ¶
func (n *Int16LiteralNode) String() string
type Int32LiteralNode ¶
type Int32LiteralNode struct {
TypedNodeBase
Value string
}
Int32 literal eg. `5i32`, `1_20i32`, `0xffi32`
func NewInt32LiteralNode ¶
func NewInt32LiteralNode(loc *position.Location, val string) *Int32LiteralNode
Create a new Int32 literal node eg. `5i32`, `1_20i32`, `0xffi32`
func (*Int32LiteralNode) Class ¶
func (*Int32LiteralNode) Class() *value.Class
func (*Int32LiteralNode) DirectClass ¶
func (*Int32LiteralNode) DirectClass() *value.Class
func (*Int32LiteralNode) Error ¶
func (n *Int32LiteralNode) Error() string
func (*Int32LiteralNode) Inspect ¶
func (n *Int32LiteralNode) Inspect() string
func (*Int32LiteralNode) IsStatic ¶
func (*Int32LiteralNode) IsStatic() bool
func (*Int32LiteralNode) MacroType ¶
func (n *Int32LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*Int32LiteralNode) String ¶
func (n *Int32LiteralNode) String() string
type Int64LiteralNode ¶
type Int64LiteralNode struct {
TypedNodeBase
Value string
}
Int64 literal eg. `5i64`, `125_355i64`, `0xffi64`
func NewInt64LiteralNode ¶
func NewInt64LiteralNode(loc *position.Location, val string) *Int64LiteralNode
Create a new Int64 literal node eg. `5i64`, `125_355i64`, `0xffi64`
func (*Int64LiteralNode) Class ¶
func (*Int64LiteralNode) Class() *value.Class
func (*Int64LiteralNode) DirectClass ¶
func (*Int64LiteralNode) DirectClass() *value.Class
func (*Int64LiteralNode) Error ¶
func (n *Int64LiteralNode) Error() string
func (*Int64LiteralNode) Inspect ¶
func (n *Int64LiteralNode) Inspect() string
func (*Int64LiteralNode) IsStatic ¶
func (*Int64LiteralNode) IsStatic() bool
func (*Int64LiteralNode) MacroType ¶
func (n *Int64LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*Int64LiteralNode) String ¶
func (n *Int64LiteralNode) String() string
type IntCollectionContentNode ¶
type IntCollectionContentNode interface {
Node
ExpressionNode
// contains filtered or unexported methods
}
All nodes that should be able to appear as elements of Int collection literals should implement this interface.
type IntLiteralNode ¶
type IntLiteralNode struct {
TypedNodeBase
Value string
}
Int literal eg. `5`, `125_355`, `0xff`
func NewIntLiteralNode ¶
func NewIntLiteralNode(loc *position.Location, val string) *IntLiteralNode
Create a new int literal node eg. `5`, `125_355`, `0xff`
func (*IntLiteralNode) Class ¶
func (*IntLiteralNode) Class() *value.Class
func (*IntLiteralNode) DirectClass ¶
func (*IntLiteralNode) DirectClass() *value.Class
func (*IntLiteralNode) Error ¶
func (n *IntLiteralNode) Error() string
func (*IntLiteralNode) Inspect ¶
func (n *IntLiteralNode) Inspect() string
func (*IntLiteralNode) IsStatic ¶
func (*IntLiteralNode) IsStatic() bool
func (*IntLiteralNode) MacroType ¶
func (n *IntLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*IntLiteralNode) String ¶
func (n *IntLiteralNode) String() string
type InterfaceDeclarationNode ¶
type InterfaceDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Constant ExpressionNode // The constant that will hold the interface value
TypeParameters []TypeParameterNode // Generic type variable definitions
Body []StatementNode // body of the interface
Implements []*ImplementExpressionNode
Bytecode value.Method
}
Represents an interface declaration eg. `interface Foo; end`
func NewInterfaceDeclarationNode ¶
func NewInterfaceDeclarationNode( loc *position.Location, docComment string, constant ExpressionNode, typeParams []TypeParameterNode, body []StatementNode, ) *InterfaceDeclarationNode
Create a new interface declaration node eg. `interface Foo; end`
func (*InterfaceDeclarationNode) Class ¶
func (*InterfaceDeclarationNode) Class() *value.Class
func (*InterfaceDeclarationNode) DirectClass ¶
func (*InterfaceDeclarationNode) DirectClass() *value.Class
func (*InterfaceDeclarationNode) Equal ¶
func (n *InterfaceDeclarationNode) Equal(other value.Value) bool
func (*InterfaceDeclarationNode) Error ¶
func (n *InterfaceDeclarationNode) Error() string
func (*InterfaceDeclarationNode) Inspect ¶
func (n *InterfaceDeclarationNode) Inspect() string
func (*InterfaceDeclarationNode) IsStatic ¶
func (*InterfaceDeclarationNode) IsStatic() bool
func (*InterfaceDeclarationNode) MacroType ¶
func (n *InterfaceDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InterfaceDeclarationNode) SkipTypechecking ¶
func (*InterfaceDeclarationNode) SkipTypechecking() bool
func (*InterfaceDeclarationNode) String ¶
func (n *InterfaceDeclarationNode) String() string
type InterpolatedRegexLiteralNode ¶
type InterpolatedRegexLiteralNode struct {
NodeBase
Content []RegexLiteralContentNode
Flags bitfield.BitField8
}
Represents an Interpolated regex literal eg. `%/foo${1 + 2}bar/`
func NewInterpolatedRegexLiteralNode ¶
func NewInterpolatedRegexLiteralNode(loc *position.Location, content []RegexLiteralContentNode, flags bitfield.BitField8) *InterpolatedRegexLiteralNode
Create a new interpolated regex literal node eg. `%/foo${1 + 3}bar/`.
func (*InterpolatedRegexLiteralNode) Class ¶
func (*InterpolatedRegexLiteralNode) Class() *value.Class
func (*InterpolatedRegexLiteralNode) DirectClass ¶
func (*InterpolatedRegexLiteralNode) DirectClass() *value.Class
func (*InterpolatedRegexLiteralNode) Equal ¶
func (n *InterpolatedRegexLiteralNode) Equal(other value.Value) bool
func (*InterpolatedRegexLiteralNode) Error ¶
func (n *InterpolatedRegexLiteralNode) Error() string
func (*InterpolatedRegexLiteralNode) Inspect ¶
func (n *InterpolatedRegexLiteralNode) Inspect() string
func (*InterpolatedRegexLiteralNode) IsASCII ¶
func (r *InterpolatedRegexLiteralNode) IsASCII() bool
func (*InterpolatedRegexLiteralNode) IsCaseInsensitive ¶
func (r *InterpolatedRegexLiteralNode) IsCaseInsensitive() bool
func (*InterpolatedRegexLiteralNode) IsDotAll ¶
func (r *InterpolatedRegexLiteralNode) IsDotAll() bool
func (*InterpolatedRegexLiteralNode) IsExtended ¶
func (r *InterpolatedRegexLiteralNode) IsExtended() bool
func (*InterpolatedRegexLiteralNode) IsMultiline ¶
func (r *InterpolatedRegexLiteralNode) IsMultiline() bool
func (*InterpolatedRegexLiteralNode) IsStatic ¶
func (*InterpolatedRegexLiteralNode) IsStatic() bool
func (*InterpolatedRegexLiteralNode) IsUngreedy ¶
func (r *InterpolatedRegexLiteralNode) IsUngreedy() bool
func (*InterpolatedRegexLiteralNode) MacroType ¶
func (n *InterpolatedRegexLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InterpolatedRegexLiteralNode) SetASCII ¶
func (r *InterpolatedRegexLiteralNode) SetASCII() *InterpolatedRegexLiteralNode
func (*InterpolatedRegexLiteralNode) SetCaseInsensitive ¶
func (r *InterpolatedRegexLiteralNode) SetCaseInsensitive() *InterpolatedRegexLiteralNode
func (*InterpolatedRegexLiteralNode) SetDotAll ¶
func (r *InterpolatedRegexLiteralNode) SetDotAll() *InterpolatedRegexLiteralNode
func (*InterpolatedRegexLiteralNode) SetExtended ¶
func (r *InterpolatedRegexLiteralNode) SetExtended() *InterpolatedRegexLiteralNode
func (*InterpolatedRegexLiteralNode) SetMultiline ¶
func (r *InterpolatedRegexLiteralNode) SetMultiline() *InterpolatedRegexLiteralNode
func (*InterpolatedRegexLiteralNode) SetUngreedy ¶
func (r *InterpolatedRegexLiteralNode) SetUngreedy() *InterpolatedRegexLiteralNode
func (*InterpolatedRegexLiteralNode) String ¶
func (n *InterpolatedRegexLiteralNode) String() string
func (*InterpolatedRegexLiteralNode) Type ¶
func (*InterpolatedRegexLiteralNode) Type(env *types.GlobalEnvironment) types.Type
type InterpolatedStringLiteralNode ¶
type InterpolatedStringLiteralNode struct {
NodeBase
Content []StringLiteralContentNode
}
Represents an interpolated string literal eg. `"foo ${bar} baz"`
func NewInterpolatedStringLiteralNode ¶
func NewInterpolatedStringLiteralNode(loc *position.Location, cont []StringLiteralContentNode) *InterpolatedStringLiteralNode
Create a new interpolated string literal node eg. `"foo ${bar} baz"`
func (*InterpolatedStringLiteralNode) Class ¶
func (*InterpolatedStringLiteralNode) Class() *value.Class
func (*InterpolatedStringLiteralNode) DirectClass ¶
func (*InterpolatedStringLiteralNode) DirectClass() *value.Class
func (*InterpolatedStringLiteralNode) Equal ¶
func (n *InterpolatedStringLiteralNode) Equal(other value.Value) bool
func (*InterpolatedStringLiteralNode) Error ¶
func (n *InterpolatedStringLiteralNode) Error() string
func (*InterpolatedStringLiteralNode) Inspect ¶
func (n *InterpolatedStringLiteralNode) Inspect() string
func (*InterpolatedStringLiteralNode) IsStatic ¶
func (*InterpolatedStringLiteralNode) IsStatic() bool
func (*InterpolatedStringLiteralNode) MacroType ¶
func (n *InterpolatedStringLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InterpolatedStringLiteralNode) String ¶
func (n *InterpolatedStringLiteralNode) String() string
func (*InterpolatedStringLiteralNode) Type ¶
func (*InterpolatedStringLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type InterpolatedSymbolLiteralNode ¶
type InterpolatedSymbolLiteralNode struct {
NodeBase
Content *InterpolatedStringLiteralNode
}
Represents an interpolated symbol eg. `:"foo ${bar + 2}"`
func NewInterpolatedSymbolLiteralNode ¶
func NewInterpolatedSymbolLiteralNode(loc *position.Location, cont *InterpolatedStringLiteralNode) *InterpolatedSymbolLiteralNode
Create an interpolated symbol literal node eg. `:"foo ${bar + 2}"`
func (*InterpolatedSymbolLiteralNode) Class ¶
func (*InterpolatedSymbolLiteralNode) Class() *value.Class
func (*InterpolatedSymbolLiteralNode) DirectClass ¶
func (*InterpolatedSymbolLiteralNode) DirectClass() *value.Class
func (*InterpolatedSymbolLiteralNode) Equal ¶
func (n *InterpolatedSymbolLiteralNode) Equal(other value.Value) bool
func (*InterpolatedSymbolLiteralNode) Error ¶
func (n *InterpolatedSymbolLiteralNode) Error() string
func (*InterpolatedSymbolLiteralNode) Inspect ¶
func (n *InterpolatedSymbolLiteralNode) Inspect() string
func (*InterpolatedSymbolLiteralNode) IsStatic ¶
func (*InterpolatedSymbolLiteralNode) IsStatic() bool
func (*InterpolatedSymbolLiteralNode) MacroType ¶
func (n *InterpolatedSymbolLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InterpolatedSymbolLiteralNode) String ¶
func (n *InterpolatedSymbolLiteralNode) String() string
func (*InterpolatedSymbolLiteralNode) Type ¶
func (*InterpolatedSymbolLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type IntersectionTypeNode ¶
type IntersectionTypeNode struct {
TypedNodeBase
Elements []TypeNode
}
Union type eg. `String & Int & Float`
func NewIntersectionTypeNode ¶
func NewIntersectionTypeNode(loc *position.Location, elements []TypeNode) *IntersectionTypeNode
Create a new binary type expression node eg. `String & Int`
func (*IntersectionTypeNode) Class ¶
func (*IntersectionTypeNode) Class() *value.Class
func (*IntersectionTypeNode) DirectClass ¶
func (*IntersectionTypeNode) DirectClass() *value.Class
func (*IntersectionTypeNode) Error ¶
func (n *IntersectionTypeNode) Error() string
func (*IntersectionTypeNode) Inspect ¶
func (n *IntersectionTypeNode) Inspect() string
func (*IntersectionTypeNode) IsStatic ¶
func (*IntersectionTypeNode) IsStatic() bool
func (*IntersectionTypeNode) MacroType ¶
func (n *IntersectionTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*IntersectionTypeNode) String ¶
func (n *IntersectionTypeNode) String() string
type InvalidNode ¶
Represents a syntax error.
func NewInvalidNode ¶
func NewInvalidNode(loc *position.Location, tok *token.Token) *InvalidNode
Create a new invalid node.
func (*InvalidNode) Class ¶
func (*InvalidNode) Class() *value.Class
func (*InvalidNode) DirectClass ¶
func (*InvalidNode) DirectClass() *value.Class
func (*InvalidNode) Error ¶
func (p *InvalidNode) Error() string
func (*InvalidNode) Inspect ¶
func (n *InvalidNode) Inspect() string
func (*InvalidNode) IsOptional ¶
func (*InvalidNode) IsOptional() bool
func (*InvalidNode) IsStatic ¶
func (*InvalidNode) IsStatic() bool
func (*InvalidNode) MacroType ¶
func (n *InvalidNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*InvalidNode) SetType ¶
func (*InvalidNode) SetType(types.Type)
func (*InvalidNode) String ¶
func (n *InvalidNode) String() string
type KeyValueExpressionNode ¶
type KeyValueExpressionNode struct {
TypedNodeBase
Key ExpressionNode
Value ExpressionNode
// contains filtered or unexported fields
}
Represents a key value expression eg. `foo => bar`
func NewKeyValueExpressionNode ¶
func NewKeyValueExpressionNode(loc *position.Location, key, val ExpressionNode) *KeyValueExpressionNode
Create a key value expression node eg. `foo => bar`
func (*KeyValueExpressionNode) Class ¶
func (*KeyValueExpressionNode) Class() *value.Class
func (*KeyValueExpressionNode) DirectClass ¶
func (*KeyValueExpressionNode) DirectClass() *value.Class
func (*KeyValueExpressionNode) Equal ¶
func (n *KeyValueExpressionNode) Equal(other value.Value) bool
func (*KeyValueExpressionNode) Error ¶
func (n *KeyValueExpressionNode) Error() string
func (*KeyValueExpressionNode) Inspect ¶
func (n *KeyValueExpressionNode) Inspect() string
func (*KeyValueExpressionNode) IsStatic ¶
func (k *KeyValueExpressionNode) IsStatic() bool
func (*KeyValueExpressionNode) MacroType ¶
func (n *KeyValueExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*KeyValueExpressionNode) String ¶
func (n *KeyValueExpressionNode) String() string
type KeyValuePatternNode ¶
type KeyValuePatternNode struct {
NodeBase
Key LiteralPatternNode
Value PatternNode
}
Represents a key value pattern eg. `foo => bar`
func NewKeyValuePatternNode ¶
func NewKeyValuePatternNode(loc *position.Location, key LiteralPatternNode, val PatternNode) *KeyValuePatternNode
Create a key value pattern node eg. `foo => bar`
func (*KeyValuePatternNode) Class ¶
func (*KeyValuePatternNode) Class() *value.Class
func (*KeyValuePatternNode) DirectClass ¶
func (*KeyValuePatternNode) DirectClass() *value.Class
func (*KeyValuePatternNode) Error ¶
func (n *KeyValuePatternNode) Error() string
func (*KeyValuePatternNode) Inspect ¶
func (n *KeyValuePatternNode) Inspect() string
func (*KeyValuePatternNode) IsStatic ¶
func (k *KeyValuePatternNode) IsStatic() bool
func (*KeyValuePatternNode) MacroType ¶
func (n *KeyValuePatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*KeyValuePatternNode) String ¶
func (n *KeyValuePatternNode) String() string
type LabeledExpressionNode ¶
type LabeledExpressionNode struct {
NodeBase
Label string
Expression ExpressionNode
}
Represents a labeled expression eg. `$foo: 1 + 2`
func NewLabeledExpressionNode ¶
func NewLabeledExpressionNode(loc *position.Location, label string, expr ExpressionNode) *LabeledExpressionNode
Create a new labeled expression node eg. `$foo: 1 + 2`
func (*LabeledExpressionNode) Class ¶
func (*LabeledExpressionNode) Class() *value.Class
func (*LabeledExpressionNode) DirectClass ¶
func (*LabeledExpressionNode) DirectClass() *value.Class
func (*LabeledExpressionNode) Error ¶
func (n *LabeledExpressionNode) Error() string
func (*LabeledExpressionNode) Inspect ¶
func (n *LabeledExpressionNode) Inspect() string
func (*LabeledExpressionNode) IsStatic ¶
func (l *LabeledExpressionNode) IsStatic() bool
func (*LabeledExpressionNode) MacroType ¶
func (n *LabeledExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*LabeledExpressionNode) String ¶
func (n *LabeledExpressionNode) String() string
func (*LabeledExpressionNode) Type ¶
func (l *LabeledExpressionNode) Type(env *types.GlobalEnvironment) types.Type
type ListPatternNode ¶
type ListPatternNode struct {
TypedNodeBase
Elements []PatternNode
}
Represents a List pattern eg. `[1, a, >= 10]`
func NewListPatternNode ¶
func NewListPatternNode(loc *position.Location, elements []PatternNode) *ListPatternNode
Create a List pattern node eg. `[1, a, >= 10]`
func (*ListPatternNode) Class ¶
func (*ListPatternNode) Class() *value.Class
func (*ListPatternNode) DirectClass ¶
func (*ListPatternNode) DirectClass() *value.Class
func (*ListPatternNode) Error ¶
func (n *ListPatternNode) Error() string
func (*ListPatternNode) Inspect ¶
func (n *ListPatternNode) Inspect() string
func (*ListPatternNode) IsStatic ¶
func (l *ListPatternNode) IsStatic() bool
func (*ListPatternNode) MacroType ¶
func (n *ListPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ListPatternNode) String ¶
func (n *ListPatternNode) String() string
type LiteralPatternNode ¶
type LiteralPatternNode interface {
Node
ExpressionNode
PatternNode
}
func NewBinArrayListLiteralPatternNode ¶
func NewBinArrayListLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
Same as NewBinArrayListLiteralNode but returns an interface.
func NewBinArrayTupleLiteralPatternNode ¶
func NewBinArrayTupleLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
Same as NewBinArrayTupleLiteralNode but returns an interface.
func NewBinHashSetLiteralPatternNode ¶
func NewBinHashSetLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
Same as NewBinHashSetLiteralNode but returns an interface.
func NewHexArrayListLiteralPatternNode ¶
func NewHexArrayListLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
Same as NewHexArrayListLiteralNode but returns an interface.
func NewHexArrayTupleLiteralPatternNode ¶
func NewHexArrayTupleLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
Same as NewHexArrayTupleLiteralNode but returns an interface.
func NewHexHashSetLiteralPatternNode ¶
func NewHexHashSetLiteralPatternNode(loc *position.Location, elements []IntCollectionContentNode) LiteralPatternNode
Same as NewHexHashSetLiteralNode but returns an interface.
func NewInvalidLiteralPatternNode ¶
func NewInvalidLiteralPatternNode(loc *position.Location, tok *token.Token) LiteralPatternNode
func NewSymbolArrayListLiteralPatternNode ¶
func NewSymbolArrayListLiteralPatternNode(loc *position.Location, elements []SymbolCollectionContentNode) LiteralPatternNode
Same as NewSymbolArrayListLiteralNode but returns an interface.
func NewSymbolArrayTupleLiteralPatternNode ¶
func NewSymbolArrayTupleLiteralPatternNode(loc *position.Location, elements []SymbolCollectionContentNode) LiteralPatternNode
Same as NewSymbolArrayTupleLiteralNode but returns an interface.
func NewSymbolHashSetLiteralPatternNode ¶
func NewSymbolHashSetLiteralPatternNode(loc *position.Location, elements []SymbolCollectionContentNode) LiteralPatternNode
Same as NewSymbolHashSetLiteralNode but returns an interface.
func NewWordArrayListLiteralPatternNode ¶
func NewWordArrayListLiteralPatternNode(loc *position.Location, elements []WordCollectionContentNode) LiteralPatternNode
Same as NewWordArrayListLiteralNode but returns an interface.
func NewWordArrayTupleLiteralPatternNode ¶
func NewWordArrayTupleLiteralPatternNode(loc *position.Location, elements []WordCollectionContentNode) LiteralPatternNode
Same as NewWordArrayTupleLiteralNode but returns an interface.
func NewWordHashSetLiteralPatternNode ¶
func NewWordHashSetLiteralPatternNode(loc *position.Location, elements []WordCollectionContentNode) LiteralPatternNode
Same as NewWordHashSetLiteralNode but returns an interface.
type LogicalExpressionNode ¶
type LogicalExpressionNode struct {
TypedNodeBase
Op *token.Token // operator
Left ExpressionNode // left hand side
Right ExpressionNode // right hand side
// contains filtered or unexported fields
}
Expression of a logical operator with two operands eg. `foo && bar`
func NewLogicalExpressionNode ¶
func NewLogicalExpressionNode(loc *position.Location, op *token.Token, left, right ExpressionNode) *LogicalExpressionNode
Create a new logical expression node.
func (*LogicalExpressionNode) Class ¶
func (*LogicalExpressionNode) Class() *value.Class
func (*LogicalExpressionNode) DirectClass ¶
func (*LogicalExpressionNode) DirectClass() *value.Class
func (*LogicalExpressionNode) Error ¶
func (n *LogicalExpressionNode) Error() string
func (*LogicalExpressionNode) Inspect ¶
func (n *LogicalExpressionNode) Inspect() string
func (*LogicalExpressionNode) IsStatic ¶
func (l *LogicalExpressionNode) IsStatic() bool
func (*LogicalExpressionNode) MacroType ¶
func (n *LogicalExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*LogicalExpressionNode) String ¶
func (n *LogicalExpressionNode) String() string
type LoopExpressionNode ¶
type LoopExpressionNode struct {
TypedNodeBase
ThenBody []StatementNode // then expression body
}
Represents a `loop` expression.
func NewLoopExpressionNode ¶
func NewLoopExpressionNode(loc *position.Location, then []StatementNode) *LoopExpressionNode
Create a new `loop` expression node eg. `loop println('elk is awesome')`
func (*LoopExpressionNode) Class ¶
func (*LoopExpressionNode) Class() *value.Class
func (*LoopExpressionNode) DirectClass ¶
func (*LoopExpressionNode) DirectClass() *value.Class
func (*LoopExpressionNode) Error ¶
func (n *LoopExpressionNode) Error() string
func (*LoopExpressionNode) Inspect ¶
func (n *LoopExpressionNode) Inspect() string
func (*LoopExpressionNode) IsStatic ¶
func (*LoopExpressionNode) IsStatic() bool
func (*LoopExpressionNode) MacroType ¶
func (n *LoopExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*LoopExpressionNode) String ¶
func (n *LoopExpressionNode) String() string
type MacroBoundaryNode ¶
type MacroBoundaryNode struct {
TypedNodeBase
Name string
Body []StatementNode
}
Represents a boundary for expanded macros
func NewMacroBoundaryNode ¶
func NewMacroBoundaryNode(loc *position.Location, body []StatementNode, name string) *MacroBoundaryNode
Create a new macro boundary node eg.
do macro
print("awesome!")
end
func (*MacroBoundaryNode) Class ¶
func (*MacroBoundaryNode) Class() *value.Class
func (*MacroBoundaryNode) DirectClass ¶
func (*MacroBoundaryNode) DirectClass() *value.Class
func (*MacroBoundaryNode) Equal ¶
func (n *MacroBoundaryNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*MacroBoundaryNode) Error ¶
func (n *MacroBoundaryNode) Error() string
func (*MacroBoundaryNode) Inspect ¶
func (n *MacroBoundaryNode) Inspect() string
func (*MacroBoundaryNode) IsStatic ¶
func (m *MacroBoundaryNode) IsStatic() bool
func (*MacroBoundaryNode) MacroType ¶
func (n *MacroBoundaryNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MacroBoundaryNode) String ¶
func (n *MacroBoundaryNode) String() string
Return a string representation of the node.
type MacroCallNode ¶
type MacroCallNode struct {
TypedNodeBase
Kind MacroKind
Receiver ExpressionNode
MacroName IdentifierNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
}
Represents a method call eg. `'123'.to_int!()`
func NewMacroCallNode ¶
func NewMacroCallNode( loc *position.Location, kind MacroKind, recv ExpressionNode, macroName IdentifierNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode, ) *MacroCallNode
Create a macro call node eg. `'123'.to_int!()`
func (*MacroCallNode) Class ¶
func (*MacroCallNode) Class() *value.Class
func (*MacroCallNode) DirectClass ¶
func (*MacroCallNode) DirectClass() *value.Class
func (*MacroCallNode) Error ¶
func (n *MacroCallNode) Error() string
func (*MacroCallNode) Inspect ¶
func (n *MacroCallNode) Inspect() string
func (*MacroCallNode) IsStatic ¶
func (*MacroCallNode) IsStatic() bool
func (*MacroCallNode) MacroType ¶
func (n *MacroCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MacroCallNode) String ¶
func (n *MacroCallNode) String() string
type MacroDefinitionNode ¶
type MacroDefinitionNode struct {
TypedNodeBase
DocCommentableNodeBase
ReturnType TypeNode
Name IdentifierNode
Parameters []ParameterNode // formal parameters
Body []StatementNode // body of the method
// contains filtered or unexported fields
}
Represents a macro definition eg. `macro foo(a: Elk::AST::StringLiteralNode); a; end`
func NewMacroDefinitionNode ¶
func NewMacroDefinitionNode( loc *position.Location, docComment string, sealed bool, name IdentifierNode, params []ParameterNode, returnType TypeNode, body []StatementNode, ) *MacroDefinitionNode
Create a method definition node eg. `def foo: String then 'hello world'`
func (*MacroDefinitionNode) Class ¶
func (*MacroDefinitionNode) Class() *value.Class
func (*MacroDefinitionNode) DirectClass ¶
func (*MacroDefinitionNode) DirectClass() *value.Class
func (*MacroDefinitionNode) Equal ¶
func (n *MacroDefinitionNode) Equal(other value.Value) bool
Check if this method definition is equal to another value.
func (*MacroDefinitionNode) Error ¶
func (p *MacroDefinitionNode) Error() string
func (*MacroDefinitionNode) Inspect ¶
func (n *MacroDefinitionNode) Inspect() string
func (*MacroDefinitionNode) IsSealed ¶
func (m *MacroDefinitionNode) IsSealed() bool
func (*MacroDefinitionNode) IsStatic ¶
func (*MacroDefinitionNode) IsStatic() bool
func (*MacroDefinitionNode) MacroType ¶
func (n *MacroDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MacroDefinitionNode) SetSealed ¶
func (m *MacroDefinitionNode) SetSealed()
func (*MacroDefinitionNode) String ¶
func (n *MacroDefinitionNode) String() string
Return a string representation of this method definition.
type MacroNameNode ¶
type MacroNameNode struct {
TypedNodeBase
Value string
}
Represents a macro name eg. `foo!`.
func NewMacroNameNode ¶
func NewMacroNameNode(loc *position.Location, val string) *MacroNameNode
Create a new macro name node eg. `foo!`.
func (*MacroNameNode) Class ¶
func (*MacroNameNode) Class() *value.Class
func (*MacroNameNode) DirectClass ¶
func (*MacroNameNode) DirectClass() *value.Class
func (*MacroNameNode) Error ¶
func (n *MacroNameNode) Error() string
func (*MacroNameNode) Inspect ¶
func (n *MacroNameNode) Inspect() string
func (*MacroNameNode) IsStatic ¶
func (*MacroNameNode) IsStatic() bool
func (*MacroNameNode) MacroType ¶
func (n *MacroNameNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MacroNameNode) String ¶
func (n *MacroNameNode) String() string
type MapPatternNode ¶
type MapPatternNode struct {
TypedNodeBase
Elements []PatternNode
}
Represents a Map pattern eg. `{ foo: 5, bar: a, 5 => >= 10 }`
func NewMapPatternNode ¶
func NewMapPatternNode(loc *position.Location, elements []PatternNode) *MapPatternNode
Create a Map pattern node eg. `{ foo: 5, bar: a, 5 => >= 10 }`
func (*MapPatternNode) Class ¶
func (*MapPatternNode) Class() *value.Class
func (*MapPatternNode) DirectClass ¶
func (*MapPatternNode) DirectClass() *value.Class
func (*MapPatternNode) Error ¶
func (n *MapPatternNode) Error() string
func (*MapPatternNode) Inspect ¶
func (n *MapPatternNode) Inspect() string
func (*MapPatternNode) IsStatic ¶
func (m *MapPatternNode) IsStatic() bool
func (*MapPatternNode) MacroType ¶
func (n *MapPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MapPatternNode) String ¶
func (n *MapPatternNode) String() string
type MatchExpressionNode ¶
type MatchExpressionNode struct {
TypedNodeBase
Expression ExpressionNode // left hand side
Pattern PatternNode // right hand side
}
An expression that matches a value against a pattern eg. `a match Foo(a: "lol", b: > 2)`
func NewMatchExpressionNode ¶
func NewMatchExpressionNode(loc *position.Location, expression ExpressionNode, pattern PatternNode) *MatchExpressionNode
Create a new match expression node.
func (*MatchExpressionNode) Class ¶
func (*MatchExpressionNode) Class() *value.Class
func (*MatchExpressionNode) DirectClass ¶
func (*MatchExpressionNode) DirectClass() *value.Class
func (*MatchExpressionNode) Error ¶
func (n *MatchExpressionNode) Error() string
func (*MatchExpressionNode) Inspect ¶
func (n *MatchExpressionNode) Inspect() string
func (*MatchExpressionNode) IsStatic ¶
func (b *MatchExpressionNode) IsStatic() bool
func (*MatchExpressionNode) MacroType ¶
func (n *MatchExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MatchExpressionNode) String ¶
func (n *MatchExpressionNode) String() string
type MethodCallNode ¶
type MethodCallNode struct {
TypedNodeBase
Receiver ExpressionNode
Op *token.Token
MethodName IdentifierNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
TailCall bool
}
Represents a method call eg. `'123'.to_int()`
func NewMethodCallNode ¶
func NewMethodCallNode(loc *position.Location, recv ExpressionNode, op *token.Token, methodName IdentifierNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *MethodCallNode
Create a method call node eg. `'123'.to_int()`
func (*MethodCallNode) Class ¶
func (*MethodCallNode) Class() *value.Class
func (*MethodCallNode) DirectClass ¶
func (*MethodCallNode) DirectClass() *value.Class
func (*MethodCallNode) Error ¶
func (n *MethodCallNode) Error() string
func (*MethodCallNode) Inspect ¶
func (n *MethodCallNode) Inspect() string
func (*MethodCallNode) IsStatic ¶
func (*MethodCallNode) IsStatic() bool
func (*MethodCallNode) MacroType ¶
func (n *MethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MethodCallNode) String ¶
func (n *MethodCallNode) String() string
type MethodDefinitionNode ¶
type MethodDefinitionNode struct {
TypedNodeBase
DocCommentableNodeBase
Name IdentifierNode
TypeParameters []TypeParameterNode
Parameters []ParameterNode // formal parameters
ReturnType TypeNode
ThrowType TypeNode
Body []StatementNode // body of the method
Flags bitfield.BitField8
}
Represents a method definition eg. `def foo: String then 'hello world'`
func NewMethodDefinitionNode ¶
func NewMethodDefinitionNode( loc *position.Location, docComment string, flags bitfield.BitFlag8, name IdentifierNode, typeParams []TypeParameterNode, params []ParameterNode, returnType, throwType TypeNode, body []StatementNode, ) *MethodDefinitionNode
Create a method definition node eg. `def foo: String then 'hello world'`
func (*MethodDefinitionNode) Class ¶
func (*MethodDefinitionNode) Class() *value.Class
func (*MethodDefinitionNode) DirectClass ¶
func (*MethodDefinitionNode) DirectClass() *value.Class
func (*MethodDefinitionNode) Equal ¶
func (n *MethodDefinitionNode) Equal(other value.Value) bool
Check if this method definition is equal to another value.
func (*MethodDefinitionNode) Error ¶
func (p *MethodDefinitionNode) Error() string
func (*MethodDefinitionNode) Inspect ¶
func (n *MethodDefinitionNode) Inspect() string
func (*MethodDefinitionNode) IsAbstract ¶
func (m *MethodDefinitionNode) IsAbstract() bool
func (*MethodDefinitionNode) IsAsync ¶
func (m *MethodDefinitionNode) IsAsync() bool
func (*MethodDefinitionNode) IsGenerator ¶
func (m *MethodDefinitionNode) IsGenerator() bool
func (*MethodDefinitionNode) IsOverload ¶
func (m *MethodDefinitionNode) IsOverload() bool
func (*MethodDefinitionNode) IsSealed ¶
func (m *MethodDefinitionNode) IsSealed() bool
func (*MethodDefinitionNode) IsSetter ¶
func (m *MethodDefinitionNode) IsSetter() bool
Whether the method is a setter.
func (*MethodDefinitionNode) IsStatic ¶
func (*MethodDefinitionNode) IsStatic() bool
func (*MethodDefinitionNode) MacroType ¶
func (n *MethodDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MethodDefinitionNode) SetAbstract ¶
func (m *MethodDefinitionNode) SetAbstract()
func (*MethodDefinitionNode) SetAsync ¶
func (m *MethodDefinitionNode) SetAsync()
func (*MethodDefinitionNode) SetGenerator ¶
func (m *MethodDefinitionNode) SetGenerator()
func (*MethodDefinitionNode) SetOverload ¶
func (m *MethodDefinitionNode) SetOverload()
func (*MethodDefinitionNode) SetSealed ¶
func (m *MethodDefinitionNode) SetSealed()
func (*MethodDefinitionNode) String ¶
func (n *MethodDefinitionNode) String() string
Return a string representation of this method definition.
type MethodLookupAsNode ¶
type MethodLookupAsNode struct {
NodeBase
MethodLookup *MethodLookupNode
AsName IdentifierNode
}
Represents a method lookup with as in using declarations eg. `Foo::bar as baz`.
func NewMethodLookupAsNode ¶
func NewMethodLookupAsNode(loc *position.Location, methodLookup *MethodLookupNode, as IdentifierNode) *MethodLookupAsNode
Create a new identifier with as eg. `Foo::bar as Bar`.
func (*MethodLookupAsNode) Class ¶
func (*MethodLookupAsNode) Class() *value.Class
func (*MethodLookupAsNode) DirectClass ¶
func (*MethodLookupAsNode) DirectClass() *value.Class
func (*MethodLookupAsNode) Equal ¶
func (n *MethodLookupAsNode) Equal(other value.Value) bool
Check if this method lookup as node is equal to another value.
func (*MethodLookupAsNode) Error ¶
func (n *MethodLookupAsNode) Error() string
func (*MethodLookupAsNode) Inspect ¶
func (n *MethodLookupAsNode) Inspect() string
func (*MethodLookupAsNode) IsMacro ¶
func (n *MethodLookupAsNode) IsMacro() bool
func (*MethodLookupAsNode) IsStatic ¶
func (*MethodLookupAsNode) IsStatic() bool
func (*MethodLookupAsNode) MacroType ¶
func (n *MethodLookupAsNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MethodLookupAsNode) String ¶
func (n *MethodLookupAsNode) String() string
Return a string representation of this method lookup as node.
type MethodLookupNode ¶
type MethodLookupNode struct {
TypedNodeBase
Receiver ExpressionNode
Name IdentifierNode
}
Represents a method lookup expression eg. `Foo::bar`, `a::c`
func NewMethodLookupNode ¶
func NewMethodLookupNode(loc *position.Location, receiver ExpressionNode, name IdentifierNode) *MethodLookupNode
Create a new method lookup expression node eg. `Foo::bar`, `a::c`
func (*MethodLookupNode) Class ¶
func (*MethodLookupNode) Class() *value.Class
func (*MethodLookupNode) DirectClass ¶
func (*MethodLookupNode) DirectClass() *value.Class
func (*MethodLookupNode) Error ¶
func (n *MethodLookupNode) Error() string
func (*MethodLookupNode) Inspect ¶
func (n *MethodLookupNode) Inspect() string
func (*MethodLookupNode) IsMacro ¶
func (n *MethodLookupNode) IsMacro() bool
func (*MethodLookupNode) IsStatic ¶
func (*MethodLookupNode) IsStatic() bool
func (*MethodLookupNode) MacroType ¶
func (n *MethodLookupNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MethodLookupNode) String ¶
func (n *MethodLookupNode) String() string
type MethodParameterNode ¶
type MethodParameterNode struct {
TypedNodeBase
Name IdentifierNode // name of the variable
TypeNode TypeNode // type of the variable
Initialiser ExpressionNode // value assigned to the variable
SetInstanceVariable bool // whether an instance variable with this name gets automatically assigned
Kind ParameterKind
}
Represents a formal parameter in method declarations eg. `foo: String = 'bar'`
func NewMethodParameterNode ¶
func NewMethodParameterNode(loc *position.Location, name IdentifierNode, setIvar bool, typ TypeNode, init ExpressionNode, kind ParameterKind) *MethodParameterNode
Create a new formal parameter node eg. `foo: String = 'bar'`
func (*MethodParameterNode) Class ¶
func (*MethodParameterNode) Class() *value.Class
func (*MethodParameterNode) DirectClass ¶
func (*MethodParameterNode) DirectClass() *value.Class
func (*MethodParameterNode) Error ¶
func (n *MethodParameterNode) Error() string
func (*MethodParameterNode) Inspect ¶
func (n *MethodParameterNode) Inspect() string
func (*MethodParameterNode) IsOptional ¶
func (f *MethodParameterNode) IsOptional() bool
func (*MethodParameterNode) IsStatic ¶
func (*MethodParameterNode) IsStatic() bool
func (*MethodParameterNode) MacroType ¶
func (n *MethodParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MethodParameterNode) String ¶
func (n *MethodParameterNode) String() string
type MethodSignatureDefinitionNode ¶
type MethodSignatureDefinitionNode struct {
TypedNodeBase
DocCommentableNodeBase
Name IdentifierNode
TypeParameters []TypeParameterNode
Parameters []ParameterNode // formal parameters
ReturnType TypeNode
ThrowType TypeNode
}
Represents a method signature definition eg. `sig to_string(val: Int): String`
func NewMethodSignatureDefinitionNode ¶
func NewMethodSignatureDefinitionNode(loc *position.Location, docComment string, name IdentifierNode, typeParams []TypeParameterNode, params []ParameterNode, returnType, throwType TypeNode) *MethodSignatureDefinitionNode
Create a method signature node eg. `sig to_string(val: Int): String`
func (*MethodSignatureDefinitionNode) Class ¶
func (*MethodSignatureDefinitionNode) Class() *value.Class
func (*MethodSignatureDefinitionNode) DirectClass ¶
func (*MethodSignatureDefinitionNode) DirectClass() *value.Class
func (*MethodSignatureDefinitionNode) Equal ¶
func (n *MethodSignatureDefinitionNode) Equal(other value.Value) bool
func (*MethodSignatureDefinitionNode) Error ¶
func (n *MethodSignatureDefinitionNode) Error() string
func (*MethodSignatureDefinitionNode) Inspect ¶
func (n *MethodSignatureDefinitionNode) Inspect() string
func (*MethodSignatureDefinitionNode) IsStatic ¶
func (*MethodSignatureDefinitionNode) IsStatic() bool
func (*MethodSignatureDefinitionNode) MacroType ¶
func (n *MethodSignatureDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MethodSignatureDefinitionNode) String ¶
func (n *MethodSignatureDefinitionNode) String() string
type MixinDeclarationNode ¶
type MixinDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Abstract bool
Constant ExpressionNode // The constant that will hold the mixin value
TypeParameters []TypeParameterNode // Generic type variable definitions
Body []StatementNode // body of the mixin
IncludesAndImplements []ExpressionNode
Bytecode value.Method
}
Represents a mixin declaration eg. `mixin Foo; end`
func NewMixinDeclarationNode ¶
func NewMixinDeclarationNode( loc *position.Location, docComment string, abstract bool, constant ExpressionNode, typeParams []TypeParameterNode, body []StatementNode, ) *MixinDeclarationNode
Create a new mixin declaration node eg. `mixin Foo; end`
func (*MixinDeclarationNode) Class ¶
func (*MixinDeclarationNode) Class() *value.Class
func (*MixinDeclarationNode) DirectClass ¶
func (*MixinDeclarationNode) DirectClass() *value.Class
func (*MixinDeclarationNode) Error ¶
func (n *MixinDeclarationNode) Error() string
func (*MixinDeclarationNode) Inspect ¶
func (n *MixinDeclarationNode) Inspect() string
func (*MixinDeclarationNode) IsStatic ¶
func (*MixinDeclarationNode) IsStatic() bool
func (*MixinDeclarationNode) MacroType ¶
func (n *MixinDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MixinDeclarationNode) SkipTypechecking ¶
func (*MixinDeclarationNode) SkipTypechecking() bool
func (*MixinDeclarationNode) String ¶
func (n *MixinDeclarationNode) String() string
type ModifierForInNode ¶
type ModifierForInNode struct {
TypedNodeBase
ThenExpression ExpressionNode // then expression body
Pattern PatternNode
InExpression ExpressionNode // expression that will be iterated through
}
Represents an `for .. in` modifier expression eg. `println(i) for i in 10..30`
func NewModifierForInNode ¶
func NewModifierForInNode(loc *position.Location, then ExpressionNode, pattern PatternNode, in ExpressionNode) *ModifierForInNode
Create a new modifier `for` .. `in` node eg. `println(i) for i in 10..30`
func (*ModifierForInNode) Class ¶
func (*ModifierForInNode) Class() *value.Class
func (*ModifierForInNode) DirectClass ¶
func (*ModifierForInNode) DirectClass() *value.Class
func (*ModifierForInNode) Error ¶
func (m *ModifierForInNode) Error() string
func (*ModifierForInNode) Inspect ¶
func (n *ModifierForInNode) Inspect() string
func (*ModifierForInNode) IsStatic ¶
func (*ModifierForInNode) IsStatic() bool
func (*ModifierForInNode) MacroType ¶
func (n *ModifierForInNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ModifierForInNode) String ¶
func (n *ModifierForInNode) String() string
type ModifierIfElseNode ¶
type ModifierIfElseNode struct {
TypedNodeBase
ThenExpression ExpressionNode // then expression body
Condition ExpressionNode // if condition
ElseExpression ExpressionNode // else expression body
}
Represents an `if .. else` modifier expression eg. `foo = 1 if bar else foo = 2`
func NewModifierIfElseNode ¶
func NewModifierIfElseNode(loc *position.Location, then, cond, els ExpressionNode) *ModifierIfElseNode
Create a new modifier `if` .. `else` node eg. `foo = 1 if bar else foo = 2“.
func (*ModifierIfElseNode) Class ¶
func (*ModifierIfElseNode) Class() *value.Class
func (*ModifierIfElseNode) DirectClass ¶
func (*ModifierIfElseNode) DirectClass() *value.Class
func (*ModifierIfElseNode) Error ¶
func (m *ModifierIfElseNode) Error() string
func (*ModifierIfElseNode) Inspect ¶
func (n *ModifierIfElseNode) Inspect() string
func (*ModifierIfElseNode) IsStatic ¶
func (*ModifierIfElseNode) IsStatic() bool
func (*ModifierIfElseNode) MacroType ¶
func (n *ModifierIfElseNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ModifierIfElseNode) String ¶
func (n *ModifierIfElseNode) String() string
type ModifierNode ¶
type ModifierNode struct {
TypedNodeBase
Modifier *token.Token // modifier token
Left ExpressionNode // left hand side
Right ExpressionNode // right hand side
}
Represents an `if`, `unless`, `while` or `until` modifier expression eg. `return true if foo`.
func NewModifierNode ¶
func NewModifierNode(loc *position.Location, mod *token.Token, left, right ExpressionNode) *ModifierNode
Create a new modifier node eg. `return true if foo`.
func (*ModifierNode) Class ¶
func (*ModifierNode) Class() *value.Class
func (*ModifierNode) DirectClass ¶
func (*ModifierNode) DirectClass() *value.Class
func (*ModifierNode) Error ¶
func (m *ModifierNode) Error() string
func (*ModifierNode) Inspect ¶
func (n *ModifierNode) Inspect() string
func (*ModifierNode) IsStatic ¶
func (*ModifierNode) IsStatic() bool
func (*ModifierNode) MacroType ¶
func (n *ModifierNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ModifierNode) String ¶
func (n *ModifierNode) String() string
type ModuleDeclarationNode ¶
type ModuleDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Constant ExpressionNode // The constant that will hold the module value
Body []StatementNode // body of the module
Bytecode value.Method
}
Represents a module declaration eg. `module Foo; end`
func NewModuleDeclarationNode ¶
func NewModuleDeclarationNode( loc *position.Location, docComment string, constant ExpressionNode, body []StatementNode, ) *ModuleDeclarationNode
Create a new module declaration node eg. `module Foo; end`
func (*ModuleDeclarationNode) Class ¶
func (*ModuleDeclarationNode) Class() *value.Class
func (*ModuleDeclarationNode) DirectClass ¶
func (*ModuleDeclarationNode) DirectClass() *value.Class
func (*ModuleDeclarationNode) Error ¶
func (n *ModuleDeclarationNode) Error() string
func (*ModuleDeclarationNode) Inspect ¶
func (n *ModuleDeclarationNode) Inspect() string
func (*ModuleDeclarationNode) IsStatic ¶
func (*ModuleDeclarationNode) IsStatic() bool
func (*ModuleDeclarationNode) MacroType ¶
func (n *ModuleDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ModuleDeclarationNode) SkipTypechecking ¶
func (*ModuleDeclarationNode) SkipTypechecking() bool
func (*ModuleDeclarationNode) String ¶
func (n *ModuleDeclarationNode) String() string
type MustExpressionNode ¶
type MustExpressionNode struct {
TypedNodeBase
Value ExpressionNode
}
Represents a `must` expression eg. `must foo()`
func NewMustExpressionNode ¶
func NewMustExpressionNode(loc *position.Location, val ExpressionNode) *MustExpressionNode
Create a new `must` expression node eg. `must foo()`
func (*MustExpressionNode) Class ¶
func (*MustExpressionNode) Class() *value.Class
func (*MustExpressionNode) DirectClass ¶
func (*MustExpressionNode) DirectClass() *value.Class
func (*MustExpressionNode) Error ¶
func (n *MustExpressionNode) Error() string
func (*MustExpressionNode) Inspect ¶
func (n *MustExpressionNode) Inspect() string
func (*MustExpressionNode) IsStatic ¶
func (*MustExpressionNode) IsStatic() bool
func (*MustExpressionNode) MacroType ¶
func (n *MustExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*MustExpressionNode) String ¶
func (n *MustExpressionNode) String() string
type NamedArgumentNode ¶
type NamedArgumentNode interface {
Node
// contains filtered or unexported methods
}
Nodes that implement this interface represent named arguments in method calls.
type NamedCallArgumentNode ¶
type NamedCallArgumentNode struct {
NodeBase
Name IdentifierNode
Value ExpressionNode
}
Represents a named argument in a function call eg. `foo: 123`
func NewNamedCallArgumentNode ¶
func NewNamedCallArgumentNode(loc *position.Location, name IdentifierNode, val ExpressionNode) *NamedCallArgumentNode
Create a named argument node eg. `foo: 123`
func (*NamedCallArgumentNode) Class ¶
func (*NamedCallArgumentNode) Class() *value.Class
func (*NamedCallArgumentNode) DirectClass ¶
func (*NamedCallArgumentNode) DirectClass() *value.Class
func (*NamedCallArgumentNode) Error ¶
func (n *NamedCallArgumentNode) Error() string
func (*NamedCallArgumentNode) Inspect ¶
func (n *NamedCallArgumentNode) Inspect() string
func (*NamedCallArgumentNode) IsStatic ¶
func (*NamedCallArgumentNode) IsStatic() bool
func (*NamedCallArgumentNode) MacroType ¶
func (n *NamedCallArgumentNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NamedCallArgumentNode) String ¶
func (n *NamedCallArgumentNode) String() string
type NeverTypeNode ¶
type NeverTypeNode struct {
NodeBase
}
`never` type.
func NewNeverTypeNode ¶
func NewNeverTypeNode(loc *position.Location) *NeverTypeNode
Create a new `never` type node.
func (*NeverTypeNode) Class ¶
func (*NeverTypeNode) Class() *value.Class
func (*NeverTypeNode) DirectClass ¶
func (*NeverTypeNode) DirectClass() *value.Class
func (*NeverTypeNode) Error ¶
func (n *NeverTypeNode) Error() string
func (*NeverTypeNode) Inspect ¶
func (n *NeverTypeNode) Inspect() string
func (*NeverTypeNode) IsStatic ¶
func (*NeverTypeNode) IsStatic() bool
func (*NeverTypeNode) MacroType ¶
func (n *NeverTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NeverTypeNode) String ¶
func (n *NeverTypeNode) String() string
func (*NeverTypeNode) Type ¶
func (*NeverTypeNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type NewExpressionNode ¶
type NewExpressionNode struct {
TypedNodeBase
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
}
Represents a new expression eg. `new(123)`
func NewNewExpressionNode ¶
func NewNewExpressionNode(loc *position.Location, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *NewExpressionNode
Create a new expression node eg. `new(123)`
func (*NewExpressionNode) Class ¶
func (*NewExpressionNode) Class() *value.Class
func (*NewExpressionNode) DirectClass ¶
func (*NewExpressionNode) DirectClass() *value.Class
func (*NewExpressionNode) Error ¶
func (n *NewExpressionNode) Error() string
func (*NewExpressionNode) Inspect ¶
func (n *NewExpressionNode) Inspect() string
func (*NewExpressionNode) IsStatic ¶
func (*NewExpressionNode) IsStatic() bool
func (*NewExpressionNode) MacroType ¶
func (n *NewExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NewExpressionNode) String ¶
func (n *NewExpressionNode) String() string
type NilLiteralNode ¶
type NilLiteralNode struct {
NodeBase
}
`nil` literal.
func NewNilLiteralNode ¶
func NewNilLiteralNode(loc *position.Location) *NilLiteralNode
Create a new `nil` literal node.
func (*NilLiteralNode) Class ¶
func (*NilLiteralNode) Class() *value.Class
func (*NilLiteralNode) DirectClass ¶
func (*NilLiteralNode) DirectClass() *value.Class
func (*NilLiteralNode) Error ¶
func (n *NilLiteralNode) Error() string
func (*NilLiteralNode) Inspect ¶
func (n *NilLiteralNode) Inspect() string
func (*NilLiteralNode) IsStatic ¶
func (*NilLiteralNode) IsStatic() bool
func (*NilLiteralNode) MacroType ¶
func (n *NilLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NilLiteralNode) SetType ¶
func (*NilLiteralNode) SetType(types.Type)
func (*NilLiteralNode) String ¶
func (n *NilLiteralNode) String() string
func (*NilLiteralNode) Type ¶
func (*NilLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type NilSafeSubscriptExpressionNode ¶
type NilSafeSubscriptExpressionNode struct {
TypedNodeBase
Receiver ExpressionNode
Key ExpressionNode
// contains filtered or unexported fields
}
Represents nil-safe subscript access eg. `arr?[5]`
func NewNilSafeSubscriptExpressionNode ¶
func NewNilSafeSubscriptExpressionNode(loc *position.Location, recv, key ExpressionNode) *NilSafeSubscriptExpressionNode
Create a nil-safe subscript expression node eg. `arr?[5]`
func (*NilSafeSubscriptExpressionNode) Class ¶
func (*NilSafeSubscriptExpressionNode) Class() *value.Class
func (*NilSafeSubscriptExpressionNode) DirectClass ¶
func (*NilSafeSubscriptExpressionNode) DirectClass() *value.Class
func (*NilSafeSubscriptExpressionNode) Equal ¶
func (n *NilSafeSubscriptExpressionNode) Equal(other value.Value) bool
func (*NilSafeSubscriptExpressionNode) Error ¶
func (n *NilSafeSubscriptExpressionNode) Error() string
func (*NilSafeSubscriptExpressionNode) Inspect ¶
func (n *NilSafeSubscriptExpressionNode) Inspect() string
func (*NilSafeSubscriptExpressionNode) IsStatic ¶
func (s *NilSafeSubscriptExpressionNode) IsStatic() bool
func (*NilSafeSubscriptExpressionNode) MacroType ¶
func (n *NilSafeSubscriptExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NilSafeSubscriptExpressionNode) String ¶
func (n *NilSafeSubscriptExpressionNode) String() string
type NilableTypeNode ¶
type NilableTypeNode struct {
TypedNodeBase
TypeNode TypeNode // right hand side
}
Represents an optional or nilable type eg. `String?`
func NewNilableTypeNode ¶
func NewNilableTypeNode(loc *position.Location, typ TypeNode) *NilableTypeNode
Create a new nilable type node eg. `String?`
func (*NilableTypeNode) Class ¶
func (*NilableTypeNode) Class() *value.Class
func (*NilableTypeNode) DirectClass ¶
func (*NilableTypeNode) DirectClass() *value.Class
func (*NilableTypeNode) Error ¶
func (n *NilableTypeNode) Error() string
func (*NilableTypeNode) Inspect ¶
func (n *NilableTypeNode) Inspect() string
func (*NilableTypeNode) IsStatic ¶
func (*NilableTypeNode) IsStatic() bool
func (*NilableTypeNode) MacroType ¶
func (n *NilableTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NilableTypeNode) String ¶
func (n *NilableTypeNode) String() string
type Node ¶
type Node interface {
position.LocationInterface
value.Reference
IsStatic() bool // Value is known at compile-time
// Return the static type of the value represented
// by the AST node
Type(*types.GlobalEnvironment) types.Type
SetType(types.Type)
SkipTypechecking() bool
Equal(value.Value) bool
String() string
// Return the type of the AST node object
// for use in macros
MacroType(*types.GlobalEnvironment) types.Type
// contains filtered or unexported methods
}
Every node type implements this interface.
type NodeBase ¶
type NodeBase struct {
// contains filtered or unexported fields
}
Base AST node.
func (*NodeBase) DirectClass ¶
func (*NodeBase) InstanceVariables ¶
func (n *NodeBase) InstanceVariables() *value.InstanceVariables
func (*NodeBase) SetLocation ¶
func (*NodeBase) SingletonClass ¶
func (*NodeBase) SkipTypechecking ¶
type NotTypeNode ¶
type NotTypeNode struct {
TypedNodeBase
TypeNode TypeNode // right hand side
}
Represents a not type eg. `~String`
func NewNotTypeNode ¶
func NewNotTypeNode(loc *position.Location, typ TypeNode) *NotTypeNode
Create a new not type node eg. `~String`
func (*NotTypeNode) Class ¶
func (*NotTypeNode) Class() *value.Class
func (*NotTypeNode) DirectClass ¶
func (*NotTypeNode) DirectClass() *value.Class
func (*NotTypeNode) Error ¶
func (n *NotTypeNode) Error() string
func (*NotTypeNode) Inspect ¶
func (n *NotTypeNode) Inspect() string
func (*NotTypeNode) IsStatic ¶
func (*NotTypeNode) IsStatic() bool
func (*NotTypeNode) MacroType ¶
func (n *NotTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NotTypeNode) String ¶
func (n *NotTypeNode) String() string
type NumericForExpressionNode ¶
type NumericForExpressionNode struct {
TypedNodeBase
Initialiser ExpressionNode // i := 0
Condition ExpressionNode // i < 10
Increment ExpressionNode // i += 1
ThenBody []StatementNode // then expression body
}
Represents a numeric `for` expression eg. `fornum i := 0; i < 10; i += 1 then println(i)`
func NewNumericForExpressionNode ¶
func NewNumericForExpressionNode(loc *position.Location, init, cond, incr ExpressionNode, then []StatementNode) *NumericForExpressionNode
Create a new numeric `fornum` expression eg. `for i := 0; i < 10; i += 1 then println(i)`
func (*NumericForExpressionNode) Class ¶
func (*NumericForExpressionNode) Class() *value.Class
func (*NumericForExpressionNode) DirectClass ¶
func (*NumericForExpressionNode) DirectClass() *value.Class
func (*NumericForExpressionNode) Equal ¶
func (n *NumericForExpressionNode) Equal(other value.Value) bool
func (*NumericForExpressionNode) Error ¶
func (n *NumericForExpressionNode) Error() string
func (*NumericForExpressionNode) Inspect ¶
func (n *NumericForExpressionNode) Inspect() string
func (*NumericForExpressionNode) IsStatic ¶
func (*NumericForExpressionNode) IsStatic() bool
func (*NumericForExpressionNode) MacroType ¶
func (n *NumericForExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*NumericForExpressionNode) String ¶
func (n *NumericForExpressionNode) String() string
type ObjectPatternNode ¶
type ObjectPatternNode struct {
TypedNodeBase
ObjectType ComplexConstantNode
Attributes []PatternNode
}
Represents an Object pattern eg. `Foo(foo: 5, bar: a, c)`
func NewObjectPatternNode ¶
func NewObjectPatternNode(loc *position.Location, objectType ComplexConstantNode, attrs []PatternNode) *ObjectPatternNode
Create an Object pattern node eg. `Foo(foo: 5, bar: a, c)`
func (*ObjectPatternNode) Class ¶
func (*ObjectPatternNode) Class() *value.Class
func (*ObjectPatternNode) DirectClass ¶
func (*ObjectPatternNode) DirectClass() *value.Class
func (*ObjectPatternNode) Error ¶
func (n *ObjectPatternNode) Error() string
func (*ObjectPatternNode) Inspect ¶
func (n *ObjectPatternNode) Inspect() string
func (*ObjectPatternNode) IsStatic ¶
func (m *ObjectPatternNode) IsStatic() bool
func (*ObjectPatternNode) MacroType ¶
func (n *ObjectPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ObjectPatternNode) String ¶
func (n *ObjectPatternNode) String() string
type ParameterKind ¶
type ParameterKind uint8
Indicates whether the parameter is a rest param
const ( NormalParameterKind ParameterKind = iota PositionalRestParameterKind NamedRestParameterKind )
type ParameterNode ¶
All nodes that should be valid in parameter declaration lists of methods or functions should implement this interface.
type ParameterStatementNode ¶
type ParameterStatementNode struct {
NodeBase
Parameter ParameterNode
}
Formal parameter optionally terminated with a newline or a semicolon.
func NewParameterStatementNode ¶
func NewParameterStatementNode(loc *position.Location, param ParameterNode) *ParameterStatementNode
Create a new formal parameter statement node eg. `foo: Bar\n`
func (*ParameterStatementNode) Class ¶
func (*ParameterStatementNode) Class() *value.Class
func (*ParameterStatementNode) DirectClass ¶
func (*ParameterStatementNode) DirectClass() *value.Class
func (*ParameterStatementNode) Equal ¶
func (n *ParameterStatementNode) Equal(other value.Value) bool
func (*ParameterStatementNode) Error ¶
func (e *ParameterStatementNode) Error() string
func (*ParameterStatementNode) Inspect ¶
func (n *ParameterStatementNode) Inspect() string
func (*ParameterStatementNode) IsStatic ¶
func (*ParameterStatementNode) IsStatic() bool
func (*ParameterStatementNode) MacroType ¶
func (n *ParameterStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ParameterStatementNode) String ¶
func (n *ParameterStatementNode) String() string
Return a string representation of the node.
type PatternExpressionNode ¶
type PatternExpressionNode struct {
NodeBase
PatternNode PatternNode
}
Represents a pattern expression `pattern String?`
func NewPatternExpressionNode ¶
func NewPatternExpressionNode(loc *position.Location, patternNode PatternNode) *PatternExpressionNode
Create a new pattern expression `pattern Foo(a: String, b: > 2)`
func (*PatternExpressionNode) Class ¶
func (*PatternExpressionNode) Class() *value.Class
func (*PatternExpressionNode) DirectClass ¶
func (*PatternExpressionNode) DirectClass() *value.Class
func (*PatternExpressionNode) Error ¶
func (n *PatternExpressionNode) Error() string
func (*PatternExpressionNode) Inspect ¶
func (n *PatternExpressionNode) Inspect() string
func (*PatternExpressionNode) IsStatic ¶
func (*PatternExpressionNode) IsStatic() bool
func (*PatternExpressionNode) MacroType ¶
func (n *PatternExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PatternExpressionNode) String ¶
func (n *PatternExpressionNode) String() string
type PatternNode ¶
type PatternNode interface {
Node
// contains filtered or unexported methods
}
All nodes that should be valid in pattern matching should implement this interface
func NewBinaryPatternNodeI ¶
func NewBinaryPatternNodeI(loc *position.Location, op *token.Token, left, right PatternNode) PatternNode
Same as NewBinaryPatternNode but returns an interface
func NewInvalidPatternNode ¶
func NewInvalidPatternNode(loc *position.Location, tok *token.Token) PatternNode
func NewListPatternNodeI ¶
func NewListPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
Same as NewListPatternNode but returns an interface
func NewMapPatternNodeI ¶
func NewMapPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
Same as NewMapPatternNode but returns an interface
func NewRecordPatternNodeI ¶
func NewRecordPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
Same as NewRecordPatternNode but returns an interface
func NewSetPatternNodeI ¶
func NewSetPatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
Same as NewSetPatternNode but returns an interface
func NewTuplePatternNodeI ¶
func NewTuplePatternNodeI(loc *position.Location, elements []PatternNode) PatternNode
Same as NewTuplePatternNode but returns an interface
type PatternStatementNode ¶
type PatternStatementNode struct {
NodeBase
Pattern PatternNode
}
Pattern optionally terminated with a newline or a semicolon.
func NewPatternStatementNode ¶
func NewPatternStatementNode(loc *position.Location, pattern PatternNode) *PatternStatementNode
Create a new pattern statement node eg. `Foo(n: 1 || nil)\n`
func (*PatternStatementNode) Class ¶
func (*PatternStatementNode) Class() *value.Class
func (*PatternStatementNode) DirectClass ¶
func (*PatternStatementNode) DirectClass() *value.Class
func (*PatternStatementNode) Error ¶
func (e *PatternStatementNode) Error() string
func (*PatternStatementNode) Inspect ¶
func (n *PatternStatementNode) Inspect() string
func (*PatternStatementNode) IsStatic ¶
func (*PatternStatementNode) IsStatic() bool
func (*PatternStatementNode) MacroType ¶
func (n *PatternStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PatternStatementNode) String ¶
func (n *PatternStatementNode) String() string
Return a string representation of the node.
type PatternTypeExpressionNode ¶
type PatternTypeExpressionNode interface {
Node
ExpressionNode
PatternNode
TypeNode
}
type PostfixExpressionNode ¶
type PostfixExpressionNode struct {
TypedNodeBase
Op *token.Token // operator
Expression ExpressionNode
}
Postfix expression eg. `foo++`, `bar--`
func NewPostfixExpressionNode ¶
func NewPostfixExpressionNode(loc *position.Location, op *token.Token, expr ExpressionNode) *PostfixExpressionNode
Create a new postfix expression node.
func (*PostfixExpressionNode) Class ¶
func (*PostfixExpressionNode) Class() *value.Class
func (*PostfixExpressionNode) DirectClass ¶
func (*PostfixExpressionNode) DirectClass() *value.Class
func (*PostfixExpressionNode) Error ¶
func (p *PostfixExpressionNode) Error() string
func (*PostfixExpressionNode) Inspect ¶
func (n *PostfixExpressionNode) Inspect() string
func (*PostfixExpressionNode) IsStatic ¶
func (i *PostfixExpressionNode) IsStatic() bool
func (*PostfixExpressionNode) MacroType ¶
func (n *PostfixExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PostfixExpressionNode) String ¶
func (n *PostfixExpressionNode) String() string
type PrivateConstantNode ¶
type PrivateConstantNode struct {
TypedNodeBase
Value string
}
Represents a private constant eg. `_Foo`
func NewPrivateConstantNode ¶
func NewPrivateConstantNode(loc *position.Location, val string) *PrivateConstantNode
Create a new private constant node eg. `_Foo`.
func (*PrivateConstantNode) Class ¶
func (*PrivateConstantNode) Class() *value.Class
func (*PrivateConstantNode) DirectClass ¶
func (*PrivateConstantNode) DirectClass() *value.Class
func (*PrivateConstantNode) Error ¶
func (n *PrivateConstantNode) Error() string
func (*PrivateConstantNode) Inspect ¶
func (n *PrivateConstantNode) Inspect() string
func (*PrivateConstantNode) IsStatic ¶
func (*PrivateConstantNode) IsStatic() bool
func (*PrivateConstantNode) MacroType ¶
func (n *PrivateConstantNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PrivateConstantNode) String ¶
func (n *PrivateConstantNode) String() string
type PrivateIdentifierNode ¶
type PrivateIdentifierNode struct {
TypedNodeBase
Value string
}
Represents a private identifier eg. `_foo`
func NewPrivateIdentifierNode ¶
func NewPrivateIdentifierNode(loc *position.Location, val string) *PrivateIdentifierNode
Create a new private identifier node eg. `_foo`.
func (*PrivateIdentifierNode) Class ¶
func (*PrivateIdentifierNode) Class() *value.Class
func (*PrivateIdentifierNode) DirectClass ¶
func (*PrivateIdentifierNode) DirectClass() *value.Class
func (*PrivateIdentifierNode) Error ¶
func (n *PrivateIdentifierNode) Error() string
func (*PrivateIdentifierNode) Inspect ¶
func (n *PrivateIdentifierNode) Inspect() string
func (*PrivateIdentifierNode) IsStatic ¶
func (*PrivateIdentifierNode) IsStatic() bool
func (*PrivateIdentifierNode) MacroType ¶
func (n *PrivateIdentifierNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PrivateIdentifierNode) String ¶
func (n *PrivateIdentifierNode) String() string
type ProgramNode ¶
type ProgramNode struct {
NodeBase
Body []StatementNode
ImportPaths []string
State ProgramState
}
Represents a single Elk program (usually a single file).
func NewProgramNode ¶
func NewProgramNode(loc *position.Location, body []StatementNode) *ProgramNode
Create a new program node.
func (*ProgramNode) Class ¶
func (*ProgramNode) Class() *value.Class
func (*ProgramNode) DirectClass ¶
func (*ProgramNode) DirectClass() *value.Class
func (*ProgramNode) Error ¶
func (p *ProgramNode) Error() string
func (*ProgramNode) Inspect ¶
func (n *ProgramNode) Inspect() string
func (*ProgramNode) IsStatic ¶
func (*ProgramNode) IsStatic() bool
func (*ProgramNode) MacroType ¶
func (n *ProgramNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ProgramNode) String ¶
func (n *ProgramNode) String() string
type ProgramState ¶
type ProgramState uint8
const ( UNCHECKED ProgramState = iota CHECKING_NAMESPACES CHECKED_NAMESPACES EXPANDING_TOP_LEVEL_MACROS EXPANDED_TOP_LEVEL_MACROS CHECKING_METHODS CHECKED_METHODS CHECKING_EXPRESSIONS CHECKED_EXPRESSIONS )
type PublicConstantAsNode ¶
type PublicConstantAsNode struct {
NodeBase
Target *PublicConstantNode
AsName string
}
Represents a constant with as in using declarations eg. `Foo as Bar`.
func NewPublicConstantAsNode ¶
func NewPublicConstantAsNode(loc *position.Location, target *PublicConstantNode, as string) *PublicConstantAsNode
Create a new identifier with as eg. `Foo as Bar`.
func (*PublicConstantAsNode) Class ¶
func (*PublicConstantAsNode) Class() *value.Class
func (*PublicConstantAsNode) DirectClass ¶
func (*PublicConstantAsNode) DirectClass() *value.Class
func (*PublicConstantAsNode) Error ¶
func (n *PublicConstantAsNode) Error() string
func (*PublicConstantAsNode) Inspect ¶
func (n *PublicConstantAsNode) Inspect() string
func (*PublicConstantAsNode) IsStatic ¶
func (*PublicConstantAsNode) IsStatic() bool
func (*PublicConstantAsNode) MacroType ¶
func (n *PublicConstantAsNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PublicConstantAsNode) String ¶
func (n *PublicConstantAsNode) String() string
type PublicConstantNode ¶
type PublicConstantNode struct {
TypedNodeBase
Value string
}
Represents a public constant eg. `Foo`.
func NewPublicConstantNode ¶
func NewPublicConstantNode(loc *position.Location, val string) *PublicConstantNode
Create a new public constant node eg. `Foo`.
func (*PublicConstantNode) Class ¶
func (*PublicConstantNode) Class() *value.Class
func (*PublicConstantNode) DirectClass ¶
func (*PublicConstantNode) DirectClass() *value.Class
func (*PublicConstantNode) Error ¶
func (n *PublicConstantNode) Error() string
func (*PublicConstantNode) Inspect ¶
func (n *PublicConstantNode) Inspect() string
func (*PublicConstantNode) IsStatic ¶
func (*PublicConstantNode) IsStatic() bool
func (*PublicConstantNode) MacroType ¶
func (n *PublicConstantNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PublicConstantNode) String ¶
func (n *PublicConstantNode) String() string
type PublicIdentifierNode ¶
type PublicIdentifierNode struct {
TypedNodeBase
Value string
}
Represents a public identifier eg. `foo`.
func NewPublicIdentifierNode ¶
func NewPublicIdentifierNode(loc *position.Location, val string) *PublicIdentifierNode
Create a new public identifier node eg. `foo`.
func (*PublicIdentifierNode) Class ¶
func (*PublicIdentifierNode) Class() *value.Class
func (*PublicIdentifierNode) DirectClass ¶
func (*PublicIdentifierNode) DirectClass() *value.Class
func (*PublicIdentifierNode) Error ¶
func (n *PublicIdentifierNode) Error() string
func (*PublicIdentifierNode) Inspect ¶
func (n *PublicIdentifierNode) Inspect() string
func (*PublicIdentifierNode) IsStatic ¶
func (*PublicIdentifierNode) IsStatic() bool
func (*PublicIdentifierNode) MacroType ¶
func (n *PublicIdentifierNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PublicIdentifierNode) String ¶
func (n *PublicIdentifierNode) String() string
type PublicInstanceVariableNode ¶
type PublicInstanceVariableNode struct {
TypedNodeBase
Value string
}
Represents an instance variable eg. `@foo`
func NewPublicInstanceVariableNode ¶
func NewPublicInstanceVariableNode(loc *position.Location, val string) *PublicInstanceVariableNode
Create an instance variable node eg. `@foo`.
func (*PublicInstanceVariableNode) Class ¶
func (*PublicInstanceVariableNode) Class() *value.Class
func (*PublicInstanceVariableNode) DirectClass ¶
func (*PublicInstanceVariableNode) DirectClass() *value.Class
func (*PublicInstanceVariableNode) Equal ¶
func (n *PublicInstanceVariableNode) Equal(other value.Value) bool
func (*PublicInstanceVariableNode) Error ¶
func (p *PublicInstanceVariableNode) Error() string
func (*PublicInstanceVariableNode) Inspect ¶
func (i *PublicInstanceVariableNode) Inspect() string
func (*PublicInstanceVariableNode) IsStatic ¶
func (*PublicInstanceVariableNode) IsStatic() bool
func (*PublicInstanceVariableNode) MacroType ¶
func (n *PublicInstanceVariableNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*PublicInstanceVariableNode) String ¶
func (n *PublicInstanceVariableNode) String() string
type QuoteExpressionNode ¶
type QuoteExpressionNode struct {
TypedNodeBase
Kind QuoteKind
Body []StatementNode
}
Represents a quoted piecie of AST
func NewQuoteExpressionNode ¶
func NewQuoteExpressionNode(loc *position.Location, kind QuoteKind, body []StatementNode) *QuoteExpressionNode
Create a quote expression node eg.
quote
print("awesome!")
end
func (*QuoteExpressionNode) Class ¶
func (*QuoteExpressionNode) Class() *value.Class
func (*QuoteExpressionNode) DirectClass ¶
func (*QuoteExpressionNode) DirectClass() *value.Class
func (*QuoteExpressionNode) Equal ¶
func (n *QuoteExpressionNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*QuoteExpressionNode) Error ¶
func (n *QuoteExpressionNode) Error() string
func (*QuoteExpressionNode) Inspect ¶
func (n *QuoteExpressionNode) Inspect() string
func (*QuoteExpressionNode) IsStatic ¶
func (*QuoteExpressionNode) IsStatic() bool
func (*QuoteExpressionNode) MacroType ¶
func (n *QuoteExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*QuoteExpressionNode) SingleExpression ¶
func (n *QuoteExpressionNode) SingleExpression() ExpressionNode
Check if the quote block consists of a single expression statement, if so retrieves it and returns the expression. Otherwise returns nil.
func (*QuoteExpressionNode) String ¶
func (n *QuoteExpressionNode) String() string
Return a string representation of the node.
type RangeLiteralNode ¶
type RangeLiteralNode struct {
TypedNodeBase
Start ExpressionNode
End ExpressionNode
Op *token.Token
// contains filtered or unexported fields
}
Represents a Range literal eg. `1...5`
func NewRangeLiteralNode ¶
func NewRangeLiteralNode(loc *position.Location, op *token.Token, start, end ExpressionNode) *RangeLiteralNode
Create a Range literal node eg. `1...5`
func (*RangeLiteralNode) Class ¶
func (*RangeLiteralNode) Class() *value.Class
func (*RangeLiteralNode) DirectClass ¶
func (*RangeLiteralNode) DirectClass() *value.Class
func (*RangeLiteralNode) Error ¶
func (n *RangeLiteralNode) Error() string
func (*RangeLiteralNode) Inspect ¶
func (n *RangeLiteralNode) Inspect() string
func (*RangeLiteralNode) IsStatic ¶
func (r *RangeLiteralNode) IsStatic() bool
func (*RangeLiteralNode) MacroType ¶
func (n *RangeLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*RangeLiteralNode) String ¶
func (n *RangeLiteralNode) String() string
type RawCharLiteralNode ¶
type RawCharLiteralNode struct {
TypedNodeBase
Value rune // value of the char literal
}
Raw Char literal eg. r`a`
func NewRawCharLiteralNode ¶
func NewRawCharLiteralNode(loc *position.Location, val rune) *RawCharLiteralNode
Create a new raw char literal node eg. r`a`
func (*RawCharLiteralNode) Class ¶
func (*RawCharLiteralNode) Class() *value.Class
func (*RawCharLiteralNode) DirectClass ¶
func (*RawCharLiteralNode) DirectClass() *value.Class
func (*RawCharLiteralNode) Error ¶
func (n *RawCharLiteralNode) Error() string
func (*RawCharLiteralNode) Inspect ¶
func (n *RawCharLiteralNode) Inspect() string
func (*RawCharLiteralNode) IsStatic ¶
func (*RawCharLiteralNode) IsStatic() bool
func (*RawCharLiteralNode) MacroType ¶
func (n *RawCharLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*RawCharLiteralNode) String ¶
func (n *RawCharLiteralNode) String() string
type RawStringLiteralNode ¶
type RawStringLiteralNode struct {
TypedNodeBase
Value string // value of the string literal
}
Raw string literal enclosed with single quotes eg. `'foo'`.
func NewRawStringLiteralNode ¶
func NewRawStringLiteralNode(loc *position.Location, val string) *RawStringLiteralNode
Create a new raw string literal node eg. `'foo'`.
func (*RawStringLiteralNode) Class ¶
func (*RawStringLiteralNode) Class() *value.Class
func (*RawStringLiteralNode) DirectClass ¶
func (*RawStringLiteralNode) DirectClass() *value.Class
func (*RawStringLiteralNode) Error ¶
func (n *RawStringLiteralNode) Error() string
func (*RawStringLiteralNode) Inspect ¶
func (n *RawStringLiteralNode) Inspect() string
func (*RawStringLiteralNode) IsStatic ¶
func (*RawStringLiteralNode) IsStatic() bool
func (*RawStringLiteralNode) MacroType ¶
func (n *RawStringLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*RawStringLiteralNode) String ¶
func (n *RawStringLiteralNode) String() string
type ReceiverlessMacroCallNode ¶
type ReceiverlessMacroCallNode struct {
TypedNodeBase
Kind MacroKind
MacroName IdentifierNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
}
Represents a function-like macro call eg. `foo!(123)`
func NewReceiverlessMacroCallNode ¶
func NewReceiverlessMacroCallNode( loc *position.Location, kind MacroKind, macroName IdentifierNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode, ) *ReceiverlessMacroCallNode
Create a function call node eg. `to_string(123)`
func (*ReceiverlessMacroCallNode) Class ¶
func (*ReceiverlessMacroCallNode) Class() *value.Class
func (*ReceiverlessMacroCallNode) DirectClass ¶
func (*ReceiverlessMacroCallNode) DirectClass() *value.Class
func (*ReceiverlessMacroCallNode) Equal ¶
func (n *ReceiverlessMacroCallNode) Equal(other value.Value) bool
func (*ReceiverlessMacroCallNode) Error ¶
func (n *ReceiverlessMacroCallNode) Error() string
func (*ReceiverlessMacroCallNode) Inspect ¶
func (n *ReceiverlessMacroCallNode) Inspect() string
func (*ReceiverlessMacroCallNode) IsStatic ¶
func (*ReceiverlessMacroCallNode) IsStatic() bool
func (*ReceiverlessMacroCallNode) MacroType ¶
func (n *ReceiverlessMacroCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ReceiverlessMacroCallNode) String ¶
func (n *ReceiverlessMacroCallNode) String() string
type ReceiverlessMethodCallNode ¶
type ReceiverlessMethodCallNode struct {
TypedNodeBase
MethodName IdentifierNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
TailCall bool
}
Represents a function-like call eg. `to_string(123)`
func NewReceiverlessMethodCallNode ¶
func NewReceiverlessMethodCallNode(loc *position.Location, methodName IdentifierNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode) *ReceiverlessMethodCallNode
Create a function call node eg. `to_string(123)`
func (*ReceiverlessMethodCallNode) Class ¶
func (*ReceiverlessMethodCallNode) Class() *value.Class
func (*ReceiverlessMethodCallNode) DirectClass ¶
func (*ReceiverlessMethodCallNode) DirectClass() *value.Class
func (*ReceiverlessMethodCallNode) Equal ¶
func (n *ReceiverlessMethodCallNode) Equal(other value.Value) bool
func (*ReceiverlessMethodCallNode) Error ¶
func (n *ReceiverlessMethodCallNode) Error() string
func (*ReceiverlessMethodCallNode) Inspect ¶
func (n *ReceiverlessMethodCallNode) Inspect() string
func (*ReceiverlessMethodCallNode) IsStatic ¶
func (*ReceiverlessMethodCallNode) IsStatic() bool
func (*ReceiverlessMethodCallNode) MacroType ¶
func (n *ReceiverlessMethodCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ReceiverlessMethodCallNode) String ¶
func (n *ReceiverlessMethodCallNode) String() string
type RecordPatternNode ¶
type RecordPatternNode struct {
NodeBase
Elements []PatternNode
}
Represents a Record pattern eg. `%{ foo: 5, bar: a, 5 => >= 10 }`
func NewRecordPatternNode ¶
func NewRecordPatternNode(loc *position.Location, elements []PatternNode) *RecordPatternNode
Create a Record pattern node eg. `%{ foo: 5, bar: a, 5 => >= 10 }`
func (*RecordPatternNode) Class ¶
func (*RecordPatternNode) Class() *value.Class
func (*RecordPatternNode) DirectClass ¶
func (*RecordPatternNode) DirectClass() *value.Class
func (*RecordPatternNode) Error ¶
func (n *RecordPatternNode) Error() string
func (*RecordPatternNode) Inspect ¶
func (n *RecordPatternNode) Inspect() string
func (*RecordPatternNode) IsStatic ¶
func (m *RecordPatternNode) IsStatic() bool
func (*RecordPatternNode) MacroType ¶
func (n *RecordPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*RecordPatternNode) String ¶
func (n *RecordPatternNode) String() string
type RegexInterpolationNode ¶
type RegexInterpolationNode struct {
NodeBase
Expression ExpressionNode
}
Represents a single interpolated section of a regex literal eg. `bar + 2` in `%/foo${bar + 2}/`
func NewRegexInterpolationNode ¶
func NewRegexInterpolationNode(loc *position.Location, expr ExpressionNode) *RegexInterpolationNode
Create a new regex interpolation node eg. `bar + 2` in `%/foo${bar + 2}/`
func (*RegexInterpolationNode) Class ¶
func (*RegexInterpolationNode) Class() *value.Class
func (*RegexInterpolationNode) DirectClass ¶
func (*RegexInterpolationNode) DirectClass() *value.Class
func (*RegexInterpolationNode) Equal ¶
func (n *RegexInterpolationNode) Equal(other value.Value) bool
func (*RegexInterpolationNode) Error ¶
func (n *RegexInterpolationNode) Error() string
func (*RegexInterpolationNode) Inspect ¶
func (n *RegexInterpolationNode) Inspect() string
func (*RegexInterpolationNode) IsStatic ¶
func (*RegexInterpolationNode) IsStatic() bool
func (*RegexInterpolationNode) MacroType ¶
func (n *RegexInterpolationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*RegexInterpolationNode) String ¶
func (n *RegexInterpolationNode) String() string
type RegexLiteralContentNode ¶
type RegexLiteralContentNode interface {
Node
// contains filtered or unexported methods
}
Nodes that implement this interface can appear inside of a Regex literal.
type RegexLiteralContentSectionNode ¶
Represents a single section of characters of a regex literal eg. `foo` in `%/foo${bar}/`.
func NewRegexLiteralContentSectionNode ¶
func NewRegexLiteralContentSectionNode(loc *position.Location, val string) *RegexLiteralContentSectionNode
Create a new regex literal content section node eg. `foo` in `%/foo${bar}/`.
func (*RegexLiteralContentSectionNode) Class ¶
func (*RegexLiteralContentSectionNode) Class() *value.Class
func (*RegexLiteralContentSectionNode) DirectClass ¶
func (*RegexLiteralContentSectionNode) DirectClass() *value.Class
func (*RegexLiteralContentSectionNode) Equal ¶
func (n *RegexLiteralContentSectionNode) Equal(other value.Value) bool
func (*RegexLiteralContentSectionNode) Error ¶
func (n *RegexLiteralContentSectionNode) Error() string
func (*RegexLiteralContentSectionNode) Inspect ¶
func (n *RegexLiteralContentSectionNode) Inspect() string
func (*RegexLiteralContentSectionNode) IsStatic ¶
func (*RegexLiteralContentSectionNode) IsStatic() bool
func (*RegexLiteralContentSectionNode) MacroType ¶
func (n *RegexLiteralContentSectionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*RegexLiteralContentSectionNode) String ¶
func (n *RegexLiteralContentSectionNode) String() string
type RegexLiteralNode ¶
type RegexLiteralNode interface {
Node
LiteralPatternNode
// contains filtered or unexported methods
}
All nodes that represent regexes should implement this interface.
type RestPatternNode ¶
type RestPatternNode struct {
NodeBase
Identifier IdentifierNode
}
Represents a rest element in a list pattern eg. `*a`
func NewRestPatternNode ¶
func NewRestPatternNode(loc *position.Location, ident IdentifierNode) *RestPatternNode
Create a rest pattern node eg. `*a`
func (*RestPatternNode) Class ¶
func (*RestPatternNode) Class() *value.Class
func (*RestPatternNode) DirectClass ¶
func (*RestPatternNode) DirectClass() *value.Class
func (*RestPatternNode) Error ¶
func (n *RestPatternNode) Error() string
func (*RestPatternNode) Inspect ¶
func (n *RestPatternNode) Inspect() string
func (*RestPatternNode) IsStatic ¶
func (r *RestPatternNode) IsStatic() bool
func (*RestPatternNode) MacroType ¶
func (n *RestPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*RestPatternNode) String ¶
func (n *RestPatternNode) String() string
type ReturnExpressionNode ¶
type ReturnExpressionNode struct {
NodeBase
Value ExpressionNode
}
Represents a `return` expression eg. `return`, `return true`
func NewReturnExpressionNode ¶
func NewReturnExpressionNode(loc *position.Location, val ExpressionNode) *ReturnExpressionNode
Create a new `return` expression node eg. `return`, `return true`
func (*ReturnExpressionNode) Class ¶
func (*ReturnExpressionNode) Class() *value.Class
func (*ReturnExpressionNode) DirectClass ¶
func (*ReturnExpressionNode) DirectClass() *value.Class
func (*ReturnExpressionNode) Error ¶
func (n *ReturnExpressionNode) Error() string
func (*ReturnExpressionNode) Inspect ¶
func (n *ReturnExpressionNode) Inspect() string
func (*ReturnExpressionNode) IsStatic ¶
func (*ReturnExpressionNode) IsStatic() bool
func (*ReturnExpressionNode) MacroType ¶
func (n *ReturnExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ReturnExpressionNode) String ¶
func (n *ReturnExpressionNode) String() string
func (*ReturnExpressionNode) Type ¶
func (*ReturnExpressionNode) Type(*types.GlobalEnvironment) types.Type
type ScopedMacroCallNode ¶
type ScopedMacroCallNode struct {
TypedNodeBase
Kind MacroKind
Receiver ExpressionNode
MacroName IdentifierNode
PositionalArguments []ExpressionNode
NamedArguments []NamedArgumentNode
}
Represents a method call eg. `Foo::bar!(5)`
func NewScopedMacroCallNode ¶
func NewScopedMacroCallNode( loc *position.Location, kind MacroKind, recv ExpressionNode, macroName IdentifierNode, posArgs []ExpressionNode, namedArgs []NamedArgumentNode, ) *ScopedMacroCallNode
Create a macro call node eg. `Foo::bar!(5)`
func (*ScopedMacroCallNode) Class ¶
func (*ScopedMacroCallNode) Class() *value.Class
func (*ScopedMacroCallNode) DirectClass ¶
func (*ScopedMacroCallNode) DirectClass() *value.Class
func (*ScopedMacroCallNode) Error ¶
func (n *ScopedMacroCallNode) Error() string
func (*ScopedMacroCallNode) Inspect ¶
func (n *ScopedMacroCallNode) Inspect() string
func (*ScopedMacroCallNode) IsStatic ¶
func (*ScopedMacroCallNode) IsStatic() bool
func (*ScopedMacroCallNode) MacroType ¶
func (n *ScopedMacroCallNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ScopedMacroCallNode) String ¶
func (n *ScopedMacroCallNode) String() string
type SelfLiteralNode ¶
type SelfLiteralNode struct {
TypedNodeBase
}
`self` literal.
func NewSelfLiteralNode ¶
func NewSelfLiteralNode(loc *position.Location) *SelfLiteralNode
Create a new `self` literal node.
func (*SelfLiteralNode) Class ¶
func (*SelfLiteralNode) Class() *value.Class
func (*SelfLiteralNode) DirectClass ¶
func (*SelfLiteralNode) DirectClass() *value.Class
func (*SelfLiteralNode) Error ¶
func (n *SelfLiteralNode) Error() string
func (*SelfLiteralNode) Inspect ¶
func (n *SelfLiteralNode) Inspect() string
func (*SelfLiteralNode) IsStatic ¶
func (*SelfLiteralNode) IsStatic() bool
func (*SelfLiteralNode) MacroType ¶
func (n *SelfLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SelfLiteralNode) String ¶
func (n *SelfLiteralNode) String() string
type SetPatternNode ¶
type SetPatternNode struct {
TypedNodeBase
Elements []PatternNode
}
Represents a Set pattern eg. `^[1, "foo"]`
func NewSetPatternNode ¶
func NewSetPatternNode(loc *position.Location, elements []PatternNode) *SetPatternNode
Create a Set pattern node eg. `^[1, "foo"]`
func (*SetPatternNode) Class ¶
func (*SetPatternNode) Class() *value.Class
func (*SetPatternNode) DirectClass ¶
func (*SetPatternNode) DirectClass() *value.Class
func (*SetPatternNode) Error ¶
func (n *SetPatternNode) Error() string
func (*SetPatternNode) Inspect ¶
func (n *SetPatternNode) Inspect() string
func (*SetPatternNode) IsStatic ¶
func (s *SetPatternNode) IsStatic() bool
func (*SetPatternNode) MacroType ¶
func (n *SetPatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SetPatternNode) String ¶
func (n *SetPatternNode) String() string
type SetterDeclarationNode ¶
type SetterDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Entries []ParameterNode
}
Represents a new setter declaration eg. `setter foo: String`
func NewSetterDeclarationNode ¶
func NewSetterDeclarationNode(loc *position.Location, docComment string, entries []ParameterNode) *SetterDeclarationNode
Create a setter declaration node eg. `setter foo: String`
func (*SetterDeclarationNode) Class ¶
func (*SetterDeclarationNode) Class() *value.Class
func (*SetterDeclarationNode) DirectClass ¶
func (*SetterDeclarationNode) DirectClass() *value.Class
func (*SetterDeclarationNode) Error ¶
func (n *SetterDeclarationNode) Error() string
func (*SetterDeclarationNode) Inspect ¶
func (n *SetterDeclarationNode) Inspect() string
func (*SetterDeclarationNode) IsStatic ¶
func (*SetterDeclarationNode) IsStatic() bool
func (*SetterDeclarationNode) MacroType ¶
func (n *SetterDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SetterDeclarationNode) String ¶
func (n *SetterDeclarationNode) String() string
type SignatureParameterNode ¶
type SignatureParameterNode struct {
TypedNodeBase
Name IdentifierNode // name of the variable
TypeNode TypeNode // type of the variable
Optional bool // whether this parameter is optional
Kind ParameterKind
}
Represents a signature parameter in method and function signatures eg. `foo?: String`
func NewSignatureParameterNode ¶
func NewSignatureParameterNode(loc *position.Location, name IdentifierNode, typ TypeNode, opt bool, kind ParameterKind) *SignatureParameterNode
Create a new signature parameter node eg. `foo?: String`
func (*SignatureParameterNode) Class ¶
func (*SignatureParameterNode) Class() *value.Class
func (*SignatureParameterNode) DirectClass ¶
func (*SignatureParameterNode) DirectClass() *value.Class
func (*SignatureParameterNode) Equal ¶
func (n *SignatureParameterNode) Equal(other value.Value) bool
func (*SignatureParameterNode) Error ¶
func (n *SignatureParameterNode) Error() string
func (*SignatureParameterNode) Inspect ¶
func (n *SignatureParameterNode) Inspect() string
func (*SignatureParameterNode) IsOptional ¶
func (f *SignatureParameterNode) IsOptional() bool
func (*SignatureParameterNode) IsStatic ¶
func (*SignatureParameterNode) IsStatic() bool
func (*SignatureParameterNode) MacroType ¶
func (n *SignatureParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SignatureParameterNode) String ¶
func (n *SignatureParameterNode) String() string
type SimpleStringLiteralNode ¶
type SimpleStringLiteralNode interface {
Node
ExpressionNode
StringLiteralNode
StringOrSymbolLiteralNode
// contains filtered or unexported methods
}
All nodes that represent simple strings (without interpolation) should implement this interface.
type SimpleSymbolLiteralNode ¶
type SimpleSymbolLiteralNode struct {
TypedNodeBase
Content string
}
Represents a symbol literal with simple content eg. `:foo`, `:'foo bar`, `:"lol"`
func NewSimpleSymbolLiteralNode ¶
func NewSimpleSymbolLiteralNode(loc *position.Location, cont string) *SimpleSymbolLiteralNode
Create a simple symbol literal node eg. `:foo`, `:'foo bar`, `:"lol"`
func (*SimpleSymbolLiteralNode) Class ¶
func (*SimpleSymbolLiteralNode) Class() *value.Class
func (*SimpleSymbolLiteralNode) DirectClass ¶
func (*SimpleSymbolLiteralNode) DirectClass() *value.Class
func (*SimpleSymbolLiteralNode) Equal ¶
func (n *SimpleSymbolLiteralNode) Equal(other value.Value) bool
func (*SimpleSymbolLiteralNode) Error ¶
func (n *SimpleSymbolLiteralNode) Error() string
func (*SimpleSymbolLiteralNode) Inspect ¶
func (n *SimpleSymbolLiteralNode) Inspect() string
func (*SimpleSymbolLiteralNode) IsStatic ¶
func (*SimpleSymbolLiteralNode) IsStatic() bool
func (*SimpleSymbolLiteralNode) MacroType ¶
func (n *SimpleSymbolLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SimpleSymbolLiteralNode) String ¶
func (n *SimpleSymbolLiteralNode) String() string
type SingletonBlockExpressionNode ¶
type SingletonBlockExpressionNode struct {
TypedNodeBase
Body []StatementNode // do expression body
Bytecode value.Method
}
Represents a `singleton` block expression eg.
singleton
def hello then println("awesome!")
end
func NewSingletonBlockExpressionNode ¶
func NewSingletonBlockExpressionNode(loc *position.Location, body []StatementNode) *SingletonBlockExpressionNode
Create a new `singleton` block expression node eg.
singleton
def hello then println("awesome!")
end
func (*SingletonBlockExpressionNode) Class ¶
func (*SingletonBlockExpressionNode) Class() *value.Class
func (*SingletonBlockExpressionNode) DirectClass ¶
func (*SingletonBlockExpressionNode) DirectClass() *value.Class
func (*SingletonBlockExpressionNode) Equal ¶
func (n *SingletonBlockExpressionNode) Equal(other value.Value) bool
func (*SingletonBlockExpressionNode) Error ¶
func (n *SingletonBlockExpressionNode) Error() string
func (*SingletonBlockExpressionNode) Inspect ¶
func (n *SingletonBlockExpressionNode) Inspect() string
func (*SingletonBlockExpressionNode) IsStatic ¶
func (*SingletonBlockExpressionNode) IsStatic() bool
func (*SingletonBlockExpressionNode) MacroType ¶
func (n *SingletonBlockExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SingletonBlockExpressionNode) SkipTypechecking ¶
func (*SingletonBlockExpressionNode) SkipTypechecking() bool
func (*SingletonBlockExpressionNode) String ¶
func (n *SingletonBlockExpressionNode) String() string
type SingletonTypeNode ¶
type SingletonTypeNode struct {
TypedNodeBase
TypeNode TypeNode // right hand side
}
Represents a singleton type eg. `&String`
func NewSingletonTypeNode ¶
func NewSingletonTypeNode(loc *position.Location, typ TypeNode) *SingletonTypeNode
Create a new singleton type node eg. `&String`
func (*SingletonTypeNode) Class ¶
func (*SingletonTypeNode) Class() *value.Class
func (*SingletonTypeNode) DirectClass ¶
func (*SingletonTypeNode) DirectClass() *value.Class
func (*SingletonTypeNode) Error ¶
func (n *SingletonTypeNode) Error() string
func (*SingletonTypeNode) Inspect ¶
func (n *SingletonTypeNode) Inspect() string
func (*SingletonTypeNode) IsStatic ¶
func (*SingletonTypeNode) IsStatic() bool
func (*SingletonTypeNode) MacroType ¶
func (n *SingletonTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SingletonTypeNode) String ¶
func (n *SingletonTypeNode) String() string
type SplatExpressionNode ¶
type SplatExpressionNode struct {
TypedNodeBase
Value ExpressionNode
}
Represents a splat expression eg. `*foo`
func NewSplatExpressionNode ¶
func NewSplatExpressionNode(loc *position.Location, val ExpressionNode) *SplatExpressionNode
Create a splat expression node eg. `*foo`
func (*SplatExpressionNode) Class ¶
func (*SplatExpressionNode) Class() *value.Class
func (*SplatExpressionNode) DirectClass ¶
func (*SplatExpressionNode) DirectClass() *value.Class
func (*SplatExpressionNode) Error ¶
func (n *SplatExpressionNode) Error() string
func (*SplatExpressionNode) Inspect ¶
func (n *SplatExpressionNode) Inspect() string
func (*SplatExpressionNode) IsStatic ¶
func (*SplatExpressionNode) IsStatic() bool
func (*SplatExpressionNode) MacroType ¶
func (n *SplatExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SplatExpressionNode) String ¶
func (n *SplatExpressionNode) String() string
type StatementNode ¶
type StatementNode interface {
Node
// contains filtered or unexported methods
}
Represents a single statement, so for example a single valid "line" of Elk code. Usually its an expression optionally terminated with a newline or a semicolon.
func ExpressionToStatement ¶
func ExpressionToStatement(expr ExpressionNode) StatementNode
Turn an expression to a statement
func ExpressionToStatements ¶
func ExpressionToStatements(expr ExpressionNode) []StatementNode
Turn an expression to a collection of statements.
func NewExpressionStatementNodeI ¶
func NewExpressionStatementNodeI(loc *position.Location, expr ExpressionNode) StatementNode
Same as NewExpressionStatementNode but returns an interface
func PatternToStatement ¶
func PatternToStatement(pattern PatternNode) StatementNode
Turn a pattern to a statement
func PatternToStatements ¶
func PatternToStatements(pattern PatternNode) []StatementNode
Turn a pattern to a collection of statements.
func TypeToStatements ¶
func TypeToStatements(typ TypeNode) []StatementNode
Turn a type to a collection of statements.
type StringInspectInterpolationNode ¶
type StringInspectInterpolationNode struct {
NodeBase
Expression ExpressionNode
}
Represents a single inspect interpolated section of a string literal eg. `bar + 2` in `"foo#{bar + 2}"`
func NewStringInspectInterpolationNode ¶
func NewStringInspectInterpolationNode(loc *position.Location, expr ExpressionNode) *StringInspectInterpolationNode
Create a new string inspect interpolation node eg. `bar + 2` in `"foo#{bar + 2}"`
func (*StringInspectInterpolationNode) Class ¶
func (*StringInspectInterpolationNode) Class() *value.Class
func (*StringInspectInterpolationNode) DirectClass ¶
func (*StringInspectInterpolationNode) DirectClass() *value.Class
func (*StringInspectInterpolationNode) Equal ¶
func (n *StringInspectInterpolationNode) Equal(other value.Value) bool
func (*StringInspectInterpolationNode) Error ¶
func (n *StringInspectInterpolationNode) Error() string
func (*StringInspectInterpolationNode) Inspect ¶
func (n *StringInspectInterpolationNode) Inspect() string
func (*StringInspectInterpolationNode) IsStatic ¶
func (*StringInspectInterpolationNode) IsStatic() bool
func (*StringInspectInterpolationNode) MacroType ¶
func (n *StringInspectInterpolationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*StringInspectInterpolationNode) String ¶
func (n *StringInspectInterpolationNode) String() string
type StringInterpolationNode ¶
type StringInterpolationNode struct {
NodeBase
Expression ExpressionNode
}
Represents a single interpolated section of a string literal eg. `bar + 2` in `"foo${bar + 2}"`
func NewStringInterpolationNode ¶
func NewStringInterpolationNode(loc *position.Location, expr ExpressionNode) *StringInterpolationNode
Create a new string interpolation node eg. `bar + 2` in `"foo${bar + 2}"`
func (*StringInterpolationNode) Class ¶
func (*StringInterpolationNode) Class() *value.Class
func (*StringInterpolationNode) DirectClass ¶
func (*StringInterpolationNode) DirectClass() *value.Class
func (*StringInterpolationNode) Equal ¶
func (n *StringInterpolationNode) Equal(other value.Value) bool
func (*StringInterpolationNode) Error ¶
func (n *StringInterpolationNode) Error() string
func (*StringInterpolationNode) Inspect ¶
func (n *StringInterpolationNode) Inspect() string
func (*StringInterpolationNode) IsStatic ¶
func (*StringInterpolationNode) IsStatic() bool
func (*StringInterpolationNode) MacroType ¶
func (n *StringInterpolationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*StringInterpolationNode) String ¶
func (n *StringInterpolationNode) String() string
type StringLiteralContentNode ¶
type StringLiteralContentNode interface {
Node
// contains filtered or unexported methods
}
Nodes that implement this interface can appear inside of a String literal.
type StringLiteralContentSectionNode ¶
Represents a single section of characters of a string literal eg. `foo` in `"foo${bar}"`.
func NewStringLiteralContentSectionNode ¶
func NewStringLiteralContentSectionNode(loc *position.Location, val string) *StringLiteralContentSectionNode
Create a new string literal content section node eg. `foo` in `"foo${bar}"`.
func (*StringLiteralContentSectionNode) Class ¶
func (*StringLiteralContentSectionNode) Class() *value.Class
func (*StringLiteralContentSectionNode) DirectClass ¶
func (*StringLiteralContentSectionNode) DirectClass() *value.Class
func (*StringLiteralContentSectionNode) Equal ¶
func (n *StringLiteralContentSectionNode) Equal(other value.Value) bool
func (*StringLiteralContentSectionNode) Error ¶
func (n *StringLiteralContentSectionNode) Error() string
func (*StringLiteralContentSectionNode) Inspect ¶
func (n *StringLiteralContentSectionNode) Inspect() string
func (*StringLiteralContentSectionNode) IsStatic ¶
func (*StringLiteralContentSectionNode) IsStatic() bool
func (*StringLiteralContentSectionNode) MacroType ¶
func (n *StringLiteralContentSectionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*StringLiteralContentSectionNode) String ¶
func (n *StringLiteralContentSectionNode) String() string
type StringLiteralNode ¶
type StringLiteralNode interface {
Node
LiteralPatternNode
StringOrSymbolLiteralNode
// contains filtered or unexported methods
}
All nodes that represent strings should implement this interface.
type StringOrSymbolLiteralNode ¶
type StringOrSymbolLiteralNode interface {
Node
LiteralPatternNode
// contains filtered or unexported methods
}
type StringOrSymbolTypeNode ¶
type StringOrSymbolTypeNode interface {
Node
TypeNode
StringOrSymbolLiteralNode
}
type StringTypeNode ¶
type StringTypeNode interface {
Node
TypeNode
StringLiteralNode
}
type StructBodyStatementNode ¶
type StructBodyStatementNode interface {
Node
// contains filtered or unexported methods
}
Represents a single statement of a struct body optionally terminated with a newline or semicolon.
func NewParameterStatementNodeI ¶
func NewParameterStatementNodeI(loc *position.Location, param ParameterNode) StructBodyStatementNode
Same as NewParameterStatementNode but returns an interface
type StructDeclarationNode ¶
type StructDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Constant ExpressionNode // The constant that will hold the struct value
TypeParameters []TypeParameterNode // Generic type variable definitions
Body []StructBodyStatementNode // body of the struct
}
Represents a struct declaration eg. `struct Foo; end`
func NewStructDeclarationNode ¶
func NewStructDeclarationNode( loc *position.Location, docComment string, constant ExpressionNode, typeParams []TypeParameterNode, body []StructBodyStatementNode, ) *StructDeclarationNode
Create a new struct declaration node eg. `struct Foo; end`
func (*StructDeclarationNode) Class ¶
func (*StructDeclarationNode) Class() *value.Class
func (*StructDeclarationNode) DirectClass ¶
func (*StructDeclarationNode) DirectClass() *value.Class
func (*StructDeclarationNode) Error ¶
func (n *StructDeclarationNode) Error() string
func (*StructDeclarationNode) Inspect ¶
func (n *StructDeclarationNode) Inspect() string
func (*StructDeclarationNode) IsStatic ¶
func (*StructDeclarationNode) IsStatic() bool
func (*StructDeclarationNode) MacroType ¶
func (n *StructDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*StructDeclarationNode) String ¶
func (n *StructDeclarationNode) String() string
type SubscriptExpressionNode ¶
type SubscriptExpressionNode struct {
TypedNodeBase
Receiver ExpressionNode
Key ExpressionNode
// contains filtered or unexported fields
}
Represents subscript access eg. `arr[5]`
func NewSubscriptExpressionNode ¶
func NewSubscriptExpressionNode(loc *position.Location, recv, key ExpressionNode) *SubscriptExpressionNode
Create a subscript expression node eg. `arr[5]`
func (*SubscriptExpressionNode) Class ¶
func (*SubscriptExpressionNode) Class() *value.Class
func (*SubscriptExpressionNode) DirectClass ¶
func (*SubscriptExpressionNode) DirectClass() *value.Class
func (*SubscriptExpressionNode) Equal ¶
func (n *SubscriptExpressionNode) Equal(other value.Value) bool
func (*SubscriptExpressionNode) Error ¶
func (n *SubscriptExpressionNode) Error() string
func (*SubscriptExpressionNode) Inspect ¶
func (n *SubscriptExpressionNode) Inspect() string
func (*SubscriptExpressionNode) IsStatic ¶
func (s *SubscriptExpressionNode) IsStatic() bool
func (*SubscriptExpressionNode) MacroType ¶
func (n *SubscriptExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SubscriptExpressionNode) String ¶
func (n *SubscriptExpressionNode) String() string
type SwitchExpressionNode ¶
type SwitchExpressionNode struct {
TypedNodeBase
Value ExpressionNode
Cases []*CaseNode
ElseBody []StatementNode
}
Represents a `switch` expression eg.
switch a
case 3
println("eureka!")
case nil
println("boo")
else
println("nothing")
end
func NewSwitchExpressionNode ¶
func NewSwitchExpressionNode(loc *position.Location, val ExpressionNode, cases []*CaseNode, els []StatementNode) *SwitchExpressionNode
Create a new `switch` expression node
func (*SwitchExpressionNode) Class ¶
func (*SwitchExpressionNode) Class() *value.Class
func (*SwitchExpressionNode) DirectClass ¶
func (*SwitchExpressionNode) DirectClass() *value.Class
func (*SwitchExpressionNode) Error ¶
func (n *SwitchExpressionNode) Error() string
func (*SwitchExpressionNode) Inspect ¶
func (n *SwitchExpressionNode) Inspect() string
func (*SwitchExpressionNode) IsStatic ¶
func (*SwitchExpressionNode) IsStatic() bool
func (*SwitchExpressionNode) MacroType ¶
func (n *SwitchExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SwitchExpressionNode) String ¶
func (n *SwitchExpressionNode) String() string
type SymbolArrayListLiteralNode ¶
type SymbolArrayListLiteralNode struct {
TypedNodeBase
Elements []SymbolCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a symbol ArrayList literal eg. `\s[foo bar]`
func NewSymbolArrayListLiteralNode ¶
func NewSymbolArrayListLiteralNode(loc *position.Location, elements []SymbolCollectionContentNode, capacity ExpressionNode) *SymbolArrayListLiteralNode
Create a symbol ArrayList literal node eg. `\s[foo bar]`
func (*SymbolArrayListLiteralNode) Class ¶
func (*SymbolArrayListLiteralNode) Class() *value.Class
func (*SymbolArrayListLiteralNode) DirectClass ¶
func (*SymbolArrayListLiteralNode) DirectClass() *value.Class
func (*SymbolArrayListLiteralNode) Equal ¶
func (n *SymbolArrayListLiteralNode) Equal(other value.Value) bool
func (*SymbolArrayListLiteralNode) Error ¶
func (n *SymbolArrayListLiteralNode) Error() string
func (*SymbolArrayListLiteralNode) Inspect ¶
func (n *SymbolArrayListLiteralNode) Inspect() string
func (*SymbolArrayListLiteralNode) IsStatic ¶
func (s *SymbolArrayListLiteralNode) IsStatic() bool
func (*SymbolArrayListLiteralNode) MacroType ¶
func (n *SymbolArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SymbolArrayListLiteralNode) String ¶
func (n *SymbolArrayListLiteralNode) String() string
type SymbolArrayTupleLiteralNode ¶
type SymbolArrayTupleLiteralNode struct {
TypedNodeBase
Elements []SymbolCollectionContentNode
}
Represents a symbol ArrayTuple literal eg. `%s[foo bar]`
func NewSymbolArrayTupleLiteralNode ¶
func NewSymbolArrayTupleLiteralNode(loc *position.Location, elements []SymbolCollectionContentNode) *SymbolArrayTupleLiteralNode
Create a symbol arrayTuple literal node eg. `%s[foo bar]`
func (*SymbolArrayTupleLiteralNode) Class ¶
func (*SymbolArrayTupleLiteralNode) Class() *value.Class
func (*SymbolArrayTupleLiteralNode) DirectClass ¶
func (*SymbolArrayTupleLiteralNode) DirectClass() *value.Class
func (*SymbolArrayTupleLiteralNode) Equal ¶
func (n *SymbolArrayTupleLiteralNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*SymbolArrayTupleLiteralNode) Error ¶
func (n *SymbolArrayTupleLiteralNode) Error() string
func (*SymbolArrayTupleLiteralNode) Inspect ¶
func (n *SymbolArrayTupleLiteralNode) Inspect() string
func (*SymbolArrayTupleLiteralNode) IsStatic ¶
func (*SymbolArrayTupleLiteralNode) IsStatic() bool
func (*SymbolArrayTupleLiteralNode) MacroType ¶
func (n *SymbolArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SymbolArrayTupleLiteralNode) String ¶
func (n *SymbolArrayTupleLiteralNode) String() string
Return a string representation of the node.
type SymbolCollectionContentNode ¶
type SymbolCollectionContentNode interface {
Node
ExpressionNode
// contains filtered or unexported methods
}
All nodes that should be able to appear as elements of symbol collection literals should implement this interface.
type SymbolHashSetLiteralNode ¶
type SymbolHashSetLiteralNode struct {
TypedNodeBase
Elements []SymbolCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a symbol HashSet literal eg. `^s[foo bar]`
func NewSymbolHashSetLiteralNode ¶
func NewSymbolHashSetLiteralNode(loc *position.Location, elements []SymbolCollectionContentNode, capacity ExpressionNode) *SymbolHashSetLiteralNode
Create a symbol HashSet literal node eg. `^s[foo bar]`
func (*SymbolHashSetLiteralNode) Class ¶
func (*SymbolHashSetLiteralNode) Class() *value.Class
func (*SymbolHashSetLiteralNode) DirectClass ¶
func (*SymbolHashSetLiteralNode) DirectClass() *value.Class
func (*SymbolHashSetLiteralNode) Equal ¶
func (n *SymbolHashSetLiteralNode) Equal(other value.Value) bool
func (*SymbolHashSetLiteralNode) Error ¶
func (n *SymbolHashSetLiteralNode) Error() string
func (*SymbolHashSetLiteralNode) Inspect ¶
func (n *SymbolHashSetLiteralNode) Inspect() string
func (*SymbolHashSetLiteralNode) IsStatic ¶
func (s *SymbolHashSetLiteralNode) IsStatic() bool
func (*SymbolHashSetLiteralNode) MacroType ¶
func (n *SymbolHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SymbolHashSetLiteralNode) String ¶
func (n *SymbolHashSetLiteralNode) String() string
type SymbolKeyValueExpressionNode ¶
type SymbolKeyValueExpressionNode struct {
NodeBase
Key IdentifierNode
Value ExpressionNode
}
Represents a symbol value expression eg. `foo: bar`
func NewSymbolKeyValueExpressionNode ¶
func NewSymbolKeyValueExpressionNode(loc *position.Location, key IdentifierNode, val ExpressionNode) *SymbolKeyValueExpressionNode
Create a symbol key value node eg. `foo: bar`
func (*SymbolKeyValueExpressionNode) Class ¶
func (*SymbolKeyValueExpressionNode) Class() *value.Class
func (*SymbolKeyValueExpressionNode) DirectClass ¶
func (*SymbolKeyValueExpressionNode) DirectClass() *value.Class
func (*SymbolKeyValueExpressionNode) Equal ¶
func (n *SymbolKeyValueExpressionNode) Equal(other value.Value) bool
func (*SymbolKeyValueExpressionNode) Error ¶
func (n *SymbolKeyValueExpressionNode) Error() string
func (*SymbolKeyValueExpressionNode) Inspect ¶
func (n *SymbolKeyValueExpressionNode) Inspect() string
func (*SymbolKeyValueExpressionNode) IsStatic ¶
func (s *SymbolKeyValueExpressionNode) IsStatic() bool
func (*SymbolKeyValueExpressionNode) MacroType ¶
func (n *SymbolKeyValueExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SymbolKeyValueExpressionNode) String ¶
func (n *SymbolKeyValueExpressionNode) String() string
type SymbolKeyValuePatternNode ¶
type SymbolKeyValuePatternNode struct {
NodeBase
Key string
Value PatternNode
}
Represents a symbol value pattern eg. `foo: bar`
func NewSymbolKeyValuePatternNode ¶
func NewSymbolKeyValuePatternNode(loc *position.Location, key string, val PatternNode) *SymbolKeyValuePatternNode
Create a symbol key value node eg. `foo: bar`
func (*SymbolKeyValuePatternNode) Class ¶
func (*SymbolKeyValuePatternNode) Class() *value.Class
func (*SymbolKeyValuePatternNode) DirectClass ¶
func (*SymbolKeyValuePatternNode) DirectClass() *value.Class
func (*SymbolKeyValuePatternNode) Equal ¶
func (n *SymbolKeyValuePatternNode) Equal(other value.Value) bool
func (*SymbolKeyValuePatternNode) Error ¶
func (n *SymbolKeyValuePatternNode) Error() string
func (*SymbolKeyValuePatternNode) Inspect ¶
func (n *SymbolKeyValuePatternNode) Inspect() string
func (*SymbolKeyValuePatternNode) IsStatic ¶
func (s *SymbolKeyValuePatternNode) IsStatic() bool
func (*SymbolKeyValuePatternNode) MacroType ¶
func (n *SymbolKeyValuePatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*SymbolKeyValuePatternNode) String ¶
func (n *SymbolKeyValuePatternNode) String() string
type SymbolLiteralNode ¶
type SymbolLiteralNode interface {
Node
ExpressionNode
// contains filtered or unexported methods
}
Nodes that implement this interface represent symbol literals.
type ThrowExpressionNode ¶
type ThrowExpressionNode struct {
NodeBase
Unchecked bool
Value ExpressionNode
}
Represents a `throw` expression eg. `throw ArgumentError("foo")`
func NewThrowExpressionNode ¶
func NewThrowExpressionNode(loc *position.Location, unchecked bool, val ExpressionNode) *ThrowExpressionNode
Create a new `throw` expression node eg. `throw ArgumentError("foo")`
func (*ThrowExpressionNode) Class ¶
func (*ThrowExpressionNode) Class() *value.Class
func (*ThrowExpressionNode) DirectClass ¶
func (*ThrowExpressionNode) DirectClass() *value.Class
func (*ThrowExpressionNode) Error ¶
func (n *ThrowExpressionNode) Error() string
func (*ThrowExpressionNode) Inspect ¶
func (n *ThrowExpressionNode) Inspect() string
func (*ThrowExpressionNode) IsStatic ¶
func (*ThrowExpressionNode) IsStatic() bool
func (*ThrowExpressionNode) MacroType ¶
func (n *ThrowExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ThrowExpressionNode) String ¶
func (n *ThrowExpressionNode) String() string
func (*ThrowExpressionNode) Type ¶
func (*ThrowExpressionNode) Type(*types.GlobalEnvironment) types.Type
type TraverseOption ¶
type TraverseOption uint8
Value used to decide what whether to skip the children of the node, break the traversal or continue in the AST Traverse method. The zero value continues the traversal.
const ( TraverseContinue TraverseOption = iota TraverseSkip TraverseBreak )
type TrueLiteralNode ¶
type TrueLiteralNode struct {
NodeBase
}
`true` literal.
func NewTrueLiteralNode ¶
func NewTrueLiteralNode(loc *position.Location) *TrueLiteralNode
Create a new `true` literal node.
func (*TrueLiteralNode) Class ¶
func (*TrueLiteralNode) Class() *value.Class
func (*TrueLiteralNode) DirectClass ¶
func (*TrueLiteralNode) DirectClass() *value.Class
func (*TrueLiteralNode) Error ¶
func (n *TrueLiteralNode) Error() string
func (*TrueLiteralNode) Inspect ¶
func (n *TrueLiteralNode) Inspect() string
func (*TrueLiteralNode) IsStatic ¶
func (*TrueLiteralNode) IsStatic() bool
func (*TrueLiteralNode) MacroType ¶
func (n *TrueLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*TrueLiteralNode) String ¶
func (n *TrueLiteralNode) String() string
func (*TrueLiteralNode) Type ¶
func (*TrueLiteralNode) Type(globalEnv *types.GlobalEnvironment) types.Type
type TryExpressionNode ¶
type TryExpressionNode struct {
TypedNodeBase
Value ExpressionNode
}
Represents a `try` expression eg. `try foo()`
func NewTryExpressionNode ¶
func NewTryExpressionNode(loc *position.Location, val ExpressionNode) *TryExpressionNode
Create a new `try` expression node eg. `try foo()`
func (*TryExpressionNode) Class ¶
func (*TryExpressionNode) Class() *value.Class
func (*TryExpressionNode) DirectClass ¶
func (*TryExpressionNode) DirectClass() *value.Class
func (*TryExpressionNode) Error ¶
func (n *TryExpressionNode) Error() string
func (*TryExpressionNode) Inspect ¶
func (n *TryExpressionNode) Inspect() string
func (*TryExpressionNode) IsStatic ¶
func (*TryExpressionNode) IsStatic() bool
func (*TryExpressionNode) MacroType ¶
func (n *TryExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*TryExpressionNode) String ¶
func (n *TryExpressionNode) String() string
type TuplePatternNode ¶
type TuplePatternNode struct {
TypedNodeBase
Elements []PatternNode
}
Represents a Tuple pattern eg. `%[1, a, >= 10]`
func NewTuplePatternNode ¶
func NewTuplePatternNode(loc *position.Location, elements []PatternNode) *TuplePatternNode
Create a Tuple pattern node eg. `%[1, a, >= 10]`
func (*TuplePatternNode) Class ¶
func (*TuplePatternNode) Class() *value.Class
func (*TuplePatternNode) DirectClass ¶
func (*TuplePatternNode) DirectClass() *value.Class
func (*TuplePatternNode) Error ¶
func (n *TuplePatternNode) Error() string
func (*TuplePatternNode) Inspect ¶
func (n *TuplePatternNode) Inspect() string
func (*TuplePatternNode) IsStatic ¶
func (l *TuplePatternNode) IsStatic() bool
func (*TuplePatternNode) MacroType ¶
func (n *TuplePatternNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*TuplePatternNode) String ¶
func (n *TuplePatternNode) String() string
type TypeDefinitionNode ¶
type TypeDefinitionNode struct {
TypedNodeBase
DocCommentableNodeBase
Constant ComplexConstantNode // new name of the type
TypeNode TypeNode // the type
}
Represents a new type definition eg. `typedef StringList = ArrayList[String]`
func NewTypeDefinitionNode ¶
func NewTypeDefinitionNode(loc *position.Location, docComment string, constant ComplexConstantNode, typ TypeNode) *TypeDefinitionNode
Create a type definition node eg. `typedef StringList = ArrayList[String]`
func (*TypeDefinitionNode) Class ¶
func (*TypeDefinitionNode) Class() *value.Class
func (*TypeDefinitionNode) DirectClass ¶
func (*TypeDefinitionNode) DirectClass() *value.Class
func (*TypeDefinitionNode) Error ¶
func (n *TypeDefinitionNode) Error() string
func (*TypeDefinitionNode) Inspect ¶
func (n *TypeDefinitionNode) Inspect() string
func (*TypeDefinitionNode) IsStatic ¶
func (*TypeDefinitionNode) IsStatic() bool
func (*TypeDefinitionNode) MacroType ¶
func (n *TypeDefinitionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*TypeDefinitionNode) String ¶
func (n *TypeDefinitionNode) String() string
type TypeExpressionNode ¶
Represents a type expression `type String?`
func NewTypeExpressionNode ¶
func NewTypeExpressionNode(loc *position.Location, typeNode TypeNode) *TypeExpressionNode
Create a new type expression `type String?`
func (*TypeExpressionNode) Class ¶
func (*TypeExpressionNode) Class() *value.Class
func (*TypeExpressionNode) DirectClass ¶
func (*TypeExpressionNode) DirectClass() *value.Class
func (*TypeExpressionNode) Error ¶
func (n *TypeExpressionNode) Error() string
func (*TypeExpressionNode) Inspect ¶
func (n *TypeExpressionNode) Inspect() string
func (*TypeExpressionNode) IsStatic ¶
func (*TypeExpressionNode) IsStatic() bool
func (*TypeExpressionNode) MacroType ¶
func (n *TypeExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*TypeExpressionNode) String ¶
func (n *TypeExpressionNode) String() string
type TypeNode ¶
type TypeNode interface {
Node
// contains filtered or unexported methods
}
All nodes that should be valid in type annotations should implement this interface
func NewBinaryTypeNodeI ¶
Same as NewBinaryTypeNode but returns an interface
type TypeParameterNode ¶
type TypeParameterNode interface {
Node
// contains filtered or unexported methods
}
Represents a type variable in generics like `class Foo[+V]; end`
type TypeStatementNode ¶
Type optionally terminated with a newline or a semicolon.
func NewTypeStatementNode ¶
func NewTypeStatementNode(loc *position.Location, typeNode TypeNode) *TypeStatementNode
Create a new type statement node eg. `Bar | Foo\n`
func (*TypeStatementNode) Class ¶
func (*TypeStatementNode) Class() *value.Class
func (*TypeStatementNode) DirectClass ¶
func (*TypeStatementNode) DirectClass() *value.Class
func (*TypeStatementNode) Error ¶
func (e *TypeStatementNode) Error() string
func (*TypeStatementNode) Inspect ¶
func (n *TypeStatementNode) Inspect() string
func (*TypeStatementNode) IsStatic ¶
func (*TypeStatementNode) IsStatic() bool
func (*TypeStatementNode) MacroType ¶
func (n *TypeStatementNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*TypeStatementNode) String ¶
func (n *TypeStatementNode) String() string
Return a string representation of the node.
type TypedNodeBase ¶
type TypedNodeBase struct {
// contains filtered or unexported fields
}
Base typed AST node.
func (*TypedNodeBase) Class ¶
func (t *TypedNodeBase) Class() *value.Class
func (*TypedNodeBase) Copy ¶
func (t *TypedNodeBase) Copy() value.Reference
func (*TypedNodeBase) DirectClass ¶
func (t *TypedNodeBase) DirectClass() *value.Class
func (*TypedNodeBase) Error ¶
func (t *TypedNodeBase) Error() string
func (*TypedNodeBase) Inspect ¶
func (t *TypedNodeBase) Inspect() string
func (*TypedNodeBase) InstanceVariables ¶
func (t *TypedNodeBase) InstanceVariables() *value.InstanceVariables
func (*TypedNodeBase) Location ¶
func (t *TypedNodeBase) Location() *position.Location
func (*TypedNodeBase) SetLocation ¶
func (t *TypedNodeBase) SetLocation(loc *position.Location)
func (*TypedNodeBase) SetSpan ¶
func (t *TypedNodeBase) SetSpan(span *position.Span)
func (*TypedNodeBase) SetType ¶
func (t *TypedNodeBase) SetType(typ types.Type)
func (*TypedNodeBase) SingletonClass ¶
func (t *TypedNodeBase) SingletonClass() *value.Class
func (*TypedNodeBase) SkipTypechecking ¶
func (t *TypedNodeBase) SkipTypechecking() bool
func (*TypedNodeBase) Span ¶
func (t *TypedNodeBase) Span() *position.Span
func (*TypedNodeBase) Type ¶
func (t *TypedNodeBase) Type(*types.GlobalEnvironment) types.Type
type TypeofExpressionNode ¶
type TypeofExpressionNode struct {
TypedNodeBase
Value ExpressionNode
}
Represents a `typeof` expression eg. `typeof foo()`
func NewTypeofExpressionNode ¶
func NewTypeofExpressionNode(loc *position.Location, val ExpressionNode) *TypeofExpressionNode
Create a new `typeof` expression node eg. `typeof foo()`
func (*TypeofExpressionNode) Class ¶
func (*TypeofExpressionNode) Class() *value.Class
func (*TypeofExpressionNode) DirectClass ¶
func (*TypeofExpressionNode) DirectClass() *value.Class
func (*TypeofExpressionNode) Error ¶
func (n *TypeofExpressionNode) Error() string
func (*TypeofExpressionNode) Inspect ¶
func (n *TypeofExpressionNode) Inspect() string
func (*TypeofExpressionNode) IsStatic ¶
func (*TypeofExpressionNode) IsStatic() bool
func (*TypeofExpressionNode) MacroType ¶
func (n *TypeofExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*TypeofExpressionNode) String ¶
func (n *TypeofExpressionNode) String() string
type UInt8LiteralNode ¶
type UInt8LiteralNode struct {
TypedNodeBase
Value string
}
UInt8 literal eg. `5u8`, `1_20u8`, `0xffu8`
func NewUInt8LiteralNode ¶
func NewUInt8LiteralNode(loc *position.Location, val string) *UInt8LiteralNode
Create a new UInt8 literal node eg. `5u8`, `1_20u8`, `0xffu8`
func (*UInt8LiteralNode) Class ¶
func (*UInt8LiteralNode) Class() *value.Class
func (*UInt8LiteralNode) DirectClass ¶
func (*UInt8LiteralNode) DirectClass() *value.Class
func (*UInt8LiteralNode) Error ¶
func (n *UInt8LiteralNode) Error() string
func (*UInt8LiteralNode) Inspect ¶
func (n *UInt8LiteralNode) Inspect() string
func (*UInt8LiteralNode) IsStatic ¶
func (*UInt8LiteralNode) IsStatic() bool
func (*UInt8LiteralNode) MacroType ¶
func (n *UInt8LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UInt8LiteralNode) String ¶
func (n *UInt8LiteralNode) String() string
type UInt16LiteralNode ¶
type UInt16LiteralNode struct {
TypedNodeBase
Value string
}
UInt16 literal eg. `5u16`, `1_20u16`, `0xffu16`
func NewUInt16LiteralNode ¶
func NewUInt16LiteralNode(loc *position.Location, val string) *UInt16LiteralNode
Create a new UInt16 literal node eg. `5u16`, `1_20u16`, `0xffu16`
func (*UInt16LiteralNode) Class ¶
func (*UInt16LiteralNode) Class() *value.Class
func (*UInt16LiteralNode) DirectClass ¶
func (*UInt16LiteralNode) DirectClass() *value.Class
func (*UInt16LiteralNode) Error ¶
func (n *UInt16LiteralNode) Error() string
func (*UInt16LiteralNode) Inspect ¶
func (n *UInt16LiteralNode) Inspect() string
func (*UInt16LiteralNode) IsStatic ¶
func (*UInt16LiteralNode) IsStatic() bool
func (*UInt16LiteralNode) MacroType ¶
func (n *UInt16LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UInt16LiteralNode) String ¶
func (n *UInt16LiteralNode) String() string
type UInt32LiteralNode ¶
type UInt32LiteralNode struct {
TypedNodeBase
Value string
}
UInt32 literal eg. `5u32`, `1_20u32`, `0xffu32`
func NewUInt32LiteralNode ¶
func NewUInt32LiteralNode(loc *position.Location, val string) *UInt32LiteralNode
Create a new UInt32 literal node eg. `5u32`, `1_20u32`, `0xffu32`
func (*UInt32LiteralNode) Class ¶
func (*UInt32LiteralNode) Class() *value.Class
func (*UInt32LiteralNode) DirectClass ¶
func (*UInt32LiteralNode) DirectClass() *value.Class
func (*UInt32LiteralNode) Error ¶
func (n *UInt32LiteralNode) Error() string
func (*UInt32LiteralNode) Inspect ¶
func (n *UInt32LiteralNode) Inspect() string
func (*UInt32LiteralNode) IsStatic ¶
func (*UInt32LiteralNode) IsStatic() bool
func (*UInt32LiteralNode) MacroType ¶
func (n *UInt32LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UInt32LiteralNode) String ¶
func (n *UInt32LiteralNode) String() string
type UInt64LiteralNode ¶
type UInt64LiteralNode struct {
TypedNodeBase
Value string
}
UInt64 literal eg. `5u64`, `125_355u64`, `0xffu64`
func NewUInt64LiteralNode ¶
func NewUInt64LiteralNode(loc *position.Location, val string) *UInt64LiteralNode
Create a new UInt64 literal node eg. `5u64`, `125_355u64`, `0xffu64`
func (*UInt64LiteralNode) Class ¶
func (*UInt64LiteralNode) Class() *value.Class
func (*UInt64LiteralNode) DirectClass ¶
func (*UInt64LiteralNode) DirectClass() *value.Class
func (*UInt64LiteralNode) Error ¶
func (n *UInt64LiteralNode) Error() string
func (*UInt64LiteralNode) Inspect ¶
func (n *UInt64LiteralNode) Inspect() string
func (*UInt64LiteralNode) IsStatic ¶
func (*UInt64LiteralNode) IsStatic() bool
func (*UInt64LiteralNode) MacroType ¶
func (n *UInt64LiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UInt64LiteralNode) String ¶
func (n *UInt64LiteralNode) String() string
type UIntLiteralNode ¶
type UIntLiteralNode struct {
TypedNodeBase
Value string
}
UInt literal eg. `5u`, `125_355u`, `0xffu`
func NewUIntLiteralNode ¶
func NewUIntLiteralNode(loc *position.Location, val string) *UIntLiteralNode
Create a new UInt literal node eg. `5u`, `125_355u`, `0xffu`
func (*UIntLiteralNode) Class ¶
func (*UIntLiteralNode) Class() *value.Class
func (*UIntLiteralNode) DirectClass ¶
func (*UIntLiteralNode) DirectClass() *value.Class
func (*UIntLiteralNode) Error ¶
func (n *UIntLiteralNode) Error() string
func (*UIntLiteralNode) Inspect ¶
func (n *UIntLiteralNode) Inspect() string
func (*UIntLiteralNode) IsStatic ¶
func (*UIntLiteralNode) IsStatic() bool
func (*UIntLiteralNode) MacroType ¶
func (n *UIntLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UIntLiteralNode) String ¶
func (n *UIntLiteralNode) String() string
type UnaryExpressionNode ¶
type UnaryExpressionNode struct {
TypedNodeBase
Op *token.Token // operator
Right ExpressionNode // right hand side
}
Expression of an operator with one operand eg. `!foo`, `-bar`
func NewUnaryExpressionNode ¶
func NewUnaryExpressionNode(loc *position.Location, op *token.Token, right ExpressionNode) *UnaryExpressionNode
Create a new unary expression node.
func (*UnaryExpressionNode) Class ¶
func (*UnaryExpressionNode) Class() *value.Class
func (*UnaryExpressionNode) DirectClass ¶
func (*UnaryExpressionNode) DirectClass() *value.Class
func (*UnaryExpressionNode) Error ¶
func (n *UnaryExpressionNode) Error() string
func (*UnaryExpressionNode) Inspect ¶
func (n *UnaryExpressionNode) Inspect() string
func (*UnaryExpressionNode) IsStatic ¶
func (u *UnaryExpressionNode) IsStatic() bool
func (*UnaryExpressionNode) MacroType ¶
func (n *UnaryExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UnaryExpressionNode) String ¶
func (n *UnaryExpressionNode) String() string
type UnaryTypeNode ¶
type UnaryTypeNode struct {
TypedNodeBase
Op *token.Token // operator
TypeNode TypeNode // right hand side
}
Type of an operator with one operand eg. `-2`, `+3`
func NewUnaryTypeNode ¶
Create a new unary expression node.
func (*UnaryTypeNode) Class ¶
func (*UnaryTypeNode) Class() *value.Class
func (*UnaryTypeNode) DirectClass ¶
func (*UnaryTypeNode) DirectClass() *value.Class
func (*UnaryTypeNode) Error ¶
func (n *UnaryTypeNode) Error() string
func (*UnaryTypeNode) Inspect ¶
func (n *UnaryTypeNode) Inspect() string
func (*UnaryTypeNode) IsStatic ¶
func (u *UnaryTypeNode) IsStatic() bool
func (*UnaryTypeNode) MacroType ¶
func (n *UnaryTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UnaryTypeNode) String ¶
func (n *UnaryTypeNode) String() string
type UndefinedLiteralNode ¶
type UndefinedLiteralNode struct {
NodeBase
}
`undefined` literal.
func NewUndefinedLiteralNode ¶
func NewUndefinedLiteralNode(loc *position.Location) *UndefinedLiteralNode
Create a new `undefined` literal node.
func (*UndefinedLiteralNode) Class ¶
func (*UndefinedLiteralNode) Class() *value.Class
func (*UndefinedLiteralNode) DirectClass ¶
func (*UndefinedLiteralNode) DirectClass() *value.Class
func (*UndefinedLiteralNode) Error ¶
func (n *UndefinedLiteralNode) Error() string
func (*UndefinedLiteralNode) Inspect ¶
func (n *UndefinedLiteralNode) Inspect() string
func (*UndefinedLiteralNode) IsStatic ¶
func (*UndefinedLiteralNode) IsStatic() bool
func (*UndefinedLiteralNode) MacroType ¶
func (n *UndefinedLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UndefinedLiteralNode) String ¶
func (n *UndefinedLiteralNode) String() string
type UnhygienicNode ¶
type UnhygienicNode struct {
TypedNodeBase
Node Node
}
Represents an unhygienic node
func NewUnhygienicNode ¶
func NewUnhygienicNode(loc *position.Location, node Node) *UnhygienicNode
Create a new unhygienic node. It enables macro-generated code to access local variables from outer scopes.
func Unhygienic ¶
func Unhygienic(node Node) *UnhygienicNode
func (*UnhygienicNode) Class ¶
func (*UnhygienicNode) Class() *value.Class
func (*UnhygienicNode) DirectClass ¶
func (*UnhygienicNode) DirectClass() *value.Class
func (*UnhygienicNode) Equal ¶
func (n *UnhygienicNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*UnhygienicNode) Error ¶
func (n *UnhygienicNode) Error() string
func (*UnhygienicNode) Inspect ¶
func (n *UnhygienicNode) Inspect() string
func (*UnhygienicNode) IsStatic ¶
func (n *UnhygienicNode) IsStatic() bool
func (*UnhygienicNode) MacroType ¶
func (n *UnhygienicNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UnhygienicNode) String ¶
func (n *UnhygienicNode) String() string
Return a string representation of the node.
type UninterpolatedRegexLiteralNode ¶
Represents an uninterpolated regex literal eg. `%/foo/`
func NewUninterpolatedRegexLiteralNode ¶
func NewUninterpolatedRegexLiteralNode(loc *position.Location, content string, flags bitfield.BitField8) *UninterpolatedRegexLiteralNode
Create a new uninterpolated regex literal node eg. `%/foo/`.
func (*UninterpolatedRegexLiteralNode) Class ¶
func (*UninterpolatedRegexLiteralNode) Class() *value.Class
func (*UninterpolatedRegexLiteralNode) DirectClass ¶
func (*UninterpolatedRegexLiteralNode) DirectClass() *value.Class
func (*UninterpolatedRegexLiteralNode) Equal ¶
func (n *UninterpolatedRegexLiteralNode) Equal(other value.Value) bool
func (*UninterpolatedRegexLiteralNode) Error ¶
func (n *UninterpolatedRegexLiteralNode) Error() string
func (*UninterpolatedRegexLiteralNode) Inspect ¶
func (n *UninterpolatedRegexLiteralNode) Inspect() string
func (*UninterpolatedRegexLiteralNode) IsASCII ¶
func (r *UninterpolatedRegexLiteralNode) IsASCII() bool
func (*UninterpolatedRegexLiteralNode) IsCaseInsensitive ¶
func (r *UninterpolatedRegexLiteralNode) IsCaseInsensitive() bool
func (*UninterpolatedRegexLiteralNode) IsDotAll ¶
func (r *UninterpolatedRegexLiteralNode) IsDotAll() bool
func (*UninterpolatedRegexLiteralNode) IsExtended ¶
func (r *UninterpolatedRegexLiteralNode) IsExtended() bool
func (*UninterpolatedRegexLiteralNode) IsMultiline ¶
func (r *UninterpolatedRegexLiteralNode) IsMultiline() bool
func (*UninterpolatedRegexLiteralNode) IsStatic ¶
func (*UninterpolatedRegexLiteralNode) IsStatic() bool
func (*UninterpolatedRegexLiteralNode) IsUngreedy ¶
func (r *UninterpolatedRegexLiteralNode) IsUngreedy() bool
func (*UninterpolatedRegexLiteralNode) MacroType ¶
func (n *UninterpolatedRegexLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UninterpolatedRegexLiteralNode) SetASCII ¶
func (r *UninterpolatedRegexLiteralNode) SetASCII() *UninterpolatedRegexLiteralNode
func (*UninterpolatedRegexLiteralNode) SetCaseInsensitive ¶
func (r *UninterpolatedRegexLiteralNode) SetCaseInsensitive() *UninterpolatedRegexLiteralNode
func (*UninterpolatedRegexLiteralNode) SetDotAll ¶
func (r *UninterpolatedRegexLiteralNode) SetDotAll() *UninterpolatedRegexLiteralNode
func (*UninterpolatedRegexLiteralNode) SetExtended ¶
func (r *UninterpolatedRegexLiteralNode) SetExtended() *UninterpolatedRegexLiteralNode
func (*UninterpolatedRegexLiteralNode) SetMultiline ¶
func (r *UninterpolatedRegexLiteralNode) SetMultiline() *UninterpolatedRegexLiteralNode
func (*UninterpolatedRegexLiteralNode) SetUngreedy ¶
func (r *UninterpolatedRegexLiteralNode) SetUngreedy() *UninterpolatedRegexLiteralNode
func (*UninterpolatedRegexLiteralNode) String ¶
func (n *UninterpolatedRegexLiteralNode) String() string
func (*UninterpolatedRegexLiteralNode) Type ¶
func (*UninterpolatedRegexLiteralNode) Type(env *types.GlobalEnvironment) types.Type
type UnionTypeNode ¶
type UnionTypeNode struct {
TypedNodeBase
Elements []TypeNode
}
Union type eg. `String | Int | Float`
func NewUnionTypeNode ¶
func NewUnionTypeNode(loc *position.Location, elements []TypeNode) *UnionTypeNode
Create a new binary type expression node eg. `String | Int`
func (*UnionTypeNode) Class ¶
func (*UnionTypeNode) Class() *value.Class
func (*UnionTypeNode) DirectClass ¶
func (*UnionTypeNode) DirectClass() *value.Class
func (*UnionTypeNode) Error ¶
func (n *UnionTypeNode) Error() string
func (*UnionTypeNode) Inspect ¶
func (n *UnionTypeNode) Inspect() string
func (*UnionTypeNode) IsStatic ¶
func (*UnionTypeNode) IsStatic() bool
func (*UnionTypeNode) MacroType ¶
func (n *UnionTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UnionTypeNode) String ¶
func (n *UnionTypeNode) String() string
type UnlessExpressionNode ¶
type UnlessExpressionNode struct {
TypedNodeBase
Condition ExpressionNode // unless condition
ThenBody []StatementNode // then expression body
ElseBody []StatementNode // else expression body
}
Represents an `unless` expression eg. `unless foo then println("bar")`
func NewUnlessExpressionNode ¶
func NewUnlessExpressionNode(loc *position.Location, cond ExpressionNode, then, els []StatementNode) *UnlessExpressionNode
Create a new `unless` expression node eg. `unless foo then println("bar")`
func (*UnlessExpressionNode) Class ¶
func (*UnlessExpressionNode) Class() *value.Class
func (*UnlessExpressionNode) DirectClass ¶
func (*UnlessExpressionNode) DirectClass() *value.Class
func (*UnlessExpressionNode) Error ¶
func (n *UnlessExpressionNode) Error() string
func (*UnlessExpressionNode) Inspect ¶
func (n *UnlessExpressionNode) Inspect() string
func (*UnlessExpressionNode) IsStatic ¶
func (*UnlessExpressionNode) IsStatic() bool
func (*UnlessExpressionNode) MacroType ¶
func (n *UnlessExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UnlessExpressionNode) String ¶
func (n *UnlessExpressionNode) String() string
type UnquoteKind ¶
type UnquoteKind uint8
const ( UNQUOTE_EXPRESSION_KIND UnquoteKind = iota // Default kind of unquote for expression nodes UNQUOTE_PATTERN_KIND // Unquote kind for pattern nodes UNQUOTE_PATTERN_EXPRESSION_KIND // Unquote kind for pattern expression nodes UNQUOTE_TYPE_KIND // Unquote kind for type nodes UNQUOTE_CONSTANT_KIND // Unquote kind for constant nodes UNQUOTE_IDENTIFIER_KIND // Unquote kind for identifier nodes UNQUOTE_INSTANCE_VARIABLE_KIND // Unquote kind for instance variable nodes )
type UnquoteNode ¶
type UnquoteNode struct {
TypedNodeBase
Kind UnquoteKind
Expression ExpressionNode
}
Represents an unquoted piece of AST inside of a quote
func NewUnquoteNode ¶
func NewUnquoteNode(loc *position.Location, kind UnquoteKind, expr ExpressionNode) *UnquoteNode
Create an unquote node eg.
unquote(x)
func (*UnquoteNode) Class ¶
func (*UnquoteNode) Class() *value.Class
func (*UnquoteNode) DirectClass ¶
func (*UnquoteNode) DirectClass() *value.Class
func (*UnquoteNode) Equal ¶
func (n *UnquoteNode) Equal(other value.Value) bool
Check if this node equals another node.
func (*UnquoteNode) Error ¶
func (n *UnquoteNode) Error() string
func (*UnquoteNode) Inspect ¶
func (n *UnquoteNode) Inspect() string
func (*UnquoteNode) IsStatic ¶
func (*UnquoteNode) IsStatic() bool
func (*UnquoteNode) MacroType ¶
func (n *UnquoteNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UnquoteNode) String ¶
func (n *UnquoteNode) String() string
Return a string representation of the node.
type UnquoteOrInvalidNode ¶
type UnquoteOrInvalidNode interface {
ExpressionNode
PatternNode
TypeNode
ConstantNode
IdentifierNode
InstanceVariableNode
// contains filtered or unexported methods
}
type UntilExpressionNode ¶
type UntilExpressionNode struct {
TypedNodeBase
Condition ExpressionNode // until condition
ThenBody []StatementNode // then expression body
}
Represents a `until` expression eg. `until i >= 5 then i += 5`
func NewUntilExpressionNode ¶
func NewUntilExpressionNode(loc *position.Location, cond ExpressionNode, then []StatementNode) *UntilExpressionNode
Create a new `until` expression node eg. `until i >= 5 then i += 5`
func (*UntilExpressionNode) Class ¶
func (*UntilExpressionNode) Class() *value.Class
func (*UntilExpressionNode) DirectClass ¶
func (*UntilExpressionNode) DirectClass() *value.Class
func (*UntilExpressionNode) Error ¶
func (n *UntilExpressionNode) Error() string
func (*UntilExpressionNode) Inspect ¶
func (n *UntilExpressionNode) Inspect() string
func (*UntilExpressionNode) IsStatic ¶
func (*UntilExpressionNode) IsStatic() bool
func (*UntilExpressionNode) MacroType ¶
func (n *UntilExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UntilExpressionNode) String ¶
func (n *UntilExpressionNode) String() string
type UsingAllEntryNode ¶
type UsingAllEntryNode struct {
TypedNodeBase
Namespace UsingEntryNode
}
Represents a using all entry node eg. `Foo::*`, `A::B::C::*`
func NewUsingAllEntryNode ¶
func NewUsingAllEntryNode(loc *position.Location, namespace UsingEntryNode) *UsingAllEntryNode
Create a new using all entry node eg. `Foo::*`, `A::B::C::*`
func (*UsingAllEntryNode) Class ¶
func (*UsingAllEntryNode) Class() *value.Class
func (*UsingAllEntryNode) DirectClass ¶
func (*UsingAllEntryNode) DirectClass() *value.Class
func (*UsingAllEntryNode) Error ¶
func (n *UsingAllEntryNode) Error() string
func (*UsingAllEntryNode) Inspect ¶
func (n *UsingAllEntryNode) Inspect() string
func (*UsingAllEntryNode) IsStatic ¶
func (*UsingAllEntryNode) IsStatic() bool
func (*UsingAllEntryNode) MacroType ¶
func (n *UsingAllEntryNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UsingAllEntryNode) String ¶
func (n *UsingAllEntryNode) String() string
type UsingEntryNode ¶
type UsingEntryNode interface {
Node
ExpressionNode
// contains filtered or unexported methods
}
Represents all nodes that are valid in using declarations
type UsingEntryWithSubentriesNode ¶
type UsingEntryWithSubentriesNode struct {
NodeBase
Namespace UsingEntryNode
Subentries []UsingSubentryNode
}
Represents a using entry node with subentries eg. `Foo::{Bar, baz}`, `A::B::C::{lol, foo as epic, Gro as Moe}`
func NewUsingEntryWithSubentriesNode ¶
func NewUsingEntryWithSubentriesNode(loc *position.Location, namespace UsingEntryNode, subentries []UsingSubentryNode) *UsingEntryWithSubentriesNode
Create a new using all entry node eg. `Foo::*`, `A::B::C::*`
func (*UsingEntryWithSubentriesNode) Class ¶
func (*UsingEntryWithSubentriesNode) Class() *value.Class
func (*UsingEntryWithSubentriesNode) DirectClass ¶
func (*UsingEntryWithSubentriesNode) DirectClass() *value.Class
func (*UsingEntryWithSubentriesNode) Equal ¶
func (n *UsingEntryWithSubentriesNode) Equal(other value.Value) bool
func (*UsingEntryWithSubentriesNode) Error ¶
func (n *UsingEntryWithSubentriesNode) Error() string
func (*UsingEntryWithSubentriesNode) Inspect ¶
func (n *UsingEntryWithSubentriesNode) Inspect() string
func (*UsingEntryWithSubentriesNode) IsStatic ¶
func (*UsingEntryWithSubentriesNode) IsStatic() bool
func (*UsingEntryWithSubentriesNode) MacroType ¶
func (n *UsingEntryWithSubentriesNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UsingEntryWithSubentriesNode) String ¶
func (n *UsingEntryWithSubentriesNode) String() string
type UsingExpressionNode ¶
type UsingExpressionNode struct {
TypedNodeBase
Entries []UsingEntryNode
}
Represents a using expression eg. `using Foo`
func NewUsingExpressionNode ¶
func NewUsingExpressionNode(loc *position.Location, consts []UsingEntryNode) *UsingExpressionNode
Create a using expression node eg. `using Foo`
func (*UsingExpressionNode) Class ¶
func (*UsingExpressionNode) Class() *value.Class
func (*UsingExpressionNode) DirectClass ¶
func (*UsingExpressionNode) DirectClass() *value.Class
func (*UsingExpressionNode) Error ¶
func (n *UsingExpressionNode) Error() string
func (*UsingExpressionNode) Inspect ¶
func (n *UsingExpressionNode) Inspect() string
func (*UsingExpressionNode) IsStatic ¶
func (*UsingExpressionNode) IsStatic() bool
func (*UsingExpressionNode) MacroType ¶
func (n *UsingExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UsingExpressionNode) SkipTypechecking ¶
func (*UsingExpressionNode) SkipTypechecking() bool
func (*UsingExpressionNode) String ¶
func (n *UsingExpressionNode) String() string
type UsingSubentryAsNode ¶
type UsingSubentryAsNode struct {
NodeBase
Target IdentifierNode
AsName IdentifierNode
}
Represents an identifier with as in using declarations eg. `foo as bar`.
func NewUsingSubentryAsNode ¶
func NewUsingSubentryAsNode(loc *position.Location, target IdentifierNode, as IdentifierNode) *UsingSubentryAsNode
Create a new identifier with as eg. `foo as bar`.
func (*UsingSubentryAsNode) Class ¶
func (*UsingSubentryAsNode) Class() *value.Class
func (*UsingSubentryAsNode) DirectClass ¶
func (*UsingSubentryAsNode) DirectClass() *value.Class
func (*UsingSubentryAsNode) Error ¶
func (n *UsingSubentryAsNode) Error() string
func (*UsingSubentryAsNode) Inspect ¶
func (n *UsingSubentryAsNode) Inspect() string
func (*UsingSubentryAsNode) IsMacro ¶
func (n *UsingSubentryAsNode) IsMacro() bool
func (*UsingSubentryAsNode) IsStatic ¶
func (*UsingSubentryAsNode) IsStatic() bool
func (*UsingSubentryAsNode) MacroType ¶
func (n *UsingSubentryAsNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*UsingSubentryAsNode) String ¶
func (n *UsingSubentryAsNode) String() string
type UsingSubentryNode ¶
type UsingSubentryNode interface {
Node
ExpressionNode
// contains filtered or unexported methods
}
Represents all nodes that are valid in using subentries in `UsingEntryWithSubentriesNode`
type ValueDeclarationNode ¶
type ValueDeclarationNode struct {
TypedNodeBase
Name IdentifierNode // name of the value
TypeNode TypeNode // type of the value
Initialiser ExpressionNode // value assigned to the value
}
Represents a value declaration eg. `val foo: String`
func NewValueDeclarationNode ¶
func NewValueDeclarationNode(loc *position.Location, name IdentifierNode, typ TypeNode, init ExpressionNode) *ValueDeclarationNode
Create a new value declaration node eg. `val foo: String`
func (*ValueDeclarationNode) Class ¶
func (*ValueDeclarationNode) Class() *value.Class
func (*ValueDeclarationNode) DirectClass ¶
func (*ValueDeclarationNode) DirectClass() *value.Class
func (*ValueDeclarationNode) Error ¶
func (v *ValueDeclarationNode) Error() string
func (*ValueDeclarationNode) Inspect ¶
func (n *ValueDeclarationNode) Inspect() string
func (*ValueDeclarationNode) IsStatic ¶
func (*ValueDeclarationNode) IsStatic() bool
func (*ValueDeclarationNode) MacroType ¶
func (n *ValueDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ValueDeclarationNode) String ¶
func (n *ValueDeclarationNode) String() string
type ValuePatternDeclarationNode ¶
type ValuePatternDeclarationNode struct {
NodeBase
Pattern PatternNode
Initialiser ExpressionNode // value assigned to the value
}
Represents a value pattern declaration eg. `val [foo, { bar }] = baz()`
func NewValuePatternDeclarationNode ¶
func NewValuePatternDeclarationNode(loc *position.Location, pattern PatternNode, init ExpressionNode) *ValuePatternDeclarationNode
Create a new value declaration node eg. `val foo: String`
func (*ValuePatternDeclarationNode) Class ¶
func (*ValuePatternDeclarationNode) Class() *value.Class
func (*ValuePatternDeclarationNode) DirectClass ¶
func (*ValuePatternDeclarationNode) DirectClass() *value.Class
func (*ValuePatternDeclarationNode) Equal ¶
func (n *ValuePatternDeclarationNode) Equal(other value.Value) bool
func (*ValuePatternDeclarationNode) Error ¶
func (v *ValuePatternDeclarationNode) Error() string
func (*ValuePatternDeclarationNode) Inspect ¶
func (n *ValuePatternDeclarationNode) Inspect() string
func (*ValuePatternDeclarationNode) IsStatic ¶
func (*ValuePatternDeclarationNode) IsStatic() bool
func (*ValuePatternDeclarationNode) MacroType ¶
func (n *ValuePatternDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*ValuePatternDeclarationNode) String ¶
func (n *ValuePatternDeclarationNode) String() string
type VariableDeclarationNode ¶
type VariableDeclarationNode struct {
TypedNodeBase
DocCommentableNodeBase
Name IdentifierNode // name of the variable
TypeNode TypeNode // type of the variable
Initialiser ExpressionNode // value assigned to the variable
}
Represents a variable declaration eg. `var foo: String`
func NewVariableDeclarationNode ¶
func NewVariableDeclarationNode(loc *position.Location, docComment string, name IdentifierNode, typ TypeNode, init ExpressionNode) *VariableDeclarationNode
Create a new variable declaration node eg. `var foo: String`
func (*VariableDeclarationNode) Class ¶
func (*VariableDeclarationNode) Class() *value.Class
func (*VariableDeclarationNode) DirectClass ¶
func (*VariableDeclarationNode) DirectClass() *value.Class
func (*VariableDeclarationNode) Equal ¶
func (n *VariableDeclarationNode) Equal(other value.Value) bool
func (*VariableDeclarationNode) Error ¶
func (v *VariableDeclarationNode) Error() string
func (*VariableDeclarationNode) Inspect ¶
func (n *VariableDeclarationNode) Inspect() string
func (*VariableDeclarationNode) IsStatic ¶
func (*VariableDeclarationNode) IsStatic() bool
func (*VariableDeclarationNode) MacroType ¶
func (n *VariableDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*VariableDeclarationNode) String ¶
func (n *VariableDeclarationNode) String() string
type VariablePatternDeclarationNode ¶
type VariablePatternDeclarationNode struct {
NodeBase
Pattern PatternNode
Initialiser ExpressionNode // value assigned to the variable
}
Represents a variable declaration with patterns eg. `var [foo, { bar }] = baz()`
func NewVariablePatternDeclarationNode ¶
func NewVariablePatternDeclarationNode(loc *position.Location, pattern PatternNode, init ExpressionNode) *VariablePatternDeclarationNode
Create a new variable declaration node with patterns eg. `var [foo, { bar }] = baz()`
func (*VariablePatternDeclarationNode) Class ¶
func (*VariablePatternDeclarationNode) Class() *value.Class
func (*VariablePatternDeclarationNode) DirectClass ¶
func (*VariablePatternDeclarationNode) DirectClass() *value.Class
func (*VariablePatternDeclarationNode) Equal ¶
func (n *VariablePatternDeclarationNode) Equal(other value.Value) bool
func (*VariablePatternDeclarationNode) Error ¶
func (v *VariablePatternDeclarationNode) Error() string
func (*VariablePatternDeclarationNode) Inspect ¶
func (n *VariablePatternDeclarationNode) Inspect() string
func (*VariablePatternDeclarationNode) IsStatic ¶
func (*VariablePatternDeclarationNode) IsStatic() bool
func (*VariablePatternDeclarationNode) MacroType ¶
func (n *VariablePatternDeclarationNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*VariablePatternDeclarationNode) String ¶
func (n *VariablePatternDeclarationNode) String() string
type VariantTypeParameterNode ¶
type VariantTypeParameterNode struct {
TypedNodeBase
Variance Variance // Variance level of this type parameter
Name string // Name of the type parameter eg. `T`
LowerBound TypeNode
UpperBound TypeNode
Default TypeNode
}
Represents a type parameter eg. `+V`
func NewVariantTypeParameterNode ¶
func NewVariantTypeParameterNode(loc *position.Location, variance Variance, name string, lower, upper, def TypeNode) *VariantTypeParameterNode
Create a new type variable node eg. `+V`
func (*VariantTypeParameterNode) Class ¶
func (*VariantTypeParameterNode) Class() *value.Class
func (*VariantTypeParameterNode) DirectClass ¶
func (*VariantTypeParameterNode) DirectClass() *value.Class
func (*VariantTypeParameterNode) Equal ¶
func (n *VariantTypeParameterNode) Equal(other value.Value) bool
func (*VariantTypeParameterNode) Error ¶
func (n *VariantTypeParameterNode) Error() string
func (*VariantTypeParameterNode) Inspect ¶
func (n *VariantTypeParameterNode) Inspect() string
func (*VariantTypeParameterNode) IsStatic ¶
func (*VariantTypeParameterNode) IsStatic() bool
func (*VariantTypeParameterNode) MacroType ¶
func (n *VariantTypeParameterNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*VariantTypeParameterNode) String ¶
func (n *VariantTypeParameterNode) String() string
type VoidTypeNode ¶
type VoidTypeNode struct {
NodeBase
}
`void` type.
func NewVoidTypeNode ¶
func NewVoidTypeNode(loc *position.Location) *VoidTypeNode
Create a new `void` type node.
func (*VoidTypeNode) Class ¶
func (*VoidTypeNode) Class() *value.Class
func (*VoidTypeNode) DirectClass ¶
func (*VoidTypeNode) DirectClass() *value.Class
func (*VoidTypeNode) Error ¶
func (n *VoidTypeNode) Error() string
func (*VoidTypeNode) Inspect ¶
func (n *VoidTypeNode) Inspect() string
func (*VoidTypeNode) IsStatic ¶
func (*VoidTypeNode) IsStatic() bool
func (*VoidTypeNode) MacroType ¶
func (n *VoidTypeNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*VoidTypeNode) String ¶
func (n *VoidTypeNode) String() string
type WhileExpressionNode ¶
type WhileExpressionNode struct {
TypedNodeBase
Condition ExpressionNode // while condition
ThenBody []StatementNode // then expression body
}
Represents a `while` expression eg. `while i < 5 then i += 5`
func NewWhileExpressionNode ¶
func NewWhileExpressionNode(loc *position.Location, cond ExpressionNode, then []StatementNode) *WhileExpressionNode
Create a new `while` expression node eg. `while i < 5 then i += 5`
func (*WhileExpressionNode) Class ¶
func (*WhileExpressionNode) Class() *value.Class
func (*WhileExpressionNode) DirectClass ¶
func (*WhileExpressionNode) DirectClass() *value.Class
func (*WhileExpressionNode) Error ¶
func (n *WhileExpressionNode) Error() string
func (*WhileExpressionNode) Inspect ¶
func (n *WhileExpressionNode) Inspect() string
func (*WhileExpressionNode) IsStatic ¶
func (*WhileExpressionNode) IsStatic() bool
func (*WhileExpressionNode) MacroType ¶
func (n *WhileExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*WhileExpressionNode) String ¶
func (n *WhileExpressionNode) String() string
type WordArrayListLiteralNode ¶
type WordArrayListLiteralNode struct {
TypedNodeBase
Elements []WordCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a word ArrayList literal eg. `\w[foo bar]`
func NewWordArrayListLiteralNode ¶
func NewWordArrayListLiteralNode(loc *position.Location, elements []WordCollectionContentNode, capacity ExpressionNode) *WordArrayListLiteralNode
Create a word ArrayList literal node eg. `\w[foo bar]`
func (*WordArrayListLiteralNode) Class ¶
func (*WordArrayListLiteralNode) Class() *value.Class
func (*WordArrayListLiteralNode) DirectClass ¶
func (*WordArrayListLiteralNode) DirectClass() *value.Class
func (*WordArrayListLiteralNode) Equal ¶
func (n *WordArrayListLiteralNode) Equal(other value.Value) bool
func (*WordArrayListLiteralNode) Error ¶
func (n *WordArrayListLiteralNode) Error() string
func (*WordArrayListLiteralNode) Inspect ¶
func (n *WordArrayListLiteralNode) Inspect() string
func (*WordArrayListLiteralNode) IsStatic ¶
func (w *WordArrayListLiteralNode) IsStatic() bool
func (*WordArrayListLiteralNode) MacroType ¶
func (n *WordArrayListLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*WordArrayListLiteralNode) String ¶
func (n *WordArrayListLiteralNode) String() string
type WordArrayTupleLiteralNode ¶
type WordArrayTupleLiteralNode struct {
TypedNodeBase
Elements []WordCollectionContentNode
}
Represents a word ArrayTuple literal eg. `%w[foo bar]`
func NewWordArrayTupleLiteralNode ¶
func NewWordArrayTupleLiteralNode(loc *position.Location, elements []WordCollectionContentNode) *WordArrayTupleLiteralNode
Create a word ArrayTuple literal node eg. `%w[foo bar]`
func (*WordArrayTupleLiteralNode) Class ¶
func (*WordArrayTupleLiteralNode) Class() *value.Class
func (*WordArrayTupleLiteralNode) DirectClass ¶
func (*WordArrayTupleLiteralNode) DirectClass() *value.Class
func (*WordArrayTupleLiteralNode) Equal ¶
func (n *WordArrayTupleLiteralNode) Equal(other value.Value) bool
func (*WordArrayTupleLiteralNode) Error ¶
func (n *WordArrayTupleLiteralNode) Error() string
func (*WordArrayTupleLiteralNode) Inspect ¶
func (n *WordArrayTupleLiteralNode) Inspect() string
func (*WordArrayTupleLiteralNode) IsStatic ¶
func (*WordArrayTupleLiteralNode) IsStatic() bool
func (*WordArrayTupleLiteralNode) MacroType ¶
func (n *WordArrayTupleLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*WordArrayTupleLiteralNode) String ¶
func (n *WordArrayTupleLiteralNode) String() string
type WordCollectionContentNode ¶
type WordCollectionContentNode interface {
Node
ExpressionNode
// contains filtered or unexported methods
}
All nodes that should be able to appear as elements of word collection literals should implement this interface.
type WordHashSetLiteralNode ¶
type WordHashSetLiteralNode struct {
TypedNodeBase
Elements []WordCollectionContentNode
Capacity ExpressionNode
// contains filtered or unexported fields
}
Represents a word HashSet literal eg. `^w[foo bar]`
func NewWordHashSetLiteralNode ¶
func NewWordHashSetLiteralNode(loc *position.Location, elements []WordCollectionContentNode, capacity ExpressionNode) *WordHashSetLiteralNode
Create a word HashSet literal node eg. `^w[foo bar]`
func (*WordHashSetLiteralNode) Class ¶
func (*WordHashSetLiteralNode) Class() *value.Class
func (*WordHashSetLiteralNode) DirectClass ¶
func (*WordHashSetLiteralNode) DirectClass() *value.Class
func (*WordHashSetLiteralNode) Equal ¶
func (n *WordHashSetLiteralNode) Equal(other value.Value) bool
func (*WordHashSetLiteralNode) Error ¶
func (n *WordHashSetLiteralNode) Error() string
func (*WordHashSetLiteralNode) Inspect ¶
func (n *WordHashSetLiteralNode) Inspect() string
func (*WordHashSetLiteralNode) IsStatic ¶
func (w *WordHashSetLiteralNode) IsStatic() bool
func (*WordHashSetLiteralNode) MacroType ¶
func (n *WordHashSetLiteralNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*WordHashSetLiteralNode) String ¶
func (n *WordHashSetLiteralNode) String() string
type YieldExpressionNode ¶
type YieldExpressionNode struct {
NodeBase
Value ExpressionNode
Forward bool
}
Represents a `yield` expression eg. `yield`, `yield true`, `yield* foo()`
func NewYieldExpressionNode ¶
func NewYieldExpressionNode(loc *position.Location, forward bool, val ExpressionNode) *YieldExpressionNode
Create a new `yield` expression node eg. `yield`, `yield true`, `yield* foo()`
func (*YieldExpressionNode) Class ¶
func (*YieldExpressionNode) Class() *value.Class
func (*YieldExpressionNode) DirectClass ¶
func (*YieldExpressionNode) DirectClass() *value.Class
func (*YieldExpressionNode) Error ¶
func (n *YieldExpressionNode) Error() string
func (*YieldExpressionNode) Inspect ¶
func (n *YieldExpressionNode) Inspect() string
func (*YieldExpressionNode) IsStatic ¶
func (*YieldExpressionNode) IsStatic() bool
func (*YieldExpressionNode) MacroType ¶
func (n *YieldExpressionNode) MacroType(env *types.GlobalEnvironment) types.Type
func (*YieldExpressionNode) String ¶
func (n *YieldExpressionNode) String() string
Source Files
¶
- argument.go
- as_expression.go
- as_pattern.go
- assignment_expression.go
- ast.go
- await_expression.go
- binary_expression.go
- binary_pattern.go
- binary_type_expression.go
- box_of_expression.go
- box_type.go
- break_expression.go
- call.go
- callable_type.go
- char.go
- class.go
- closure_literal.go
- collection_content.go
- constant.go
- constant_as.go
- constant_declaration.go
- continue_expression.go
- do.go
- expression.go
- extend.go
- float.go
- for_in_expression.go
- go_expression.go
- identifier.go
- if_expression.go
- implement_expression.go
- include_expression.go
- instance_of_type.go
- instance_variable_declaration.go
- instance_variable_node.go
- integer.go
- interface.go
- intersection_type.go
- invalid.go
- key_value.go
- labeled_expression.go
- list.go
- logical_expression.go
- loop_expression.go
- macro.go
- macro_boundary.go
- map.go
- map_pattern.go
- match_expression.go
- method.go
- method_lookup.go
- mixin.go
- modifier.go
- module.go
- must_expression.go
- nilable_type.go
- not_type.go
- numeric_for_expression.go
- object_pattern.go
- parameter.go
- pattern.go
- pattern_expression.go
- postfix_expression.go
- program.go
- quote_expression.go
- range_literal.go
- record_pattern.go
- regex.go
- rest_pattern.go
- return_expression.go
- set.go
- simple_literal.go
- simple_type.go
- singleton_block.go
- singleton_type.go
- splat.go
- statement.go
- string.go
- struct.go
- switch_expression.go
- symbol.go
- throw_expression.go
- try_expression.go
- tuple.go
- type.go
- type_definition.go
- type_expression.go
- type_parameter.go
- typeof_expression.go
- unary_expression.go
- unary_type.go
- unhygienic.go
- union_type.go
- unless_expression.go
- unquote.go
- until_expression.go
- using.go
- value_declaration.go
- value_pattern_declaration.go
- variable_declaration.go
- variable_pattern_declaration.go
- while_expression.go
- yield_expression.go