ast

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttrExpr

type AttrExpr struct {
	Dot  *Node
	Attr *Node
}

IndexExpr represents an attribute selector.

func (*AttrExpr) EndPos

func (e *AttrExpr) EndPos() int

func (*AttrExpr) StartPos

func (e *AttrExpr) StartPos() int

type Expr

type Expr interface {
	StartPos() int
	EndPos() int
	// contains filtered or unexported methods
}

Expr represents an abstract expression.

type IndexExpr

type IndexExpr struct {
	LBracket *Node
	Index    LitExpr
	RBracket *Node
}

IndexExpr represents an index into a slice.

func (*IndexExpr) EndPos

func (e *IndexExpr) EndPos() int

func (*IndexExpr) StartPos

func (e *IndexExpr) StartPos() int

type IntLit

type IntLit struct {
	Node *Node
}

func (*IntLit) EndPos

func (l *IntLit) EndPos() int

func (*IntLit) StartPos

func (l *IntLit) StartPos() int

func (*IntLit) Value

func (l *IntLit) Value() interface{}

type LitExpr

type LitExpr interface {
	Expr
	Value() interface{}
}

LitExpr represents a literal expression.

type Node

type Node struct {
	Tok      token.Token
	Lit      string
	StartPos int
	EndPos   int
}

Node represents an abstract syntax Node.

type StringLit

type StringLit struct {
	Node *Node
}

func (*StringLit) EndPos

func (l *StringLit) EndPos() int

func (*StringLit) StartPos

func (l *StringLit) StartPos() int

func (*StringLit) Value

func (l *StringLit) Value() interface{}

Jump to

Keyboard shortcuts

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