fluent interface for node SetAttribure
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
type AltElse struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
stmt node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n AltElse) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n AltElse) SetAttribute(key string, value interface{}) {
|
||||
func (n AltElse) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n AltElse) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type AltElseIf struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
cond node.Node
|
||||
stmt node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n AltElseIf) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n AltElseIf) SetAttribute(key string, value interface{}) {
|
||||
func (n AltElseIf) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n AltElseIf) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type AltIf struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
cond node.Node
|
||||
stmt node.Node
|
||||
elseIf []node.Node
|
||||
@@ -38,8 +38,9 @@ func (n AltIf) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n AltIf) SetAttribute(key string, value interface{}) {
|
||||
func (n AltIf) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n AltIf) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Break struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
expr node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Break) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Break) SetAttribute(key string, value interface{}) {
|
||||
func (n Break) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Break) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Case struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
cond node.Node
|
||||
stmts []node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n Case) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Case) SetAttribute(key string, value interface{}) {
|
||||
func (n Case) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Case) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Catch struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
types []node.Node
|
||||
variable node.Node
|
||||
stmts []node.Node
|
||||
@@ -36,8 +36,9 @@ func (n Catch) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Catch) SetAttribute(key string, value interface{}) {
|
||||
func (n Catch) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Catch) Position() *node.Position {
|
||||
|
||||
@@ -44,8 +44,9 @@ func (n Class) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Class) SetAttribute(key string, value interface{}) {
|
||||
func (n Class) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Class) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type ClassConstList struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
modifiers []node.Node
|
||||
consts []node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n ClassConstList) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n ClassConstList) SetAttribute(key string, value interface{}) {
|
||||
func (n ClassConstList) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n ClassConstList) Position() *node.Position {
|
||||
|
||||
@@ -43,8 +43,9 @@ func (n ClassMethod) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n ClassMethod) SetAttribute(key string, value interface{}) {
|
||||
func (n ClassMethod) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n ClassMethod) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type ConstList struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
consts []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n ConstList) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n ConstList) SetAttribute(key string, value interface{}) {
|
||||
func (n ConstList) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n ConstList) Position() *node.Position {
|
||||
|
||||
@@ -36,8 +36,9 @@ func (n Constant) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Constant) SetAttribute(key string, value interface{}) {
|
||||
func (n Constant) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Constant) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Continue struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
expr node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Continue) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Continue) SetAttribute(key string, value interface{}) {
|
||||
func (n Continue) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Continue) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Declare struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
consts []node.Node
|
||||
stmt node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n Declare) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Declare) SetAttribute(key string, value interface{}) {
|
||||
func (n Declare) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Declare) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Default struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
stmts []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Default) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Default) SetAttribute(key string, value interface{}) {
|
||||
func (n Default) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Default) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Do struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
stmt node.Node
|
||||
cond node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n Do) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Do) SetAttribute(key string, value interface{}) {
|
||||
func (n Do) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Do) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Echo struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
exprs []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Echo) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Echo) SetAttribute(key string, value interface{}) {
|
||||
func (n Echo) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Echo) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Else struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
stmt node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Else) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Else) SetAttribute(key string, value interface{}) {
|
||||
func (n Else) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Else) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type ElseIf struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
cond node.Node
|
||||
stmt node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n ElseIf) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n ElseIf) SetAttribute(key string, value interface{}) {
|
||||
func (n ElseIf) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n ElseIf) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Expression struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
expr node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Expression) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Expression) SetAttribute(key string, value interface{}) {
|
||||
func (n Expression) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Expression) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Finally struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
stmts []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Finally) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Finally) SetAttribute(key string, value interface{}) {
|
||||
func (n Finally) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Finally) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type For struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
init []node.Node
|
||||
cond []node.Node
|
||||
loop []node.Node
|
||||
@@ -38,8 +38,9 @@ func (n For) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n For) SetAttribute(key string, value interface{}) {
|
||||
func (n For) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n For) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Foreach struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
expr node.Node
|
||||
key node.Node
|
||||
variable node.Node
|
||||
@@ -40,8 +40,9 @@ func (n Foreach) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Foreach) SetAttribute(key string, value interface{}) {
|
||||
func (n Foreach) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Foreach) Position() *node.Position {
|
||||
|
||||
@@ -41,8 +41,9 @@ func (n Function) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Function) SetAttribute(key string, value interface{}) {
|
||||
func (n Function) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Function) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Global struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
vars []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Global) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Global) SetAttribute(key string, value interface{}) {
|
||||
func (n Global) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Global) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Goto struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
label node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Goto) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Goto) SetAttribute(key string, value interface{}) {
|
||||
func (n Goto) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Goto) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type GroupUse struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
useType node.Node
|
||||
prefix node.Node
|
||||
useList []node.Node
|
||||
@@ -36,8 +36,9 @@ func (n GroupUse) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n GroupUse) SetAttribute(key string, value interface{}) {
|
||||
func (n GroupUse) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n GroupUse) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type HaltCompiler struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
}
|
||||
|
||||
func NewHaltCompiler() node.Node {
|
||||
@@ -30,8 +30,9 @@ func (n HaltCompiler) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n HaltCompiler) SetAttribute(key string, value interface{}) {
|
||||
func (n HaltCompiler) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n HaltCompiler) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type If struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
cond node.Node
|
||||
stmt node.Node
|
||||
elseIf []node.Node
|
||||
@@ -38,8 +38,9 @@ func (n If) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n If) SetAttribute(key string, value interface{}) {
|
||||
func (n If) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n If) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type InlineHtml struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
}
|
||||
|
||||
func NewInlineHtml(value string) node.Node {
|
||||
@@ -32,8 +32,9 @@ func (n InlineHtml) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n InlineHtml) SetAttribute(key string, value interface{}) {
|
||||
func (n InlineHtml) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n InlineHtml) Position() *node.Position {
|
||||
|
||||
@@ -38,8 +38,9 @@ func (n Interface) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Interface) SetAttribute(key string, value interface{}) {
|
||||
func (n Interface) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Interface) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Label struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
labelName node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Label) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Label) SetAttribute(key string, value interface{}) {
|
||||
func (n Label) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Label) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Namespace struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
namespaceName node.Node
|
||||
stmts []node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n Namespace) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Namespace) SetAttribute(key string, value interface{}) {
|
||||
func (n Namespace) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Namespace) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Nop struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
}
|
||||
|
||||
func NewNop() node.Node {
|
||||
@@ -30,8 +30,9 @@ func (n Nop) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Nop) SetAttribute(key string, value interface{}) {
|
||||
func (n Nop) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Nop) Position() *node.Position {
|
||||
|
||||
@@ -35,8 +35,9 @@ func (n Property) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Property) SetAttribute(key string, value interface{}) {
|
||||
func (n Property) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Property) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type PropertyList struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
modifiers []node.Node
|
||||
properties []node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n PropertyList) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n PropertyList) SetAttribute(key string, value interface{}) {
|
||||
func (n PropertyList) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n PropertyList) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Return struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
expr node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Return) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Return) SetAttribute(key string, value interface{}) {
|
||||
func (n Return) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Return) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Static struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
vars []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Static) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Static) SetAttribute(key string, value interface{}) {
|
||||
func (n Static) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Static) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type StaticVar struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
variable node.Node
|
||||
expr node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n StaticVar) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n StaticVar) SetAttribute(key string, value interface{}) {
|
||||
func (n StaticVar) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n StaticVar) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type StmtList struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
stmts []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n StmtList) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n StmtList) SetAttribute(key string, value interface{}) {
|
||||
func (n StmtList) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n StmtList) Position() *node.Position {
|
||||
|
||||
@@ -37,8 +37,9 @@ func (n Switch) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Switch) SetAttribute(key string, value interface{}) {
|
||||
func (n Switch) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Switch) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Throw struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
expr node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Throw) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Throw) SetAttribute(key string, value interface{}) {
|
||||
func (n Throw) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Throw) Position() *node.Position {
|
||||
|
||||
@@ -36,8 +36,9 @@ func (n Trait) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Trait) SetAttribute(key string, value interface{}) {
|
||||
func (n Trait) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Trait) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type TraitMethodRef struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
trait node.Node
|
||||
method node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n TraitMethodRef) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n TraitMethodRef) SetAttribute(key string, value interface{}) {
|
||||
func (n TraitMethodRef) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n TraitMethodRef) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type TraitUse struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
traits []node.Node
|
||||
adaptations []node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n TraitUse) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n TraitUse) SetAttribute(key string, value interface{}) {
|
||||
func (n TraitUse) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n TraitUse) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type TraitUseAlias struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
ref node.Node
|
||||
modifier node.Node
|
||||
alias node.Node
|
||||
@@ -36,8 +36,9 @@ func (n TraitUseAlias) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n TraitUseAlias) SetAttribute(key string, value interface{}) {
|
||||
func (n TraitUseAlias) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n TraitUseAlias) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type TraitUsePrecedence struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
ref node.Node
|
||||
insteadof node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n TraitUsePrecedence) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n TraitUsePrecedence) SetAttribute(key string, value interface{}) {
|
||||
func (n TraitUsePrecedence) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n TraitUsePrecedence) Position() *node.Position {
|
||||
|
||||
@@ -36,8 +36,9 @@ func (n Try) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Try) SetAttribute(key string, value interface{}) {
|
||||
func (n Try) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Try) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Unset struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
vars []node.Node
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ func (n Unset) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Unset) SetAttribute(key string, value interface{}) {
|
||||
func (n Unset) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Unset) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Use struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
useType node.Node
|
||||
use node.Node
|
||||
alias node.Node
|
||||
@@ -36,8 +36,9 @@ func (n Use) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n Use) SetAttribute(key string, value interface{}) {
|
||||
func (n Use) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n Use) Position() *node.Position {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type UseList struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
useType node.Node
|
||||
uses []node.Node
|
||||
}
|
||||
@@ -34,8 +34,9 @@ func (n UseList) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n UseList) SetAttribute(key string, value interface{}) {
|
||||
func (n UseList) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n UseList) Position() *node.Position {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
type While struct {
|
||||
name string
|
||||
attributes map[string]interface{}
|
||||
position *node.Position
|
||||
position *node.Position
|
||||
token token.Token
|
||||
cond node.Node
|
||||
stmt node.Node
|
||||
@@ -37,8 +37,9 @@ func (n While) Attribute(key string) interface{} {
|
||||
return n.attributes[key]
|
||||
}
|
||||
|
||||
func (n While) SetAttribute(key string, value interface{}) {
|
||||
func (n While) SetAttribute(key string, value interface{}) node.Node {
|
||||
n.attributes[key] = value
|
||||
return n
|
||||
}
|
||||
|
||||
func (n While) Position() *node.Position {
|
||||
|
||||
Reference in New Issue
Block a user