ast

package
v0.0.0-...-21b70b4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArithmeticOpExpr

type ArithmeticOpExpr struct {
	ExprBase

	Operator string
	Lhs      Expr
	Rhs      Expr
}

type AssignStmt

type AssignStmt struct {
	StmtBase

	Lhs []Expr
	Rhs []Expr
}

type AttrGetExpr

type AttrGetExpr struct {
	ExprBase

	Object Expr
	Key    Expr
}

type BreakStmt

type BreakStmt struct {
	StmtBase
}

type Comma3Expr

type Comma3Expr struct {
	ExprBase
}

type ConstExpr

type ConstExpr interface {
	Expr
	// contains filtered or unexported methods
}

type ConstExprBase

type ConstExprBase struct {
	ExprBase
}

type DoBlockStmt

type DoBlockStmt struct {
	StmtBase

	Stmts []Stmt
}

type Expr

type Expr interface {
	PositionHolder
	// contains filtered or unexported methods
}

type ExprBase

type ExprBase struct {
	Node
}

type FalseExpr

type FalseExpr struct {
	ConstExprBase
}

type Field

type Field struct {
	Key   Expr
	Value Expr
}

type FuncCallExpr

type FuncCallExpr struct {
	ExprBase

	Func      Expr
	Receiver  Expr
	Method    string
	Args      []Expr
	AdjustRet bool
}

type FuncCallStmt

type FuncCallStmt struct {
	StmtBase

	Expr Expr
}

type FuncDefStmt

type FuncDefStmt struct {
	StmtBase

	Name *FuncName
	Func *FunctionExpr
}

type FuncName

type FuncName struct {
	Func     Expr
	Receiver Expr
	Method   string
}

type FunctionExpr

type FunctionExpr struct {
	ExprBase

	ParList *ParList
	Stmts   []Stmt
}

type GenericForStmt

type GenericForStmt struct {
	StmtBase

	Names []string
	Exprs []Expr
	Stmts []Stmt
}

type IdentExpr

type IdentExpr struct {
	ExprBase

	Value string
}

type IfStmt

type IfStmt struct {
	StmtBase

	Condition Expr
	Then      []Stmt
	Else      []Stmt
}

type LocalAssignStmt

type LocalAssignStmt struct {
	StmtBase

	Names []string
	Exprs []Expr
}

type LogicalOpExpr

type LogicalOpExpr struct {
	ExprBase

	Operator string
	Lhs      Expr
	Rhs      Expr
}

type NilExpr

type NilExpr struct {
	ConstExprBase
}

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (*Node) LastLine

func (self *Node) LastLine() int

func (*Node) Line

func (self *Node) Line() int

func (*Node) SetLastLine

func (self *Node) SetLastLine(line int)

func (*Node) SetLine

func (self *Node) SetLine(line int)

type NumberExpr

type NumberExpr struct {
	ConstExprBase

	Value string
}

type NumberForStmt

type NumberForStmt struct {
	StmtBase

	Name  string
	Init  Expr
	Limit Expr
	Step  Expr
	Stmts []Stmt
}

type ParList

type ParList struct {
	HasVargs bool
	Names    []string
}

type Position

type Position struct {
	Source string
	Line   int
	Column int
}

type PositionHolder

type PositionHolder interface {
	Line() int
	SetLine(int)
	LastLine() int
	SetLastLine(int)
}

type RelationalOpExpr

type RelationalOpExpr struct {
	ExprBase

	Operator string
	Lhs      Expr
	Rhs      Expr
}

type RepeatStmt

type RepeatStmt struct {
	StmtBase

	Condition Expr
	Stmts     []Stmt
}

type ReturnStmt

type ReturnStmt struct {
	StmtBase

	Exprs []Expr
}

type Stmt

type Stmt interface {
	PositionHolder
	// contains filtered or unexported methods
}

type StmtBase

type StmtBase struct {
	Node
}

type StringConcatOpExpr

type StringConcatOpExpr struct {
	ExprBase

	Lhs Expr
	Rhs Expr
}

type StringExpr

type StringExpr struct {
	ConstExprBase

	Value string
}

type TableExpr

type TableExpr struct {
	ExprBase

	Fields []*Field
}

type Token

type Token struct {
	Type int
	Name string
	Str  string
	Pos  Position
}

func (*Token) String

func (self *Token) String() string

type TrueExpr

type TrueExpr struct {
	ConstExprBase
}

type UnaryLenOpExpr

type UnaryLenOpExpr struct {
	ExprBase
	Expr Expr
}

type UnaryMinusOpExpr

type UnaryMinusOpExpr struct {
	ExprBase
	Expr Expr
}

type UnaryNotOpExpr

type UnaryNotOpExpr struct {
	ExprBase
	Expr Expr
}

type WhileStmt

type WhileStmt struct {
	StmtBase

	Condition Expr
	Stmts     []Stmt
}

Jump to

Keyboard shortcuts

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