make nodes fields public
This commit is contained in:
@@ -8,13 +8,13 @@ type Assign struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewAssign(variable node.Node, expression node.Node) node.Node {
|
||||
func NewAssign(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Assign{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Assign) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -7,6 +7,6 @@ import (
|
||||
type AssignOp struct {
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
variable node.Node
|
||||
expression node.Node
|
||||
Variable node.Node
|
||||
Expression node.Node
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@ type AssignRef struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewAssignRef(variable node.Node, expression node.Node) node.Node {
|
||||
func NewAssignRef(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &AssignRef{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n AssignRef) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type BitwiseAnd struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node {
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &BitwiseAnd{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n BitwiseAnd) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type BitwiseOr struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewBitwiseOr(variable node.Node, expression node.Node) node.Node {
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &BitwiseOr{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n BitwiseOr) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type BitwiseXor struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewBitwiseXor(variable node.Node, expression node.Node) node.Node {
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &BitwiseXor{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n BitwiseXor) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type Concat struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewConcat(variable node.Node, expression node.Node) node.Node {
|
||||
func NewConcat(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Concat{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Concat) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type Div struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewDiv(variable node.Node, expression node.Node) node.Node {
|
||||
func NewDiv(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Div{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Div) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type Minus struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewMinus(variable node.Node, expression node.Node) node.Node {
|
||||
func NewMinus(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Minus{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Minus) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type Mod struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewMod(variable node.Node, expression node.Node) node.Node {
|
||||
func NewMod(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Mod{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Mod) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type Mul struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewMul(variable node.Node, expression node.Node) node.Node {
|
||||
func NewMul(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Mul{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Mul) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type Plus struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewPlus(variable node.Node, expression node.Node) node.Node {
|
||||
func NewPlus(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Plus{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Plus) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type Pow struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewPow(variable node.Node, expression node.Node) node.Node {
|
||||
func NewPow(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &Pow{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n Pow) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type ShiftLeft struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewShiftLeft(variable node.Node, expression node.Node) node.Node {
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &ShiftLeft{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n ShiftLeft) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
@@ -8,13 +8,13 @@ type ShiftRight struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewShiftRight(variable node.Node, expression node.Node) node.Node {
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
|
||||
return &ShiftRight{
|
||||
AssignOp{
|
||||
map[string]interface{}{},
|
||||
nil,
|
||||
variable,
|
||||
expression,
|
||||
Variable,
|
||||
Expression,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,14 @@ func (n ShiftRight) Walk(v node.Visitor) {
|
||||
return
|
||||
}
|
||||
|
||||
if n.variable != nil {
|
||||
vv := v.GetChildrenVisitor("variable")
|
||||
n.variable.Walk(vv)
|
||||
if n.Variable != nil {
|
||||
vv := v.GetChildrenVisitor("Variable")
|
||||
n.Variable.Walk(vv)
|
||||
}
|
||||
|
||||
if n.expression != nil {
|
||||
vv := v.GetChildrenVisitor("expression")
|
||||
n.expression.Walk(vv)
|
||||
if n.Expression != nil {
|
||||
vv := v.GetChildrenVisitor("Expression")
|
||||
n.Expression.Walk(vv)
|
||||
}
|
||||
|
||||
v.LeaveNode(n)
|
||||
|
||||
Reference in New Issue
Block a user