ast

package
v0.0.0-...-b8ea24a Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentExpression

type AssignmentExpression struct {
	*Attr
	Operator AssignmentOperator
	Left     Expression
	Right    Expression
}

func (*AssignmentExpression) GetAttr

func (a *AssignmentExpression) GetAttr() *Attr

func (*AssignmentExpression) String

func (a *AssignmentExpression) String() string

type AssignmentOperator

type AssignmentOperator string

type Attr

type Attr struct {
	Type  string
	Start int
	End   int
	Loc   *SourceLocation
}

type BinaryExpression

type BinaryExpression struct {
	*Attr
	Operator BinaryOperator
	Left     Expression
	Right    Expression
}

func (*BinaryExpression) GetAttr

func (b *BinaryExpression) GetAttr() *Attr

func (*BinaryExpression) String

func (a *BinaryExpression) String() string

type BinaryOperator

type BinaryOperator string

type CallExpression

type CallExpression struct {
	*Attr
	Callee    Expression
	Arguments []Expression
}

func (*CallExpression) GetAttr

func (c *CallExpression) GetAttr() *Attr

func (*CallExpression) String

func (c *CallExpression) String() string

type Declaration

type Declaration interface {
	Statement
	// contains filtered or unexported methods
}

type Expression

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

type ExpressionStatement

type ExpressionStatement struct {
	*Attr
	Expression Expression
}

func (*ExpressionStatement) GetAttr

func (e *ExpressionStatement) GetAttr() *Attr

func (*ExpressionStatement) String

func (e *ExpressionStatement) String() string

type Extra

type Extra struct {
	RawValue interface{}
	Raw      interface{}
}

type File

type File struct {
	*Attr
	Program *Program
}

func (*File) GetAttr

func (f *File) GetAttr() *Attr

func (*File) String

func (f *File) String() string

func (*File) UnmarshalJSON

func (f *File) UnmarshalJSON(data []byte) error

type Identifier

type Identifier struct {
	*Attr
	Name string
}

func (*Identifier) GetAttr

func (i *Identifier) GetAttr() *Attr

func (*Identifier) String

func (i *Identifier) String() string

type Literal

type Literal interface {
	Expression
	// contains filtered or unexported methods
}

type MemberExpression

type MemberExpression struct {
	*Attr
	Object   Expression
	Property Expression
	Computed bool
}

func (*MemberExpression) GetAttr

func (m *MemberExpression) GetAttr() *Attr

func (*MemberExpression) String

func (e *MemberExpression) String() string

type Node

type Node interface {
	fmt.Stringer
	GetAttr() *Attr
}

type NumericLiteral

type NumericLiteral struct {
	*Attr
	Extra *Extra
	Value float64
}

TODO: Value is always float64 Can delay conversion and adapt to int vs. float

func (*NumericLiteral) GetAttr

func (n *NumericLiteral) GetAttr() *Attr

func (*NumericLiteral) String

func (n *NumericLiteral) String() string

type Position

type Position struct {
	Line   int
	Column int
}

type Program

type Program struct {
	*Attr
	SourceType string
	Body       []Statement
}

func (*Program) GetAttr

func (p *Program) GetAttr() *Attr

func (*Program) String

func (p *Program) String() string

type SourceLocation

type SourceLocation struct {
	Start *Position
	End   *Position
}

type Statement

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

type StringLiteral

type StringLiteral struct {
	*Attr
	Extra *Extra
	Value string
}

func (*StringLiteral) GetAttr

func (s *StringLiteral) GetAttr() *Attr

func (*StringLiteral) String

func (s *StringLiteral) String() string

type VariableDeclaration

type VariableDeclaration struct {
	*Attr
	Declarations []*VariableDeclarator
	Kind         string
}

func (*VariableDeclaration) GetAttr

func (v *VariableDeclaration) GetAttr() *Attr

func (*VariableDeclaration) String

func (v *VariableDeclaration) String() string

type VariableDeclarator

type VariableDeclarator struct {
	*Attr
	ID   *Identifier
	Init Expression
}

func (*VariableDeclarator) GetAttr

func (v *VariableDeclarator) GetAttr() *Attr

func (*VariableDeclarator) String

func (v *VariableDeclarator) String() string

Jump to

Keyboard shortcuts

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