Documentation ¶ Index ¶ type Expr func Parse(tokens []Token) (Expr, error) type Func func (f Func) IsContext() bool func (f Func) String() string func (f Func) Tree(ident int) string type Kind func (k Kind) String() string type Package func (p Package) String() string func (p Package) Tree(ident int) string type Select func (s Select) String() string func (s Select) Tree(ident int) string type Token func Tokenize(s string) ([]Token, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Expr ¶ type Expr interface { String() string Tree(ident int) string } func Parse ¶ func Parse(tokens []Token) (Expr, error) type Func ¶ type Func struct { Name string Args []Expr } func (Func) IsContext ¶ func (f Func) IsContext() bool func (Func) String ¶ func (f Func) String() string func (Func) Tree ¶ func (f Func) Tree(ident int) string type Kind ¶ type Kind byte const ( TUnknown Kind = '?' TOp Kind = 'o' TComma Kind = ',' TSelector Kind = 's' TFunc Kind = 'f' TLeftParen Kind = '(' TRightParen Kind = ')' TPackage Kind = 'p' ) func (Kind) String ¶ func (k Kind) String() string type Package ¶ type Package string func (Package) String ¶ func (p Package) String() string func (Package) Tree ¶ func (p Package) Tree(ident int) string type Select ¶ type Select struct { Expr Expr Selector string } func (Select) String ¶ func (s Select) String() string func (Select) Tree ¶ func (s Select) Tree(ident int) string type Token ¶ type Token struct { Kind Kind Text string } func Tokenize ¶ func Tokenize(s string) ([]Token, error) Source Files ¶ View all Source files ast.go tokens.go Click to show internal directories. Click to hide internal directories.