remove name field

This commit is contained in:
z7zmey
2018-01-04 20:29:07 +02:00
parent e8655c5f4c
commit 383a245370
159 changed files with 14 additions and 891 deletions

View File

@@ -5,7 +5,6 @@ import (
)
type AltElse struct {
name string
attributes map[string]interface{}
position *node.Position
stmt node.Node
@@ -13,17 +12,12 @@ type AltElse struct {
func NewAltElse(stmt node.Node) node.Node {
return AltElse{
"AltElse",
map[string]interface{}{},
nil,
stmt,
}
}
func (n AltElse) Name() string {
return "AltElse"
}
func (n AltElse) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type AltElseIf struct {
name string
attributes map[string]interface{}
position *node.Position
cond node.Node
@@ -14,7 +13,6 @@ type AltElseIf struct {
func NewAltElseIf(cond node.Node, stmt node.Node) node.Node {
return AltElseIf{
"AltElseIf",
map[string]interface{}{},
nil,
cond,
@@ -22,10 +20,6 @@ func NewAltElseIf(cond node.Node, stmt node.Node) node.Node {
}
}
func (n AltElseIf) Name() string {
return "AltElseIf"
}
func (n AltElseIf) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type AltIf struct {
name string
attributes map[string]interface{}
position *node.Position
cond node.Node
@@ -16,7 +15,6 @@ type AltIf struct {
func NewAltIf(cond node.Node, stmt node.Node) node.Node {
return AltIf{
"AltIf",
map[string]interface{}{},
nil,
cond,
@@ -26,10 +24,6 @@ func NewAltIf(cond node.Node, stmt node.Node) node.Node {
}
}
func (n AltIf) Name() string {
return "AltIf"
}
func (n AltIf) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Break struct {
name string
attributes map[string]interface{}
position *node.Position
expr node.Node
@@ -13,17 +12,12 @@ type Break struct {
func NewBreak(expr node.Node) node.Node {
return Break{
"Break",
map[string]interface{}{},
nil,
expr,
}
}
func (n Break) Name() string {
return "Break"
}
func (n Break) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Case struct {
name string
attributes map[string]interface{}
position *node.Position
cond node.Node
@@ -14,7 +13,6 @@ type Case struct {
func NewCase(cond node.Node, stmts []node.Node) node.Node {
return Case{
"Case",
map[string]interface{}{},
nil,
cond,
@@ -22,10 +20,6 @@ func NewCase(cond node.Node, stmts []node.Node) node.Node {
}
}
func (n Case) Name() string {
return "Case"
}
func (n Case) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Catch struct {
name string
attributes map[string]interface{}
position *node.Position
types []node.Node
@@ -15,7 +14,6 @@ type Catch struct {
func NewCatch(types []node.Node, variable node.Node, stmts []node.Node) node.Node {
return Catch{
"Catch",
map[string]interface{}{},
nil,
types,
@@ -24,10 +22,6 @@ func NewCatch(types []node.Node, variable node.Node, stmts []node.Node) node.Nod
}
}
func (n Catch) Name() string {
return "Catch"
}
func (n Catch) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Class struct {
name string
attributes map[string]interface{}
position *node.Position
className node.Node
@@ -18,7 +17,6 @@ type Class struct {
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{
"Class",
map[string]interface{}{
"phpDocComment": phpDocComment,
},
@@ -32,10 +30,6 @@ func NewClass(className node.Node, modifiers []node.Node, args []node.Node, exte
}
}
func (n Class) Name() string {
return "Class"
}
func (n Class) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type ClassConstList struct {
name string
attributes map[string]interface{}
position *node.Position
modifiers []node.Node
@@ -14,7 +13,6 @@ type ClassConstList struct {
func NewClassConstList(modifiers []node.Node, consts []node.Node) node.Node {
return ClassConstList{
"ClassConstList",
map[string]interface{}{},
nil,
modifiers,
@@ -22,10 +20,6 @@ func NewClassConstList(modifiers []node.Node, consts []node.Node) node.Node {
}
}
func (n ClassConstList) Name() string {
return "ClassConstList"
}
func (n ClassConstList) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type ClassMethod struct {
name string
attributes map[string]interface{}
position *node.Position
methodName node.Node
@@ -17,7 +16,6 @@ type ClassMethod struct {
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{
"ClassMethod",
map[string]interface{}{
"returnsRef": returnsRef,
"phpDocComment": phpDocComment,
@@ -31,10 +29,6 @@ func NewClassMethod(methodName node.Node, modifiers []node.Node, returnsRef bool
}
}
func (n ClassMethod) Name() string {
return "ClassMethod"
}
func (n ClassMethod) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type ConstList struct {
name string
attributes map[string]interface{}
position *node.Position
consts []node.Node
@@ -13,17 +12,12 @@ type ConstList struct {
func NewConstList(consts []node.Node) node.Node {
return ConstList{
"ConstList",
map[string]interface{}{},
nil,
consts,
}
}
func (n ConstList) Name() string {
return "ConstList"
}
func (n ConstList) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Constant struct {
name string
attributes map[string]interface{}
position *node.Position
constantName node.Node
@@ -14,7 +13,6 @@ type Constant struct {
func NewConstant(constantName node.Node, expr node.Node, phpDocComment string) node.Node {
return Constant{
"Constant",
map[string]interface{}{
"phpDocComment": phpDocComment,
},
@@ -24,10 +22,6 @@ func NewConstant(constantName node.Node, expr node.Node, phpDocComment string) n
}
}
func (n Constant) Name() string {
return "Constant"
}
func (n Constant) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Continue struct {
name string
attributes map[string]interface{}
position *node.Position
expr node.Node
@@ -13,17 +12,12 @@ type Continue struct {
func NewContinue(expr node.Node) node.Node {
return Continue{
"Continue",
map[string]interface{}{},
nil,
expr,
}
}
func (n Continue) Name() string {
return "Continue"
}
func (n Continue) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Declare struct {
name string
attributes map[string]interface{}
position *node.Position
consts []node.Node
@@ -14,7 +13,6 @@ type Declare struct {
func NewDeclare(consts []node.Node, stmt node.Node) node.Node {
return Declare{
"Declare",
map[string]interface{}{},
nil,
consts,
@@ -22,10 +20,6 @@ func NewDeclare(consts []node.Node, stmt node.Node) node.Node {
}
}
func (n Declare) Name() string {
return "Declare"
}
func (n Declare) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Default struct {
name string
attributes map[string]interface{}
position *node.Position
stmts []node.Node
@@ -13,17 +12,12 @@ type Default struct {
func NewDefault(stmts []node.Node) node.Node {
return Default{
"Default",
map[string]interface{}{},
nil,
stmts,
}
}
func (n Default) Name() string {
return "Default"
}
func (n Default) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Do struct {
name string
attributes map[string]interface{}
position *node.Position
stmt node.Node
@@ -14,7 +13,6 @@ type Do struct {
func NewDo(stmt node.Node, cond node.Node) node.Node {
return Do{
"Do",
map[string]interface{}{},
nil,
stmt,
@@ -22,10 +20,6 @@ func NewDo(stmt node.Node, cond node.Node) node.Node {
}
}
func (n Do) Name() string {
return "Do"
}
func (n Do) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Echo struct {
name string
attributes map[string]interface{}
position *node.Position
exprs []node.Node
@@ -13,17 +12,12 @@ type Echo struct {
func NewEcho(exprs []node.Node) node.Node {
return Echo{
"Echo",
map[string]interface{}{},
nil,
exprs,
}
}
func (n Echo) Name() string {
return "Echo"
}
func (n Echo) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Else struct {
name string
attributes map[string]interface{}
position *node.Position
stmt node.Node
@@ -13,17 +12,12 @@ type Else struct {
func NewElse(stmt node.Node) node.Node {
return Else{
"Else",
map[string]interface{}{},
nil,
stmt,
}
}
func (n Else) Name() string {
return "Else"
}
func (n Else) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type ElseIf struct {
name string
attributes map[string]interface{}
position *node.Position
cond node.Node
@@ -14,7 +13,6 @@ type ElseIf struct {
func NewElseIf(cond node.Node, stmt node.Node) node.Node {
return ElseIf{
"ElseIf",
map[string]interface{}{},
nil,
cond,
@@ -22,10 +20,6 @@ func NewElseIf(cond node.Node, stmt node.Node) node.Node {
}
}
func (n ElseIf) Name() string {
return "ElseIf"
}
func (n ElseIf) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Expression struct {
name string
attributes map[string]interface{}
position *node.Position
expr node.Node
@@ -13,17 +12,12 @@ type Expression struct {
func NewExpression(expr node.Node) node.Node {
return Expression{
"Expression",
map[string]interface{}{},
nil,
expr,
}
}
func (n Expression) Name() string {
return "Expression"
}
func (n Expression) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Finally struct {
name string
attributes map[string]interface{}
position *node.Position
stmts []node.Node
@@ -13,17 +12,12 @@ type Finally struct {
func NewFinally(stmts []node.Node) node.Node {
return Finally{
"Finally",
map[string]interface{}{},
nil,
stmts,
}
}
func (n Finally) Name() string {
return "Finally"
}
func (n Finally) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type For struct {
name string
attributes map[string]interface{}
position *node.Position
init []node.Node
@@ -16,7 +15,6 @@ type For struct {
func NewFor(init []node.Node, cond []node.Node, loop []node.Node, stmt node.Node) node.Node {
return For{
"For",
map[string]interface{}{},
nil,
init,
@@ -26,10 +24,6 @@ func NewFor(init []node.Node, cond []node.Node, loop []node.Node, stmt node.Node
}
}
func (n For) Name() string {
return "For"
}
func (n For) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Foreach struct {
name string
attributes map[string]interface{}
position *node.Position
expr node.Node
@@ -16,7 +15,6 @@ type Foreach struct {
func NewForeach(expr node.Node, key node.Node, variable node.Node, stmt node.Node, byRef bool) node.Node {
return Foreach{
"Foreach",
map[string]interface{}{
"byRef": byRef,
},
@@ -28,10 +26,6 @@ func NewForeach(expr node.Node, key node.Node, variable node.Node, stmt node.Nod
}
}
func (n Foreach) Name() string {
return "Foreach"
}
func (n Foreach) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Function struct {
name string
attributes map[string]interface{}
position *node.Position
functionName node.Node
@@ -16,7 +15,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{
"Function",
map[string]interface{}{
"returnsRef": returnsRef,
"phpDocComment": phpDocComment,
@@ -29,10 +27,6 @@ func NewFunction(functionName node.Node, returnsRef bool, params []node.Node, re
}
}
func (n Function) Name() string {
return "Function"
}
func (n Function) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Global struct {
name string
attributes map[string]interface{}
position *node.Position
vars []node.Node
@@ -13,17 +12,12 @@ type Global struct {
func NewGlobal(vars []node.Node) node.Node {
return Global{
"Global",
map[string]interface{}{},
nil,
vars,
}
}
func (n Global) Name() string {
return "Global"
}
func (n Global) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Goto struct {
name string
attributes map[string]interface{}
position *node.Position
label node.Node
@@ -13,17 +12,12 @@ type Goto struct {
func NewGoto(label node.Node) node.Node {
return Goto{
"Goto",
map[string]interface{}{},
nil,
label,
}
}
func (n Goto) Name() string {
return "Goto"
}
func (n Goto) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type GroupUse struct {
name string
attributes map[string]interface{}
position *node.Position
useType node.Node
@@ -15,7 +14,6 @@ type GroupUse struct {
func NewGroupUse(useType node.Node, prefix node.Node, useList []node.Node) node.Node {
return GroupUse{
"GroupUse",
map[string]interface{}{},
nil,
useType,
@@ -24,10 +22,6 @@ func NewGroupUse(useType node.Node, prefix node.Node, useList []node.Node) node.
}
}
func (n GroupUse) Name() string {
return "GroupUse"
}
func (n GroupUse) Attributes() map[string]interface{} {
return n.attributes
}

View File

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

View File

@@ -5,7 +5,6 @@ import (
)
type If struct {
name string
attributes map[string]interface{}
position *node.Position
cond node.Node
@@ -16,7 +15,6 @@ type If struct {
func NewIf(cond node.Node, stmt node.Node) node.Node {
return If{
"If",
map[string]interface{}{},
nil,
cond,
@@ -26,10 +24,6 @@ func NewIf(cond node.Node, stmt node.Node) node.Node {
}
}
func (n If) Name() string {
return "If"
}
func (n If) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,14 +5,12 @@ import (
)
type InlineHtml struct {
name string
attributes map[string]interface{}
position *node.Position
}
func NewInlineHtml(value string) node.Node {
return InlineHtml{
"InlineHtml",
map[string]interface{}{
"value": value,
},
@@ -20,10 +18,6 @@ func NewInlineHtml(value string) node.Node {
}
}
func (n InlineHtml) Name() string {
return "InlineHtml"
}
func (n InlineHtml) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Interface struct {
name string
attributes map[string]interface{}
position *node.Position
interfaceName node.Node
@@ -15,7 +14,6 @@ type Interface struct {
func NewInterface(interfaceName node.Node, extends []node.Node, stmts []node.Node, phpDocComment string) node.Node {
return Interface{
"Interface",
map[string]interface{}{
"phpDocComment": phpDocComment,
},
@@ -26,10 +24,6 @@ func NewInterface(interfaceName node.Node, extends []node.Node, stmts []node.Nod
}
}
func (n Interface) Name() string {
return "Interface"
}
func (n Interface) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Label struct {
name string
attributes map[string]interface{}
position *node.Position
labelName node.Node
@@ -13,17 +12,12 @@ type Label struct {
func NewLabel(labelName node.Node) node.Node {
return Label{
"Label",
map[string]interface{}{},
nil,
labelName,
}
}
func (n Label) Name() string {
return "Label"
}
func (n Label) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Namespace struct {
name string
attributes map[string]interface{}
position *node.Position
namespaceName node.Node
@@ -14,7 +13,6 @@ type Namespace struct {
func NewNamespace(namespaceName node.Node, stmts []node.Node) node.Node {
return Namespace{
"Namespace",
map[string]interface{}{},
nil,
namespaceName,
@@ -22,10 +20,6 @@ func NewNamespace(namespaceName node.Node, stmts []node.Node) node.Node {
}
}
func (n Namespace) Name() string {
return "Namespace"
}
func (n Namespace) Attributes() map[string]interface{} {
return n.attributes
}

View File

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

View File

@@ -5,7 +5,6 @@ import (
)
type Property struct {
name string
attributes map[string]interface{}
position *node.Position
variable node.Node
@@ -14,7 +13,6 @@ type Property struct {
func NewProperty(variable node.Node, expr node.Node, phpDocComment string) node.Node {
return Property{
"Property",
map[string]interface{}{
"phpDocComment": phpDocComment,
},
@@ -23,10 +21,6 @@ func NewProperty(variable node.Node, expr node.Node, phpDocComment string) node.
expr,
}
}
func (n Property) Name() string {
return "Property"
}
func (n Property) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type PropertyList struct {
name string
attributes map[string]interface{}
position *node.Position
modifiers []node.Node
@@ -14,7 +13,6 @@ type PropertyList struct {
func NewPropertyList(modifiers []node.Node, properties []node.Node) node.Node {
return PropertyList{
"PropertyList",
map[string]interface{}{},
nil,
modifiers,
@@ -22,10 +20,6 @@ func NewPropertyList(modifiers []node.Node, properties []node.Node) node.Node {
}
}
func (n PropertyList) Name() string {
return "PropertyList"
}
func (n PropertyList) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Return struct {
name string
attributes map[string]interface{}
position *node.Position
expr node.Node
@@ -13,17 +12,12 @@ type Return struct {
func NewReturn(expr node.Node) node.Node {
return Return{
"Return",
map[string]interface{}{},
nil,
expr,
}
}
func (n Return) Name() string {
return "Return"
}
func (n Return) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Static struct {
name string
attributes map[string]interface{}
position *node.Position
vars []node.Node
@@ -13,17 +12,12 @@ type Static struct {
func NewStatic(vars []node.Node) node.Node {
return Static{
"Static",
map[string]interface{}{},
nil,
vars,
}
}
func (n Static) Name() string {
return "Static"
}
func (n Static) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type StaticVar struct {
name string
attributes map[string]interface{}
position *node.Position
variable node.Node
@@ -14,7 +13,6 @@ type StaticVar struct {
func NewStaticVar(variable node.Node, expr node.Node) node.Node {
return StaticVar{
"StaticVar",
map[string]interface{}{},
nil,
variable,
@@ -22,10 +20,6 @@ func NewStaticVar(variable node.Node, expr node.Node) node.Node {
}
}
func (n StaticVar) Name() string {
return "StaticVar"
}
func (n StaticVar) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type StmtList struct {
name string
attributes map[string]interface{}
position *node.Position
stmts []node.Node
@@ -13,17 +12,12 @@ type StmtList struct {
func NewStmtList(stmts []node.Node) node.Node {
return StmtList{
"StmtList",
map[string]interface{}{},
nil,
stmts,
}
}
func (n StmtList) Name() string {
return "StmtList"
}
func (n StmtList) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -6,7 +6,6 @@ import (
)
type Switch struct {
name string
attributes map[string]interface{}
position *node.Position
token token.Token
@@ -16,7 +15,6 @@ type Switch struct {
func NewSwitch(token token.Token, cond node.Node, cases []node.Node) node.Node {
return Switch{
"Switch",
map[string]interface{}{},
nil,
token,
@@ -25,10 +23,6 @@ func NewSwitch(token token.Token, cond node.Node, cases []node.Node) node.Node {
}
}
func (n Switch) Name() string {
return "Switch"
}
func (n Switch) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Throw struct {
name string
attributes map[string]interface{}
position *node.Position
expr node.Node
@@ -13,17 +12,12 @@ type Throw struct {
func NewThrow(expr node.Node) node.Node {
return Throw{
"Throw",
map[string]interface{}{},
nil,
expr,
}
}
func (n Throw) Name() string {
return "Throw"
}
func (n Throw) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Trait struct {
name string
attributes map[string]interface{}
position *node.Position
traitName node.Node
@@ -14,7 +13,6 @@ type Trait struct {
func NewTrait(traitName node.Node, stmts []node.Node, phpDocComment string) node.Node {
return Trait{
"Trait",
map[string]interface{}{
"phpDocComment": phpDocComment,
},
@@ -24,10 +22,6 @@ func NewTrait(traitName node.Node, stmts []node.Node, phpDocComment string) node
}
}
func (n Trait) Name() string {
return "Trait"
}
func (n Trait) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type TraitMethodRef struct {
name string
attributes map[string]interface{}
position *node.Position
trait node.Node
@@ -14,7 +13,6 @@ type TraitMethodRef struct {
func NewTraitMethodRef(trait node.Node, method node.Node) node.Node {
return TraitMethodRef{
"TraitMethodRef",
map[string]interface{}{},
nil,
trait,
@@ -22,10 +20,6 @@ func NewTraitMethodRef(trait node.Node, method node.Node) node.Node {
}
}
func (n TraitMethodRef) Name() string {
return "TraitMethodRef"
}
func (n TraitMethodRef) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type TraitUse struct {
name string
attributes map[string]interface{}
position *node.Position
traits []node.Node
@@ -14,7 +13,6 @@ type TraitUse struct {
func NewTraitUse(traits []node.Node, adaptations []node.Node) node.Node {
return TraitUse{
"TraitUse",
map[string]interface{}{},
nil,
traits,
@@ -22,10 +20,6 @@ func NewTraitUse(traits []node.Node, adaptations []node.Node) node.Node {
}
}
func (n TraitUse) Name() string {
return "TraitUse"
}
func (n TraitUse) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type TraitUseAlias struct {
name string
attributes map[string]interface{}
position *node.Position
ref node.Node
@@ -15,7 +14,6 @@ type TraitUseAlias struct {
func NewTraitUseAlias(ref node.Node, modifier node.Node, alias node.Node) node.Node {
return TraitUseAlias{
"TraitUseAlias",
map[string]interface{}{},
nil,
ref,
@@ -24,10 +22,6 @@ func NewTraitUseAlias(ref node.Node, modifier node.Node, alias node.Node) node.N
}
}
func (n TraitUseAlias) Name() string {
return "TraitUseAlias"
}
func (n TraitUseAlias) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type TraitUsePrecedence struct {
name string
attributes map[string]interface{}
position *node.Position
ref node.Node
@@ -14,7 +13,6 @@ type TraitUsePrecedence struct {
func NewTraitUsePrecedence(ref node.Node, insteadof node.Node) node.Node {
return TraitUsePrecedence{
"TraitUsePrecedence",
map[string]interface{}{},
nil,
ref,
@@ -22,10 +20,6 @@ func NewTraitUsePrecedence(ref node.Node, insteadof node.Node) node.Node {
}
}
func (n TraitUsePrecedence) Name() string {
return "TraitUsePrecedence"
}
func (n TraitUsePrecedence) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Try struct {
name string
attributes map[string]interface{}
position *node.Position
stmts []node.Node
@@ -15,7 +14,6 @@ type Try struct {
func NewTry(stmts []node.Node, catches []node.Node, finally node.Node) node.Node {
return Try{
"Try",
map[string]interface{}{},
nil,
stmts,
@@ -24,10 +22,6 @@ func NewTry(stmts []node.Node, catches []node.Node, finally node.Node) node.Node
}
}
func (n Try) Name() string {
return "Try"
}
func (n Try) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Unset struct {
name string
attributes map[string]interface{}
position *node.Position
vars []node.Node
@@ -13,17 +12,12 @@ type Unset struct {
func NewUnset(vars []node.Node) node.Node {
return Unset{
"Unset",
map[string]interface{}{},
nil,
vars,
}
}
func (n Unset) Name() string {
return "Unset"
}
func (n Unset) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type Use struct {
name string
attributes map[string]interface{}
position *node.Position
useType node.Node
@@ -15,7 +14,6 @@ type Use struct {
func NewUse(useType node.Node, use node.Node, alias node.Node) node.Node {
return Use{
"Use",
map[string]interface{}{},
nil,
useType,
@@ -24,10 +22,6 @@ func NewUse(useType node.Node, use node.Node, alias node.Node) node.Node {
}
}
func (n Use) Name() string {
return "Use"
}
func (n Use) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -5,7 +5,6 @@ import (
)
type UseList struct {
name string
attributes map[string]interface{}
position *node.Position
useType node.Node
@@ -14,7 +13,6 @@ type UseList struct {
func NewUseList(useType node.Node, uses []node.Node) node.Node {
return UseList{
"UseList",
map[string]interface{}{},
nil,
useType,
@@ -22,10 +20,6 @@ func NewUseList(useType node.Node, uses []node.Node) node.Node {
}
}
func (n UseList) Name() string {
return "UseList"
}
func (n UseList) Attributes() map[string]interface{} {
return n.attributes
}

View File

@@ -6,7 +6,6 @@ import (
)
type While struct {
name string
attributes map[string]interface{}
position *node.Position
token token.Token
@@ -16,7 +15,6 @@ type While struct {
func NewWhile(token token.Token, cond node.Node, stmt node.Node) node.Node {
return While{
"While",
map[string]interface{}{},
nil,
token,
@@ -25,10 +23,6 @@ func NewWhile(token token.Token, cond node.Node, stmt node.Node) node.Node {
}
}
func (n While) Name() string {
return "While"
}
func (n While) Attributes() map[string]interface{} {
return n.attributes
}