node

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: MIT Imports: 3 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument struct {
	FreeFloating freefloating.Collection
	Position     *position.Position
	Variadic     bool // if ... before variable
	IsReference  bool // if & before variable
	Expr         Node // Exression
}

Argument node

func NewArgument

func NewArgument(Expression Node, Variadic bool, IsReference bool) *Argument

NewArgument node constructor

func (*Argument) Attributes

func (n *Argument) Attributes() map[string]interface{}

Attributes returns node attributes as map

func (*Argument) GetFreeFloating added in v0.6.0

func (n *Argument) GetFreeFloating() *freefloating.Collection

func (*Argument) GetPosition added in v0.6.0

func (n *Argument) GetPosition() *position.Position

GetPosition returns node positions

func (*Argument) SetPosition added in v0.6.0

func (n *Argument) SetPosition(p *position.Position)

SetPosition sets node position

func (*Argument) Walk

func (n *Argument) Walk(v walker.Visitor)

Walk traverses nodes Walk is invoked recursively until v.EnterNode returns true

type ArgumentList added in v0.5.0

type ArgumentList struct {
	FreeFloating freefloating.Collection
	Position     *position.Position
	Arguments    []Node
}

ArgumentList node

func NewArgumentList added in v0.5.0

func NewArgumentList(Arguments []Node) *ArgumentList

NewArgumentList node constructor

func (*ArgumentList) Attributes added in v0.5.0

func (n *ArgumentList) Attributes() map[string]interface{}

Attributes returns node attributes as map

func (*ArgumentList) GetFreeFloating added in v0.6.0

func (n *ArgumentList) GetFreeFloating() *freefloating.Collection

func (*ArgumentList) GetPosition added in v0.6.0

func (n *ArgumentList) GetPosition() *position.Position

GetPosition returns node positions

func (*ArgumentList) SetPosition added in v0.6.0

func (n *ArgumentList) SetPosition(p *position.Position)

SetPosition sets node position

func (*ArgumentList) Walk added in v0.5.0

func (n *ArgumentList) Walk(v walker.Visitor)

Walk traverses nodes Walk is invoked recursively until v.EnterNode returns true

type Identifier

type Identifier struct {
	FreeFloating freefloating.Collection
	Position     *position.Position
	Value        string
}

Identifier node

func NewIdentifier

func NewIdentifier(Value string) *Identifier

NewIdentifier node constructor

func (*Identifier) Attributes

func (n *Identifier) Attributes() map[string]interface{}

Attributes returns node attributes as map

func (*Identifier) GetFreeFloating added in v0.6.0

func (n *Identifier) GetFreeFloating() *freefloating.Collection

func (*Identifier) GetPosition added in v0.6.0

func (n *Identifier) GetPosition() *position.Position

GetPosition returns node positions

func (*Identifier) SetPosition added in v0.6.0

func (n *Identifier) SetPosition(p *position.Position)

SetPosition sets node position

func (*Identifier) Walk

func (n *Identifier) Walk(v walker.Visitor)

Walk traverses nodes Walk is invoked recursively until v.EnterNode returns true

type Node

type Node interface {
	walker.Walkable
	Attributes() map[string]interface{} // Attributes returns node attributes as map
	SetPosition(p *position.Position)
	GetPosition() *position.Position
	GetFreeFloating() *freefloating.Collection
}

Node interface

type Nullable

type Nullable struct {
	FreeFloating freefloating.Collection
	Position     *position.Position
	Expr         Node
}

Nullable node

func NewNullable

func NewNullable(Expression Node) *Nullable

NewNullable node constructor

func (*Nullable) Attributes

func (n *Nullable) Attributes() map[string]interface{}

Attributes returns node attributes as map

func (*Nullable) GetFreeFloating added in v0.6.0

func (n *Nullable) GetFreeFloating() *freefloating.Collection

func (*Nullable) GetPosition added in v0.6.0

func (n *Nullable) GetPosition() *position.Position

GetPosition returns node positions

func (*Nullable) SetPosition added in v0.6.0

func (n *Nullable) SetPosition(p *position.Position)

SetPosition sets node position

func (*Nullable) Walk

func (n *Nullable) Walk(v walker.Visitor)

Walk traverses nodes Walk is invoked recursively until v.EnterNode returns true

type Parameter

type Parameter struct {
	FreeFloating freefloating.Collection
	Position     *position.Position
	ByRef        bool
	Variadic     bool
	VariableType Node
	Variable     Node
	DefaultValue Node
}

Parameter node

func NewParameter

func NewParameter(VariableType Node, Variable Node, DefaultValue Node, ByRef bool, Variadic bool) *Parameter

NewParameter node constructor

func (*Parameter) Attributes

func (n *Parameter) Attributes() map[string]interface{}

Attributes returns node attributes as map

func (*Parameter) GetFreeFloating added in v0.6.0

func (n *Parameter) GetFreeFloating() *freefloating.Collection

func (*Parameter) GetPosition added in v0.6.0

func (n *Parameter) GetPosition() *position.Position

GetPosition returns node positions

func (*Parameter) SetPosition added in v0.6.0

func (n *Parameter) SetPosition(p *position.Position)

SetPosition sets node position

func (*Parameter) Walk

func (n *Parameter) Walk(v walker.Visitor)

Walk traverses nodes Walk is invoked recursively until v.EnterNode returns true

type Root added in v0.5.0

type Root struct {
	FreeFloating freefloating.Collection
	Position     *position.Position
	Stmts        []Node
}

Root node

func NewRoot added in v0.5.0

func NewRoot(Stmts []Node) *Root

NewRoot node constructor

func (*Root) Attributes added in v0.5.0

func (n *Root) Attributes() map[string]interface{}

Attributes returns node attributes as map

func (*Root) GetFreeFloating added in v0.6.0

func (n *Root) GetFreeFloating() *freefloating.Collection

func (*Root) GetPosition added in v0.6.0

func (n *Root) GetPosition() *position.Position

GetPosition returns node positions

func (*Root) SetPosition added in v0.6.0

func (n *Root) SetPosition(p *position.Position)

SetPosition sets node position

func (*Root) Walk added in v0.5.0

func (n *Root) Walk(v walker.Visitor)

Walk traverses nodes Walk is invoked recursively until v.EnterNode returns true

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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