ast

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

type Binary struct {
	position.Pos
	X  Expr
	Op token.Token
	Y  Expr
}

二元表达式

func (*Binary) String

func (o *Binary) String() string

type Brace

type Brace struct {
	position.Pos
	List []Expr
}

{} 花括号表达式

func (*Brace) String

func (l *Brace) String() string

type Brack

type Brack struct {
	position.Pos
	X Expr
	Y Expr
}

[] 方括号表达式

func (*Brack) String

func (l *Brack) String() string

type Break

type Break struct {
	position.Pos
}

break 关键字

func (*Break) String

func (l *Break) String() string

type Call

type Call struct {
	position.Pos
	Name Expr
	Args Expr
}

call

func (*Call) String

func (l *Call) String() string

type Continue

type Continue struct {
	position.Pos
}

continue 关键字

func (*Continue) String

func (l *Continue) String() string

type Expr

type Expr interface {
	fmt.Stringer
	GetPos() position.Pos
}

type For

type For struct {
	position.Pos
	Init Expr
	Cond Expr
	Next Expr
	Body Expr
	Else Expr
}

for 关键字

func (*For) String

func (l *For) String() string

type Func

type Func struct {
	position.Pos
	Func Expr
	Body Expr
}

函数定义

func (*Func) String

func (l *Func) String() string

type If

type If struct {
	position.Pos
	Init Expr
	Cond Expr
	Body Expr
	Else Expr
}

if 关键字

func (*If) String

func (l *If) String() string

type Literal

type Literal struct {
	position.Pos
	Type  token.Token
	Value string
}

常量和符号

func (*Literal) String

func (l *Literal) String() string

type Map

type Map struct {
	position.Pos
	Body Expr
}

map 关键字

func (*Map) String

func (l *Map) String() string

type Return

type Return struct {
	position.Pos
	Ret Expr
}

return 定义

func (*Return) String

func (l *Return) String() string

type Tuple

type Tuple struct {
	position.Pos
	List []Expr
}

() 元组表达式

func (*Tuple) String

func (l *Tuple) String() string

type UnaryPre

type UnaryPre struct {
	position.Pos
	Op token.Token
	X  Expr
}

前缀一元表达式

func (*UnaryPre) String

func (o *UnaryPre) String() string

type UnarySuf

type UnarySuf struct {
	position.Pos
	X  Expr
	Op token.Token
}

后缀一元表达式

func (*UnarySuf) String

func (o *UnarySuf) String() string

Jump to

Keyboard shortcuts

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