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,14 +7,14 @@ import (
type AltElse struct {
attributes map[string]interface{}
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{
map[string]interface{}{},
nil,
stmt,
Stmt,
}
}
@@ -36,9 +36,9 @@ func (n AltElse) Walk(v node.Visitor) {
return
}
if n.stmt != nil {
vv := v.GetChildrenVisitor("stmt")
n.stmt.Walk(vv)
if n.Stmt != nil {
vv := v.GetChildrenVisitor("Stmt")
n.Stmt.Walk(vv)
}
v.LeaveNode(n)

View File

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

View File

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

View File

@@ -7,16 +7,16 @@ import (
type Case struct {
attributes map[string]interface{}
position *node.Position
cond node.Node
stmts []node.Node
Cond node.Node
Stmts []node.Node
}
func NewCase(cond node.Node, stmts []node.Node) node.Node {
func NewCase(Cond node.Node, Stmts []node.Node) node.Node {
return &Case{
map[string]interface{}{},
nil,
cond,
stmts,
Cond,
Stmts,
}
}
@@ -38,14 +38,14 @@ func (n Case) Walk(v node.Visitor) {
return
}
if n.cond != nil {
vv := v.GetChildrenVisitor("cond")
n.cond.Walk(vv)
if n.Cond != nil {
vv := v.GetChildrenVisitor("Cond")
n.Cond.Walk(vv)
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}

View File

@@ -7,18 +7,18 @@ import (
type Catch struct {
attributes map[string]interface{}
position *node.Position
types []node.Node
variable node.Node
stmts []node.Node
Types []node.Node
Variable node.Node
Stmts []node.Node
}
func NewCatch(types []node.Node, variable node.Node, stmts []node.Node) node.Node {
func NewCatch(Types []node.Node, Variable node.Node, Stmts []node.Node) node.Node {
return &Catch{
map[string]interface{}{},
nil,
types,
variable,
stmts,
Types,
Variable,
Stmts,
}
}
@@ -40,16 +40,16 @@ func (n Catch) Walk(v node.Visitor) {
return
}
if n.types != nil {
vv := v.GetChildrenVisitor("types")
for _, nn := range n.types {
if n.Types != nil {
vv := v.GetChildrenVisitor("Types")
for _, nn := range n.Types {
nn.Walk(vv)
}
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}

View File

@@ -7,26 +7,26 @@ import (
type Class struct {
attributes map[string]interface{}
position *node.Position
className node.Node
modifiers []node.Node
ClassName node.Node
Modifiers []node.Node
args []node.Node
extends node.Node
implements []node.Node
stmts []node.Node
Extends node.Node
Implements []node.Node
Stmts []node.Node
}
func NewClass(className node.Node, modifiers []node.Node, args []node.Node, extends node.Node, implements []node.Node, stmts []node.Node, phpDocComment string) node.Node {
func NewClass(ClassName node.Node, Modifiers []node.Node, args []node.Node, Extends node.Node, Implements []node.Node, Stmts []node.Node, phpDocComment string) node.Node {
return &Class{
map[string]interface{}{
"phpDocComment": phpDocComment,
},
nil,
className,
modifiers,
ClassName,
Modifiers,
args,
extends,
implements,
stmts,
Extends,
Implements,
Stmts,
}
}
@@ -48,14 +48,14 @@ func (n Class) Walk(v node.Visitor) {
return
}
if n.className != nil {
vv := v.GetChildrenVisitor("className")
n.className.Walk(vv)
if n.ClassName != nil {
vv := v.GetChildrenVisitor("ClassName")
n.ClassName.Walk(vv)
}
if n.modifiers != nil {
vv := v.GetChildrenVisitor("modifiers")
for _, nn := range n.modifiers {
if n.Modifiers != nil {
vv := v.GetChildrenVisitor("Modifiers")
for _, nn := range n.Modifiers {
nn.Walk(vv)
}
}
@@ -67,21 +67,21 @@ func (n Class) Walk(v node.Visitor) {
}
}
if n.extends != nil {
vv := v.GetChildrenVisitor("extends")
n.extends.Walk(vv)
if n.Extends != nil {
vv := v.GetChildrenVisitor("Extends")
n.Extends.Walk(vv)
}
if n.implements != nil {
vv := v.GetChildrenVisitor("implements")
for _, nn := range n.implements {
if n.Implements != nil {
vv := v.GetChildrenVisitor("Implements")
for _, nn := range n.Implements {
nn.Walk(vv)
}
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}

View File

@@ -7,16 +7,16 @@ import (
type ClassConstList struct {
attributes map[string]interface{}
position *node.Position
modifiers []node.Node
consts []node.Node
Modifiers []node.Node
Consts []node.Node
}
func NewClassConstList(modifiers []node.Node, consts []node.Node) node.Node {
func NewClassConstList(Modifiers []node.Node, Consts []node.Node) node.Node {
return &ClassConstList{
map[string]interface{}{},
nil,
modifiers,
consts,
Modifiers,
Consts,
}
}
@@ -38,16 +38,16 @@ func (n ClassConstList) Walk(v node.Visitor) {
return
}
if n.modifiers != nil {
vv := v.GetChildrenVisitor("modifiers")
for _, nn := range n.modifiers {
if n.Modifiers != nil {
vv := v.GetChildrenVisitor("Modifiers")
for _, nn := range n.Modifiers {
nn.Walk(vv)
}
}
if n.consts != nil {
vv := v.GetChildrenVisitor("consts")
for _, nn := range n.consts {
if n.Consts != nil {
vv := v.GetChildrenVisitor("Consts")
for _, nn := range n.Consts {
nn.Walk(vv)
}
}

View File

@@ -7,25 +7,25 @@ import (
type ClassMethod struct {
attributes map[string]interface{}
position *node.Position
methodName node.Node
modifiers []node.Node
params []node.Node
returnType node.Node
stmts []node.Node
MethodName node.Node
Modifiers []node.Node
Params []node.Node
ReturnType node.Node
Stmts []node.Node
}
func NewClassMethod(methodName node.Node, modifiers []node.Node, returnsRef bool, params []node.Node, returnType node.Node, stmts []node.Node, phpDocComment string) node.Node {
func NewClassMethod(MethodName node.Node, Modifiers []node.Node, returnsRef bool, Params []node.Node, ReturnType node.Node, Stmts []node.Node, phpDocComment string) node.Node {
return &ClassMethod{
map[string]interface{}{
"returnsRef": returnsRef,
"phpDocComment": phpDocComment,
},
nil,
methodName,
modifiers,
params,
returnType,
stmts,
MethodName,
Modifiers,
Params,
ReturnType,
Stmts,
}
}
@@ -47,33 +47,33 @@ func (n ClassMethod) Walk(v node.Visitor) {
return
}
if n.methodName != nil {
vv := v.GetChildrenVisitor("methodName")
n.methodName.Walk(vv)
if n.MethodName != nil {
vv := v.GetChildrenVisitor("MethodName")
n.MethodName.Walk(vv)
}
if n.modifiers != nil {
vv := v.GetChildrenVisitor("modifiers")
for _, nn := range n.modifiers {
if n.Modifiers != nil {
vv := v.GetChildrenVisitor("Modifiers")
for _, nn := range n.Modifiers {
nn.Walk(vv)
}
}
if n.params != nil {
vv := v.GetChildrenVisitor("params")
for _, nn := range n.params {
if n.Params != nil {
vv := v.GetChildrenVisitor("Params")
for _, nn := range n.Params {
nn.Walk(vv)
}
}
if n.returnType != nil {
vv := v.GetChildrenVisitor("returnType")
n.returnType.Walk(vv)
if n.ReturnType != nil {
vv := v.GetChildrenVisitor("ReturnType")
n.ReturnType.Walk(vv)
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}

View File

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

View File

@@ -7,17 +7,17 @@ import (
type Constant struct {
attributes map[string]interface{}
position *node.Position
constantName node.Node
ConstantName node.Node
expr node.Node
}
func NewConstant(constantName node.Node, expr node.Node, phpDocComment string) node.Node {
func NewConstant(ConstantName node.Node, expr node.Node, phpDocComment string) node.Node {
return &Constant{
map[string]interface{}{
"phpDocComment": phpDocComment,
},
nil,
constantName,
ConstantName,
expr,
}
}
@@ -40,9 +40,9 @@ func (n Constant) Walk(v node.Visitor) {
return
}
if n.constantName != nil {
vv := v.GetChildrenVisitor("constantName")
n.constantName.Walk(vv)
if n.ConstantName != nil {
vv := v.GetChildrenVisitor("ConstantName")
n.ConstantName.Walk(vv)
}
if n.expr != nil {

View File

@@ -7,16 +7,16 @@ import (
type Declare struct {
attributes map[string]interface{}
position *node.Position
consts []node.Node
stmt node.Node
Consts []node.Node
Stmt node.Node
}
func NewDeclare(consts []node.Node, stmt node.Node) node.Node {
func NewDeclare(Consts []node.Node, Stmt node.Node) node.Node {
return &Declare{
map[string]interface{}{},
nil,
consts,
stmt,
Consts,
Stmt,
}
}
@@ -38,16 +38,16 @@ func (n Declare) Walk(v node.Visitor) {
return
}
if n.consts != nil {
vv := v.GetChildrenVisitor("consts")
for _, nn := range n.consts {
if n.Consts != nil {
vv := v.GetChildrenVisitor("Consts")
for _, nn := range n.Consts {
nn.Walk(vv)
}
}
if n.stmt != nil {
vv := v.GetChildrenVisitor("stmt")
n.stmt.Walk(vv)
if n.Stmt != nil {
vv := v.GetChildrenVisitor("Stmt")
n.Stmt.Walk(vv)
}
v.LeaveNode(n)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -7,20 +7,20 @@ import (
type For struct {
attributes map[string]interface{}
position *node.Position
init []node.Node
cond []node.Node
loop []node.Node
stmt node.Node
Init []node.Node
Cond []node.Node
Loop []node.Node
Stmt node.Node
}
func NewFor(init []node.Node, cond []node.Node, loop []node.Node, stmt node.Node) node.Node {
func NewFor(Init []node.Node, Cond []node.Node, Loop []node.Node, Stmt node.Node) node.Node {
return &For{
map[string]interface{}{},
nil,
init,
cond,
loop,
stmt,
Init,
Cond,
Loop,
Stmt,
}
}
@@ -42,30 +42,30 @@ func (n For) Walk(v node.Visitor) {
return
}
if n.init != nil {
vv := v.GetChildrenVisitor("init")
for _, nn := range n.init {
if n.Init != nil {
vv := v.GetChildrenVisitor("Init")
for _, nn := range n.Init {
nn.Walk(vv)
}
}
if n.cond != nil {
vv := v.GetChildrenVisitor("cond")
for _, nn := range n.cond {
if n.Cond != nil {
vv := v.GetChildrenVisitor("Cond")
for _, nn := range n.Cond {
nn.Walk(vv)
}
}
if n.loop != nil {
vv := v.GetChildrenVisitor("loop")
for _, nn := range n.loop {
if n.Loop != nil {
vv := v.GetChildrenVisitor("Loop")
for _, nn := range n.Loop {
nn.Walk(vv)
}
}
if n.stmt != nil {
vv := v.GetChildrenVisitor("stmt")
n.stmt.Walk(vv)
if n.Stmt != nil {
vv := v.GetChildrenVisitor("Stmt")
n.Stmt.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -8,21 +8,21 @@ type Foreach struct {
attributes map[string]interface{}
position *node.Position
expr node.Node
key node.Node
variable node.Node
stmt node.Node
Key node.Node
Variable node.Node
Stmt node.Node
}
func NewForeach(expr node.Node, key node.Node, variable node.Node, stmt node.Node, byRef bool) node.Node {
func NewForeach(expr node.Node, Key node.Node, Variable node.Node, Stmt node.Node, byRef bool) node.Node {
return &Foreach{
map[string]interface{}{
"byRef": byRef,
},
nil,
expr,
key,
variable,
stmt,
Key,
Variable,
Stmt,
}
}
@@ -49,19 +49,19 @@ func (n Foreach) Walk(v node.Visitor) {
n.expr.Walk(vv)
}
if n.key != nil {
vv := v.GetChildrenVisitor("key")
n.key.Walk(vv)
if n.Key != nil {
vv := v.GetChildrenVisitor("Key")
n.Key.Walk(vv)
}
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.stmt != nil {
vv := v.GetChildrenVisitor("stmt")
n.stmt.Walk(vv)
if n.Stmt != nil {
vv := v.GetChildrenVisitor("Stmt")
n.Stmt.Walk(vv)
}
v.LeaveNode(n)

View File

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

View File

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

View File

@@ -7,18 +7,18 @@ import (
type GroupUse struct {
attributes map[string]interface{}
position *node.Position
useType node.Node
prefix node.Node
useList []node.Node
UseType node.Node
pRefix node.Node
UseList []node.Node
}
func NewGroupUse(useType node.Node, prefix node.Node, useList []node.Node) node.Node {
func NewGroupUse(UseType node.Node, pRefix node.Node, UseList []node.Node) node.Node {
return &GroupUse{
map[string]interface{}{},
nil,
useType,
prefix,
useList,
UseType,
pRefix,
UseList,
}
}
@@ -35,8 +35,8 @@ func (n GroupUse) SetPosition(p *node.Position) node.Node {
return n
}
func (n GroupUse) SetUseType(useType node.Node) node.Node {
n.useType = useType
func (n GroupUse) SetUseType(UseType node.Node) node.Node {
n.UseType = UseType
return n
}
@@ -45,19 +45,19 @@ func (n GroupUse) Walk(v node.Visitor) {
return
}
if n.useType != nil {
vv := v.GetChildrenVisitor("useType")
n.useType.Walk(vv)
if n.UseType != nil {
vv := v.GetChildrenVisitor("UseType")
n.UseType.Walk(vv)
}
if n.prefix != nil {
vv := v.GetChildrenVisitor("prefix")
n.prefix.Walk(vv)
if n.pRefix != nil {
vv := v.GetChildrenVisitor("pRefix")
n.pRefix.Walk(vv)
}
if n.useList != nil {
vv := v.GetChildrenVisitor("useList")
for _, nn := range n.useList {
if n.UseList != nil {
vv := v.GetChildrenVisitor("UseList")
for _, nn := range n.UseList {
nn.Walk(vv)
}
}

View File

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

View File

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

View File

@@ -7,20 +7,20 @@ import (
type Interface struct {
attributes map[string]interface{}
position *node.Position
interfaceName node.Node
extends []node.Node
stmts []node.Node
InterfaceName node.Node
Extends []node.Node
Stmts []node.Node
}
func NewInterface(interfaceName node.Node, extends []node.Node, stmts []node.Node, phpDocComment string) node.Node {
func NewInterface(InterfaceName node.Node, Extends []node.Node, Stmts []node.Node, phpDocComment string) node.Node {
return &Interface{
map[string]interface{}{
"phpDocComment": phpDocComment,
},
nil,
interfaceName,
extends,
stmts,
InterfaceName,
Extends,
Stmts,
}
}
@@ -42,21 +42,21 @@ func (n Interface) Walk(v node.Visitor) {
return
}
if n.interfaceName != nil {
vv := v.GetChildrenVisitor("interfaceName")
n.interfaceName.Walk(vv)
if n.InterfaceName != nil {
vv := v.GetChildrenVisitor("InterfaceName")
n.InterfaceName.Walk(vv)
}
if n.extends != nil {
vv := v.GetChildrenVisitor("extends")
for _, nn := range n.extends {
if n.Extends != nil {
vv := v.GetChildrenVisitor("Extends")
for _, nn := range n.Extends {
nn.Walk(vv)
}
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}

View File

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

View File

@@ -7,16 +7,16 @@ import (
type Namespace struct {
attributes map[string]interface{}
position *node.Position
namespaceName node.Node
stmts []node.Node
NamespaceName node.Node
Stmts []node.Node
}
func NewNamespace(namespaceName node.Node, stmts []node.Node) node.Node {
func NewNamespace(NamespaceName node.Node, Stmts []node.Node) node.Node {
return &Namespace{
map[string]interface{}{},
nil,
namespaceName,
stmts,
NamespaceName,
Stmts,
}
}
@@ -38,14 +38,14 @@ func (n Namespace) Walk(v node.Visitor) {
return
}
if n.namespaceName != nil {
vv := v.GetChildrenVisitor("namespaceName")
n.namespaceName.Walk(vv)
if n.NamespaceName != nil {
vv := v.GetChildrenVisitor("NamespaceName")
n.NamespaceName.Walk(vv)
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}

View File

@@ -7,17 +7,17 @@ import (
type Property struct {
attributes map[string]interface{}
position *node.Position
variable node.Node
Variable node.Node
expr node.Node
}
func NewProperty(variable node.Node, expr node.Node, phpDocComment string) node.Node {
func NewProperty(Variable node.Node, expr node.Node, phpDocComment string) node.Node {
return &Property{
map[string]interface{}{
"phpDocComment": phpDocComment,
},
nil,
variable,
Variable,
expr,
}
}
@@ -39,9 +39,9 @@ func (n Property) 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.expr != nil {

View File

@@ -7,16 +7,16 @@ import (
type PropertyList struct {
attributes map[string]interface{}
position *node.Position
modifiers []node.Node
properties []node.Node
Modifiers []node.Node
Properties []node.Node
}
func NewPropertyList(modifiers []node.Node, properties []node.Node) node.Node {
func NewPropertyList(Modifiers []node.Node, Properties []node.Node) node.Node {
return &PropertyList{
map[string]interface{}{},
nil,
modifiers,
properties,
Modifiers,
Properties,
}
}
@@ -38,16 +38,16 @@ func (n PropertyList) Walk(v node.Visitor) {
return
}
if n.modifiers != nil {
vv := v.GetChildrenVisitor("modifiers")
for _, nn := range n.modifiers {
if n.Modifiers != nil {
vv := v.GetChildrenVisitor("Modifiers")
for _, nn := range n.Modifiers {
nn.Walk(vv)
}
}
if n.properties != nil {
vv := v.GetChildrenVisitor("properties")
for _, nn := range n.properties {
if n.Properties != nil {
vv := v.GetChildrenVisitor("Properties")
for _, nn := range n.Properties {
nn.Walk(vv)
}
}

View File

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

View File

@@ -7,15 +7,15 @@ import (
type StaticVar struct {
attributes map[string]interface{}
position *node.Position
variable node.Node
Variable node.Node
expr node.Node
}
func NewStaticVar(variable node.Node, expr node.Node) node.Node {
func NewStaticVar(Variable node.Node, expr node.Node) node.Node {
return &StaticVar{
map[string]interface{}{},
nil,
variable,
Variable,
expr,
}
}
@@ -38,9 +38,9 @@ func (n StaticVar) 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.expr != nil {

View File

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

View File

@@ -9,16 +9,16 @@ type Switch struct {
attributes map[string]interface{}
position *node.Position
token token.Token
cond node.Node
Cond node.Node
cases []node.Node
}
func NewSwitch(token token.Token, cond node.Node, cases []node.Node) node.Node {
func NewSwitch(token token.Token, Cond node.Node, cases []node.Node) node.Node {
return &Switch{
map[string]interface{}{},
nil,
token,
cond,
Cond,
cases,
}
}
@@ -41,9 +41,9 @@ func (n Switch) Walk(v node.Visitor) {
return
}
if n.cond != nil {
vv := v.GetChildrenVisitor("cond")
n.cond.Walk(vv)
if n.Cond != nil {
vv := v.GetChildrenVisitor("Cond")
n.Cond.Walk(vv)
}
if n.cases != nil {

View File

@@ -7,18 +7,18 @@ import (
type Trait struct {
attributes map[string]interface{}
position *node.Position
traitName node.Node
stmts []node.Node
TraitName node.Node
Stmts []node.Node
}
func NewTrait(traitName node.Node, stmts []node.Node, phpDocComment string) node.Node {
func NewTrait(TraitName node.Node, Stmts []node.Node, phpDocComment string) node.Node {
return &Trait{
map[string]interface{}{
"phpDocComment": phpDocComment,
},
nil,
traitName,
stmts,
TraitName,
Stmts,
}
}
@@ -40,14 +40,14 @@ func (n Trait) Walk(v node.Visitor) {
return
}
if n.traitName != nil {
vv := v.GetChildrenVisitor("traitName")
n.traitName.Walk(vv)
if n.TraitName != nil {
vv := v.GetChildrenVisitor("TraitName")
n.TraitName.Walk(vv)
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}

View File

@@ -7,16 +7,16 @@ import (
type TraitMethodRef struct {
attributes map[string]interface{}
position *node.Position
trait node.Node
method node.Node
Trait node.Node
Method node.Node
}
func NewTraitMethodRef(trait node.Node, method node.Node) node.Node {
func NewTraitMethodRef(Trait node.Node, Method node.Node) node.Node {
return &TraitMethodRef{
map[string]interface{}{},
nil,
trait,
method,
Trait,
Method,
}
}
@@ -38,14 +38,14 @@ func (n TraitMethodRef) Walk(v node.Visitor) {
return
}
if n.trait != nil {
vv := v.GetChildrenVisitor("trait")
n.trait.Walk(vv)
if n.Trait != nil {
vv := v.GetChildrenVisitor("Trait")
n.Trait.Walk(vv)
}
if n.method != nil {
vv := v.GetChildrenVisitor("method")
n.method.Walk(vv)
if n.Method != nil {
vv := v.GetChildrenVisitor("Method")
n.Method.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -7,16 +7,16 @@ import (
type TraitUse struct {
attributes map[string]interface{}
position *node.Position
traits []node.Node
adaptations []node.Node
Traits []node.Node
Adaptations []node.Node
}
func NewTraitUse(traits []node.Node, adaptations []node.Node) node.Node {
func NewTraitUse(Traits []node.Node, Adaptations []node.Node) node.Node {
return &TraitUse{
map[string]interface{}{},
nil,
traits,
adaptations,
Traits,
Adaptations,
}
}
@@ -38,16 +38,16 @@ func (n TraitUse) Walk(v node.Visitor) {
return
}
if n.traits != nil {
vv := v.GetChildrenVisitor("traits")
for _, nn := range n.traits {
if n.Traits != nil {
vv := v.GetChildrenVisitor("Traits")
for _, nn := range n.Traits {
nn.Walk(vv)
}
}
if n.adaptations != nil {
vv := v.GetChildrenVisitor("adaptations")
for _, nn := range n.adaptations {
if n.Adaptations != nil {
vv := v.GetChildrenVisitor("Adaptations")
for _, nn := range n.Adaptations {
nn.Walk(vv)
}
}

View File

@@ -7,18 +7,18 @@ import (
type TraitUseAlias struct {
attributes map[string]interface{}
position *node.Position
ref node.Node
modifier node.Node
alias node.Node
Ref node.Node
Modifier node.Node
Alias node.Node
}
func NewTraitUseAlias(ref node.Node, modifier node.Node, alias node.Node) node.Node {
func NewTraitUseAlias(Ref node.Node, Modifier node.Node, Alias node.Node) node.Node {
return &TraitUseAlias{
map[string]interface{}{},
nil,
ref,
modifier,
alias,
Ref,
Modifier,
Alias,
}
}
@@ -40,19 +40,19 @@ func (n TraitUseAlias) Walk(v node.Visitor) {
return
}
if n.ref != nil {
vv := v.GetChildrenVisitor("ref")
n.ref.Walk(vv)
if n.Ref != nil {
vv := v.GetChildrenVisitor("Ref")
n.Ref.Walk(vv)
}
if n.modifier != nil {
vv := v.GetChildrenVisitor("modifier")
n.modifier.Walk(vv)
if n.Modifier != nil {
vv := v.GetChildrenVisitor("Modifier")
n.Modifier.Walk(vv)
}
if n.alias != nil {
vv := v.GetChildrenVisitor("alias")
n.alias.Walk(vv)
if n.Alias != nil {
vv := v.GetChildrenVisitor("Alias")
n.Alias.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -7,16 +7,16 @@ import (
type TraitUsePrecedence struct {
attributes map[string]interface{}
position *node.Position
ref node.Node
insteadof node.Node
Ref node.Node
Insteadof node.Node
}
func NewTraitUsePrecedence(ref node.Node, insteadof node.Node) node.Node {
func NewTraitUsePrecedence(Ref node.Node, Insteadof node.Node) node.Node {
return &TraitUsePrecedence{
map[string]interface{}{},
nil,
ref,
insteadof,
Ref,
Insteadof,
}
}
@@ -38,14 +38,14 @@ func (n TraitUsePrecedence) Walk(v node.Visitor) {
return
}
if n.ref != nil {
vv := v.GetChildrenVisitor("ref")
n.ref.Walk(vv)
if n.Ref != nil {
vv := v.GetChildrenVisitor("Ref")
n.Ref.Walk(vv)
}
if n.insteadof != nil {
vv := v.GetChildrenVisitor("insteadof")
n.insteadof.Walk(vv)
if n.Insteadof != nil {
vv := v.GetChildrenVisitor("Insteadof")
n.Insteadof.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -7,18 +7,18 @@ import (
type Try struct {
attributes map[string]interface{}
position *node.Position
stmts []node.Node
catches []node.Node
finally node.Node
Stmts []node.Node
Catches []node.Node
Finally node.Node
}
func NewTry(stmts []node.Node, catches []node.Node, finally node.Node) node.Node {
func NewTry(Stmts []node.Node, Catches []node.Node, Finally node.Node) node.Node {
return &Try{
map[string]interface{}{},
nil,
stmts,
catches,
finally,
Stmts,
Catches,
Finally,
}
}
@@ -40,23 +40,23 @@ func (n Try) Walk(v node.Visitor) {
return
}
if n.stmts != nil {
vv := v.GetChildrenVisitor("stmts")
for _, nn := range n.stmts {
if n.Stmts != nil {
vv := v.GetChildrenVisitor("Stmts")
for _, nn := range n.Stmts {
nn.Walk(vv)
}
}
if n.catches != nil {
vv := v.GetChildrenVisitor("catches")
for _, nn := range n.catches {
if n.Catches != nil {
vv := v.GetChildrenVisitor("Catches")
for _, nn := range n.Catches {
nn.Walk(vv)
}
}
if n.finally != nil {
vv := v.GetChildrenVisitor("finally")
n.finally.Walk(vv)
if n.Finally != nil {
vv := v.GetChildrenVisitor("Finally")
n.Finally.Walk(vv)
}
v.LeaveNode(n)

View File

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

View File

@@ -5,25 +5,23 @@ import (
)
type Use struct {
attributes map[string]interface{}
position *node.Position
useType node.Node
use node.Node
alias node.Node
position *node.Position
UseType node.Node
Use node.Node
Alias node.Node
}
func NewUse(useType node.Node, use node.Node, alias node.Node) node.Node {
func NewUse(UseType node.Node, use node.Node, Alias node.Node) node.Node {
return &Use{
map[string]interface{}{},
nil,
useType,
UseType,
use,
alias,
Alias,
}
}
func (n Use) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Use) Position() *node.Position {
@@ -35,8 +33,8 @@ func (n Use) SetPosition(p *node.Position) node.Node {
return n
}
func (n Use) SetUseType(useType node.Node) node.Node {
n.useType = useType
func (n Use) SetUseType(UseType node.Node) node.Node {
n.UseType = UseType
return n
}
@@ -45,19 +43,19 @@ func (n Use) Walk(v node.Visitor) {
return
}
if n.useType != nil {
vv := v.GetChildrenVisitor("useType")
n.useType.Walk(vv)
if n.UseType != nil {
vv := v.GetChildrenVisitor("UseType")
n.UseType.Walk(vv)
}
if n.use != nil {
vv := v.GetChildrenVisitor("use")
n.use.Walk(vv)
if n.Use != nil {
vv := v.GetChildrenVisitor("Use")
n.Use.Walk(vv)
}
if n.alias != nil {
vv := v.GetChildrenVisitor("alias")
n.alias.Walk(vv)
if n.Alias != nil {
vv := v.GetChildrenVisitor("Alias")
n.Alias.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,23 +5,21 @@ import (
)
type UseList struct {
attributes map[string]interface{}
position *node.Position
useType node.Node
uses []node.Node
position *node.Position
UseType node.Node
Uses []node.Node
}
func NewUseList(useType node.Node, uses []node.Node) node.Node {
func NewUseList(UseType node.Node, Uses []node.Node) node.Node {
return &UseList{
map[string]interface{}{},
nil,
useType,
uses,
UseType,
Uses,
}
}
func (n UseList) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n UseList) Position() *node.Position {
@@ -38,14 +36,14 @@ func (n UseList) Walk(v node.Visitor) {
return
}
if n.useType != nil {
vv := v.GetChildrenVisitor("useType")
n.useType.Walk(vv)
if n.UseType != nil {
vv := v.GetChildrenVisitor("UseType")
n.UseType.Walk(vv)
}
if n.uses != nil {
vv := v.GetChildrenVisitor("uses")
for _, nn := range n.uses {
if n.Uses != nil {
vv := v.GetChildrenVisitor("Uses")
for _, nn := range n.Uses {
nn.Walk(vv)
}
}

View File

@@ -6,25 +6,23 @@ import (
)
type While struct {
attributes map[string]interface{}
position *node.Position
token token.Token
cond node.Node
stmt node.Node
position *node.Position
Token token.Token
Cond node.Node
Stmt node.Node
}
func NewWhile(token token.Token, cond node.Node, stmt node.Node) node.Node {
func NewWhile(Token token.Token, Cond node.Node, Stmt node.Node) node.Node {
return &While{
map[string]interface{}{},
nil,
token,
cond,
stmt,
Token,
Cond,
Stmt,
}
}
func (n While) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n While) Position() *node.Position {
@@ -41,14 +39,14 @@ func (n While) Walk(v node.Visitor) {
return
}
if n.cond != nil {
vv := v.GetChildrenVisitor("cond")
n.cond.Walk(vv)
if n.Cond != nil {
vv := v.GetChildrenVisitor("Cond")
n.Cond.Walk(vv)
}
if n.stmt != nil {
vv := v.GetChildrenVisitor("stmt")
n.stmt.Walk(vv)
if n.Stmt != nil {
vv := v.GetChildrenVisitor("Stmt")
n.Stmt.Walk(vv)
}
v.LeaveNode(n)