Documentation ¶
Index ¶
- type ArrayType
- type AssignmentStatement
- type BreakStatement
- type BuiltinType
- type ContinueStatement
- type DataType
- type Definition
- type ElseClause
- type ElseifClause
- type Expression
- type ForeachStatement
- type ForincStatement
- type FunctionCall
- type FunctionDefinition
- type FunctionType
- type GlobalDefinition
- type GoStatement
- type IfStatement
- type ImportDefinition
- type InterfaceDefinition
- type LocalFuncStatement
- type LocalsStatement
- type MethodCall
- type MethodDefinition
- type NativeImportDefinition
- type Operation
- type Package
- type ParsedDataType
- type ReturnStatement
- type SelectClause
- type SelectDefaultClause
- type SelectRcvClause
- type SelectSendClause
- type SelectStatement
- type Signature
- type Statement
- type Struct
- type StructDefinition
- type Token
- type TokenType
- type TypeExpression
- type TypeswitchCase
- type TypeswitchStatement
- type Variable
- type WhileStatement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignmentStatement ¶
type AssignmentStatement struct { LineNumber int Column int Targets []Expression Value Expression }
func (AssignmentStatement) Line ¶
func (t AssignmentStatement) Line() int
func (AssignmentStatement) Statement ¶
func (t AssignmentStatement) Statement()
type BreakStatement ¶
func (BreakStatement) Line ¶
func (t BreakStatement) Line() int
func (BreakStatement) Statement ¶
func (t BreakStatement) Statement()
type BuiltinType ¶
func (BuiltinType) DataType ¶
func (t BuiltinType) DataType()
type ContinueStatement ¶
func (ContinueStatement) Line ¶
func (t ContinueStatement) Line() int
func (ContinueStatement) Statement ¶
func (t ContinueStatement) Statement()
type Definition ¶
type Definition interface { Definition() Line() int }
type ElseClause ¶
type ElseifClause ¶
type ElseifClause struct { LineNumber int Column int Condition Expression Body []Statement }
type Expression ¶
type Expression interface { Expression() Line() int }
type ForeachStatement ¶
type ForeachStatement struct { LineNumber int Column int IndexName string IndexType ParsedDataType ValName string ValType ParsedDataType Collection Expression Body []Statement }
func (ForeachStatement) Line ¶
func (t ForeachStatement) Line() int
func (ForeachStatement) Statement ¶
func (t ForeachStatement) Statement()
type ForincStatement ¶
type ForincStatement struct { LineNumber int Column int IndexName string IndexType ParsedDataType StartVal Expression EndVal Expression Body []Statement Dec bool }
func (ForincStatement) Line ¶
func (t ForincStatement) Line() int
func (ForincStatement) Statement ¶
func (t ForincStatement) Statement()
type FunctionCall ¶
type FunctionCall struct { LineNumber int Column int Function Expression // either an identifier or another function/operator call Arguments []Expression }
func (FunctionCall) Expression ¶
func (t FunctionCall) Expression()
func (FunctionCall) Line ¶
func (t FunctionCall) Line() int
func (FunctionCall) Statement ¶
func (t FunctionCall) Statement()
type FunctionDefinition ¶
type FunctionDefinition struct { LineNumber int Column int Name string Parameters []Variable ReturnTypes []ParsedDataType Body []Statement NativeCode string // a native function has a string of native code and an empty body Pkg *Package }
func (FunctionDefinition) Definition ¶
func (t FunctionDefinition) Definition()
func (FunctionDefinition) Line ¶
func (t FunctionDefinition) Line() int
type FunctionType ¶
func (FunctionType) DataType ¶
func (t FunctionType) DataType()
type GlobalDefinition ¶
type GlobalDefinition struct { LineNumber int Column int Name string Value Expression Type ParsedDataType Pkg *Package }
func (GlobalDefinition) Definition ¶
func (t GlobalDefinition) Definition()
func (GlobalDefinition) Line ¶
func (t GlobalDefinition) Line() int
type GoStatement ¶
type GoStatement struct { LineNumber int Column int Call Expression // FunctionCall or MethodCall }
func (GoStatement) Line ¶
func (t GoStatement) Line() int
func (GoStatement) Statement ¶
func (t GoStatement) Statement()
type IfStatement ¶
type IfStatement struct { LineNumber int Column int Condition Expression Body []Statement Elifs []ElseifClause Else ElseClause }
func (IfStatement) Line ¶
func (t IfStatement) Line() int
func (IfStatement) Statement ¶
func (t IfStatement) Statement()
type ImportDefinition ¶
type ImportDefinition struct { LineNumber int Column int Path string Names []string Aliases []string Pkg *Package }
func (ImportDefinition) Definition ¶
func (t ImportDefinition) Definition()
func (ImportDefinition) Line ¶
func (t ImportDefinition) Line() int
type InterfaceDefinition ¶
type InterfaceDefinition struct { LineNumber int Column int Name string Methods []Signature Pkg *Package }
func (InterfaceDefinition) DataType ¶
func (t InterfaceDefinition) DataType()
func (InterfaceDefinition) Definition ¶
func (t InterfaceDefinition) Definition()
func (InterfaceDefinition) Line ¶
func (t InterfaceDefinition) Line() int
type LocalFuncStatement ¶
type LocalFuncStatement struct { LineNumber int Column int Name string Parameters []Variable ReturnTypes []ParsedDataType Body []Statement }
func (LocalFuncStatement) Line ¶
func (t LocalFuncStatement) Line() int
func (LocalFuncStatement) Statement ¶
func (t LocalFuncStatement) Statement()
type LocalsStatement ¶
func (LocalsStatement) Line ¶
func (t LocalsStatement) Line() int
func (LocalsStatement) Statement ¶
func (t LocalsStatement) Statement()
type MethodCall ¶
type MethodCall struct { LineNumber int Column int MethodName string // either an identifier or another function/operator call Receiver Expression Arguments []Expression }
func (MethodCall) Expression ¶
func (t MethodCall) Expression()
func (MethodCall) Line ¶
func (t MethodCall) Line() int
func (MethodCall) Statement ¶
func (t MethodCall) Statement()
type MethodDefinition ¶
type MethodDefinition struct { LineNumber int Column int Name string Receiver Variable Parameters []Variable ReturnTypes []ParsedDataType Body []Statement Pkg *Package }
func (MethodDefinition) Definition ¶
func (t MethodDefinition) Definition()
func (MethodDefinition) Line ¶
func (t MethodDefinition) Line() int
type NativeImportDefinition ¶
type NativeImportDefinition struct { LineNumber int Column int Path string Alias string Pkg *Package }
func (NativeImportDefinition) Definition ¶
func (t NativeImportDefinition) Definition()
func (NativeImportDefinition) Line ¶
func (t NativeImportDefinition) Line() int
type Operation ¶
type Operation struct { LineNumber int Column int Operator string MakeType ParsedDataType // nil for all ops except a 'make' op Operands []Expression }
func (Operation) Expression ¶
func (t Operation) Expression()
type Package ¶
type Package struct { Globals map[string]GlobalDefinition Types map[string]DataType // all types of current package and those brought into current namespace ImportedTypes map[DataType]bool // all types of imported packages (directly and indirectly) ValidBreakpoints map[string]bool StructDefs map[string]StructDefinition // parsed form of struct Structs map[string]Struct // processed form of struct Funcs map[string]FunctionDefinition Methods map[string]map[string]MethodDefinition // method name:, struct name:, def Interfaces map[string]InterfaceDefinition FullPath string Prefix string ImportDefs map[string]ImportDefinition ImportedPackages map[string]*Package Code string NativeImports map[string]string }
type ParsedDataType ¶
type ParsedDataType struct { LineNumber int Column int Type string Params []ParsedDataType ReturnTypes []ParsedDataType // non-nil only for functions with return types }
func (ParsedDataType) Expression ¶
func (t ParsedDataType) Expression()
func (ParsedDataType) Line ¶
func (t ParsedDataType) Line() int
type ReturnStatement ¶
type ReturnStatement struct { LineNumber int Column int Values []Expression }
func (ReturnStatement) Line ¶
func (t ReturnStatement) Line() int
func (ReturnStatement) Statement ¶
func (t ReturnStatement) Statement()
type SelectClause ¶
type SelectClause interface {
SelectClause()
}
type SelectDefaultClause ¶
type SelectRcvClause ¶
type SelectRcvClause struct { LineNumber int Column int Target Variable Channel Expression Body []Statement }
func (SelectRcvClause) SelectClause ¶
func (s SelectRcvClause) SelectClause()
type SelectSendClause ¶
type SelectSendClause struct { LineNumber int Column int Channel Expression Value Expression Body []Statement }
func (SelectSendClause) SelectClause ¶
func (s SelectSendClause) SelectClause()
type SelectStatement ¶
type SelectStatement struct { LineNumber int Column int Clauses []SelectClause Default SelectDefaultClause }
func (SelectStatement) Line ¶
func (t SelectStatement) Line() int
func (SelectStatement) Statement ¶
func (t SelectStatement) Statement()
type Signature ¶
type Signature struct { LineNumber int Column int Name string ParamTypes []ParsedDataType ReturnTypes []ParsedDataType }
type Struct ¶
type StructDefinition ¶
type StructDefinition struct { LineNumber int Column int Name string Members []Variable NativeCode string Pkg *Package }
func (StructDefinition) DataType ¶
func (t StructDefinition) DataType()
func (StructDefinition) Definition ¶
func (t StructDefinition) Definition()
func (StructDefinition) Line ¶
func (t StructDefinition) Line() int
type Token ¶
type Token struct { Type TokenType Content string // the token itself, e.g. a number 3.7 is stored here as "3.7" LineNumber int // first line is line 1 Column int // first character of a line is in column 1 }
func (Token) Expression ¶
func (t Token) Expression()
type TokenType ¶
type TokenType int
we use arbitrary number values to designate each type of token. Rather than using straight ints, we create a distinct type to help avoid mistreating these values like ints.
type TypeExpression ¶
type TypeExpression struct { LineNumber int Column int Type ParsedDataType Operands []Expression }
func (TypeExpression) Expression ¶
func (t TypeExpression) Expression()
func (TypeExpression) Line ¶
func (t TypeExpression) Line() int
type TypeswitchCase ¶
type TypeswitchStatement ¶
type TypeswitchStatement struct { LineNumber int Column int Value Expression Cases []TypeswitchCase Default []Statement DefaultVariable string }
func (TypeswitchStatement) Line ¶
func (t TypeswitchStatement) Line() int
func (TypeswitchStatement) Statement ¶
func (t TypeswitchStatement) Statement()
type WhileStatement ¶
type WhileStatement struct { LineNumber int Column int Condition Expression Body []Statement }
func (WhileStatement) Line ¶
func (t WhileStatement) Line() int
func (WhileStatement) Statement ¶
func (t WhileStatement) Statement()
Click to show internal directories.
Click to hide internal directories.