ast

package module
v0.0.0-...-ca0e709 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inspect

func Inspect(node Node, f func(Node) bool)

func Walk

func Walk(v Visitor, node Node)

Types

type BadExpr

type BadExpr struct {
	From, To token.Pos
}

func (*BadExpr) End

func (x *BadExpr) End() token.Pos

func (*BadExpr) Pos

func (x *BadExpr) Pos() token.Pos

type BasicLit

type BasicLit struct {
	ValuePos token.Pos
	Kind     token.Token
	Value    string
}

func (*BasicLit) End

func (x *BasicLit) End() token.Pos

func (*BasicLit) Pos

func (x *BasicLit) Pos() token.Pos

type BinaryExpr

type BinaryExpr struct {
	X     Expr
	OpPos token.Pos
	Op    token.Token
	Y     Expr
}

func (*BinaryExpr) End

func (x *BinaryExpr) End() token.Pos

func (*BinaryExpr) Pos

func (x *BinaryExpr) Pos() token.Pos

type CallExpr

type CallExpr struct {
	Fun    Expr
	Lparen token.Pos
	Args   []Expr
	Rparen token.Pos
}

func (*CallExpr) End

func (x *CallExpr) End() token.Pos

func (*CallExpr) Pos

func (x *CallExpr) Pos() token.Pos

type Expr

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

type Field

type Field struct {
	Names []*Ident
	Type  Expr
	Tag   *BasicLit
}

func (*Field) End

func (f *Field) End() token.Pos

func (*Field) Pos

func (f *Field) Pos() token.Pos

type FieldList

type FieldList struct {
	Opening token.Pos
	List    []*Field
	Closing token.Pos
}

func (*FieldList) End

func (f *FieldList) End() token.Pos

func (*FieldList) NumFields

func (f *FieldList) NumFields() int

func (*FieldList) Pos

func (f *FieldList) Pos() token.Pos

type Ident

type Ident struct {
	NamePos token.Pos
	Name    string
}

func (*Ident) End

func (x *Ident) End() token.Pos

func (*Ident) Pos

func (x *Ident) Pos() token.Pos

type Node

type Node interface {
	Pos() token.Pos // position of first character belonging to the node
	End() token.Pos // position of first character immediately after the node
}

type ParenExpr

type ParenExpr struct {
	Lparen token.Pos
	X      Expr
	Rparen token.Pos
}

func (*ParenExpr) End

func (x *ParenExpr) End() token.Pos

func (*ParenExpr) Pos

func (x *ParenExpr) Pos() token.Pos

type UnaryExpr

type UnaryExpr struct {
	OpPos token.Pos
	Op    token.Token
	X     Expr
}

func (*UnaryExpr) End

func (x *UnaryExpr) End() token.Pos

func (*UnaryExpr) Pos

func (x *UnaryExpr) Pos() token.Pos

type Visitor

type Visitor interface {
	Visit(node Node) (w Visitor)
}

Jump to

Keyboard shortcuts

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