Documentation ¶
Index ¶
- type ArrayAccessExpressionNode
- type ArrayAssignmentExpressionNode
- type AssignmentExpressionNode
- type BinaryExpressionNode
- type BlockStatementNode
- type BreakStatementNode
- type CallExpressionNode
- type ClassDeclarationMember
- type ClassFieldAccessExpressionNode
- type ClassFieldAssignmentExpressionNode
- type ContinueStatementNode
- type DereferenceExpressionNode
- type ElseClauseNode
- type EnumDeclarationMember
- type ExpressionNode
- type ExpressionStatementNode
- type ExternalFunctionDeclarationMember
- type ForStatementNode
- type FromToStatementNode
- type FunctionDeclarationMember
- type GlobalStatementMember
- type IfStatementNode
- type LambdaExpressionNode
- type LiteralExpressionNode
- type MakeArrayExpressionNode
- type MakeExpressionNode
- type MakeStructExpressionNode
- type MemberNode
- type NameExpressionNode
- type NodeType
- type PackageAliasMember
- type PackageCallExpressionNode
- type PackageReferenceMember
- type PackageUseMember
- type ParameterNode
- type ParenthesisedExpressionNode
- type ReferenceExpressionNode
- type ReturnStatementNode
- type StatementNode
- type StructDeclarationMember
- type SyntaxNode
- type TernaryExpressionNode
- type ThisExpressionNode
- type TypeCallExpressionNode
- type TypeClauseNode
- type UnaryExpressionNode
- type VariableDeclarationStatementNode
- type VariableEditorExpressionNode
- type WhileStatementNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayAccessExpressionNode ¶
type ArrayAccessExpressionNode struct { ExpressionNode Base ExpressionNode Index ExpressionNode ClosingBracket lexer.Token }
func CreateArrayAccessExpressionNode ¶
func CreateArrayAccessExpressionNode(base ExpressionNode, index ExpressionNode) ArrayAccessExpressionNode
"constructor" / ooga booga OOP cave man brain
func (ArrayAccessExpressionNode) NodeType ¶
func (ArrayAccessExpressionNode) NodeType() NodeType
implement node type from interface
func (ArrayAccessExpressionNode) Print ¶
func (node ArrayAccessExpressionNode) Print(indent string)
node print function
func (ArrayAccessExpressionNode) Span ¶
func (node ArrayAccessExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ArrayAssignmentExpressionNode ¶
type ArrayAssignmentExpressionNode struct { ExpressionNode Base ExpressionNode Index ExpressionNode Value ExpressionNode }
func CreateArrayAssignmentExpressionNode ¶
func CreateArrayAssignmentExpressionNode(base ExpressionNode, index ExpressionNode, value ExpressionNode) ArrayAssignmentExpressionNode
"constructor" / ooga booga OOP cave man brain
func (ArrayAssignmentExpressionNode) NodeType ¶
func (ArrayAssignmentExpressionNode) NodeType() NodeType
implement node type from interface
func (ArrayAssignmentExpressionNode) Print ¶
func (node ArrayAssignmentExpressionNode) Print(indent string)
node print function
func (ArrayAssignmentExpressionNode) Span ¶
func (node ArrayAssignmentExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type AssignmentExpressionNode ¶
type AssignmentExpressionNode struct { ExpressionNode InMain bool Identifier lexer.Token Expression ExpressionNode }
func CreateAssignmentExpressionNode ¶
func CreateAssignmentExpressionNode(id lexer.Token, expr ExpressionNode) AssignmentExpressionNode
"constructor" / ooga booga OOP cave man brain
func CreateMainAssignmentExpressionNode ¶
func CreateMainAssignmentExpressionNode(id lexer.Token, expr ExpressionNode) AssignmentExpressionNode
func (AssignmentExpressionNode) NodeType ¶
func (AssignmentExpressionNode) NodeType() NodeType
implement node type from interface
func (AssignmentExpressionNode) Print ¶
func (node AssignmentExpressionNode) Print(indent string)
node print function
func (AssignmentExpressionNode) Span ¶
func (node AssignmentExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type BinaryExpressionNode ¶
type BinaryExpressionNode struct { ExpressionNode Left ExpressionNode Operator lexer.Token Right ExpressionNode }
func CreateBinaryExpressionNode ¶
func CreateBinaryExpressionNode(op lexer.Token, left ExpressionNode, right ExpressionNode) BinaryExpressionNode
"constructor" / ooga booga OOP cave man brain
func (BinaryExpressionNode) NodeType ¶
func (BinaryExpressionNode) NodeType() NodeType
implement node type from interface
func (BinaryExpressionNode) Print ¶
func (node BinaryExpressionNode) Print(indent string)
node print function
func (BinaryExpressionNode) Span ¶
func (node BinaryExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type BlockStatementNode ¶
type BlockStatementNode struct { StatementNode OpenBrace lexer.Token Statements []StatementNode CloseBrace lexer.Token }
basic global statement member
func CreateBlockStatementNode ¶
func CreateBlockStatementNode(openBrace lexer.Token, statements []StatementNode, closeBrace lexer.Token) BlockStatementNode
"constructor" / ooga booga OOP cave man brain
func (BlockStatementNode) NodeType ¶
func (BlockStatementNode) NodeType() NodeType
implement node type from interface
func (BlockStatementNode) Print ¶
func (node BlockStatementNode) Print(indent string)
node print function
func (BlockStatementNode) Span ¶
func (node BlockStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient. BlockStatementNode is a bit weird because it gets the length of all the statements... Oh well, I'm sure nothing wacky can happen from this! - tokorv
type BreakStatementNode ¶
type BreakStatementNode struct { StatementNode Keyword lexer.Token }
ReturnStatementNode like: return "Yo mama"; there, get rect.
func CreateBreakStatement ¶
func CreateBreakStatement(keyword lexer.Token) BreakStatementNode
"constructor" / ooga booga OOP cave man brain - Same -_-
func (BreakStatementNode) NodeType ¶
func (BreakStatementNode) NodeType() NodeType
NodeType Copy + Paste
func (BreakStatementNode) Print ¶
func (node BreakStatementNode) Print(indent string)
Print Prints beautiful stuff in console
func (BreakStatementNode) Span ¶
func (node BreakStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type CallExpressionNode ¶
type CallExpressionNode struct { ExpressionNode InMain bool Identifier lexer.Token Arguments []ExpressionNode CastingType TypeClauseNode // if this call is actually a complex cast ClosingParenthesis lexer.Token }
func CreateCallExpressionNode ¶
func CreateCallExpressionNode(id lexer.Token, args []ExpressionNode, castClause TypeClauseNode, parenthesis lexer.Token) CallExpressionNode
"constructor" / ooga booga OOP cave man brain
func CreateMainCallExpressionNode ¶
func CreateMainCallExpressionNode(id lexer.Token, args []ExpressionNode, castClause TypeClauseNode, parenthesis lexer.Token) CallExpressionNode
func (CallExpressionNode) NodeType ¶
func (CallExpressionNode) NodeType() NodeType
implement node type from interface
func (CallExpressionNode) Print ¶
func (node CallExpressionNode) Print(indent string)
node print function
func (CallExpressionNode) Span ¶
func (node CallExpressionNode) Span() print.TextSpan
type ClassDeclarationMember ¶
type ClassDeclarationMember struct { MemberNode ClassKeyword lexer.Token Identifier lexer.Token Members []MemberNode ClosingToken lexer.Token }
func CreateClassDeclarationMember ¶
func CreateClassDeclarationMember(kw lexer.Token, id lexer.Token, members []MemberNode, closing lexer.Token) ClassDeclarationMember
"constructor" / ooga booga OOP cave man brain
func (ClassDeclarationMember) NodeType ¶
func (ClassDeclarationMember) NodeType() NodeType
implement node type from interface
func (ClassDeclarationMember) Print ¶
func (node ClassDeclarationMember) Print(indent string)
node print function
func (ClassDeclarationMember) Span ¶
func (node ClassDeclarationMember) Span() print.TextSpan
type ClassFieldAccessExpressionNode ¶
type ClassFieldAccessExpressionNode struct { ExpressionNode Base ExpressionNode FieldIdentifier lexer.Token }
func CreateClassFieldAccessExpressionNode ¶
func CreateClassFieldAccessExpressionNode(base ExpressionNode, fieldId lexer.Token) ClassFieldAccessExpressionNode
"constructor" / ooga booga OOP cave man brain
func (ClassFieldAccessExpressionNode) NodeType ¶
func (ClassFieldAccessExpressionNode) NodeType() NodeType
implement node type from interface
func (ClassFieldAccessExpressionNode) Print ¶
func (node ClassFieldAccessExpressionNode) Print(indent string)
node print function
func (ClassFieldAccessExpressionNode) Span ¶
func (node ClassFieldAccessExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ClassFieldAssignmentExpressionNode ¶
type ClassFieldAssignmentExpressionNode struct { ExpressionNode Base ExpressionNode FieldIdentifier lexer.Token Value ExpressionNode }
func CreateClassFieldAssignmentExpressionNode ¶
func CreateClassFieldAssignmentExpressionNode(base ExpressionNode, fieldId lexer.Token, value ExpressionNode) ClassFieldAssignmentExpressionNode
"constructor" / ooga booga OOP cave man brain
func (ClassFieldAssignmentExpressionNode) NodeType ¶
func (ClassFieldAssignmentExpressionNode) NodeType() NodeType
implement node type from interface
func (ClassFieldAssignmentExpressionNode) Print ¶
func (node ClassFieldAssignmentExpressionNode) Print(indent string)
node print function
func (ClassFieldAssignmentExpressionNode) Span ¶
func (node ClassFieldAssignmentExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ContinueStatementNode ¶
type ContinueStatementNode struct { StatementNode Keyword lexer.Token }
ReturnStatementNode like: return "Yo mama"; there, get rect.
func CreateContinueStatement ¶
func CreateContinueStatement(keyword lexer.Token) ContinueStatementNode
"constructor" / ooga booga OOP cave man brain - Same -_-
func (ContinueStatementNode) NodeType ¶
func (ContinueStatementNode) NodeType() NodeType
NodeType Copy + Paste
func (ContinueStatementNode) Print ¶
func (node ContinueStatementNode) Print(indent string)
Print Prints beautiful stuff in console
func (ContinueStatementNode) Span ¶
func (node ContinueStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type DereferenceExpressionNode ¶
type DereferenceExpressionNode struct { ExpressionNode DerefKeyword lexer.Token Expression ExpressionNode }
func CreateDereferenceExpressionNode ¶
func CreateDereferenceExpressionNode(kw lexer.Token, expr ExpressionNode) DereferenceExpressionNode
"constructor" / ooga booga OOP cave man brain
func (DereferenceExpressionNode) NodeType ¶
func (DereferenceExpressionNode) NodeType() NodeType
implement node type from interface
func (DereferenceExpressionNode) Print ¶
func (node DereferenceExpressionNode) Print(indent string)
node print function
func (DereferenceExpressionNode) Span ¶
func (node DereferenceExpressionNode) Span() print.TextSpan
type ElseClauseNode ¶
type ElseClauseNode struct { SyntaxNode ClauseIsSet bool ElseKeyword lexer.Token ElseStatement StatementNode }
basic global statement member
func CreateElseClauseNode ¶
func CreateElseClauseNode(kw lexer.Token, stmt StatementNode) ElseClauseNode
"constructor" / ooga booga OOP cave man brain
func (ElseClauseNode) NodeType ¶
func (ElseClauseNode) NodeType() NodeType
implement node type from interface
func (ElseClauseNode) Span ¶
func (node ElseClauseNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type EnumDeclarationMember ¶
type EnumDeclarationMember struct { MemberNode StructKeyword lexer.Token Identifier lexer.Token Fields map[lexer.Token]*LiteralExpressionNode ClosingToken lexer.Token }
func CreateEnumDeclarationMember ¶
func CreateEnumDeclarationMember(kw lexer.Token, id lexer.Token, fields map[lexer.Token]*LiteralExpressionNode, closing lexer.Token) EnumDeclarationMember
"constructor" / ooga booga OOP cave man brain
func (EnumDeclarationMember) NodeType ¶
func (EnumDeclarationMember) NodeType() NodeType
implement node type from interface
func (EnumDeclarationMember) Print ¶
func (node EnumDeclarationMember) Print(indent string)
node print function
func (EnumDeclarationMember) Span ¶
func (node EnumDeclarationMember) Span() print.TextSpan
type ExpressionNode ¶
type ExpressionNode interface { SyntaxNode }
very cool interface for creating expressions (craaaaazy ikr)
type ExpressionStatementNode ¶
type ExpressionStatementNode struct { StatementNode Expression ExpressionNode }
basic global statement member
func CreateExpressionStatementNode ¶
func CreateExpressionStatementNode(expr ExpressionNode) ExpressionStatementNode
"constructor" / ooga booga OOP cave man brain
func (ExpressionStatementNode) NodeType ¶
func (ExpressionStatementNode) NodeType() NodeType
implement node type from interface
func (ExpressionStatementNode) Print ¶
func (node ExpressionStatementNode) Print(indent string)
node print function
func (ExpressionStatementNode) Span ¶
func (node ExpressionStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ExternalFunctionDeclarationMember ¶
type ExternalFunctionDeclarationMember struct { MemberNode ExternalKeyword lexer.Token Identifier lexer.Token Parameters []ParameterNode ClosingToken lexer.Token TypeClause TypeClauseNode IsVariadic bool IsAdapted bool }
basic global statement member
func CreateExternalFunctionDeclarationMember ¶
func CreateExternalFunctionDeclarationMember(kw lexer.Token, id lexer.Token, params []ParameterNode, typeClause TypeClauseNode, closing lexer.Token, variadic bool, adapted bool) ExternalFunctionDeclarationMember
"constructor" / ooga booga OOP cave man brain
func (ExternalFunctionDeclarationMember) NodeType ¶
func (ExternalFunctionDeclarationMember) NodeType() NodeType
implement node type from interface
func (ExternalFunctionDeclarationMember) Print ¶
func (node ExternalFunctionDeclarationMember) Print(indent string)
node print function
func (ExternalFunctionDeclarationMember) Span ¶
func (node ExternalFunctionDeclarationMember) Span() print.TextSpan
type ForStatementNode ¶
type ForStatementNode struct { StatementNode Keyword lexer.Token Initaliser VariableDeclarationStatementNode Condition ExpressionNode Updation StatementNode Statement StatementNode }
ForStatementNode for(var i = 0; i < 10; i++) Print("Hello");
func CreateForStatementNode ¶
func CreateForStatementNode(keyword lexer.Token, initaliser VariableDeclarationStatementNode, condition ExpressionNode, updation ExpressionNode, statement StatementNode) ForStatementNode
"constructor" / ooga booga OOP cave man brain - Same -_-
func (ForStatementNode) NodeType ¶
func (ForStatementNode) NodeType() NodeType
NodeType Copy + Paste
func (ForStatementNode) Print ¶
func (node ForStatementNode) Print(indent string)
Print Prints beautiful stuff in console
func (ForStatementNode) Span ¶
func (node ForStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient. ForStatementNode we don't do the Statement because it can be super long (i.e., a block statement)
type FromToStatementNode ¶
type FromToStatementNode struct { StatementNode Keyword lexer.Token Identifier lexer.Token LowerBound ExpressionNode UpperBound ExpressionNode Statement StatementNode }
FromToStatementNode joke comments get old after awhile
func CreateFromToStatementNode ¶
func CreateFromToStatementNode(keyword lexer.Token, id lexer.Token, lower ExpressionNode, upper ExpressionNode, statement StatementNode) FromToStatementNode
"constructor" / ooga booga OOP cave man brain - Same -_-
func (FromToStatementNode) NodeType ¶
func (FromToStatementNode) NodeType() NodeType
NodeType Copy + Paste again
func (FromToStatementNode) Print ¶
func (node FromToStatementNode) Print(indent string)
Print Prints beautiful stuff in console
func (FromToStatementNode) Span ¶
func (node FromToStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient. FromToStatementNode we don't do the Statement because it can be super long (i.e., a block statement)
type FunctionDeclarationMember ¶
type FunctionDeclarationMember struct { MemberNode FunctionKeyword lexer.Token Identifier lexer.Token Parameters []ParameterNode TypeClause TypeClauseNode Body BlockStatementNode IsPublic bool }
basic global statement member
func CreateFunctionDeclarationMember ¶
func CreateFunctionDeclarationMember(kw lexer.Token, id lexer.Token, params []ParameterNode, typeClause TypeClauseNode, body BlockStatementNode, public bool) FunctionDeclarationMember
"constructor" / ooga booga OOP cave man brain
func (FunctionDeclarationMember) NodeType ¶
func (FunctionDeclarationMember) NodeType() NodeType
implement node type from interface
func (FunctionDeclarationMember) Print ¶
func (node FunctionDeclarationMember) Print(indent string)
node print function
func (FunctionDeclarationMember) Span ¶
func (node FunctionDeclarationMember) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient. For FunctionDeclarationMember we don't get the length of the body, only the keyword, name, parameters, and type
type GlobalStatementMember ¶
type GlobalStatementMember struct { MemberNode Statement StatementNode }
basic global statement member
func CreateGlobalStatementMember ¶
func CreateGlobalStatementMember(stmt StatementNode) GlobalStatementMember
"constructor" / ooga booga OOP cave man brain
func (GlobalStatementMember) NodeType ¶
func (GlobalStatementMember) NodeType() NodeType
implement node type from interface
func (GlobalStatementMember) Print ¶
func (node GlobalStatementMember) Print(indent string)
node print function
func (GlobalStatementMember) Span ¶
func (node GlobalStatementMember) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type IfStatementNode ¶
type IfStatementNode struct { StatementNode IfKeyword lexer.Token Condition ExpressionNode ThenStatement StatementNode ElseClause ElseClauseNode }
basic global statement member
func CreateIfStatementNode ¶
func CreateIfStatementNode(kw lexer.Token, cond ExpressionNode, then StatementNode, elseClause ElseClauseNode) IfStatementNode
"constructor" / ooga booga OOP cave man brain
func (IfStatementNode) NodeType ¶
func (IfStatementNode) NodeType() NodeType
implement node type from interface
func (IfStatementNode) Span ¶
func (node IfStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient. IfStatementNode we don't do the Statement because it can be super long (i.e., a block statement)
type LambdaExpressionNode ¶
type LambdaExpressionNode struct { ExpressionNode LambdaKeyword lexer.Token Parameters []ParameterNode TypeClause TypeClauseNode Body BlockStatementNode }
basic global statement member
func CreateLambdaExpressionNode ¶
func CreateLambdaExpressionNode(kw lexer.Token, params []ParameterNode, typeClause TypeClauseNode, body BlockStatementNode) LambdaExpressionNode
"constructor" / ooga booga OOP cave man brain
func (LambdaExpressionNode) NodeType ¶
func (LambdaExpressionNode) NodeType() NodeType
implement node type from interface
func (LambdaExpressionNode) Print ¶
func (node LambdaExpressionNode) Print(indent string)
node print function
func (LambdaExpressionNode) Span ¶
func (node LambdaExpressionNode) Span() print.TextSpan
type LiteralExpressionNode ¶
type LiteralExpressionNode struct { ExpressionNode LiteralToken lexer.Token LiteralValue interface{} IsNative bool }
basic global statement member
func CreateLiteralExpressionNode ¶
func CreateLiteralExpressionNode(tok lexer.Token) LiteralExpressionNode
"constructor" / ooga booga OOP cave man brain
func CreateNativeLiteralExpressionNode ¶
func CreateNativeLiteralExpressionNode(tok lexer.Token) LiteralExpressionNode
func (LiteralExpressionNode) NodeType ¶
func (LiteralExpressionNode) NodeType() NodeType
implement node type from interface
func (LiteralExpressionNode) Print ¶
func (node LiteralExpressionNode) Print(indent string)
node print function
func (LiteralExpressionNode) Span ¶
func (node LiteralExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type MakeArrayExpressionNode ¶
type MakeArrayExpressionNode struct { ExpressionNode IsLiteral bool MakeKeyword lexer.Token ClosingToken lexer.Token Type TypeClauseNode Length ExpressionNode LiteralValues []ExpressionNode }
func CreateMakeArrayExpressionNode ¶
func CreateMakeArrayExpressionNode(typ TypeClauseNode, length ExpressionNode, makeKw lexer.Token, closing lexer.Token) MakeArrayExpressionNode
"constructor" / ooga booga OOP cave man brain
func CreateMakeArrayExpressionNodeLiteral ¶
func CreateMakeArrayExpressionNodeLiteral(typ TypeClauseNode, literals []ExpressionNode, makeKw lexer.Token, closing lexer.Token) MakeArrayExpressionNode
func (MakeArrayExpressionNode) NodeType ¶
func (MakeArrayExpressionNode) NodeType() NodeType
implement node type from interface
func (MakeArrayExpressionNode) Print ¶
func (node MakeArrayExpressionNode) Print(indent string)
node print function
func (MakeArrayExpressionNode) Span ¶
func (node MakeArrayExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type MakeExpressionNode ¶
type MakeExpressionNode struct { ExpressionNode MakeKeyword lexer.Token ClosingToken lexer.Token Package *lexer.Token BaseType lexer.Token Arguments []ExpressionNode }
func CreateMakeExpressionNode ¶
func CreateMakeExpressionNode(pack *lexer.Token, typ lexer.Token, args []ExpressionNode, makeKw lexer.Token, closing lexer.Token) MakeExpressionNode
"constructor" / ooga booga OOP cave man brain
func (MakeExpressionNode) NodeType ¶
func (MakeExpressionNode) NodeType() NodeType
implement node type from interface
func (MakeExpressionNode) Print ¶
func (node MakeExpressionNode) Print(indent string)
node print function
func (MakeExpressionNode) Span ¶
func (node MakeExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type MakeStructExpressionNode ¶
type MakeStructExpressionNode struct { ExpressionNode MakeKeyword lexer.Token ClosingToken lexer.Token Type lexer.Token LiteralValues []ExpressionNode }
func CreateMakeStructExpressionNode ¶
func CreateMakeStructExpressionNode(typ lexer.Token, literals []ExpressionNode, makeKw lexer.Token, closing lexer.Token) MakeStructExpressionNode
"constructor" / ooga booga OOP cave man brain
func (MakeStructExpressionNode) NodeType ¶
func (MakeStructExpressionNode) NodeType() NodeType
implement node type from interface
func (MakeStructExpressionNode) Print ¶
func (node MakeStructExpressionNode) Print(indent string)
node print function
func (MakeStructExpressionNode) Span ¶
func (node MakeStructExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type MemberNode ¶
type MemberNode interface { SyntaxNode }
very cool interface for creating members (again, organisation.)
type NameExpressionNode ¶
type NameExpressionNode struct { ExpressionNode InMain bool Identifier lexer.Token }
aaaaaa, b even
func CreateMainNameExpressionNode ¶
func CreateMainNameExpressionNode(id lexer.Token) NameExpressionNode
func CreateNameExpressionNode ¶
func CreateNameExpressionNode(id lexer.Token) NameExpressionNode
"constructor" / ooga booga OOP cave man brain
func (NameExpressionNode) NodeType ¶
func (NameExpressionNode) NodeType() NodeType
implement node type from interface
func (NameExpressionNode) Print ¶
func (node NameExpressionNode) Print(indent string)
node print function
func (NameExpressionNode) Span ¶
func (node NameExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type NodeType ¶
type NodeType string
cool node type Enum straight up stolen from ReCT v1.0
const ( // Members // ------- GlobalStatement NodeType = "Global Statement" FunctionDeclaration NodeType = "Function Declaration" ExternalFunctionDeclaration NodeType = "External Function Declaration" ClassDeclaration NodeType = "Class Declaration" StructDeclaration NodeType = "Struct Declaration" EnumDeclaration NodeType = "Enum Declaration" PackageReference NodeType = "Package Reference" PackageAlias NodeType = "Package Alias" PackageUse NodeType = "Package Use" // General // ------- Parameter NodeType = "Parameter" TypeClause NodeType = "Type Clause" // Statements // ---------- BlockStatement NodeType = "Block Statement" VariableDeclaration NodeType = "Variable Declaration" IfStatement NodeType = "If Statement" ElseClause NodeType = "Else Clause" ReturnStatement NodeType = "Return Statement" ForStatement NodeType = "For Statement" WhileStatement NodeType = "While Statement" BreakStatement NodeType = "Break Statement" ContinueStatement NodeType = "Continue Statement" FromToStatement NodeType = "FromTo Statement" ExpressionStatement NodeType = "Expression Statement" // Expressions // ----------- LiteralExpression NodeType = "Literal Expression" ParenthesisedExpression NodeType = "Parenthesised Expression" NameExpression NodeType = "Name Expression" AssignmentExpression NodeType = "Assignment Expression" CallExpression NodeType = "Call Expression" PackageCallExpression NodeType = "PackageCall Expression" UnaryExpression NodeType = "Unary Expression" BinaryExpression NodeType = "Binary Expression" VariableEditorExpression NodeType = "VariableEditor Expression" TypeCallExpression NodeType = "TypeCall Expression" ClassFieldAccessExpression NodeType = "ClassFieldAccess Expression" ClassFieldAssignmentExpression NodeType = "ClassFieldAssignment Expression" ArrayAccessExpression NodeType = "ArrayAccess Expression" ArrayAssignmentExpression NodeType = "ArrayAssignment Expression" MakeExpression NodeType = "Make Expression" MakeArrayExpression NodeType = "MakeArray Expression" TernaryExpression NodeType = "Ternary Expression" ReferenceExpression NodeType = "Reference Expression" DereferenceExpression NodeType = "Dereference Expression" MakeStructExpression NodeType = "MakeStruct Expression" LambdaExpression NodeType = "Lambda Expression" ThisExpression NodeType = "This Expression" )
type PackageAliasMember ¶
type PackageAliasMember struct { MemberNode PackageKeyword lexer.Token Package lexer.Token Alias lexer.Token }
basic global statement member
func CreatePackageAliasMember ¶
func CreatePackageAliasMember(kw lexer.Token, pkg lexer.Token, alias lexer.Token) PackageAliasMember
"constructor" / ooga booga OOP cave man brain
func (PackageAliasMember) NodeType ¶
func (PackageAliasMember) NodeType() NodeType
implement node type from interface
func (PackageAliasMember) Print ¶
func (node PackageAliasMember) Print(indent string)
node print function
func (PackageAliasMember) Span ¶
func (node PackageAliasMember) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type PackageCallExpressionNode ¶
type PackageCallExpressionNode struct { ExpressionNode Package lexer.Token Identifier lexer.Token Arguments []ExpressionNode ClosingToken lexer.Token }
func CreatePackageCallExpressionNode ¶
func CreatePackageCallExpressionNode(pck lexer.Token, id lexer.Token, args []ExpressionNode, closing lexer.Token) PackageCallExpressionNode
"constructor" / ooga booga OOP cave man brain
func (PackageCallExpressionNode) NodeType ¶
func (PackageCallExpressionNode) NodeType() NodeType
implement node type from interface
func (PackageCallExpressionNode) Print ¶
func (node PackageCallExpressionNode) Print(indent string)
node print function
func (PackageCallExpressionNode) Span ¶
func (node PackageCallExpressionNode) Span() print.TextSpan
type PackageReferenceMember ¶
type PackageReferenceMember struct { MemberNode PackageKeyword lexer.Token Package lexer.Token }
basic global statement member
func CreatePackageReferenceMember ¶
func CreatePackageReferenceMember(kw lexer.Token, pkg lexer.Token) PackageReferenceMember
"constructor" / ooga booga OOP cave man brain
func (PackageReferenceMember) NodeType ¶
func (PackageReferenceMember) NodeType() NodeType
implement node type from interface
func (PackageReferenceMember) Print ¶
func (node PackageReferenceMember) Print(indent string)
node print function
func (PackageReferenceMember) Span ¶
func (node PackageReferenceMember) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type PackageUseMember ¶
type PackageUseMember struct { MemberNode PackageKeyword lexer.Token Package lexer.Token }
basic global statement member
func CreatePackageUseMember ¶
func CreatePackageUseMember(kw lexer.Token, pkg lexer.Token) PackageUseMember
"constructor" / ooga booga OOP cave man brain
func (PackageUseMember) NodeType ¶
func (PackageUseMember) NodeType() NodeType
implement node type from interface
func (PackageUseMember) Print ¶
func (node PackageUseMember) Print(indent string)
node print function
func (PackageUseMember) Span ¶
func (node PackageUseMember) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ParameterNode ¶
type ParameterNode struct { SyntaxNode Identifier lexer.Token TypeClause TypeClauseNode }
basic global statement member
func CreateParameterNode ¶
func CreateParameterNode(id lexer.Token, typeClause TypeClauseNode) ParameterNode
"constructor" / ooga booga OOP cave man brain
func (ParameterNode) NodeType ¶
func (ParameterNode) NodeType() NodeType
implement node type from interface
func (ParameterNode) Span ¶
func (node ParameterNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ParenthesisedExpressionNode ¶
type ParenthesisedExpressionNode struct { ExpressionNode OpenParenthesis lexer.Token Expression ExpressionNode ClosedParenthesis lexer.Token }
aaaaaa
func CreateParenthesisedExpressionNode ¶
func CreateParenthesisedExpressionNode(expression ExpressionNode, open lexer.Token, closed lexer.Token) ParenthesisedExpressionNode
"constructor" / ooga booga OOP cave man brain
func (ParenthesisedExpressionNode) NodeType ¶
func (ParenthesisedExpressionNode) NodeType() NodeType
implement node type from interface
func (ParenthesisedExpressionNode) Print ¶
func (node ParenthesisedExpressionNode) Print(indent string)
node print function
func (ParenthesisedExpressionNode) Span ¶
func (node ParenthesisedExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ReferenceExpressionNode ¶
type ReferenceExpressionNode struct { ExpressionNode RefKeyword lexer.Token Expression NameExpressionNode }
func CreateReferenceExpressionNode ¶
func CreateReferenceExpressionNode(kw lexer.Token, expr NameExpressionNode) ReferenceExpressionNode
"constructor" / ooga booga OOP cave man brain
func (ReferenceExpressionNode) NodeType ¶
func (ReferenceExpressionNode) NodeType() NodeType
implement node type from interface
func (ReferenceExpressionNode) Print ¶
func (node ReferenceExpressionNode) Print(indent string)
node print function
func (ReferenceExpressionNode) Span ¶
func (node ReferenceExpressionNode) Span() print.TextSpan
type ReturnStatementNode ¶
type ReturnStatementNode struct { StatementNode Keyword lexer.Token Expression ExpressionNode }
ReturnStatementNode like: return "Yo mama"; there, get rect.
func CreateReturnStatementNode ¶
func CreateReturnStatementNode(keyword lexer.Token, expression ExpressionNode) ReturnStatementNode
"constructor" / ooga booga OOP cave man brain - Same -_-
func (ReturnStatementNode) NodeType ¶
func (ReturnStatementNode) NodeType() NodeType
NodeType Copy + Paste
func (ReturnStatementNode) Print ¶
func (node ReturnStatementNode) Print(indent string)
Print Prints beautiful stuff in console
func (ReturnStatementNode) Span ¶
func (node ReturnStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type StatementNode ¶
type StatementNode interface { SyntaxNode }
very cool interface for creating statements (ik this isnt very revolutionary but i just like to organise stuff)
type StructDeclarationMember ¶
type StructDeclarationMember struct { MemberNode StructKeyword lexer.Token Identifier lexer.Token Fields []ParameterNode ClosingToken lexer.Token }
func CreateStructDeclarationMember ¶
func CreateStructDeclarationMember(kw lexer.Token, id lexer.Token, fields []ParameterNode, closing lexer.Token) StructDeclarationMember
"constructor" / ooga booga OOP cave man brain
func (StructDeclarationMember) NodeType ¶
func (StructDeclarationMember) NodeType() NodeType
implement node type from interface
func (StructDeclarationMember) Print ¶
func (node StructDeclarationMember) Print(indent string)
node print function
func (StructDeclarationMember) Span ¶
func (node StructDeclarationMember) Span() print.TextSpan
type SyntaxNode ¶
type SyntaxNode interface { NodeType() NodeType Span() print2.TextSpan // exact text position of this node Print(indent string) }
very cool interface for creating syntax nodes
type TernaryExpressionNode ¶
type TernaryExpressionNode struct { ExpressionNode Condition ExpressionNode If ExpressionNode Else ExpressionNode }
func CreateTernaryExpressionNode ¶
func CreateTernaryExpressionNode(condition ExpressionNode, ifexpr ExpressionNode, elseexpr ExpressionNode) TernaryExpressionNode
"constructor" / ooga booga OOP cave man brain
func (TernaryExpressionNode) NodeType ¶
func (TernaryExpressionNode) NodeType() NodeType
implement node type from interface
func (TernaryExpressionNode) Print ¶
func (node TernaryExpressionNode) Print(indent string)
node print function
func (TernaryExpressionNode) Span ¶
func (node TernaryExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type ThisExpressionNode ¶
type ThisExpressionNode struct { ExpressionNode ThisKeyword lexer.Token }
func CreateThisExpressionNode ¶
func CreateThisExpressionNode(kw lexer.Token) ThisExpressionNode
"constructor" / ooga booga OOP cave man brain
func (ThisExpressionNode) NodeType ¶
func (ThisExpressionNode) NodeType() NodeType
implement node type from interface
func (ThisExpressionNode) Print ¶
func (node ThisExpressionNode) Print(indent string)
node print function
func (ThisExpressionNode) Span ¶
func (node ThisExpressionNode) Span() print.TextSpan
type TypeCallExpressionNode ¶
type TypeCallExpressionNode struct { ExpressionNode Base ExpressionNode CallIdentifier lexer.Token Arguments []ExpressionNode ClosingToken lexer.Token }
func CreateTypeCallExpressionNode ¶
func CreateTypeCallExpressionNode(base ExpressionNode, callId lexer.Token, args []ExpressionNode, closing lexer.Token) TypeCallExpressionNode
"constructor" / ooga booga OOP cave man brain
func (TypeCallExpressionNode) NodeType ¶
func (TypeCallExpressionNode) NodeType() NodeType
implement node type from interface
func (TypeCallExpressionNode) Print ¶
func (node TypeCallExpressionNode) Print(indent string)
node print function
func (TypeCallExpressionNode) Span ¶
func (node TypeCallExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type TypeClauseNode ¶
type TypeClauseNode struct { SyntaxNode ClauseIsSet bool Package *lexer.Token TypeIdentifier lexer.Token SubClauses []TypeClauseNode ClosingBracket lexer.Token }
basic global statement member
func CreateTypeClauseNode ¶
func CreateTypeClauseNode(pack *lexer.Token, id lexer.Token, subtypes []TypeClauseNode, bracket lexer.Token) TypeClauseNode
"constructor" / ooga booga OOP cave man brain
func (TypeClauseNode) NodeType ¶
func (TypeClauseNode) NodeType() NodeType
implement node type from interface
func (TypeClauseNode) Span ¶
func (node TypeClauseNode) Span() print.TextSpan
type UnaryExpressionNode ¶
type UnaryExpressionNode struct { ExpressionNode Operator lexer.Token Operand ExpressionNode }
func CreateUnaryExpressionNode ¶
func CreateUnaryExpressionNode(op lexer.Token, expr ExpressionNode) UnaryExpressionNode
"constructor" / ooga booga OOP cave man brain
func (UnaryExpressionNode) NodeType ¶
func (UnaryExpressionNode) NodeType() NodeType
implement node type from interface
func (UnaryExpressionNode) Print ¶
func (node UnaryExpressionNode) Print(indent string)
node print function
func (UnaryExpressionNode) Span ¶
func (node UnaryExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type VariableDeclarationStatementNode ¶
type VariableDeclarationStatementNode struct { StatementNode Keyword lexer.Token TypeClause TypeClauseNode Identifier lexer.Token AssignToken lexer.Token Initializer ExpressionNode }
basic global statement member
func CreateVariableDeclarationStatementNode ¶
func CreateVariableDeclarationStatementNode(kw lexer.Token, typeClause TypeClauseNode, id lexer.Token, assign lexer.Token, init ExpressionNode) VariableDeclarationStatementNode
"constructor" / ooga booga OOP cave man brain
func (VariableDeclarationStatementNode) NodeType ¶
func (VariableDeclarationStatementNode) NodeType() NodeType
implement node type from interface
func (VariableDeclarationStatementNode) Print ¶
func (node VariableDeclarationStatementNode) Print(indent string)
node print function
func (VariableDeclarationStatementNode) Span ¶
func (node VariableDeclarationStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type VariableEditorExpressionNode ¶
type VariableEditorExpressionNode struct { ExpressionNode Identifier lexer.Token Operator lexer.Token Expression ExpressionNode IsSingleStep bool // things like ++ or -- }
func CreateVariableEditorExpressionNode ¶
func CreateVariableEditorExpressionNode(id lexer.Token, op lexer.Token, expr ExpressionNode, singleStep bool) VariableEditorExpressionNode
"constructor" / ooga booga OOP cave man brain
func (VariableEditorExpressionNode) NodeType ¶
func (VariableEditorExpressionNode) NodeType() NodeType
implement node type from interface
func (VariableEditorExpressionNode) Print ¶
func (node VariableEditorExpressionNode) Print(indent string)
node print function
func (VariableEditorExpressionNode) Span ¶
func (node VariableEditorExpressionNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient.
type WhileStatementNode ¶
type WhileStatementNode struct { StatementNode Keyword lexer.Token Condition ExpressionNode Statement StatementNode }
WhileStatementNode joke comments get old after awhile
func CreateWhileStatementNode ¶
func CreateWhileStatementNode(keyword lexer.Token, condition ExpressionNode, statement StatementNode) WhileStatementNode
"constructor" / ooga booga OOP cave man brain - Same -_-
func (WhileStatementNode) NodeType ¶
func (WhileStatementNode) NodeType() NodeType
NodeType Copy + Paste again
func (WhileStatementNode) Print ¶
func (node WhileStatementNode) Print(indent string)
Print Prints beautiful stuff in console
func (WhileStatementNode) Span ¶
func (node WhileStatementNode) Span() print.TextSpan
Position returns the starting line and column, and the total length of the statement The starting line and column aren't always the absolute beginning of the statement just what's most convenient. We don't process the statement for WhileStatementNode because it do be chonky
Source Files ¶
- clause-elseClause.go
- clause-typeClause.go
- expr-arrayAccessExpression.go
- expr-arrayAssignmentExpression.go
- expr-assignmentExpression.go
- expr-binaryExpression.go
- expr-callExpression.go
- expr-classFieldAccessEpxression.go
- expr-classFieldAssignmentEpxression.go
- expr-dereferenceExpression.go
- expr-lambdaExpression.go
- expr-literalExpression.go
- expr-makeArrayExpression.go
- expr-makeExpression.go
- expr-makeStructExpression.go
- expr-nameExpression.go
- expr-packageCallExpression.go
- expr-parenthesizedExpression.go
- expr-referenceExpression.go
- expr-ternaryExpression.go
- expr-thisExpression.go
- expr-typeCallEpxression.go
- expr-unaryExpression.go
- expr-variableEditorExpression.go
- node-classDeclarationMember.go
- node-enumDeclarationMember.go
- node-externalFunctionDeclarationMember.go
- node-functionDeclarationMember.go
- node-globalStatementMember.go
- node-packageAliasMember.go
- node-packageReferenceMember.go
- node-packageUseMember.go
- node-parameterNode.go
- node-structDeclarationMember.go
- stmt-blockStatement.go
- stmt-breakStatement.go
- stmt-continueStatement.go
- stmt-expressionStatement.go
- stmt-forStatement.go
- stmt-fromToStatement.go
- stmt-ifStatement.go
- stmt-returnStatement.go
- stmt-variableDeclaration.go
- stmt-whileStatement.go
- syntaxnode.go