remove unused attributes fields

This commit is contained in:
z7zmey
2018-01-05 00:12:01 +02:00
parent 469db8f9e2
commit 17bca8d1dc
156 changed files with 739 additions and 996 deletions

View File

@@ -5,21 +5,19 @@ import (
)
type AltElse struct {
attributes map[string]interface{}
position *node.Position
Stmt node.Node
position *node.Position
Stmt node.Node
}
func NewAltElse(Stmt node.Node) node.Node {
return &AltElse{
map[string]interface{}{},
nil,
Stmt,
}
}
func (n AltElse) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n AltElse) Position() *node.Position {

View File

@@ -5,15 +5,13 @@ import (
)
type AltElseIf struct {
attributes map[string]interface{}
position *node.Position
Cond node.Node
Stmt node.Node
position *node.Position
Cond node.Node
Stmt node.Node
}
func NewAltElseIf(Cond node.Node, Stmt node.Node) node.Node {
return &AltElseIf{
map[string]interface{}{},
nil,
Cond,
Stmt,
@@ -21,7 +19,7 @@ func NewAltElseIf(Cond node.Node, Stmt node.Node) node.Node {
}
func (n AltElseIf) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n AltElseIf) Position() *node.Position {

View File

@@ -5,17 +5,15 @@ import (
)
type AltIf struct {
attributes map[string]interface{}
position *node.Position
Cond node.Node
Stmt node.Node
ElseIf []node.Node
_else node.Node
position *node.Position
Cond node.Node
Stmt node.Node
ElseIf []node.Node
_else node.Node
}
func NewAltIf(Cond node.Node, Stmt node.Node) node.Node {
return &AltIf{
map[string]interface{}{},
nil,
Cond,
Stmt,
@@ -25,7 +23,7 @@ func NewAltIf(Cond node.Node, Stmt node.Node) node.Node {
}
func (n AltIf) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n AltIf) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Break struct {
attributes map[string]interface{}
position *node.Position
expr node.Node
position *node.Position
Expr node.Node
}
func NewBreak(expr node.Node) node.Node {
func NewBreak(Expr node.Node) node.Node {
return &Break{
map[string]interface{}{},
nil,
expr,
Expr,
}
}
func (n Break) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Break) Position() *node.Position {
@@ -36,9 +34,9 @@ func (n Break) Walk(v node.Visitor) {
return
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,15 +5,13 @@ import (
)
type Case struct {
attributes map[string]interface{}
position *node.Position
Cond node.Node
Stmts []node.Node
position *node.Position
Cond node.Node
Stmts []node.Node
}
func NewCase(Cond node.Node, Stmts []node.Node) node.Node {
return &Case{
map[string]interface{}{},
nil,
Cond,
Stmts,
@@ -21,7 +19,7 @@ func NewCase(Cond node.Node, Stmts []node.Node) node.Node {
}
func (n Case) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Case) Position() *node.Position {

View File

@@ -5,16 +5,14 @@ import (
)
type Catch struct {
attributes map[string]interface{}
position *node.Position
Types []node.Node
Variable node.Node
Stmts []node.Node
position *node.Position
Types []node.Node
Variable node.Node
Stmts []node.Node
}
func NewCatch(Types []node.Node, Variable node.Node, Stmts []node.Node) node.Node {
return &Catch{
map[string]interface{}{},
nil,
Types,
Variable,
@@ -23,7 +21,7 @@ func NewCatch(Types []node.Node, Variable node.Node, Stmts []node.Node) node.Nod
}
func (n Catch) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Catch) Position() *node.Position {

View File

@@ -5,22 +5,20 @@ import (
)
type Class struct {
attributes map[string]interface{}
position *node.Position
ClassName node.Node
Modifiers []node.Node
args []node.Node
Extends node.Node
Implements []node.Node
Stmts []node.Node
position *node.Position
PhpDocComment string
ClassName node.Node
Modifiers []node.Node
args []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,
PhpDocComment,
ClassName,
Modifiers,
args,
@@ -31,7 +29,9 @@ func NewClass(ClassName node.Node, Modifiers []node.Node, args []node.Node, Exte
}
func (n Class) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"PhpDocComment": n.PhpDocComment,
}
}
func (n Class) Position() *node.Position {

View File

@@ -5,15 +5,13 @@ import (
)
type ClassConstList struct {
attributes map[string]interface{}
position *node.Position
Modifiers []node.Node
Consts []node.Node
position *node.Position
Modifiers []node.Node
Consts []node.Node
}
func NewClassConstList(Modifiers []node.Node, Consts []node.Node) node.Node {
return &ClassConstList{
map[string]interface{}{},
nil,
Modifiers,
Consts,
@@ -21,7 +19,7 @@ func NewClassConstList(Modifiers []node.Node, Consts []node.Node) node.Node {
}
func (n ClassConstList) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n ClassConstList) Position() *node.Position {

View File

@@ -5,22 +5,21 @@ 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
position *node.Position
ReturnsRef bool
PhpDocComment string
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,
ReturnsRef,
PhpDocComment,
MethodName,
Modifiers,
Params,
@@ -30,7 +29,10 @@ func NewClassMethod(MethodName node.Node, Modifiers []node.Node, returnsRef bool
}
func (n ClassMethod) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"ReturnsRef": n.ReturnsRef,
"PhpDocComment": n.PhpDocComment,
}
}
func (n ClassMethod) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type ConstList struct {
attributes map[string]interface{}
position *node.Position
Consts []node.Node
position *node.Position
Consts []node.Node
}
func NewConstList(Consts []node.Node) node.Node {
return &ConstList{
map[string]interface{}{},
nil,
Consts,
}
}
func (n ConstList) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n ConstList) Position() *node.Position {

View File

@@ -5,25 +5,25 @@ import (
)
type Constant struct {
attributes map[string]interface{}
position *node.Position
ConstantName node.Node
expr node.Node
position *node.Position
PhpDocComment string
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,
PhpDocComment,
ConstantName,
expr,
Expr,
}
}
func (n Constant) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"PhpDocComment": n.PhpDocComment,
}
}
func (n Constant) Position() *node.Position {
@@ -45,9 +45,9 @@ func (n Constant) Walk(v node.Visitor) {
n.ConstantName.Walk(vv)
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,21 +5,19 @@ import (
)
type Continue struct {
attributes map[string]interface{}
position *node.Position
expr node.Node
position *node.Position
Expr node.Node
}
func NewContinue(expr node.Node) node.Node {
func NewContinue(Expr node.Node) node.Node {
return &Continue{
map[string]interface{}{},
nil,
expr,
Expr,
}
}
func (n Continue) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Continue) Position() *node.Position {
@@ -36,9 +34,9 @@ func (n Continue) Walk(v node.Visitor) {
return
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,15 +5,13 @@ import (
)
type Declare struct {
attributes map[string]interface{}
position *node.Position
Consts []node.Node
Stmt node.Node
position *node.Position
Consts []node.Node
Stmt node.Node
}
func NewDeclare(Consts []node.Node, Stmt node.Node) node.Node {
return &Declare{
map[string]interface{}{},
nil,
Consts,
Stmt,
@@ -21,7 +19,7 @@ func NewDeclare(Consts []node.Node, Stmt node.Node) node.Node {
}
func (n Declare) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Declare) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Default struct {
attributes map[string]interface{}
position *node.Position
Stmts []node.Node
position *node.Position
Stmts []node.Node
}
func NewDefault(Stmts []node.Node) node.Node {
return &Default{
map[string]interface{}{},
nil,
Stmts,
}
}
func (n Default) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Default) Position() *node.Position {

View File

@@ -5,15 +5,13 @@ import (
)
type Do struct {
attributes map[string]interface{}
position *node.Position
Stmt node.Node
Cond node.Node
position *node.Position
Stmt node.Node
Cond node.Node
}
func NewDo(Stmt node.Node, Cond node.Node) node.Node {
return &Do{
map[string]interface{}{},
nil,
Stmt,
Cond,
@@ -21,7 +19,7 @@ func NewDo(Stmt node.Node, Cond node.Node) node.Node {
}
func (n Do) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Do) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Echo struct {
attributes map[string]interface{}
position *node.Position
Exprs []node.Node
position *node.Position
Exprs []node.Node
}
func NewEcho(Exprs []node.Node) node.Node {
return &Echo{
map[string]interface{}{},
nil,
Exprs,
}
}
func (n Echo) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Echo) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Else struct {
attributes map[string]interface{}
position *node.Position
Stmt node.Node
position *node.Position
Stmt node.Node
}
func NewElse(Stmt node.Node) node.Node {
return &Else{
map[string]interface{}{},
nil,
Stmt,
}
}
func (n Else) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Else) Position() *node.Position {

View File

@@ -5,15 +5,13 @@ import (
)
type ElseIf struct {
attributes map[string]interface{}
position *node.Position
Cond node.Node
Stmt node.Node
position *node.Position
Cond node.Node
Stmt node.Node
}
func NewElseIf(Cond node.Node, Stmt node.Node) node.Node {
return &ElseIf{
map[string]interface{}{},
nil,
Cond,
Stmt,
@@ -21,7 +19,7 @@ func NewElseIf(Cond node.Node, Stmt node.Node) node.Node {
}
func (n ElseIf) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n ElseIf) Position() *node.Position {

View File

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

View File

@@ -5,21 +5,19 @@ import (
)
type Finally struct {
attributes map[string]interface{}
position *node.Position
Stmts []node.Node
position *node.Position
Stmts []node.Node
}
func NewFinally(Stmts []node.Node) node.Node {
return &Finally{
map[string]interface{}{},
nil,
Stmts,
}
}
func (n Finally) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Finally) Position() *node.Position {

View File

@@ -5,17 +5,15 @@ import (
)
type For struct {
attributes map[string]interface{}
position *node.Position
Init []node.Node
Cond []node.Node
Loop []node.Node
Stmt node.Node
position *node.Position
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 {
return &For{
map[string]interface{}{},
nil,
Init,
Cond,
@@ -25,7 +23,7 @@ func NewFor(Init []node.Node, Cond []node.Node, Loop []node.Node, Stmt node.Node
}
func (n For) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n For) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Foreach struct {
attributes map[string]interface{}
position *node.Position
expr node.Node
Key node.Node
Variable node.Node
Stmt node.Node
position *node.Position
ByRef bool
Expr 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,
ByRef,
Expr,
Key,
Variable,
Stmt,
@@ -27,7 +25,9 @@ func NewForeach(expr node.Node, Key node.Node, Variable node.Node, Stmt node.Nod
}
func (n Foreach) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"ByRef": n.ByRef,
}
}
func (n Foreach) Position() *node.Position {
@@ -44,9 +44,9 @@ func (n Foreach) Walk(v node.Visitor) {
return
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
if n.Key != nil {

View File

@@ -5,7 +5,6 @@ import (
)
type Function struct {
attributes map[string]interface{}
position *node.Position
ReturnsRef bool
PhpDocComment string
@@ -17,10 +16,6 @@ type Function struct {
func NewFunction(FunctionName node.Node, ReturnsRef bool, Params []node.Node, ReturnType node.Node, Stmts []node.Node, PhpDocComment string) node.Node {
return &Function{
map[string]interface{}{
"ReturnsRef": ReturnsRef,
"PhpDocComment": PhpDocComment,
},
nil,
ReturnsRef,
PhpDocComment,

View File

@@ -5,21 +5,19 @@ import (
)
type Global struct {
attributes map[string]interface{}
position *node.Position
Vars []node.Node
position *node.Position
Vars []node.Node
}
func NewGlobal(Vars []node.Node) node.Node {
return &Global{
map[string]interface{}{},
nil,
Vars,
}
}
func (n Global) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Global) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Goto struct {
attributes map[string]interface{}
position *node.Position
Label node.Node
position *node.Position
Label node.Node
}
func NewGoto(Label node.Node) node.Node {
return &Goto{
map[string]interface{}{},
nil,
Label,
}
}
func (n Goto) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Goto) Position() *node.Position {

View File

@@ -5,16 +5,14 @@ import (
)
type GroupUse struct {
attributes map[string]interface{}
position *node.Position
UseType node.Node
pRefix node.Node
UseList []node.Node
position *node.Position
UseType node.Node
pRefix node.Node
UseList []node.Node
}
func NewGroupUse(UseType node.Node, pRefix node.Node, UseList []node.Node) node.Node {
return &GroupUse{
map[string]interface{}{},
nil,
UseType,
pRefix,
@@ -23,7 +21,7 @@ func NewGroupUse(UseType node.Node, pRefix node.Node, UseList []node.Node) node.
}
func (n GroupUse) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n GroupUse) Position() *node.Position {

View File

@@ -5,19 +5,17 @@ import (
)
type HaltCompiler struct {
attributes map[string]interface{}
position *node.Position
position *node.Position
}
func NewHaltCompiler() node.Node {
return &HaltCompiler{
map[string]interface{}{},
nil,
}
}
func (n HaltCompiler) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n HaltCompiler) Position() *node.Position {

View File

@@ -5,17 +5,15 @@ import (
)
type If struct {
attributes map[string]interface{}
position *node.Position
Cond node.Node
Stmt node.Node
ElseIf []node.Node
_else node.Node
position *node.Position
Cond node.Node
Stmt node.Node
ElseIf []node.Node
_else node.Node
}
func NewIf(Cond node.Node, Stmt node.Node) node.Node {
return &If{
map[string]interface{}{},
nil,
Cond,
Stmt,
@@ -25,7 +23,7 @@ func NewIf(Cond node.Node, Stmt node.Node) node.Node {
}
func (n If) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n If) Position() *node.Position {

View File

@@ -5,21 +5,21 @@ import (
)
type InlineHtml struct {
attributes map[string]interface{}
position *node.Position
position *node.Position
Value string
}
func NewInlineHtml(Value string) node.Node {
return &InlineHtml{
map[string]interface{}{
"Value": Value,
},
nil,
Value,
}
}
func (n InlineHtml) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"Value": n.Value,
}
}
func (n InlineHtml) Position() *node.Position {

View File

@@ -5,19 +5,17 @@ import (
)
type Interface struct {
attributes map[string]interface{}
position *node.Position
PhpDocComment string
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,
PhpDocComment,
InterfaceName,
Extends,
Stmts,
@@ -25,7 +23,9 @@ func NewInterface(InterfaceName node.Node, Extends []node.Node, Stmts []node.Nod
}
func (n Interface) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"PhpDocComment": n.PhpDocComment,
}
}
func (n Interface) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Label struct {
attributes map[string]interface{}
position *node.Position
LabelName node.Node
position *node.Position
LabelName node.Node
}
func NewLabel(LabelName node.Node) node.Node {
return &Label{
map[string]interface{}{},
nil,
LabelName,
}
}
func (n Label) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Label) Position() *node.Position {

View File

@@ -5,7 +5,6 @@ import (
)
type Namespace struct {
attributes map[string]interface{}
position *node.Position
NamespaceName node.Node
Stmts []node.Node
@@ -13,7 +12,6 @@ type Namespace struct {
func NewNamespace(NamespaceName node.Node, Stmts []node.Node) node.Node {
return &Namespace{
map[string]interface{}{},
nil,
NamespaceName,
Stmts,
@@ -21,7 +19,7 @@ func NewNamespace(NamespaceName node.Node, Stmts []node.Node) node.Node {
}
func (n Namespace) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Namespace) Position() *node.Position {

View File

@@ -5,19 +5,17 @@ import (
)
type Nop struct {
attributes map[string]interface{}
position *node.Position
position *node.Position
}
func NewNop() node.Node {
return &Nop{
map[string]interface{}{},
nil,
}
}
func (n Nop) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Nop) Position() *node.Position {

View File

@@ -5,24 +5,24 @@ import (
)
type Property struct {
attributes map[string]interface{}
position *node.Position
Variable node.Node
expr node.Node
position *node.Position
PhpDocComment string
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,
PhpDocComment,
Variable,
expr,
Expr,
}
}
func (n Property) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"PhpDocComment": n.PhpDocComment,
}
}
func (n Property) Position() *node.Position {
@@ -44,9 +44,9 @@ func (n Property) Walk(v node.Visitor) {
n.Variable.Walk(vv)
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,7 +5,6 @@ import (
)
type PropertyList struct {
attributes map[string]interface{}
position *node.Position
Modifiers []node.Node
Properties []node.Node
@@ -13,7 +12,6 @@ type PropertyList struct {
func NewPropertyList(Modifiers []node.Node, Properties []node.Node) node.Node {
return &PropertyList{
map[string]interface{}{},
nil,
Modifiers,
Properties,
@@ -21,7 +19,7 @@ func NewPropertyList(Modifiers []node.Node, Properties []node.Node) node.Node {
}
func (n PropertyList) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n PropertyList) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Return struct {
attributes map[string]interface{}
position *node.Position
expr node.Node
position *node.Position
Expr node.Node
}
func NewReturn(expr node.Node) node.Node {
func NewReturn(Expr node.Node) node.Node {
return &Return{
map[string]interface{}{},
nil,
expr,
Expr,
}
}
func (n Return) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Return) Position() *node.Position {
@@ -36,9 +34,9 @@ func (n Return) Walk(v node.Visitor) {
return
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,21 +5,19 @@ import (
)
type Static struct {
attributes map[string]interface{}
position *node.Position
Vars []node.Node
position *node.Position
Vars []node.Node
}
func NewStatic(Vars []node.Node) node.Node {
return &Static{
map[string]interface{}{},
nil,
Vars,
}
}
func (n Static) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Static) Position() *node.Position {

View File

@@ -5,23 +5,21 @@ import (
)
type StaticVar struct {
attributes map[string]interface{}
position *node.Position
Variable node.Node
expr node.Node
position *node.Position
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,
expr,
Expr,
}
}
func (n StaticVar) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n StaticVar) Position() *node.Position {
@@ -43,9 +41,9 @@ func (n StaticVar) Walk(v node.Visitor) {
n.Variable.Walk(vv)
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,21 +5,19 @@ import (
)
type StmtList struct {
attributes map[string]interface{}
position *node.Position
Stmts []node.Node
position *node.Position
Stmts []node.Node
}
func NewStmtList(Stmts []node.Node) node.Node {
return StmtList{
map[string]interface{}{},
nil,
Stmts,
}
}
func (n StmtList) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n StmtList) Position() *node.Position {

View File

@@ -6,16 +6,14 @@ import (
)
type Switch struct {
attributes map[string]interface{}
position *node.Position
token token.Token
Cond node.Node
cases []node.Node
position *node.Position
token token.Token
Cond node.Node
cases []node.Node
}
func NewSwitch(token token.Token, Cond node.Node, cases []node.Node) node.Node {
return &Switch{
map[string]interface{}{},
nil,
token,
Cond,
@@ -24,7 +22,7 @@ func NewSwitch(token token.Token, Cond node.Node, cases []node.Node) node.Node {
}
func (n Switch) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Switch) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Throw struct {
attributes map[string]interface{}
position *node.Position
expr node.Node
position *node.Position
Expr node.Node
}
func NewThrow(expr node.Node) node.Node {
func NewThrow(Expr node.Node) node.Node {
return &Throw{
map[string]interface{}{},
nil,
expr,
Expr,
}
}
func (n Throw) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Throw) Position() *node.Position {
@@ -36,9 +34,9 @@ func (n Throw) Walk(v node.Visitor) {
return
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
if n.Expr != nil {
vv := v.GetChildrenVisitor("Expr")
n.Expr.Walk(vv)
}
v.LeaveNode(n)

View File

@@ -5,25 +5,25 @@ import (
)
type Trait struct {
attributes map[string]interface{}
position *node.Position
TraitName node.Node
Stmts []node.Node
position *node.Position
PhpDocComment string
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,
PhpDocComment,
TraitName,
Stmts,
}
}
func (n Trait) Attributes() map[string]interface{} {
return n.attributes
return map[string]interface{}{
"PhpDocComment": n.PhpDocComment,
}
}
func (n Trait) Position() *node.Position {

View File

@@ -5,15 +5,13 @@ import (
)
type TraitMethodRef struct {
attributes map[string]interface{}
position *node.Position
Trait node.Node
Method node.Node
position *node.Position
Trait node.Node
Method node.Node
}
func NewTraitMethodRef(Trait node.Node, Method node.Node) node.Node {
return &TraitMethodRef{
map[string]interface{}{},
nil,
Trait,
Method,
@@ -21,7 +19,7 @@ func NewTraitMethodRef(Trait node.Node, Method node.Node) node.Node {
}
func (n TraitMethodRef) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n TraitMethodRef) Position() *node.Position {

View File

@@ -5,7 +5,6 @@ import (
)
type TraitUse struct {
attributes map[string]interface{}
position *node.Position
Traits []node.Node
Adaptations []node.Node
@@ -13,7 +12,6 @@ type TraitUse struct {
func NewTraitUse(Traits []node.Node, Adaptations []node.Node) node.Node {
return &TraitUse{
map[string]interface{}{},
nil,
Traits,
Adaptations,
@@ -21,7 +19,7 @@ func NewTraitUse(Traits []node.Node, Adaptations []node.Node) node.Node {
}
func (n TraitUse) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n TraitUse) Position() *node.Position {

View File

@@ -5,16 +5,14 @@ import (
)
type TraitUseAlias struct {
attributes map[string]interface{}
position *node.Position
Ref node.Node
Modifier node.Node
Alias node.Node
position *node.Position
Ref node.Node
Modifier node.Node
Alias node.Node
}
func NewTraitUseAlias(Ref node.Node, Modifier node.Node, Alias node.Node) node.Node {
return &TraitUseAlias{
map[string]interface{}{},
nil,
Ref,
Modifier,
@@ -23,7 +21,7 @@ func NewTraitUseAlias(Ref node.Node, Modifier node.Node, Alias node.Node) node.N
}
func (n TraitUseAlias) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n TraitUseAlias) Position() *node.Position {

View File

@@ -5,15 +5,13 @@ import (
)
type TraitUsePrecedence struct {
attributes map[string]interface{}
position *node.Position
Ref node.Node
Insteadof node.Node
position *node.Position
Ref node.Node
Insteadof node.Node
}
func NewTraitUsePrecedence(Ref node.Node, Insteadof node.Node) node.Node {
return &TraitUsePrecedence{
map[string]interface{}{},
nil,
Ref,
Insteadof,
@@ -21,7 +19,7 @@ func NewTraitUsePrecedence(Ref node.Node, Insteadof node.Node) node.Node {
}
func (n TraitUsePrecedence) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n TraitUsePrecedence) Position() *node.Position {

View File

@@ -5,16 +5,14 @@ import (
)
type Try struct {
attributes map[string]interface{}
position *node.Position
Stmts []node.Node
Catches []node.Node
Finally node.Node
position *node.Position
Stmts []node.Node
Catches []node.Node
Finally node.Node
}
func NewTry(Stmts []node.Node, Catches []node.Node, Finally node.Node) node.Node {
return &Try{
map[string]interface{}{},
nil,
Stmts,
Catches,
@@ -23,7 +21,7 @@ func NewTry(Stmts []node.Node, Catches []node.Node, Finally node.Node) node.Node
}
func (n Try) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Try) Position() *node.Position {

View File

@@ -5,21 +5,19 @@ import (
)
type Unset struct {
attributes map[string]interface{}
position *node.Position
Vars []node.Node
position *node.Position
Vars []node.Node
}
func NewUnset(Vars []node.Node) node.Node {
return &Unset{
map[string]interface{}{},
nil,
Vars,
}
}
func (n Unset) Attributes() map[string]interface{} {
return n.attributes
return nil
}
func (n Unset) Position() *node.Position {