make nodes fields public

This commit is contained in:
z7zmey 2018-01-04 23:26:04 +02:00
parent 02807502d3
commit 469db8f9e2
141 changed files with 1192 additions and 1198 deletions

View File

@ -7,13 +7,13 @@ type Argument struct {
variadic bool variadic bool
} }
func NewArgument(expression Node, variadic bool) Node { func NewArgument(Expression Node, variadic bool) Node {
return &Argument{ return &Argument{
map[string]interface{}{ map[string]interface{}{
"variadic": variadic, "variadic": variadic,
}, },
nil, nil,
expression, Expression,
variadic, variadic,
} }
} }
@ -22,12 +22,12 @@ func (n Argument) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }
func (n Argument) Attribute(key string) interface{} { func (n Argument) Attribute(Key string) interface{} {
return n.attributes[key] return n.attributes[Key]
} }
func (n Argument) SetAttribute(key string, value interface{}) Node { func (n Argument) SetAttribute(Key string, Value interface{}) Node {
n.attributes[key] = value n.attributes[Key] = Value
return n return n
} }

View File

@ -7,14 +7,14 @@ import (
type Array struct { type Array struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node Items []node.Node
} }
func NewArray(items []node.Node) node.Node { func NewArray(Items []node.Node) node.Node {
return &Array{ return &Array{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, Items,
} }
} }
@ -36,9 +36,9 @@ func (n Array) Walk(v node.Visitor) {
return return
} }
if n.items != nil { if n.Items != nil {
vv := v.GetChildrenVisitor("items") vv := v.GetChildrenVisitor("Items")
for _, nn := range n.items { for _, nn := range n.Items {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,16 +7,16 @@ import (
type ArrayDimFetch struct { type ArrayDimFetch struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
dim node.Node Dim node.Node
} }
func NewArrayDimFetch(variable node.Node, dim node.Node) node.Node { func NewArrayDimFetch(Variable node.Node, Dim node.Node) node.Node {
return &ArrayDimFetch{ return &ArrayDimFetch{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
dim, Dim,
} }
} }
@ -38,14 +38,14 @@ func (n ArrayDimFetch) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.dim != nil { if n.Dim != nil {
vv := v.GetChildrenVisitor("dim") vv := v.GetChildrenVisitor("Dim")
n.dim.Walk(vv) n.Dim.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,18 +7,18 @@ import (
type ArrayItem struct { type ArrayItem struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
key node.Node Key node.Node
val node.Node Val node.Node
} }
func NewArrayItem(key node.Node, val node.Node, byRef bool) node.Node { func NewArrayItem(Key node.Node, Val node.Node, byRef bool) node.Node {
return &ArrayItem{ return &ArrayItem{
map[string]interface{}{ map[string]interface{}{
"byRef": byRef, "byRef": byRef,
}, },
nil, nil,
key, Key,
val, Val,
} }
} }
@ -40,14 +40,14 @@ func (n ArrayItem) Walk(v node.Visitor) {
return return
} }
if n.key != nil { if n.Key != nil {
vv := v.GetChildrenVisitor("key") vv := v.GetChildrenVisitor("Key")
n.key.Walk(vv) n.Key.Walk(vv)
} }
if n.val != nil { if n.Val != nil {
vv := v.GetChildrenVisitor("val") vv := v.GetChildrenVisitor("Val")
n.val.Walk(vv) n.Val.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Assign struct {
AssignOp AssignOp
} }
func NewAssign(variable node.Node, expression node.Node) node.Node { func NewAssign(Variable node.Node, Expression node.Node) node.Node {
return &Assign{ return &Assign{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Assign) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,6 +7,6 @@ import (
type AssignOp struct { type AssignOp struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
expression node.Node Expression node.Node
} }

View File

@ -8,13 +8,13 @@ type AssignRef struct {
AssignOp AssignOp
} }
func NewAssignRef(variable node.Node, expression node.Node) node.Node { func NewAssignRef(Variable node.Node, Expression node.Node) node.Node {
return &AssignRef{ return &AssignRef{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n AssignRef) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type BitwiseAnd struct {
AssignOp AssignOp
} }
func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node { func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseAnd{ return &BitwiseAnd{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BitwiseAnd) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type BitwiseOr struct {
AssignOp AssignOp
} }
func NewBitwiseOr(variable node.Node, expression node.Node) node.Node { func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseOr{ return &BitwiseOr{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BitwiseOr) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type BitwiseXor struct {
AssignOp AssignOp
} }
func NewBitwiseXor(variable node.Node, expression node.Node) node.Node { func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseXor{ return &BitwiseXor{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BitwiseXor) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Concat struct {
AssignOp AssignOp
} }
func NewConcat(variable node.Node, expression node.Node) node.Node { func NewConcat(Variable node.Node, Expression node.Node) node.Node {
return &Concat{ return &Concat{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Concat) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Div struct {
AssignOp AssignOp
} }
func NewDiv(variable node.Node, expression node.Node) node.Node { func NewDiv(Variable node.Node, Expression node.Node) node.Node {
return &Div{ return &Div{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Div) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Minus struct {
AssignOp AssignOp
} }
func NewMinus(variable node.Node, expression node.Node) node.Node { func NewMinus(Variable node.Node, Expression node.Node) node.Node {
return &Minus{ return &Minus{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Minus) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Mod struct {
AssignOp AssignOp
} }
func NewMod(variable node.Node, expression node.Node) node.Node { func NewMod(Variable node.Node, Expression node.Node) node.Node {
return &Mod{ return &Mod{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Mod) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Mul struct {
AssignOp AssignOp
} }
func NewMul(variable node.Node, expression node.Node) node.Node { func NewMul(Variable node.Node, Expression node.Node) node.Node {
return &Mul{ return &Mul{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Mul) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Plus struct {
AssignOp AssignOp
} }
func NewPlus(variable node.Node, expression node.Node) node.Node { func NewPlus(Variable node.Node, Expression node.Node) node.Node {
return &Plus{ return &Plus{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Plus) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Pow struct {
AssignOp AssignOp
} }
func NewPow(variable node.Node, expression node.Node) node.Node { func NewPow(Variable node.Node, Expression node.Node) node.Node {
return &Pow{ return &Pow{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Pow) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type ShiftLeft struct {
AssignOp AssignOp
} }
func NewShiftLeft(variable node.Node, expression node.Node) node.Node { func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
return &ShiftLeft{ return &ShiftLeft{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n ShiftLeft) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type ShiftRight struct {
AssignOp AssignOp
} }
func NewShiftRight(variable node.Node, expression node.Node) node.Node { func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
return &ShiftRight{ return &ShiftRight{
AssignOp{ AssignOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n ShiftRight) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.expression != nil { if n.Expression != nil {
vv := v.GetChildrenVisitor("expression") vv := v.GetChildrenVisitor("Expression")
n.expression.Walk(vv) n.Expression.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,6 +7,6 @@ import (
type BinaryOp struct { type BinaryOp struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
left node.Node Left node.Node
right node.Node Right node.Node
} }

View File

@ -8,13 +8,13 @@ type BitwiseAnd struct {
BinaryOp BinaryOp
} }
func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node { func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseAnd{ return &BitwiseAnd{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BitwiseAnd) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type BitwiseOr struct {
BinaryOp BinaryOp
} }
func NewBitwiseOr(variable node.Node, expression node.Node) node.Node { func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseOr{ return &BitwiseOr{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BitwiseOr) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type BitwiseXor struct {
BinaryOp BinaryOp
} }
func NewBitwiseXor(variable node.Node, expression node.Node) node.Node { func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseXor{ return &BitwiseXor{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BitwiseXor) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type BooleanAnd struct {
BinaryOp BinaryOp
} }
func NewBooleanAnd(variable node.Node, expression node.Node) node.Node { func NewBooleanAnd(Variable node.Node, Expression node.Node) node.Node {
return &BooleanAnd{ return &BooleanAnd{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BooleanAnd) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type BooleanOr struct {
BinaryOp BinaryOp
} }
func NewBooleanOr(variable node.Node, expression node.Node) node.Node { func NewBooleanOr(Variable node.Node, Expression node.Node) node.Node {
return &BooleanOr{ return &BooleanOr{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n BooleanOr) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Coalesce struct {
BinaryOp BinaryOp
} }
func NewCoalesce(variable node.Node, expression node.Node) node.Node { func NewCoalesce(Variable node.Node, Expression node.Node) node.Node {
return &Coalesce{ return &Coalesce{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Coalesce) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Concat struct {
BinaryOp BinaryOp
} }
func NewConcat(variable node.Node, expression node.Node) node.Node { func NewConcat(Variable node.Node, Expression node.Node) node.Node {
return &Concat{ return &Concat{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Concat) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Div struct {
BinaryOp BinaryOp
} }
func NewDiv(variable node.Node, expression node.Node) node.Node { func NewDiv(Variable node.Node, Expression node.Node) node.Node {
return &Div{ return &Div{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Div) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Equal struct {
BinaryOp BinaryOp
} }
func NewEqual(variable node.Node, expression node.Node) node.Node { func NewEqual(Variable node.Node, Expression node.Node) node.Node {
return &Equal{ return &Equal{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Equal) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Greater struct {
BinaryOp BinaryOp
} }
func NewGreater(variable node.Node, expression node.Node) node.Node { func NewGreater(Variable node.Node, Expression node.Node) node.Node {
return &Greater{ return &Greater{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Greater) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type GreaterOrEqual struct {
BinaryOp BinaryOp
} }
func NewGreaterOrEqual(variable node.Node, expression node.Node) node.Node { func NewGreaterOrEqual(Variable node.Node, Expression node.Node) node.Node {
return &GreaterOrEqual{ return &GreaterOrEqual{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n GreaterOrEqual) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Identical struct {
BinaryOp BinaryOp
} }
func NewIdentical(variable node.Node, expression node.Node) node.Node { func NewIdentical(Variable node.Node, Expression node.Node) node.Node {
return &Identical{ return &Identical{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Identical) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type LogicalAnd struct {
BinaryOp BinaryOp
} }
func NewLogicalAnd(variable node.Node, expression node.Node) node.Node { func NewLogicalAnd(Variable node.Node, Expression node.Node) node.Node {
return &LogicalAnd{ return &LogicalAnd{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n LogicalAnd) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type LogicalOr struct {
BinaryOp BinaryOp
} }
func NewLogicalOr(variable node.Node, expression node.Node) node.Node { func NewLogicalOr(Variable node.Node, Expression node.Node) node.Node {
return &LogicalOr{ return &LogicalOr{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n LogicalOr) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type LogicalXor struct {
BinaryOp BinaryOp
} }
func NewLogicalXor(variable node.Node, expression node.Node) node.Node { func NewLogicalXor(Variable node.Node, Expression node.Node) node.Node {
return &LogicalXor{ return &LogicalXor{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n LogicalXor) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Minus struct {
BinaryOp BinaryOp
} }
func NewMinus(variable node.Node, expression node.Node) node.Node { func NewMinus(Variable node.Node, Expression node.Node) node.Node {
return &Minus{ return &Minus{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Minus) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Mod struct {
BinaryOp BinaryOp
} }
func NewMod(variable node.Node, expression node.Node) node.Node { func NewMod(Variable node.Node, Expression node.Node) node.Node {
return &Mod{ return &Mod{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Mod) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Mul struct {
BinaryOp BinaryOp
} }
func NewMul(variable node.Node, expression node.Node) node.Node { func NewMul(Variable node.Node, Expression node.Node) node.Node {
return &Mul{ return &Mul{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Mul) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type NotEqual struct {
BinaryOp BinaryOp
} }
func NewNotEqual(variable node.Node, expression node.Node) node.Node { func NewNotEqual(Variable node.Node, Expression node.Node) node.Node {
return &NotEqual{ return &NotEqual{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n NotEqual) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type NotIdentical struct {
BinaryOp BinaryOp
} }
func NewNotIdentical(variable node.Node, expression node.Node) node.Node { func NewNotIdentical(Variable node.Node, Expression node.Node) node.Node {
return &NotIdentical{ return &NotIdentical{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n NotIdentical) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Plus struct {
BinaryOp BinaryOp
} }
func NewPlus(variable node.Node, expression node.Node) node.Node { func NewPlus(Variable node.Node, Expression node.Node) node.Node {
return &Plus{ return &Plus{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Plus) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Pow struct {
BinaryOp BinaryOp
} }
func NewPow(variable node.Node, expression node.Node) node.Node { func NewPow(Variable node.Node, Expression node.Node) node.Node {
return &Pow{ return &Pow{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Pow) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type ShiftLeft struct {
BinaryOp BinaryOp
} }
func NewShiftLeft(variable node.Node, expression node.Node) node.Node { func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
return &ShiftLeft{ return &ShiftLeft{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n ShiftLeft) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type ShiftRight struct {
BinaryOp BinaryOp
} }
func NewShiftRight(variable node.Node, expression node.Node) node.Node { func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
return &ShiftRight{ return &ShiftRight{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n ShiftRight) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Smaller struct {
BinaryOp BinaryOp
} }
func NewSmaller(variable node.Node, expression node.Node) node.Node { func NewSmaller(Variable node.Node, Expression node.Node) node.Node {
return &Smaller{ return &Smaller{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Smaller) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type SmallerOrEqual struct {
BinaryOp BinaryOp
} }
func NewSmallerOrEqual(variable node.Node, expression node.Node) node.Node { func NewSmallerOrEqual(Variable node.Node, Expression node.Node) node.Node {
return &SmallerOrEqual{ return &SmallerOrEqual{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n SmallerOrEqual) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,13 +8,13 @@ type Spaceship struct {
BinaryOp BinaryOp
} }
func NewSpaceship(variable node.Node, expression node.Node) node.Node { func NewSpaceship(Variable node.Node, Expression node.Node) node.Node {
return &Spaceship{ return &Spaceship{
BinaryOp{ BinaryOp{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
expression, Expression,
}, },
} }
} }
@ -37,14 +37,14 @@ func (n Spaceship) Walk(v node.Visitor) {
return return
} }
if n.left != nil { if n.Left != nil {
vv := v.GetChildrenVisitor("left") vv := v.GetChildrenVisitor("Left")
n.left.Walk(vv) n.Left.Walk(vv)
} }
if n.right != nil { if n.Right != nil {
vv := v.GetChildrenVisitor("right") vv := v.GetChildrenVisitor("Right")
n.right.Walk(vv) n.Right.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -10,11 +10,11 @@ type BitwiseNot struct {
expr node.Node expr node.Node
} }
func NewBitwiseNot(expression node.Node) node.Node { func NewBitwiseNot(Expression node.Node) node.Node {
return &BitwiseNot{ return &BitwiseNot{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -10,11 +10,11 @@ type BooleanNot struct {
expr node.Node expr node.Node
} }
func NewBooleanNot(expression node.Node) node.Node { func NewBooleanNot(Expression node.Node) node.Node {
return &BooleanNot{ return &BooleanNot{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -7,16 +7,16 @@ import (
type ClassConstFetch struct { type ClassConstFetch struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node Class node.Node
constantName node.Node ConstantName node.Node
} }
func NewClassConstFetch(class node.Node, constantName node.Node) node.Node { func NewClassConstFetch(Class node.Node, ConstantName node.Node) node.Node {
return &ClassConstFetch{ return &ClassConstFetch{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, Class,
constantName, ConstantName,
} }
} }
@ -38,14 +38,14 @@ func (n ClassConstFetch) Walk(v node.Visitor) {
return return
} }
if n.constantName != nil { if n.ConstantName != nil {
vv := v.GetChildrenVisitor("constantName") vv := v.GetChildrenVisitor("ConstantName")
n.constantName.Walk(vv) n.ConstantName.Walk(vv)
} }
if n.class != nil { if n.Class != nil {
vv := v.GetChildrenVisitor("class") vv := v.GetChildrenVisitor("Class")
n.class.Walk(vv) n.Class.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -10,11 +10,11 @@ type Clone struct {
expr node.Node expr node.Node
} }
func NewClone(expression node.Node) node.Node { func NewClone(Expression node.Node) node.Node {
return &Clone{ return &Clone{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -7,13 +7,13 @@ import (
type Closure struct { type Closure struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
params []node.Node Params []node.Node
uses []node.Node Uses []node.Node
returnType node.Node ReturnType node.Node
stmts []node.Node Stmts []node.Node
} }
func NewClosure(params []node.Node, uses []node.Node, returnType node.Node, stmts []node.Node, isStatic bool, isReturnRef bool, phpDocComment string) node.Node { func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, isStatic bool, isReturnRef bool, phpDocComment string) node.Node {
return &Closure{ return &Closure{
map[string]interface{}{ map[string]interface{}{
"isReturnRef": isReturnRef, "isReturnRef": isReturnRef,
@ -21,10 +21,10 @@ func NewClosure(params []node.Node, uses []node.Node, returnType node.Node, stmt
"phpDocComment": phpDocComment, "phpDocComment": phpDocComment,
}, },
nil, nil,
params, Params,
uses, Uses,
returnType, ReturnType,
stmts, Stmts,
} }
} }
@ -46,28 +46,28 @@ func (n Closure) Walk(v node.Visitor) {
return return
} }
if n.params != nil { if n.Params != nil {
vv := v.GetChildrenVisitor("params") vv := v.GetChildrenVisitor("Params")
for _, nn := range n.params { for _, nn := range n.Params {
nn.Walk(vv) nn.Walk(vv)
} }
} }
if n.uses != nil { if n.Uses != nil {
vv := v.GetChildrenVisitor("uses") vv := v.GetChildrenVisitor("Uses")
for _, nn := range n.uses { for _, nn := range n.Uses {
nn.Walk(vv) nn.Walk(vv)
} }
} }
if n.returnType != nil { if n.ReturnType != nil {
vv := v.GetChildrenVisitor("returnType") vv := v.GetChildrenVisitor("ReturnType")
n.returnType.Walk(vv) n.ReturnType.Walk(vv)
} }
if n.stmts != nil { if n.Stmts != nil {
vv := v.GetChildrenVisitor("stmts") vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.stmts { for _, nn := range n.Stmts {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,16 +7,16 @@ import (
type ClusureUse struct { type ClusureUse struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
} }
func NewClusureUse(variable node.Node, byRef bool) node.Node { func NewClusureUse(Variable node.Node, byRef bool) node.Node {
return &ClusureUse{ return &ClusureUse{
map[string]interface{}{ map[string]interface{}{
"byRef": byRef, "byRef": byRef,
}, },
nil, nil,
variable, Variable,
} }
} }
@ -38,9 +38,9 @@ func (n ClusureUse) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,14 +7,14 @@ import (
type ConstFetch struct { type ConstFetch struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
constant node.Node Constant node.Node
} }
func NewConstFetch(constant node.Node) node.Node { func NewConstFetch(Constant node.Node) node.Node {
return &ConstFetch{ return &ConstFetch{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
constant, Constant,
} }
} }
@ -36,9 +36,9 @@ func (n ConstFetch) Walk(v node.Visitor) {
return return
} }
if n.constant != nil { if n.Constant != nil {
vv := v.GetChildrenVisitor("constant") vv := v.GetChildrenVisitor("Constant")
n.constant.Walk(vv) n.Constant.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -10,11 +10,11 @@ type Empty struct {
expr node.Node expr node.Node
} }
func NewEmpty(expression node.Node) node.Node { func NewEmpty(Expression node.Node) node.Node {
return &Empty{ return &Empty{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -10,11 +10,11 @@ type ErrorSuppress struct {
expr node.Node expr node.Node
} }
func NewErrorSuppress(expression node.Node) node.Node { func NewErrorSuppress(Expression node.Node) node.Node {
return &ErrorSuppress{ return &ErrorSuppress{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -10,11 +10,11 @@ type Eval struct {
expr node.Node expr node.Node
} }
func NewEval(expression node.Node) node.Node { func NewEval(Expression node.Node) node.Node {
return &Eval{ return &Eval{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -7,16 +7,16 @@ import (
type FunctionCall struct { type FunctionCall struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
function node.Node Function node.Node
arguments []node.Node Arguments []node.Node
} }
func NewFunctionCall(function node.Node, arguments []node.Node) node.Node { func NewFunctionCall(Function node.Node, Arguments []node.Node) node.Node {
return &FunctionCall{ return &FunctionCall{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
function, Function,
arguments, Arguments,
} }
} }
@ -38,14 +38,14 @@ func (n FunctionCall) Walk(v node.Visitor) {
return return
} }
if n.function != nil { if n.Function != nil {
vv := v.GetChildrenVisitor("function") vv := v.GetChildrenVisitor("Function")
n.function.Walk(vv) n.Function.Walk(vv)
} }
if n.arguments != nil { if n.Arguments != nil {
vv := v.GetChildrenVisitor("arguments") vv := v.GetChildrenVisitor("Arguments")
for _, nn := range n.arguments { for _, nn := range n.Arguments {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -10,11 +10,11 @@ type Include struct {
expr node.Node expr node.Node
} }
func NewInclude(expression node.Node) node.Node { func NewInclude(Expression node.Node) node.Node {
return &Include{ return &Include{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -10,11 +10,11 @@ type IncludeOnce struct {
expr node.Node expr node.Node
} }
func NewIncludeOnce(expression node.Node) node.Node { func NewIncludeOnce(Expression node.Node) node.Node {
return &IncludeOnce{ return &IncludeOnce{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -8,15 +8,15 @@ type InstanceOf struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
class node.Node Class node.Node
} }
func NewInstanceOf(expr node.Node, class node.Node) node.Node { func NewInstanceOf(expr node.Node, Class node.Node) node.Node {
return &InstanceOf{ return &InstanceOf{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
class, Class,
} }
} }
@ -43,9 +43,9 @@ func (n InstanceOf) Walk(v node.Visitor) {
n.expr.Walk(vv) n.expr.Walk(vv)
} }
if n.class != nil { if n.Class != nil {
vv := v.GetChildrenVisitor("class") vv := v.GetChildrenVisitor("Class")
n.class.Walk(vv) n.Class.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,14 +7,14 @@ import (
type Isset struct { type Isset struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variables []node.Node Variables []node.Node
} }
func NewIsset(variables []node.Node) node.Node { func NewIsset(Variables []node.Node) node.Node {
return &Isset{ return &Isset{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variables, Variables,
} }
} }
@ -36,9 +36,9 @@ func (n Isset) Walk(v node.Visitor) {
return return
} }
if n.variables != nil { if n.Variables != nil {
vv := v.GetChildrenVisitor("variables") vv := v.GetChildrenVisitor("Variables")
for _, nn := range n.variables { for _, nn := range n.Variables {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,14 +7,14 @@ import (
type List struct { type List struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node Items []node.Node
} }
func NewList(items []node.Node) node.Node { func NewList(Items []node.Node) node.Node {
return &List{ return &List{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, Items,
} }
} }
@ -36,9 +36,9 @@ func (n List) Walk(v node.Visitor) {
return return
} }
if n.items != nil { if n.Items != nil {
vv := v.GetChildrenVisitor("items") vv := v.GetChildrenVisitor("Items")
for _, nn := range n.items { for _, nn := range n.Items {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,18 +7,18 @@ import (
type MethodCall struct { type MethodCall struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
method node.Node Method node.Node
arguments []node.Node Arguments []node.Node
} }
func NewMethodCall(variable node.Node, method node.Node, arguments []node.Node) node.Node { func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) node.Node {
return &MethodCall{ return &MethodCall{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
method, Method,
arguments, Arguments,
} }
} }
@ -40,19 +40,19 @@ func (n MethodCall) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.method != nil { if n.Method != nil {
vv := v.GetChildrenVisitor("method") vv := v.GetChildrenVisitor("Method")
n.method.Walk(vv) n.Method.Walk(vv)
} }
if n.arguments != nil { if n.Arguments != nil {
vv := v.GetChildrenVisitor("arguments") vv := v.GetChildrenVisitor("Arguments")
for _, nn := range n.arguments { for _, nn := range n.Arguments {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,16 +7,16 @@ import (
type New struct { type New struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node Class node.Node
arguments []node.Node Arguments []node.Node
} }
func NewNew(class node.Node, arguments []node.Node) node.Node { func NewNew(Class node.Node, Arguments []node.Node) node.Node {
return &New{ return &New{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, Class,
arguments, Arguments,
} }
} }
@ -38,14 +38,14 @@ func (n New) Walk(v node.Visitor) {
return return
} }
if n.class != nil { if n.Class != nil {
vv := v.GetChildrenVisitor("class") vv := v.GetChildrenVisitor("Class")
n.class.Walk(vv) n.Class.Walk(vv)
} }
if n.arguments != nil { if n.Arguments != nil {
vv := v.GetChildrenVisitor("arguments") vv := v.GetChildrenVisitor("Arguments")
for _, nn := range n.arguments { for _, nn := range n.Arguments {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,14 +7,14 @@ import (
type PostDec struct { type PostDec struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
} }
func NewPostDec(variable node.Node) node.Node { func NewPostDec(Variable node.Node) node.Node {
return &PostDec{ return &PostDec{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
} }
} }
@ -36,9 +36,9 @@ func (n PostDec) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,14 +7,14 @@ import (
type PostInc struct { type PostInc struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
} }
func NewPostInc(variable node.Node) node.Node { func NewPostInc(Variable node.Node) node.Node {
return &PostInc{ return &PostInc{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
} }
} }
@ -36,9 +36,9 @@ func (n PostInc) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,14 +7,14 @@ import (
type PreDec struct { type PreDec struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
} }
func NewPreDec(variable node.Node) node.Node { func NewPreDec(Variable node.Node) node.Node {
return &PreDec{ return &PreDec{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
} }
} }
@ -36,9 +36,9 @@ func (n PreDec) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,14 +7,14 @@ import (
type PreInc struct { type PreInc struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
} }
func NewPreInc(variable node.Node) node.Node { func NewPreInc(Variable node.Node) node.Node {
return &PreInc{ return &PreInc{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
} }
} }
@ -36,9 +36,9 @@ func (n PreInc) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -10,11 +10,11 @@ type Print struct {
expr node.Node expr node.Node
} }
func NewPrint(expression node.Node) node.Node { func NewPrint(Expression node.Node) node.Node {
return &Print{ return &Print{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -7,16 +7,16 @@ import (
type PropertyFetch struct { type PropertyFetch struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node Variable node.Node
property node.Node Property node.Node
} }
func NewPropertyFetch(variable node.Node, property node.Node) node.Node { func NewPropertyFetch(Variable node.Node, Property node.Node) node.Node {
return &PropertyFetch{ return &PropertyFetch{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, Variable,
property, Property,
} }
} }
@ -38,14 +38,14 @@ func (n PropertyFetch) Walk(v node.Visitor) {
return return
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.property != nil { if n.Property != nil {
vv := v.GetChildrenVisitor("property") vv := v.GetChildrenVisitor("Property")
n.property.Walk(vv) n.Property.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -10,11 +10,11 @@ type Require struct {
expr node.Node expr node.Node
} }
func NewRequire(expression node.Node) node.Node { func NewRequire(Expression node.Node) node.Node {
return &Require{ return &Require{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -10,11 +10,11 @@ type RequireOnce struct {
expr node.Node expr node.Node
} }
func NewRequireOnce(expression node.Node) node.Node { func NewRequireOnce(Expression node.Node) node.Node {
return &RequireOnce{ return &RequireOnce{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -7,14 +7,14 @@ import (
type ShellExec struct { type ShellExec struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
parts []node.Node Parts []node.Node
} }
func NewShellExec(parts []node.Node) node.Node { func NewShellExec(Parts []node.Node) node.Node {
return &ShellExec{ return &ShellExec{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, Parts,
} }
} }
@ -36,9 +36,9 @@ func (n ShellExec) Walk(v node.Visitor) {
return return
} }
if n.parts != nil { if n.Parts != nil {
vv := v.GetChildrenVisitor("parts") vv := v.GetChildrenVisitor("Parts")
for _, nn := range n.parts { for _, nn := range n.Parts {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,14 +7,14 @@ import (
type ShortArray struct { type ShortArray struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node Items []node.Node
} }
func NewShortArray(items []node.Node) node.Node { func NewShortArray(Items []node.Node) node.Node {
return &ShortArray{ return &ShortArray{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, Items,
} }
} }
@ -36,9 +36,9 @@ func (n ShortArray) Walk(v node.Visitor) {
return return
} }
if n.items != nil { if n.Items != nil {
vv := v.GetChildrenVisitor("items") vv := v.GetChildrenVisitor("Items")
for _, nn := range n.items { for _, nn := range n.Items {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,14 +7,14 @@ import (
type ShortList struct { type ShortList struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node Items []node.Node
} }
func NewShortList(items []node.Node) node.Node { func NewShortList(Items []node.Node) node.Node {
return &ShortList{ return &ShortList{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, Items,
} }
} }
@ -36,9 +36,9 @@ func (n ShortList) Walk(v node.Visitor) {
return return
} }
if n.items != nil { if n.Items != nil {
vv := v.GetChildrenVisitor("items") vv := v.GetChildrenVisitor("Items")
for _, nn := range n.items { for _, nn := range n.Items {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,18 +7,18 @@ import (
type StaticCall struct { type StaticCall struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node Class node.Node
call node.Node Call node.Node
arguments []node.Node Arguments []node.Node
} }
func NewStaticCall(class node.Node, call node.Node, arguments []node.Node) node.Node { func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) node.Node {
return &StaticCall{ return &StaticCall{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, Class,
call, Call,
arguments, Arguments,
} }
} }
@ -40,19 +40,19 @@ func (n StaticCall) Walk(v node.Visitor) {
return return
} }
if n.class != nil { if n.Class != nil {
vv := v.GetChildrenVisitor("class") vv := v.GetChildrenVisitor("Class")
n.class.Walk(vv) n.Class.Walk(vv)
} }
if n.call != nil { if n.Call != nil {
vv := v.GetChildrenVisitor("call") vv := v.GetChildrenVisitor("Call")
n.call.Walk(vv) n.Call.Walk(vv)
} }
if n.arguments != nil { if n.Arguments != nil {
vv := v.GetChildrenVisitor("arguments") vv := v.GetChildrenVisitor("Arguments")
for _, nn := range n.arguments { for _, nn := range n.Arguments {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -7,16 +7,16 @@ import (
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node Class node.Node
property node.Node Property node.Node
} }
func NewStaticPropertyFetch(class node.Node, property node.Node) node.Node { func NewStaticPropertyFetch(Class node.Node, Property node.Node) node.Node {
return &StaticPropertyFetch{ return &StaticPropertyFetch{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, Class,
property, Property,
} }
} }
@ -38,14 +38,14 @@ func (n StaticPropertyFetch) Walk(v node.Visitor) {
return return
} }
if n.class != nil { if n.Class != nil {
vv := v.GetChildrenVisitor("class") vv := v.GetChildrenVisitor("Class")
n.class.Walk(vv) n.Class.Walk(vv)
} }
if n.property != nil { if n.Property != nil {
vv := v.GetChildrenVisitor("property") vv := v.GetChildrenVisitor("Property")
n.property.Walk(vv) n.Property.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,18 +7,18 @@ import (
type Ternary struct { type Ternary struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
condition node.Node Condition node.Node
ifTrue node.Node IfTrue node.Node
ifFalse node.Node IfFalse node.Node
} }
func NewTernary(condition node.Node, ifTrue node.Node, ifFalse node.Node) node.Node { func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) node.Node {
return &Ternary{ return &Ternary{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
condition, Condition,
ifTrue, IfTrue,
ifFalse, IfFalse,
} }
} }
@ -40,19 +40,19 @@ func (n Ternary) Walk(v node.Visitor) {
return return
} }
if n.condition != nil { if n.Condition != nil {
vv := v.GetChildrenVisitor("condition") vv := v.GetChildrenVisitor("Condition")
n.condition.Walk(vv) n.Condition.Walk(vv)
} }
if n.ifTrue != nil { if n.IfTrue != nil {
vv := v.GetChildrenVisitor("ifTrue") vv := v.GetChildrenVisitor("IfTrue")
n.ifTrue.Walk(vv) n.IfTrue.Walk(vv)
} }
if n.ifFalse != nil { if n.IfFalse != nil {
vv := v.GetChildrenVisitor("ifFalse") vv := v.GetChildrenVisitor("IfFalse")
n.ifFalse.Walk(vv) n.IfFalse.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -10,11 +10,11 @@ type UnaryMinus struct {
expr node.Node expr node.Node
} }
func NewUnaryMinus(expression node.Node) node.Node { func NewUnaryMinus(Expression node.Node) node.Node {
return &UnaryMinus{ return &UnaryMinus{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -10,11 +10,11 @@ type UnaryPlus struct {
expr node.Node expr node.Node
} }
func NewUnaryPlus(expression node.Node) node.Node { func NewUnaryPlus(Expression node.Node) node.Node {
return &UnaryPlus{ return &UnaryPlus{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -7,14 +7,14 @@ import (
type Variable struct { type Variable struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
varName node.Node VarName node.Node
} }
func NewVariable(varName node.Node) node.Node { func NewVariable(VarName node.Node) node.Node {
return &Variable{ return &Variable{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
varName, VarName,
} }
} }
@ -36,9 +36,9 @@ func (n Variable) Walk(v node.Visitor) {
return return
} }
if n.varName != nil { if n.VarName != nil {
vv := v.GetChildrenVisitor("varName") vv := v.GetChildrenVisitor("VarName")
n.varName.Walk(vv) n.VarName.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,16 +7,16 @@ import (
type Yield struct { type Yield struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
key node.Node Key node.Node
value node.Node Value node.Node
} }
func NewYield(key node.Node, value node.Node) node.Node { func NewYield(Key node.Node, Value node.Node) node.Node {
return &Yield{ return &Yield{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
key, Key,
value, Value,
} }
} }
@ -38,14 +38,14 @@ func (n Yield) Walk(v node.Visitor) {
return return
} }
if n.key != nil { if n.Key != nil {
vv := v.GetChildrenVisitor("key") vv := v.GetChildrenVisitor("Key")
n.key.Walk(vv) n.Key.Walk(vv)
} }
if n.value != nil { if n.Value != nil {
vv := v.GetChildrenVisitor("value") vv := v.GetChildrenVisitor("Value")
n.value.Walk(vv) n.Value.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -10,11 +10,11 @@ type YieldFrom struct {
expr node.Node expr node.Node
} }
func NewYieldFrom(expression node.Node) node.Node { func NewYieldFrom(Expression node.Node) node.Node {
return &YieldFrom{ return &YieldFrom{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }

View File

@ -12,7 +12,7 @@ type Identifier struct {
func NewIdentifier(token token.Token) Node { func NewIdentifier(token token.Token) Node {
return &Identifier{ return &Identifier{
map[string]interface{}{ map[string]interface{}{
"value": token.Value, "Value": token.Value,
}, },
nil, nil,
} }
@ -22,12 +22,12 @@ func (n Identifier) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }
func (n Identifier) Attribute(key string) interface{} { func (n Identifier) Attribute(Key string) interface{} {
return n.attributes[key] return n.attributes[Key]
} }
func (n Identifier) SetAttribute(key string, value interface{}) Node { func (n Identifier) SetAttribute(Key string, Value interface{}) Node {
n.attributes[key] = value n.attributes[Key] = Value
return n return n
} }

View File

@ -8,12 +8,12 @@ type FullyQualified struct {
Name Name
} }
func NewFullyQualified(parts []node.Node) node.Node { func NewFullyQualified(Parts []node.Node) node.Node {
return &FullyQualified{ return &FullyQualified{
Name{ Name{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, Parts,
}, },
} }
} }

View File

@ -7,14 +7,14 @@ import (
type Name struct { type Name struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
parts []node.Node Parts []node.Node
} }
func NewName(parts []node.Node) node.Node { func NewName(Parts []node.Node) node.Node {
return &Name{ return &Name{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, Parts,
} }
} }
@ -36,9 +36,9 @@ func (n Name) Walk(v node.Visitor) {
return return
} }
if n.parts != nil { if n.Parts != nil {
vv := v.GetChildrenVisitor("parts") vv := v.GetChildrenVisitor("Parts")
for _, nn := range n.parts { for _, nn := range n.Parts {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -9,10 +9,10 @@ type NamePart struct {
position *node.Position position *node.Position
} }
func NewNamePart(value string) node.Node { func NewNamePart(Value string) node.Node {
return &NamePart{ return &NamePart{
map[string]interface{}{ map[string]interface{}{
"value": value, "Value": Value,
}, },
nil, nil,
} }

View File

@ -8,12 +8,12 @@ type Relative struct {
Name Name
} }
func NewRelative(parts []node.Node) node.Node { func NewRelative(Parts []node.Node) node.Node {
return &Relative{ return &Relative{
Name{ Name{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, Parts,
}, },
} }
} }

View File

@ -6,11 +6,11 @@ type Nullable struct {
expr Node expr Node
} }
func NewNullable(expression Node) Node { func NewNullable(Expression Node) Node {
return &Nullable{ return &Nullable{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, Expression,
} }
} }
@ -18,12 +18,12 @@ func (n Nullable) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }
func (n Nullable) Attribute(key string) interface{} { func (n Nullable) Attribute(Key string) interface{} {
return n.attributes[key] return n.attributes[Key]
} }
func (n Nullable) SetAttribute(key string, value interface{}) Node { func (n Nullable) SetAttribute(Key string, Value interface{}) Node {
n.attributes[key] = value n.attributes[Key] = Value
return n return n
} }

View File

@ -3,21 +3,21 @@ package node
type Parameter struct { type Parameter struct {
attributes map[string]interface{} attributes map[string]interface{}
position *Position position *Position
variableType Node VariableType Node
variable Node Variable Node
defaultValue Node DefaultValue Node
} }
func NewParameter(variableType Node, variable Node, defaultValue Node, byRef bool, variadic bool) Node { func NewParameter(VariableType Node, Variable Node, DefaultValue Node, byRef bool, variadic bool) Node {
return &Parameter{ return &Parameter{
map[string]interface{}{ map[string]interface{}{
"byRef": byRef, "byRef": byRef,
"variadic": variadic, "variadic": variadic,
}, },
nil, nil,
variableType, VariableType,
variable, Variable,
defaultValue, DefaultValue,
} }
} }
@ -25,12 +25,12 @@ func (n Parameter) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }
func (n Parameter) Attribute(key string) interface{} { func (n Parameter) Attribute(Key string) interface{} {
return n.attributes[key] return n.attributes[Key]
} }
func (n Parameter) SetAttribute(key string, value interface{}) Node { func (n Parameter) SetAttribute(Key string, Value interface{}) Node {
n.attributes[key] = value n.attributes[Key] = Value
return n return n
} }
@ -48,19 +48,19 @@ func (n Parameter) Walk(v Visitor) {
return return
} }
if n.variableType != nil { if n.VariableType != nil {
vv := v.GetChildrenVisitor("variableType") vv := v.GetChildrenVisitor("VariableType")
n.variableType.Walk(vv) n.VariableType.Walk(vv)
} }
if n.variable != nil { if n.Variable != nil {
vv := v.GetChildrenVisitor("variable") vv := v.GetChildrenVisitor("Variable")
n.variable.Walk(vv) n.Variable.Walk(vv)
} }
if n.defaultValue != nil { if n.DefaultValue != nil {
vv := v.GetChildrenVisitor("defaultValue") vv := v.GetChildrenVisitor("DefaultValue")
n.defaultValue.Walk(vv) n.DefaultValue.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -9,10 +9,10 @@ type Dnumber struct {
position *node.Position position *node.Position
} }
func NewDnumber(value string) node.Node { func NewDnumber(Value string) node.Node {
return &Dnumber{ return &Dnumber{
map[string]interface{}{ map[string]interface{}{
"value": value, "Value": Value,
}, },
nil, nil,
} }

View File

@ -7,14 +7,14 @@ import (
type Encapsed struct { type Encapsed struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
parts []node.Node Parts []node.Node
} }
func NewEncapsed(parts []node.Node) node.Node { func NewEncapsed(Parts []node.Node) node.Node {
return &Encapsed{ return &Encapsed{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, Parts,
} }
} }
@ -36,9 +36,9 @@ func (n Encapsed) Walk(v node.Visitor) {
return return
} }
if n.parts != nil { if n.Parts != nil {
vv := v.GetChildrenVisitor("parts") vv := v.GetChildrenVisitor("Parts")
for _, nn := range n.parts { for _, nn := range n.Parts {
nn.Walk(vv) nn.Walk(vv)
} }
} }

View File

@ -9,10 +9,10 @@ type EncapsedStringPart struct {
position *node.Position position *node.Position
} }
func NewEncapsedStringPart(value string) node.Node { func NewEncapsedStringPart(Value string) node.Node {
return &EncapsedStringPart{ return &EncapsedStringPart{
map[string]interface{}{ map[string]interface{}{
"value": value, "Value": Value,
}, },
nil, nil,
} }

View File

@ -9,10 +9,10 @@ type Lnumber struct {
position *node.Position position *node.Position
} }
func NewLnumber(value string) node.Node { func NewLnumber(Value string) node.Node {
return &Lnumber{ return &Lnumber{
map[string]interface{}{ map[string]interface{}{
"value": value, "Value": Value,
}, },
nil, nil,
} }

View File

@ -9,10 +9,10 @@ type MagicConstant struct {
position *node.Position position *node.Position
} }
func NewMagicConstant(value string) node.Node { func NewMagicConstant(Value string) node.Node {
return &MagicConstant{ return &MagicConstant{
map[string]interface{}{ map[string]interface{}{
"value": value, "Value": Value,
}, },
nil, nil,
} }

View File

@ -9,10 +9,10 @@ type String struct {
position *node.Position position *node.Position
} }
func NewString(value string) node.Node { func NewString(Value string) node.Node {
return &String{ return &String{
map[string]interface{}{ map[string]interface{}{
"value": value, "Value": Value,
}, },
nil, nil,
} }

View File

@ -7,14 +7,14 @@ import (
type AltElse struct { type AltElse struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
stmt node.Node Stmt node.Node
} }
func NewAltElse(stmt node.Node) node.Node { func NewAltElse(Stmt node.Node) node.Node {
return &AltElse{ return &AltElse{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
stmt, Stmt,
} }
} }
@ -36,9 +36,9 @@ func (n AltElse) Walk(v node.Visitor) {
return return
} }
if n.stmt != nil { if n.Stmt != nil {
vv := v.GetChildrenVisitor("stmt") vv := v.GetChildrenVisitor("Stmt")
n.stmt.Walk(vv) n.Stmt.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,16 +7,16 @@ import (
type AltElseIf struct { type AltElseIf struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
cond node.Node Cond node.Node
stmt node.Node Stmt node.Node
} }
func NewAltElseIf(cond node.Node, stmt node.Node) node.Node { func NewAltElseIf(Cond node.Node, Stmt node.Node) node.Node {
return &AltElseIf{ return &AltElseIf{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
cond, Cond,
stmt, Stmt,
} }
} }
@ -38,14 +38,14 @@ func (n AltElseIf) Walk(v node.Visitor) {
return return
} }
if n.cond != nil { if n.Cond != nil {
vv := v.GetChildrenVisitor("cond") vv := v.GetChildrenVisitor("Cond")
n.cond.Walk(vv) n.Cond.Walk(vv)
} }
if n.stmt != nil { if n.Stmt != nil {
vv := v.GetChildrenVisitor("stmt") vv := v.GetChildrenVisitor("Stmt")
n.stmt.Walk(vv) n.Stmt.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -7,18 +7,18 @@ import (
type AltIf struct { type AltIf struct {
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
cond node.Node Cond node.Node
stmt node.Node Stmt node.Node
elseIf []node.Node ElseIf []node.Node
_else node.Node _else node.Node
} }
func NewAltIf(cond node.Node, stmt node.Node) node.Node { func NewAltIf(Cond node.Node, Stmt node.Node) node.Node {
return &AltIf{ return &AltIf{
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
cond, Cond,
stmt, Stmt,
nil, nil,
nil, nil,
} }
@ -37,12 +37,12 @@ func (n AltIf) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n AltIf) AddElseIf(elseIf node.Node) node.Node { func (n AltIf) AddElseIf(ElseIf node.Node) node.Node {
if n.elseIf == nil { if n.ElseIf == nil {
n.elseIf = make([]node.Node, 0) n.ElseIf = make([]node.Node, 0)
} }
n.elseIf = append(n.elseIf, elseIf) n.ElseIf = append(n.ElseIf, ElseIf)
return n return n
} }
@ -58,19 +58,19 @@ func (n AltIf) Walk(v node.Visitor) {
return return
} }
if n.cond != nil { if n.Cond != nil {
vv := v.GetChildrenVisitor("cond") vv := v.GetChildrenVisitor("Cond")
n.cond.Walk(vv) n.Cond.Walk(vv)
} }
if n.stmt != nil { if n.Stmt != nil {
vv := v.GetChildrenVisitor("stmt") vv := v.GetChildrenVisitor("Stmt")
n.stmt.Walk(vv) n.Stmt.Walk(vv)
} }
if n.elseIf != nil { if n.ElseIf != nil {
vv := v.GetChildrenVisitor("elseIf") vv := v.GetChildrenVisitor("ElseIf")
for _, nn := range n.elseIf { for _, nn := range n.ElseIf {
nn.Walk(vv) nn.Walk(vv)
} }
} }

Some files were not shown because too many files have changed in this diff Show More