ast

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TUnknown    Kind = '?'
	TOp              = 'o'
	TComma           = ','
	TSelector        = 's'
	TFunc            = 'f'
	TLeftParen       = '('
	TRightParen      = ')'
	TPackage         = 'p'
)

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) String

func (f Func) String() string

func (Func) Tree added in v0.0.3

func (f Func) Tree(ident int) string

type Kind

type Kind byte

type Package

type Package string

func (Package) String

func (p Package) String() string

func (Package) Tree added in v0.0.3

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 added in v0.0.3

func (s Select) Tree(ident int) string

type Token

type Token struct {
	Kind Kind
	Text string
}

func Tokenize

func Tokenize(s string) ([]Token, error)

Jump to

Keyboard shortcuts

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