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 ¶
NewArgument node constructor
func (*Argument) GetFreeFloating ¶
func (n *Argument) GetFreeFloating() *freefloating.Collection
func (*Argument) GetPosition ¶
GetPosition returns node positions
func (*Argument) SetPosition ¶
SetPosition sets node position
type ArgumentList ¶
type ArgumentList struct { FreeFloating freefloating.Collection Position *position.Position Arguments []Node }
ArgumentList node
func NewArgumentList ¶
func NewArgumentList(Arguments []Node) *ArgumentList
NewArgumentList node constructor
func (*ArgumentList) GetFreeFloating ¶
func (n *ArgumentList) GetFreeFloating() *freefloating.Collection
func (*ArgumentList) GetPosition ¶
func (n *ArgumentList) GetPosition() *position.Position
GetPosition returns node positions
func (*ArgumentList) SetPosition ¶
func (n *ArgumentList) SetPosition(p *position.Position)
SetPosition sets node position
func (*ArgumentList) Walk ¶
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 (*Identifier) GetFreeFloating ¶
func (n *Identifier) GetFreeFloating() *freefloating.Collection
func (*Identifier) GetPosition ¶
func (n *Identifier) GetPosition() *position.Position
GetPosition returns node positions
func (*Identifier) SetPosition ¶
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 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 (*Nullable) GetFreeFloating ¶
func (n *Nullable) GetFreeFloating() *freefloating.Collection
func (*Nullable) GetPosition ¶
GetPosition returns node positions
func (*Nullable) SetPosition ¶
SetPosition sets node position
type Parameter ¶
type Parameter struct { FreeFloating freefloating.Collection Position *position.Position ByRef bool Variadic bool VariableType Node Variable *SimpleVar DefaultValue Node }
Parameter node
func NewParameter ¶
func NewParameter(VariableType Node, variable *SimpleVar, DefaultValue Node, ByRef bool, Variadic bool) *Parameter
NewParameter node constructor
func (*Parameter) GetFreeFloating ¶
func (n *Parameter) GetFreeFloating() *freefloating.Collection
func (*Parameter) GetPosition ¶
GetPosition returns node positions
func (*Parameter) SetPosition ¶
SetPosition sets node position
type Root ¶
type Root struct { FreeFloating freefloating.Collection Position *position.Position Stmts []Node }
Root node
func (*Root) GetFreeFloating ¶
func (n *Root) GetFreeFloating() *freefloating.Collection
func (*Root) GetPosition ¶
GetPosition returns node positions
func (*Root) SetPosition ¶
SetPosition sets node position
type SimpleVar ¶
type SimpleVar struct { FreeFloating freefloating.Collection Position *position.Position Name string // Variable name without leading "$" }
SimpleVar node is a plain PHP variable where it's name is a simple identifier.
For example, $x is a simple var. $$x is not a simple var, but rather a Variable, where VarName is a SimpleVar.
func (*SimpleVar) GetFreeFloating ¶
func (n *SimpleVar) GetFreeFloating() *freefloating.Collection
func (*SimpleVar) GetPosition ¶
GetPosition returns node positions
func (*SimpleVar) SetPosition ¶
SetPosition sets node position
type Var ¶
type Var struct { FreeFloating freefloating.Collection Position *position.Position Expr Node }
Var is an expression that evaluates to a variable. Unlike SimpleVar, it can contain complex expressions.
Here are some examples:
$x - SimpleVar.Name="x" $$x - Var.Expr.(*SimpleVar).Name="x" ${"x"} - Var.Expr.(*scalar.String).Value="x"
func (*Var) GetFreeFloating ¶
func (n *Var) GetFreeFloating() *freefloating.Collection
func (*Var) GetPosition ¶
GetPosition returns node positions
func (*Var) SetPosition ¶
SetPosition sets node position