boundnodes

package
v0.0.0-...-169fbab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

README

ReCT Bound Nodes

Here we go again! A folder filled with mysterious node files!
These here are the "bound" version of syntax nodes that have been fed through the Binder.
The main difference is that wonky syntax node things like tokens have been replaced by variable, function, and type symbol references.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BinaryOperators []BoundBinaryOperator = []BoundBinaryOperator{}/* 126 elements not displayed */

allowed operations

allowed operations

Functions

This section is empty.

Types

type BoundArrayAccessExpressionNode

type BoundArrayAccessExpressionNode struct {
	BoundExpressionNode

	Base          BoundExpressionNode
	Index         BoundExpressionNode
	IsPointer     bool
	UnboundSource nodes.SyntaxNode
}

func CreateBoundArrayAccessExpressionNode

func CreateBoundArrayAccessExpressionNode(base BoundExpressionNode, index BoundExpressionNode, isPointer bool, src nodes.SyntaxNode) BoundArrayAccessExpressionNode

func (BoundArrayAccessExpressionNode) IsPersistent

func (BoundArrayAccessExpressionNode) IsPersistent() bool

func (BoundArrayAccessExpressionNode) NodeType

func (BoundArrayAccessExpressionNode) Print

func (node BoundArrayAccessExpressionNode) Print(indent string)

func (BoundArrayAccessExpressionNode) Source

func (BoundArrayAccessExpressionNode) Type

implement the expression node interface

type BoundArrayAssignmentExpressionNode

type BoundArrayAssignmentExpressionNode struct {
	BoundExpressionNode

	Base      BoundExpressionNode
	Index     BoundExpressionNode
	Value     BoundExpressionNode
	IsPointer bool

	UnboundSource nodes.SyntaxNode
}

func (BoundArrayAssignmentExpressionNode) IsPersistent

func (BoundArrayAssignmentExpressionNode) NodeType

func (BoundArrayAssignmentExpressionNode) Print

func (node BoundArrayAssignmentExpressionNode) Print(indent string)

func (BoundArrayAssignmentExpressionNode) Source

func (BoundArrayAssignmentExpressionNode) Type

implement the expression node interface

type BoundAssignmentExpressionNode

type BoundAssignmentExpressionNode struct {
	BoundExpressionNode

	InMain bool

	Variable      symbols.VariableSymbol
	Expression    BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundAssignmentExpressionNode

func CreateBoundAssignmentExpressionNode(variable symbols.VariableSymbol, expression BoundExpressionNode, inMain bool, src nodes.SyntaxNode) BoundAssignmentExpressionNode

func (BoundAssignmentExpressionNode) IsPersistent

func (BoundAssignmentExpressionNode) IsPersistent() bool

func (BoundAssignmentExpressionNode) NodeType

func (BoundAssignmentExpressionNode) Print

func (node BoundAssignmentExpressionNode) Print(indent string)

func (BoundAssignmentExpressionNode) Source

func (BoundAssignmentExpressionNode) Type

implement the expression node interface

type BoundBinaryExpressionNode

type BoundBinaryExpressionNode struct {
	BoundExpressionNode

	Left          BoundExpressionNode
	Op            BoundBinaryOperator
	Right         BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func (BoundBinaryExpressionNode) IsPersistent

func (BoundBinaryExpressionNode) IsPersistent() bool

func (BoundBinaryExpressionNode) NodeType

func (BoundBinaryExpressionNode) Print

func (node BoundBinaryExpressionNode) Print(indent string)

func (BoundBinaryExpressionNode) Source

func (BoundBinaryExpressionNode) Type

implement the expression node interface

type BoundBinaryOperator

type BoundBinaryOperator struct {
	Exists bool

	TokenKind    lexer.TokenKind
	OperatorKind BoundBinaryOperatorType
	LeftType     symbols.TypeSymbol
	RightType    symbols.TypeSymbol
	ResultType   symbols.TypeSymbol
}

func BindBinaryOperator

func BindBinaryOperator(tokenKind lexer.TokenKind, leftType symbols.TypeSymbol, rightType symbols.TypeSymbol) BoundBinaryOperator

func CreateBoundBinaryOperator

func CreateBoundBinaryOperator(tok lexer.TokenKind, kind BoundBinaryOperatorType, left symbols.TypeSymbol, right symbols.TypeSymbol, result symbols.TypeSymbol) BoundBinaryOperator

constructors

func CreateBoundBinaryOperatorAllSame

func CreateBoundBinaryOperatorAllSame(tok lexer.TokenKind, kind BoundBinaryOperatorType, datatype symbols.TypeSymbol) BoundBinaryOperator

type BoundBinaryOperatorType

type BoundBinaryOperatorType string
const (
	Addition        BoundBinaryOperatorType = "Addition"
	Subtraction     BoundBinaryOperatorType = "Subtraction"
	Multiplication  BoundBinaryOperatorType = "Multiplication"
	Division        BoundBinaryOperatorType = "Division"
	Modulus         BoundBinaryOperatorType = "Modulus"
	LogicalAnd      BoundBinaryOperatorType = "LogicalAnd"
	LogicalOr       BoundBinaryOperatorType = "LogicalOr"
	BitwiseAnd      BoundBinaryOperatorType = "BitwiseAnd"
	BitwiseOr       BoundBinaryOperatorType = "BitwiseOr"
	BitwiseXor      BoundBinaryOperatorType = "BitwiseXor"
	Equals          BoundBinaryOperatorType = "Equals"
	NotEquals       BoundBinaryOperatorType = "NotEquals"
	Less            BoundBinaryOperatorType = "LessThan"
	LessOrEquals    BoundBinaryOperatorType = "LessOrEquals"
	Greater         BoundBinaryOperatorType = "GreaterThan"
	GreaterOrEquals BoundBinaryOperatorType = "GreaterOrEquals"
	BitshiftLeft    BoundBinaryOperatorType = "BitshiftLeft"
	BitshiftRight   BoundBinaryOperatorType = "BitshiftRight"
)

type BoundBlockStatementNode

type BoundBlockStatementNode struct {
	BoundStatementNode

	Statements    []BoundStatementNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundBlockStatementNode

func CreateBoundBlockStatementNode(stmts []BoundStatementNode, src nodes.SyntaxNode) BoundBlockStatementNode

constructor

func (BoundBlockStatementNode) NodeType

implement the interface

func (BoundBlockStatementNode) Print

func (node BoundBlockStatementNode) Print(indent string)

func (BoundBlockStatementNode) Source

type BoundCallExpressionNode

type BoundCallExpressionNode struct {
	BoundExpressionNode

	InMain bool

	Function      symbols.FunctionSymbol
	Arguments     []BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundCallExpressionNode

func CreateBoundCallExpressionNode(function symbols.FunctionSymbol, args []BoundExpressionNode, inMain bool, src nodes.SyntaxNode) BoundCallExpressionNode

func (BoundCallExpressionNode) IsPersistent

func (BoundCallExpressionNode) IsPersistent() bool

func (BoundCallExpressionNode) NodeType

func (BoundCallExpressionNode) Print

func (node BoundCallExpressionNode) Print(indent string)

func (BoundCallExpressionNode) Source

func (BoundCallExpressionNode) Type

implement the expression node interface

type BoundClassCallExpressionNode

type BoundClassCallExpressionNode struct {
	BoundExpressionNode

	Base      BoundExpressionNode
	Function  symbols.FunctionSymbol
	Arguments []BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundClassCallExpressionNode

func CreateBoundClassCallExpressionNode(
	base BoundExpressionNode,
	callId symbols.FunctionSymbol,
	args []BoundExpressionNode,
	src nodes.SyntaxNode,
) BoundClassCallExpressionNode

"constructor" / ooga booga OOP cave man brain

func (BoundClassCallExpressionNode) IsPersistent

func (BoundClassCallExpressionNode) IsPersistent() bool

func (BoundClassCallExpressionNode) NodeType

implement node type from interface

func (BoundClassCallExpressionNode) Print

func (node BoundClassCallExpressionNode) Print(indent string)

node print function

func (BoundClassCallExpressionNode) Source

func (BoundClassCallExpressionNode) Type

implement the expression node interface

type BoundClassFieldAccessExpressionNode

type BoundClassFieldAccessExpressionNode struct {
	BoundExpressionNode

	Base          BoundExpressionNode
	Field         symbols.VariableSymbol
	UnboundSource nodes.SyntaxNode
}

func CreateBoundClassFieldAccessExpressionNode

func CreateBoundClassFieldAccessExpressionNode(base BoundExpressionNode, field symbols.VariableSymbol, src nodes.SyntaxNode) BoundClassFieldAccessExpressionNode

"constructor" / ooga booga OOP cave man brain

func (BoundClassFieldAccessExpressionNode) IsPersistent

func (BoundClassFieldAccessExpressionNode) NodeType

implement node type from interface

func (BoundClassFieldAccessExpressionNode) Print

func (node BoundClassFieldAccessExpressionNode) Print(indent string)

node print function

func (BoundClassFieldAccessExpressionNode) Source

func (BoundClassFieldAccessExpressionNode) Type

implement the expression node interface

type BoundClassFieldAssignmentExpressionNode

type BoundClassFieldAssignmentExpressionNode struct {
	BoundExpressionNode

	Base  BoundExpressionNode
	Field symbols.VariableSymbol
	Value BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundClassFieldAssignmentExpressionNode

func CreateBoundClassFieldAssignmentExpressionNode(base BoundExpressionNode, field symbols.VariableSymbol, value BoundExpressionNode, src nodes.SyntaxNode) BoundClassFieldAssignmentExpressionNode

"constructor" / ooga booga OOP cave man brain

func (BoundClassFieldAssignmentExpressionNode) IsPersistent

func (BoundClassFieldAssignmentExpressionNode) NodeType

implement node type from interface

func (BoundClassFieldAssignmentExpressionNode) Print

node print function

func (BoundClassFieldAssignmentExpressionNode) Source

func (BoundClassFieldAssignmentExpressionNode) Type

implement the expression node interface

type BoundConditionalGotoStatementNode

type BoundConditionalGotoStatementNode struct {
	BoundStatementNode

	Condition BoundExpressionNode
	IfLabel   BoundLabel
	ElseLabel BoundLabel

	UnboundSource nodes.SyntaxNode
}

func CreateBoundConditionalGotoStatementNode

func CreateBoundConditionalGotoStatementNode(condition BoundExpressionNode, ifLabel BoundLabel, elseLabel BoundLabel, src nodes.SyntaxNode) BoundConditionalGotoStatementNode

constructor

func (BoundConditionalGotoStatementNode) NodeType

implement the interface

func (BoundConditionalGotoStatementNode) Print

func (node BoundConditionalGotoStatementNode) Print(indent string)

func (BoundConditionalGotoStatementNode) Source

type BoundConversionExpressionNode

type BoundConversionExpressionNode struct {
	BoundExpressionNode

	Expression    BoundExpressionNode
	ToType        symbols.TypeSymbol
	UnboundSource nodes.SyntaxNode
}

func CreateBoundConversionExpressionNode

func CreateBoundConversionExpressionNode(_type symbols.TypeSymbol, expression BoundExpressionNode, src nodes.SyntaxNode) BoundConversionExpressionNode

func (BoundConversionExpressionNode) IsPersistent

func (node BoundConversionExpressionNode) IsPersistent() bool

func (BoundConversionExpressionNode) NodeType

func (BoundConversionExpressionNode) Print

func (node BoundConversionExpressionNode) Print(indent string)

func (BoundConversionExpressionNode) Source

func (BoundConversionExpressionNode) Type

implement the expression node interface

type BoundDereferenceExpressionNode

type BoundDereferenceExpressionNode struct {
	BoundExpressionNode

	Expression    BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundDereferenceExpressionNode

func CreateBoundDereferenceExpressionNode(expression BoundExpressionNode, src nodes.SyntaxNode) BoundDereferenceExpressionNode

func (BoundDereferenceExpressionNode) IsPersistent

func (node BoundDereferenceExpressionNode) IsPersistent() bool

func (BoundDereferenceExpressionNode) NodeType

func (BoundDereferenceExpressionNode) Print

func (node BoundDereferenceExpressionNode) Print(indent string)

func (BoundDereferenceExpressionNode) Source

func (BoundDereferenceExpressionNode) Type

implement the expression node interface

type BoundEnumExpressionNode

type BoundEnumExpressionNode struct {
	BoundExpressionNode

	Value         int
	Enum          symbols.EnumSymbol
	UnboundSource nodes.SyntaxNode
}

basic global statement member

func CreateBoundEnumExpressionNode

func CreateBoundEnumExpressionNode(val int, enm symbols.EnumSymbol, src nodes.SyntaxNode) BoundEnumExpressionNode

Doubt this is right

func (BoundEnumExpressionNode) IsPersistent

func (BoundEnumExpressionNode) IsPersistent() bool

func (BoundEnumExpressionNode) NodeType

implement node type from interface

func (BoundEnumExpressionNode) Print

func (node BoundEnumExpressionNode) Print(indent string)

node print function

func (BoundEnumExpressionNode) Source

func (BoundEnumExpressionNode) Type

implement the expression node interface

type BoundErrorExpressionNode

type BoundErrorExpressionNode struct {
	BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundErrorExpressionNode

func CreateBoundErrorExpressionNode(src nodes.SyntaxNode) BoundErrorExpressionNode

func (BoundErrorExpressionNode) IsPersistent

func (BoundErrorExpressionNode) IsPersistent() bool

func (BoundErrorExpressionNode) NodeType

func (BoundErrorExpressionNode) Print

func (node BoundErrorExpressionNode) Print(indent string)

func (BoundErrorExpressionNode) Source

func (BoundErrorExpressionNode) Type

implement the expression node interface

type BoundExpressionNode

type BoundExpressionNode interface {
	BoundNode
	Type() symbols.TypeSymbol
	IsPersistent() bool
}

type BoundExpressionStatementNode

type BoundExpressionStatementNode struct {
	BoundStatementNode

	Expression    BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundExpressionStatementNode

func CreateBoundExpressionStatementNode(expr BoundExpressionNode, src nodes.SyntaxNode) BoundExpressionStatementNode

constructor

func (BoundExpressionStatementNode) NodeType

implement the interface

func (BoundExpressionStatementNode) Print

func (node BoundExpressionStatementNode) Print(indent string)

func (BoundExpressionStatementNode) Source

type BoundForStatementNode

type BoundForStatementNode struct {
	BoundLoopStatementNode

	Variable  BoundVariableDeclarationStatementNode
	Condition BoundExpressionNode
	Action    BoundStatementNode

	Body          BoundStatementNode
	BreakLabel    BoundLabel
	ContinueLabel BoundLabel

	UnboundSource nodes.SyntaxNode
}

func CreateBoundForStatementNode

func CreateBoundForStatementNode(variable BoundVariableDeclarationStatementNode, cond BoundExpressionNode, action BoundStatementNode, body BoundStatementNode, breakLabel BoundLabel, continueLabel BoundLabel, src nodes.SyntaxNode) BoundForStatementNode

constructor

func (BoundForStatementNode) LoopBreakLabel

func (node BoundForStatementNode) LoopBreakLabel() BoundLabel

func (BoundForStatementNode) LoopContinueLabel

func (node BoundForStatementNode) LoopContinueLabel() BoundLabel

func (BoundForStatementNode) NodeType

func (BoundForStatementNode) NodeType() BoundType

implement the interface

func (BoundForStatementNode) Print

func (node BoundForStatementNode) Print(indent string)

func (BoundForStatementNode) Source

func (node BoundForStatementNode) Source() nodes.SyntaxNode

type BoundFromToStatementNode

type BoundFromToStatementNode struct {
	BoundLoopStatementNode

	Variable      symbols.VariableSymbol
	LowerBound    BoundExpressionNode
	UpperBound    BoundExpressionNode
	Body          BoundStatementNode
	BreakLabel    BoundLabel
	ContinueLabel BoundLabel

	UnboundSource nodes.SyntaxNode
}

func CreateBoundFromToStatementNode

func CreateBoundFromToStatementNode(variable symbols.VariableSymbol, lower BoundExpressionNode, upper BoundExpressionNode, body BoundStatementNode, breakLabel BoundLabel, continueLabel BoundLabel, src nodes.SyntaxNode) BoundFromToStatementNode

constructor

func (BoundFromToStatementNode) LoopBreakLabel

func (node BoundFromToStatementNode) LoopBreakLabel() BoundLabel

func (BoundFromToStatementNode) LoopContinueLabel

func (node BoundFromToStatementNode) LoopContinueLabel() BoundLabel

func (BoundFromToStatementNode) NodeType

implement the interface

func (BoundFromToStatementNode) Print

func (node BoundFromToStatementNode) Print(indent string)

func (BoundFromToStatementNode) Source

type BoundFunctionExpressionNode

type BoundFunctionExpressionNode struct {
	BoundExpressionNode

	InClass       symbols.ClassSymbol
	Function      symbols.FunctionSymbol
	UnboundSource nodes.SyntaxNode
}

func CreateBoundFunctionExpressionNode

func CreateBoundFunctionExpressionNode(function symbols.FunctionSymbol, src nodes.SyntaxNode) BoundFunctionExpressionNode

func CreateBoundFunctionInClassExpressionNode

func CreateBoundFunctionInClassExpressionNode(function symbols.FunctionSymbol, class symbols.ClassSymbol, src nodes.SyntaxNode) BoundFunctionExpressionNode

func (BoundFunctionExpressionNode) IsPersistent

func (BoundFunctionExpressionNode) IsPersistent() bool

func (BoundFunctionExpressionNode) NodeType

func (BoundFunctionExpressionNode) Print

func (node BoundFunctionExpressionNode) Print(indent string)

func (BoundFunctionExpressionNode) Source

func (BoundFunctionExpressionNode) Type

implement the expression node interface

type BoundGotoStatementNode

type BoundGotoStatementNode struct {
	BoundStatementNode

	Label         BoundLabel
	UnboundSource nodes.SyntaxNode
}

func CreateBoundGotoStatementNode

func CreateBoundGotoStatementNode(label BoundLabel, src nodes.SyntaxNode) BoundGotoStatementNode

constructor

func (BoundGotoStatementNode) NodeType

func (BoundGotoStatementNode) NodeType() BoundType

implement the interface

func (BoundGotoStatementNode) Print

func (node BoundGotoStatementNode) Print(indent string)

func (BoundGotoStatementNode) Source

func (node BoundGotoStatementNode) Source() nodes.SyntaxNode

type BoundIfStatementNode

type BoundIfStatementNode struct {
	BoundStatementNode

	Condition     BoundExpressionNode
	ThenStatement BoundStatementNode
	ElseStatement BoundStatementNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundIfStatementNode

func CreateBoundIfStatementNode(cond BoundExpressionNode, thenStmt BoundStatementNode, elseStmt BoundStatementNode, src nodes.SyntaxNode) BoundIfStatementNode

constructor

func (BoundIfStatementNode) NodeType

func (BoundIfStatementNode) NodeType() BoundType

implement the interface

func (BoundIfStatementNode) Print

func (node BoundIfStatementNode) Print(indent string)

func (BoundIfStatementNode) Source

func (node BoundIfStatementNode) Source() nodes.SyntaxNode

type BoundInternalValueExpressionNode

type BoundInternalValueExpressionNode struct {
	BoundExpressionNode

	Value     value.Value
	ValueType symbols.TypeSymbol
}

basic global statement member

func CreateBoundInternalValueExpressionNode

func CreateBoundInternalValueExpressionNode(val value.Value, typ symbols.TypeSymbol) BoundInternalValueExpressionNode

Doubt this is right

func (BoundInternalValueExpressionNode) IsPersistent

func (BoundInternalValueExpressionNode) IsPersistent() bool

func (BoundInternalValueExpressionNode) NodeType

implement node type from interface

func (BoundInternalValueExpressionNode) Print

func (node BoundInternalValueExpressionNode) Print(indent string)

node print function

func (BoundInternalValueExpressionNode) Source

func (BoundInternalValueExpressionNode) Type

implement the expression node interface

type BoundLabel

type BoundLabel string

type BoundLabelStatementNode

type BoundLabelStatementNode struct {
	BoundStatementNode

	Label         BoundLabel
	UnboundSource nodes.SyntaxNode
}

func CreateBoundLabelStatementNode

func CreateBoundLabelStatementNode(label BoundLabel, src nodes.SyntaxNode) BoundLabelStatementNode

constructor

func (BoundLabelStatementNode) NodeType

implement the interface

func (BoundLabelStatementNode) Print

func (node BoundLabelStatementNode) Print(indent string)

func (BoundLabelStatementNode) Source

type BoundLambdaExpressionNode

type BoundLambdaExpressionNode struct {
	BoundExpressionNode

	Function      symbols.FunctionSymbol
	Body          BoundBlockStatementNode
	UnboundSource nodes.SyntaxNode
}

func (BoundLambdaExpressionNode) IsPersistent

func (BoundLambdaExpressionNode) IsPersistent() bool

func (BoundLambdaExpressionNode) NodeType

func (BoundLambdaExpressionNode) Print

func (node BoundLambdaExpressionNode) Print(indent string)

func (BoundLambdaExpressionNode) Source

func (BoundLambdaExpressionNode) Type

implement the expression node interface

type BoundLiteralExpressionNode

type BoundLiteralExpressionNode struct {
	BoundExpressionNode

	Value         interface{}
	LiteralType   symbols.TypeSymbol
	UnboundSource nodes.SyntaxNode
}

basic global statement member

func CreateBoundLiteralExpressionNode

func CreateBoundLiteralExpressionNode(expr nodes.LiteralExpressionNode, src nodes.SyntaxNode) BoundLiteralExpressionNode

Doubt this is right

func CreateBoundLiteralExpressionNodeFromValue

func CreateBoundLiteralExpressionNodeFromValue(value interface{}, src nodes.SyntaxNode) BoundLiteralExpressionNode

func (BoundLiteralExpressionNode) IsPersistent

func (BoundLiteralExpressionNode) IsPersistent() bool

func (BoundLiteralExpressionNode) NodeType

implement node type from interface

func (BoundLiteralExpressionNode) Print

func (node BoundLiteralExpressionNode) Print(indent string)

node print function

func (BoundLiteralExpressionNode) Source

func (BoundLiteralExpressionNode) Type

implement the expression node interface

type BoundLoopStatementNode

type BoundLoopStatementNode interface {
	BoundStatementNode
	LoopBreakLabel() BoundLabel
	LoopContinueLabel() BoundLabel
}

type BoundMakeArrayExpressionNode

type BoundMakeArrayExpressionNode struct {
	BoundExpressionNode

	IsLiteral bool
	BaseType  symbols.TypeSymbol
	Length    BoundExpressionNode
	Literals  []BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundMakeArrayExpressionNode

func CreateBoundMakeArrayExpressionNode(baseType symbols.TypeSymbol, length BoundExpressionNode, src nodes.SyntaxNode) BoundMakeArrayExpressionNode

func CreateBoundMakeArrayExpressionNodeLiteral

func CreateBoundMakeArrayExpressionNodeLiteral(baseType symbols.TypeSymbol, literals []BoundExpressionNode, src nodes.SyntaxNode) BoundMakeArrayExpressionNode

func (BoundMakeArrayExpressionNode) IsPersistent

func (BoundMakeArrayExpressionNode) IsPersistent() bool

func (BoundMakeArrayExpressionNode) NodeType

func (BoundMakeArrayExpressionNode) Print

func (node BoundMakeArrayExpressionNode) Print(indent string)

func (BoundMakeArrayExpressionNode) Source

func (BoundMakeArrayExpressionNode) Type

implement the expression node interface

type BoundMakeExpressionNode

type BoundMakeExpressionNode struct {
	BoundExpressionNode

	BaseType  symbols.ClassSymbol
	Arguments []BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundMakeExpressionNode

func CreateBoundMakeExpressionNode(baseType symbols.ClassSymbol, args []BoundExpressionNode, src nodes.SyntaxNode) BoundMakeExpressionNode

func (BoundMakeExpressionNode) IsPersistent

func (BoundMakeExpressionNode) IsPersistent() bool

func (BoundMakeExpressionNode) NodeType

func (BoundMakeExpressionNode) Print

func (node BoundMakeExpressionNode) Print(indent string)

func (BoundMakeExpressionNode) Source

func (BoundMakeExpressionNode) Type

implement the expression node interface

type BoundMakeStructExpressionNode

type BoundMakeStructExpressionNode struct {
	BoundExpressionNode

	StructType symbols.TypeSymbol
	Literals   []BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundMakeStructExpressionNode

func CreateBoundMakeStructExpressionNode(structType symbols.TypeSymbol, literals []BoundExpressionNode, src nodes.SyntaxNode) BoundMakeStructExpressionNode

func (BoundMakeStructExpressionNode) IsPersistent

func (BoundMakeStructExpressionNode) IsPersistent() bool

func (BoundMakeStructExpressionNode) NodeType

func (BoundMakeStructExpressionNode) Print

func (node BoundMakeStructExpressionNode) Print(indent string)

func (BoundMakeStructExpressionNode) Source

func (BoundMakeStructExpressionNode) Type

implement the expression node interface

type BoundNode

type BoundNode interface {
	NodeType() BoundType
	Print(indent string)
	Source() nodes.SyntaxNode
}

incredibly cool interface for creating bound nodes

type BoundPackageCallExpressionNode

type BoundPackageCallExpressionNode struct {
	BoundExpressionNode

	Package   symbols.PackageSymbol
	Function  symbols.FunctionSymbol
	Arguments []BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func (BoundPackageCallExpressionNode) IsPersistent

func (BoundPackageCallExpressionNode) IsPersistent() bool

func (BoundPackageCallExpressionNode) NodeType

func (BoundPackageCallExpressionNode) Print

func (node BoundPackageCallExpressionNode) Print(indent string)

func (BoundPackageCallExpressionNode) Source

func (BoundPackageCallExpressionNode) Type

implement the expression node interface

type BoundReferenceExpressionNode

type BoundReferenceExpressionNode struct {
	BoundExpressionNode

	Expression    BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundReferenceExpressionNode

func CreateBoundReferenceExpressionNode(expression BoundExpressionNode, src nodes.SyntaxNode) BoundReferenceExpressionNode

func (BoundReferenceExpressionNode) IsPersistent

func (node BoundReferenceExpressionNode) IsPersistent() bool

func (BoundReferenceExpressionNode) NodeType

func (BoundReferenceExpressionNode) Print

func (node BoundReferenceExpressionNode) Print(indent string)

func (BoundReferenceExpressionNode) Source

func (BoundReferenceExpressionNode) Type

implement the expression node interface

type BoundReturnStatementNode

type BoundReturnStatementNode struct {
	BoundStatementNode

	Expression    BoundExpressionNode
	UnboundSource nodes.SyntaxNode
}

func CreateBoundReturnStatementNode

func CreateBoundReturnStatementNode(expr BoundExpressionNode, src nodes.SyntaxNode) BoundReturnStatementNode

constructor

func (BoundReturnStatementNode) NodeType

implement the interface

func (BoundReturnStatementNode) Print

func (node BoundReturnStatementNode) Print(indent string)

func (BoundReturnStatementNode) Source

type BoundStatementNode

type BoundStatementNode interface {
	BoundNode
}

type BoundTernaryExpressionNode

type BoundTernaryExpressionNode struct {
	BoundExpressionNode

	Condition BoundExpressionNode
	If        BoundExpressionNode
	Else      BoundExpressionNode
	Tmp       symbols.LocalVariableSymbol

	IfLabel   BoundLabel
	ElseLabel BoundLabel
	EndLabel  BoundLabel

	UnboundSource nodes.SyntaxNode
}

func (BoundTernaryExpressionNode) IsPersistent

func (node BoundTernaryExpressionNode) IsPersistent() bool

func (BoundTernaryExpressionNode) NodeType

func (BoundTernaryExpressionNode) Print

func (node BoundTernaryExpressionNode) Print(indent string)

func (BoundTernaryExpressionNode) Source

func (BoundTernaryExpressionNode) Type

implement the expression node interface

type BoundThisExpressionNode

type BoundThisExpressionNode struct {
	BoundExpressionNode

	Class         symbols.ClassSymbol
	UnboundSource nodes.SyntaxNode
}

func CreateBoundThisExpressionNode

func CreateBoundThisExpressionNode(class symbols.ClassSymbol, src nodes.SyntaxNode) BoundThisExpressionNode

func (BoundThisExpressionNode) IsPersistent

func (BoundThisExpressionNode) IsPersistent() bool

func (BoundThisExpressionNode) NodeType

func (BoundThisExpressionNode) Print

func (node BoundThisExpressionNode) Print(indent string)

func (BoundThisExpressionNode) Source

func (BoundThisExpressionNode) Type

implement the expression node interface

type BoundType

type BoundType string

enum for all our node types

const (

	// Statements
	BoundBlockStatement           BoundType = "BoundBlockStatement"
	BoundVariableDeclaration      BoundType = "BoundVariableDeclaration"
	BoundIfStatement              BoundType = "BoundIfStatement"
	BoundWhileStatement           BoundType = "BoundWhileStatement"
	BoundForStatement             BoundType = "BoundForStatement"
	BoundFromToStatement          BoundType = "BoundFromToStatement"
	BoundLabelStatement           BoundType = "BoundLabelStatement"
	BoundGotoStatement            BoundType = "BoundGotoStatement"
	BoundConditionalGotoStatement BoundType = "BoundConditionalGotoStatement"
	BoundReturnStatement          BoundType = "BoundReturnStatement"
	BoundExpressionStatement      BoundType = "BoundExpressionStatement"

	// Expressions
	BoundErrorExpression                BoundType = "BoundErrorExpression"
	BoundLiteralExpression              BoundType = "BoundLiteralExpression"
	BoundVariableExpression             BoundType = "BoundVariableExpression"
	BoundAssignmentExpression           BoundType = "BoundAssignmentExpression"
	BoundUnaryExpression                BoundType = "BoundUnaryExpression"
	BoundBinaryExpression               BoundType = "BoundBinaryExpression"
	BoundCallExpression                 BoundType = "BoundCallExpression"
	BoundPackageCallExpression          BoundType = "BoundPackageCallExpression"
	BoundConversionExpression           BoundType = "BoundConversionExpression"
	BoundTypeCallExpression             BoundType = "BoundTypeCallExpression"
	BoundClassCallExpression            BoundType = "BoundClassCallExpression"
	BoundClassFieldAccessExpression     BoundType = "BoundClassFieldAccessExpression"
	BoundClassFieldAssignmentExpression BoundType = "BoundClassFieldAssignmentExpression"
	BoundArrayAccessExpression          BoundType = "BoundArrayAccessExpression"
	BoundArrayAssignmentExpression      BoundType = "BoundArrayAssignmentExpression"
	BoundMakeExpression                 BoundType = "BoundMakeExpression"
	BoundMakeArrayExpression            BoundType = "BoundMakeArrayExpression"
	BoundFunctionExpression             BoundType = "BoundFunctionExpression"
	BoundTernaryExpression              BoundType = "BoundTernaryExpression"
	BoundReferenceExpression            BoundType = "BoundReferenceExpression"
	BoundDereferenceExpression          BoundType = "BoundDereferenceExpression"
	BoundMakeStructExpression           BoundType = "BoundMakeStructExpression"
	BoundLambdaExpression               BoundType = "BoundLambdaExpression"
	BoundThisExpression                 BoundType = "BoundThisExpression"
	BoundInternalValueExpression        BoundType = "BoundInternalValueExpression"
	BoundEnumExpression                 BoundType = "BoundEnumExpression"
)

type BoundTypeCallExpressionNode

type BoundTypeCallExpressionNode struct {
	BoundExpressionNode

	Base      BoundExpressionNode
	Function  symbols.TypeFunctionSymbol
	Arguments []BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundTypeCallExpressionNode

func CreateBoundTypeCallExpressionNode(
	base BoundExpressionNode,
	callId symbols.TypeFunctionSymbol,
	args []BoundExpressionNode,
	src nodes.SyntaxNode,
) BoundTypeCallExpressionNode

"constructor" / ooga booga OOP cave man brain

func (BoundTypeCallExpressionNode) IsPersistent

func (BoundTypeCallExpressionNode) IsPersistent() bool

func (BoundTypeCallExpressionNode) NodeType

implement node type from interface

func (BoundTypeCallExpressionNode) Print

func (node BoundTypeCallExpressionNode) Print(indent string)

node print function

func (BoundTypeCallExpressionNode) Source

func (BoundTypeCallExpressionNode) Type

implement the expression node interface

type BoundUnaryExpressionNode

type BoundUnaryExpressionNode struct {
	BoundExpressionNode

	Op         BoundUnaryOperator
	Expression BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func (BoundUnaryExpressionNode) IsPersistent

func (BoundUnaryExpressionNode) IsPersistent() bool

func (BoundUnaryExpressionNode) NodeType

func (BoundUnaryExpressionNode) Print

func (node BoundUnaryExpressionNode) Print(indent string)

func (BoundUnaryExpressionNode) Source

func (BoundUnaryExpressionNode) Type

implement the expression node interface

type BoundUnaryOperator

type BoundUnaryOperator struct {
	Exists bool

	TokenKind    lexer.TokenKind
	OperatorKind BoundUnaryOperatorType
	OperandType  symbols.TypeSymbol
	ResultType   symbols.TypeSymbol
}

func BindUnaryOperator

func BindUnaryOperator(tokenKind lexer.TokenKind, operandType symbols.TypeSymbol) BoundUnaryOperator

func CreateBoundUnaryOperator

func CreateBoundUnaryOperator(tok lexer.TokenKind, kind BoundUnaryOperatorType, operand symbols.TypeSymbol, result symbols.TypeSymbol) BoundUnaryOperator

constructor

type BoundUnaryOperatorType

type BoundUnaryOperatorType string
const (
	Identity        BoundUnaryOperatorType = "Identity"
	Negation        BoundUnaryOperatorType = "Negation"
	LogicalNegation BoundUnaryOperatorType = "LogicalNegation"
)

type BoundVariableDeclarationStatementNode

type BoundVariableDeclarationStatementNode struct {
	BoundStatementNode

	Variable    symbols.VariableSymbol
	Initializer BoundExpressionNode

	UnboundSource nodes.SyntaxNode
}

func CreateBoundVariableDeclarationStatementNode

func CreateBoundVariableDeclarationStatementNode(variable symbols.VariableSymbol, init BoundExpressionNode, src nodes.SyntaxNode) BoundVariableDeclarationStatementNode

constructor

func (BoundVariableDeclarationStatementNode) NodeType

implement the interface

func (BoundVariableDeclarationStatementNode) Print

func (node BoundVariableDeclarationStatementNode) Print(indent string)

func (BoundVariableDeclarationStatementNode) Source

type BoundVariableExpressionNode

type BoundVariableExpressionNode struct {
	BoundExpressionNode

	InMain        bool
	Variable      symbols.VariableSymbol
	UnboundSource nodes.SyntaxNode
}

func CreateBoundVariableExpressionNode

func CreateBoundVariableExpressionNode(variable symbols.VariableSymbol, inMain bool, src nodes.SyntaxNode) BoundVariableExpressionNode

func (BoundVariableExpressionNode) IsPersistent

func (BoundVariableExpressionNode) IsPersistent() bool

func (BoundVariableExpressionNode) NodeType

func (BoundVariableExpressionNode) Print

func (node BoundVariableExpressionNode) Print(indent string)

func (BoundVariableExpressionNode) Source

func (BoundVariableExpressionNode) Type

implement the expression node interface

type BoundWhileStatementNode

type BoundWhileStatementNode struct {
	BoundLoopStatementNode

	Condition     BoundExpressionNode
	Body          BoundStatementNode
	BreakLabel    BoundLabel
	ContinueLabel BoundLabel

	UnboundSource nodes.SyntaxNode
}

func CreateBoundWhileStatementNode

func CreateBoundWhileStatementNode(cond BoundExpressionNode, body BoundStatementNode, breakLabel BoundLabel, continueLabel BoundLabel, src nodes.SyntaxNode) BoundWhileStatementNode

constructor

func (BoundWhileStatementNode) LoopBreakLabel

func (node BoundWhileStatementNode) LoopBreakLabel() BoundLabel

func (BoundWhileStatementNode) LoopContinueLabel

func (node BoundWhileStatementNode) LoopContinueLabel() BoundLabel

func (BoundWhileStatementNode) NodeType

implement the interface

func (BoundWhileStatementNode) Print

func (node BoundWhileStatementNode) Print(indent string)

func (BoundWhileStatementNode) Source

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL