Documentation
¶
Index ¶
- func StringNode(n Node) string
- type ArrayMode
- type ArrayType
- type Assignment
- type BaseType
- type BinaryExpr
- type Block
- type CallExpr
- type CaseClause
- type CastExpr
- type CompositeLiteral
- type Declaration
- type Decrement
- type ErrorNode
- type Expr
- type ExprStmt
- type For
- type FunctionArg
- type FunctionDeclaration
- type GroupExpr
- type Identifier
- type If
- type Increment
- type IndexExpr
- type InferType
- type LitBool
- type LitFloat
- type LitInteger
- type LitString
- type Node
- type ParseOptions
- type Parser
- type PointerType
- type Program
- type Repeat
- type Return
- type Stmt
- type Switch
- type TupleType
- type UnaryExpr
- type VariableDeclaration
- type While
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringNode ¶
Types ¶
type ArrayType ¶
type ArrayType struct {
Base Expr
Mode ArrayMode
FixedSize int64
// contains filtered or unexported fields
}
func (ArrayType) GetSpan ¶
func (n ArrayType) GetSpan() diagnostics.SectionSpan
type Assignment ¶
func (Assignment) GetSpan ¶
func (n Assignment) GetSpan() diagnostics.SectionSpan
type BaseType ¶
type BaseType struct {
Name string
// contains filtered or unexported fields
}
func (BaseType) GetSpan ¶
func (n BaseType) GetSpan() diagnostics.SectionSpan
type BinaryExpr ¶
type BinaryExpr struct {
Left Expr
Op *lexer.Token
Right Expr
// contains filtered or unexported fields
}
func (BinaryExpr) GetSpan ¶
func (n BinaryExpr) GetSpan() diagnostics.SectionSpan
type Block ¶
type Block struct {
Statements []Stmt
// contains filtered or unexported fields
}
func (Block) GetSpan ¶
func (n Block) GetSpan() diagnostics.SectionSpan
type CallExpr ¶
func (CallExpr) GetSpan ¶
func (n CallExpr) GetSpan() diagnostics.SectionSpan
type CaseClause ¶
type CaseClause struct {
Values []Expr
Default bool
Block Node
// contains filtered or unexported fields
}
func (CaseClause) GetSpan ¶
func (n CaseClause) GetSpan() diagnostics.SectionSpan
type CastExpr ¶
func (CastExpr) GetSpan ¶
func (n CastExpr) GetSpan() diagnostics.SectionSpan
type CompositeLiteral ¶
type CompositeLiteral struct {
Literals []Expr
// contains filtered or unexported fields
}
func (CompositeLiteral) GetSpan ¶
func (n CompositeLiteral) GetSpan() diagnostics.SectionSpan
type Declaration ¶
func (Declaration) GetSpan ¶
func (n Declaration) GetSpan() diagnostics.SectionSpan
type Decrement ¶
type Decrement struct {
Target Expr
// contains filtered or unexported fields
}
func (Decrement) GetSpan ¶
func (n Decrement) GetSpan() diagnostics.SectionSpan
type ErrorNode ¶
type ErrorNode struct {
Message string
// contains filtered or unexported fields
}
func (ErrorNode) GetSpan ¶
func (n ErrorNode) GetSpan() diagnostics.SectionSpan
type ExprStmt ¶
type ExprStmt struct {
Value Expr
// contains filtered or unexported fields
}
func (ExprStmt) GetSpan ¶
func (n ExprStmt) GetSpan() diagnostics.SectionSpan
type For ¶
type For struct {
Init Stmt
Cond Expr
Post Stmt
Block Stmt
// contains filtered or unexported fields
}
func (For) GetSpan ¶
func (n For) GetSpan() diagnostics.SectionSpan
type FunctionArg ¶
func (FunctionArg) GetSpan ¶
func (n FunctionArg) GetSpan() diagnostics.SectionSpan
type FunctionDeclaration ¶
type FunctionDeclaration struct {
Name string
Returns Expr
Args []Node
Block *Block
// contains filtered or unexported fields
}
func (FunctionDeclaration) GetSpan ¶
func (n FunctionDeclaration) GetSpan() diagnostics.SectionSpan
type GroupExpr ¶
type GroupExpr struct {
Grouped Expr
// contains filtered or unexported fields
}
func (GroupExpr) GetSpan ¶
func (n GroupExpr) GetSpan() diagnostics.SectionSpan
type Identifier ¶
type Identifier struct {
Name string
// contains filtered or unexported fields
}
func (Identifier) GetSpan ¶
func (n Identifier) GetSpan() diagnostics.SectionSpan
type If ¶
type If struct {
Cond Expr
Block Stmt
Elifs []Stmt
Else Stmt
// contains filtered or unexported fields
}
func (If) GetSpan ¶
func (n If) GetSpan() diagnostics.SectionSpan
type Increment ¶
type Increment struct {
Target Expr
// contains filtered or unexported fields
}
func (Increment) GetSpan ¶
func (n Increment) GetSpan() diagnostics.SectionSpan
type IndexExpr ¶
func (IndexExpr) GetSpan ¶
func (n IndexExpr) GetSpan() diagnostics.SectionSpan
type InferType ¶
type InferType struct {
// contains filtered or unexported fields
}
func (InferType) GetSpan ¶
func (n InferType) GetSpan() diagnostics.SectionSpan
type LitBool ¶
type LitBool struct {
Value bool
// contains filtered or unexported fields
}
func (LitBool) GetSpan ¶
func (n LitBool) GetSpan() diagnostics.SectionSpan
type LitFloat ¶
type LitFloat struct {
Value float64
// contains filtered or unexported fields
}
func (LitFloat) GetSpan ¶
func (n LitFloat) GetSpan() diagnostics.SectionSpan
type LitInteger ¶
func (LitInteger) GetSpan ¶
func (n LitInteger) GetSpan() diagnostics.SectionSpan
type LitString ¶
type LitString struct {
Value string
// contains filtered or unexported fields
}
func (LitString) GetSpan ¶
func (n LitString) GetSpan() diagnostics.SectionSpan
type Node ¶
type Node interface {
GetSpan() diagnostics.SectionSpan
// contains filtered or unexported methods
}
type ParseOptions ¶
type ParseOptions struct {
Throw bool
}
type Parser ¶
type Parser interface {
diagnostics.MightFail
Parse(ts *lexer.TokenStream, opts *ParseOptions) Node
}
type PointerType ¶
type PointerType struct {
Value Expr
// contains filtered or unexported fields
}
func (PointerType) GetSpan ¶
func (n PointerType) GetSpan() diagnostics.SectionSpan
type Program ¶
type Program struct {
Statements []Stmt
File *diagnostics.File
// contains filtered or unexported fields
}
func (Program) GetSpan ¶
func (n Program) GetSpan() diagnostics.SectionSpan
type Repeat ¶
func (Repeat) GetSpan ¶
func (n Repeat) GetSpan() diagnostics.SectionSpan
type Return ¶
type Return struct {
Values []Expr
// contains filtered or unexported fields
}
func (Return) GetSpan ¶
func (n Return) GetSpan() diagnostics.SectionSpan
type Switch ¶
type Switch struct {
Subject Expr
Cases []*CaseClause
// contains filtered or unexported fields
}
func (Switch) GetSpan ¶
func (n Switch) GetSpan() diagnostics.SectionSpan
type TupleType ¶
type TupleType struct {
Types []Expr
// contains filtered or unexported fields
}
func (TupleType) GetSpan ¶
func (n TupleType) GetSpan() diagnostics.SectionSpan
type UnaryExpr ¶
func (UnaryExpr) GetSpan ¶
func (n UnaryExpr) GetSpan() diagnostics.SectionSpan
type VariableDeclaration ¶
type VariableDeclaration struct {
Name string
Type Expr
Value Expr
// contains filtered or unexported fields
}
func (VariableDeclaration) GetSpan ¶
func (n VariableDeclaration) GetSpan() diagnostics.SectionSpan
type While ¶
func (While) GetSpan ¶
func (n While) GetSpan() diagnostics.SectionSpan
Click to show internal directories.
Click to hide internal directories.