fluent interface for node SetAttribure

This commit is contained in:
vadim 2018-01-02 14:11:08 +02:00
parent 2051e3a23d
commit 31cc11da0c
153 changed files with 392 additions and 240 deletions

View File

@ -32,8 +32,9 @@ func (n Argument) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Argument) SetAttribute(key string, value interface{}) { func (n Argument) SetAttribute(key string, value interface{}) Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Argument) Position() *Position { func (n Argument) Position() *Position {

View File

@ -7,7 +7,7 @@ import (
type Array struct { type Array struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
} }
@ -32,8 +32,9 @@ func (n Array) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Array) SetAttribute(key string, value interface{}) { func (n Array) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Array) Position() *node.Position { func (n Array) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ArrayDimFetch struct { type ArrayDimFetch struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
dim node.Node dim node.Node
} }
@ -34,8 +34,9 @@ func (n ArrayDimFetch) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ArrayDimFetch) SetAttribute(key string, value interface{}) { func (n ArrayDimFetch) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ArrayDimFetch) Position() *node.Position { func (n ArrayDimFetch) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ArrayItem struct { type ArrayItem struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
key node.Node key node.Node
val node.Node val node.Node
} }
@ -36,8 +36,9 @@ func (n ArrayItem) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ArrayItem) SetAttribute(key string, value interface{}) { func (n ArrayItem) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ArrayItem) Position() *node.Position { func (n ArrayItem) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Assign) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Assign) SetAttribute(key string, value interface{}) { func (n Assign) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Assign) Position() *node.Position { func (n Assign) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n AssignRef) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n AssignRef) SetAttribute(key string, value interface{}) { func (n AssignRef) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n AssignRef) Position() *node.Position { func (n AssignRef) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n BitwiseAnd) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BitwiseAnd) SetAttribute(key string, value interface{}) { func (n BitwiseAnd) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BitwiseAnd) Position() *node.Position { func (n BitwiseAnd) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n BitwiseOr) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BitwiseOr) SetAttribute(key string, value interface{}) { func (n BitwiseOr) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BitwiseOr) Position() *node.Position { func (n BitwiseOr) Position() *node.Position {

View File

@ -28,8 +28,9 @@ func (n BitwiseXor) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BitwiseXor) SetAttribute(key string, value interface{}) { func (n BitwiseXor) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BitwiseXor) Position() *node.Position { func (n BitwiseXor) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Concat) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Concat) SetAttribute(key string, value interface{}) { func (n Concat) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Concat) Position() *node.Position { func (n Concat) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Div) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Div) SetAttribute(key string, value interface{}) { func (n Div) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Div) Position() *node.Position { func (n Div) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Minus) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Minus) SetAttribute(key string, value interface{}) { func (n Minus) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Minus) Position() *node.Position { func (n Minus) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Mod) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Mod) SetAttribute(key string, value interface{}) { func (n Mod) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Mod) Position() *node.Position { func (n Mod) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Mul) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Mul) SetAttribute(key string, value interface{}) { func (n Mul) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Mul) Position() *node.Position { func (n Mul) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Plus) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Plus) SetAttribute(key string, value interface{}) { func (n Plus) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Plus) Position() *node.Position { func (n Plus) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Pow) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Pow) SetAttribute(key string, value interface{}) { func (n Pow) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Pow) Position() *node.Position { func (n Pow) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n ShiftLeft) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ShiftLeft) SetAttribute(key string, value interface{}) { func (n ShiftLeft) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ShiftLeft) Position() *node.Position { func (n ShiftLeft) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n ShiftRight) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ShiftRight) SetAttribute(key string, value interface{}) { func (n ShiftRight) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ShiftRight) Position() *node.Position { func (n ShiftRight) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n BitwiseAnd) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BitwiseAnd) SetAttribute(key string, value interface{}) { func (n BitwiseAnd) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BitwiseAnd) Position() *node.Position { func (n BitwiseAnd) Position() *node.Position {

View File

@ -28,8 +28,9 @@ func (n BitwiseOr) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BitwiseOr) SetAttribute(key string, value interface{}) { func (n BitwiseOr) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BitwiseOr) Position() *node.Position { func (n BitwiseOr) Position() *node.Position {

View File

@ -28,8 +28,9 @@ func (n BitwiseXor) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BitwiseXor) SetAttribute(key string, value interface{}) { func (n BitwiseXor) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BitwiseXor) Position() *node.Position { func (n BitwiseXor) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n BooleanAnd) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BooleanAnd) SetAttribute(key string, value interface{}) { func (n BooleanAnd) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BooleanAnd) Position() *node.Position { func (n BooleanAnd) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n BooleanOr) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BooleanOr) SetAttribute(key string, value interface{}) { func (n BooleanOr) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BooleanOr) Position() *node.Position { func (n BooleanOr) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Coalesce) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Coalesce) SetAttribute(key string, value interface{}) { func (n Coalesce) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Coalesce) Position() *node.Position { func (n Coalesce) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Concat) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Concat) SetAttribute(key string, value interface{}) { func (n Concat) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Concat) Position() *node.Position { func (n Concat) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Div) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Div) SetAttribute(key string, value interface{}) { func (n Div) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Div) Position() *node.Position { func (n Div) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Equal) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Equal) SetAttribute(key string, value interface{}) { func (n Equal) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Equal) Position() *node.Position { func (n Equal) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Greater) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Greater) SetAttribute(key string, value interface{}) { func (n Greater) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Greater) Position() *node.Position { func (n Greater) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n GreaterOrEqual) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n GreaterOrEqual) SetAttribute(key string, value interface{}) { func (n GreaterOrEqual) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n GreaterOrEqual) Position() *node.Position { func (n GreaterOrEqual) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Identical) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Identical) SetAttribute(key string, value interface{}) { func (n Identical) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Identical) Position() *node.Position { func (n Identical) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n LogicalAnd) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n LogicalAnd) SetAttribute(key string, value interface{}) { func (n LogicalAnd) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n LogicalAnd) Position() *node.Position { func (n LogicalAnd) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n LogicalOr) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n LogicalOr) SetAttribute(key string, value interface{}) { func (n LogicalOr) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n LogicalOr) Position() *node.Position { func (n LogicalOr) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n LogicalXor) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n LogicalXor) SetAttribute(key string, value interface{}) { func (n LogicalXor) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n LogicalXor) Position() *node.Position { func (n LogicalXor) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Minus) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Minus) SetAttribute(key string, value interface{}) { func (n Minus) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Minus) Position() *node.Position { func (n Minus) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Mod) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Mod) SetAttribute(key string, value interface{}) { func (n Mod) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Mod) Position() *node.Position { func (n Mod) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Mul) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Mul) SetAttribute(key string, value interface{}) { func (n Mul) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Mul) Position() *node.Position { func (n Mul) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n NotEqual) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n NotEqual) SetAttribute(key string, value interface{}) { func (n NotEqual) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n NotEqual) Position() *node.Position { func (n NotEqual) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n NotIdentical) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n NotIdentical) SetAttribute(key string, value interface{}) { func (n NotIdentical) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n NotIdentical) Position() *node.Position { func (n NotIdentical) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Plus) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Plus) SetAttribute(key string, value interface{}) { func (n Plus) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Plus) Position() *node.Position { func (n Plus) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Pow) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Pow) SetAttribute(key string, value interface{}) { func (n Pow) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Pow) Position() *node.Position { func (n Pow) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n ShiftLeft) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ShiftLeft) SetAttribute(key string, value interface{}) { func (n ShiftLeft) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ShiftLeft) Position() *node.Position { func (n ShiftLeft) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n ShiftRight) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ShiftRight) SetAttribute(key string, value interface{}) { func (n ShiftRight) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ShiftRight) Position() *node.Position { func (n ShiftRight) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Smaller) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Smaller) SetAttribute(key string, value interface{}) { func (n Smaller) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Smaller) Position() *node.Position { func (n Smaller) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n SmallerOrEqual) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n SmallerOrEqual) SetAttribute(key string, value interface{}) { func (n SmallerOrEqual) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n SmallerOrEqual) Position() *node.Position { func (n SmallerOrEqual) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Spaceship) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Spaceship) SetAttribute(key string, value interface{}) { func (n Spaceship) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Spaceship) Position() *node.Position { func (n Spaceship) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type BitwiseNot struct { type BitwiseNot struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n BitwiseNot) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BitwiseNot) SetAttribute(key string, value interface{}) { func (n BitwiseNot) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BitwiseNot) Position() *node.Position { func (n BitwiseNot) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type BooleanNot struct { type BooleanNot struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n BooleanNot) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n BooleanNot) SetAttribute(key string, value interface{}) { func (n BooleanNot) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n BooleanNot) Position() *node.Position { func (n BooleanNot) Position() *node.Position {

View File

@ -31,8 +31,9 @@ func (n CastArray) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n CastArray) SetAttribute(key string, value interface{}) { func (n CastArray) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n CastArray) Position() *node.Position { func (n CastArray) Position() *node.Position {

View File

@ -31,8 +31,9 @@ func (n CastBool) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n CastBool) SetAttribute(key string, value interface{}) { func (n CastBool) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n CastBool) Position() *node.Position { func (n CastBool) Position() *node.Position {

View File

@ -31,8 +31,9 @@ func (n CastDouble) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n CastDouble) SetAttribute(key string, value interface{}) { func (n CastDouble) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n CastDouble) Position() *node.Position { func (n CastDouble) Position() *node.Position {

View File

@ -31,8 +31,9 @@ func (n CastInt) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n CastInt) SetAttribute(key string, value interface{}) { func (n CastInt) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n CastInt) Position() *node.Position { func (n CastInt) Position() *node.Position {

View File

@ -31,8 +31,9 @@ func (n CastObject) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n CastObject) SetAttribute(key string, value interface{}) { func (n CastObject) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n CastObject) Position() *node.Position { func (n CastObject) Position() *node.Position {

View File

@ -31,8 +31,9 @@ func (n CastString) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n CastString) SetAttribute(key string, value interface{}) { func (n CastString) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n CastString) Position() *node.Position { func (n CastString) Position() *node.Position {

View File

@ -31,8 +31,9 @@ func (n CastUnset) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n CastUnset) SetAttribute(key string, value interface{}) { func (n CastUnset) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n CastUnset) Position() *node.Position { func (n CastUnset) Position() *node.Position {

View File

@ -34,8 +34,9 @@ func (n ClassConstFetch) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ClassConstFetch) SetAttribute(key string, value interface{}) { func (n ClassConstFetch) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ClassConstFetch) Position() *node.Position { func (n ClassConstFetch) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Clone struct { type Clone struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n Clone) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Clone) SetAttribute(key string, value interface{}) { func (n Clone) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Clone) Position() *node.Position { func (n Clone) Position() *node.Position {

View File

@ -42,8 +42,9 @@ func (n Closure) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Closure) SetAttribute(key string, value interface{}) { func (n Closure) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Closure) Position() *node.Position { func (n Closure) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ClusureUse struct { type ClusureUse struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
} }
@ -34,8 +34,9 @@ func (n ClusureUse) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ClusureUse) SetAttribute(key string, value interface{}) { func (n ClusureUse) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ClusureUse) Position() *node.Position { func (n ClusureUse) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ConstFetch struct { type ConstFetch struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
constant node.Node constant node.Node
} }
@ -32,8 +32,9 @@ func (n ConstFetch) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ConstFetch) SetAttribute(key string, value interface{}) { func (n ConstFetch) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ConstFetch) Position() *node.Position { func (n ConstFetch) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Empty struct { type Empty struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n Empty) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Empty) SetAttribute(key string, value interface{}) { func (n Empty) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Empty) Position() *node.Position { func (n Empty) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ErrorSuppress struct { type ErrorSuppress struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n ErrorSuppress) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ErrorSuppress) SetAttribute(key string, value interface{}) { func (n ErrorSuppress) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ErrorSuppress) Position() *node.Position { func (n ErrorSuppress) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Eval struct { type Eval struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n Eval) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Eval) SetAttribute(key string, value interface{}) { func (n Eval) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Eval) Position() *node.Position { func (n Eval) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Exit struct { type Exit struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -34,8 +34,9 @@ func (n Exit) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Exit) SetAttribute(key string, value interface{}) { func (n Exit) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Exit) Position() *node.Position { func (n Exit) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type FunctionCall struct { type FunctionCall struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
function node.Node function node.Node
arguments []node.Node arguments []node.Node
} }
@ -34,8 +34,9 @@ func (n FunctionCall) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n FunctionCall) SetAttribute(key string, value interface{}) { func (n FunctionCall) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n FunctionCall) Position() *node.Position { func (n FunctionCall) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Include struct { type Include struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n Include) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Include) SetAttribute(key string, value interface{}) { func (n Include) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Include) Position() *node.Position { func (n Include) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type IncludeOnce struct { type IncludeOnce struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n IncludeOnce) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n IncludeOnce) SetAttribute(key string, value interface{}) { func (n IncludeOnce) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n IncludeOnce) Position() *node.Position { func (n IncludeOnce) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type InstanceOf struct { type InstanceOf struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
class node.Node class node.Node
} }
@ -34,8 +34,9 @@ func (n InstanceOf) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n InstanceOf) SetAttribute(key string, value interface{}) { func (n InstanceOf) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n InstanceOf) Position() *node.Position { func (n InstanceOf) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Isset struct { type Isset struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variables []node.Node variables []node.Node
} }
@ -32,8 +32,9 @@ func (n Isset) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Isset) SetAttribute(key string, value interface{}) { func (n Isset) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Isset) Position() *node.Position { func (n Isset) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type List struct { type List struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
} }
@ -32,8 +32,9 @@ func (n List) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n List) SetAttribute(key string, value interface{}) { func (n List) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n List) Position() *node.Position { func (n List) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type MethodCall struct { type MethodCall struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
method node.Node method node.Node
arguments []node.Node arguments []node.Node
@ -36,8 +36,9 @@ func (n MethodCall) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n MethodCall) SetAttribute(key string, value interface{}) { func (n MethodCall) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n MethodCall) Position() *node.Position { func (n MethodCall) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type New struct { type New struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node class node.Node
arguments []node.Node arguments []node.Node
} }
@ -34,8 +34,9 @@ func (n New) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n New) SetAttribute(key string, value interface{}) { func (n New) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n New) Position() *node.Position { func (n New) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type PostDec struct { type PostDec struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
} }
@ -32,8 +32,9 @@ func (n PostDec) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n PostDec) SetAttribute(key string, value interface{}) { func (n PostDec) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n PostDec) Position() *node.Position { func (n PostDec) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type PostInc struct { type PostInc struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
} }
@ -32,8 +32,9 @@ func (n PostInc) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n PostInc) SetAttribute(key string, value interface{}) { func (n PostInc) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n PostInc) Position() *node.Position { func (n PostInc) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type PreDec struct { type PreDec struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
} }
@ -32,8 +32,9 @@ func (n PreDec) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n PreDec) SetAttribute(key string, value interface{}) { func (n PreDec) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n PreDec) Position() *node.Position { func (n PreDec) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type PreInc struct { type PreInc struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
} }
@ -32,8 +32,9 @@ func (n PreInc) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n PreInc) SetAttribute(key string, value interface{}) { func (n PreInc) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n PreInc) Position() *node.Position { func (n PreInc) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Print struct { type Print struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n Print) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Print) SetAttribute(key string, value interface{}) { func (n Print) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Print) Position() *node.Position { func (n Print) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type PropertyFetch struct { type PropertyFetch struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
property node.Node property node.Node
} }
@ -34,8 +34,9 @@ func (n PropertyFetch) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n PropertyFetch) SetAttribute(key string, value interface{}) { func (n PropertyFetch) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n PropertyFetch) Position() *node.Position { func (n PropertyFetch) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Require struct { type Require struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n Require) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Require) SetAttribute(key string, value interface{}) { func (n Require) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Require) Position() *node.Position { func (n Require) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type RequireOnce struct { type RequireOnce struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n RequireOnce) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n RequireOnce) SetAttribute(key string, value interface{}) { func (n RequireOnce) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n RequireOnce) Position() *node.Position { func (n RequireOnce) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ShellExec struct { type ShellExec struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
parts []node.Node parts []node.Node
} }
@ -32,8 +32,9 @@ func (n ShellExec) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ShellExec) SetAttribute(key string, value interface{}) { func (n ShellExec) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ShellExec) Position() *node.Position { func (n ShellExec) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ShortArray struct { type ShortArray struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
} }
@ -32,8 +32,9 @@ func (n ShortArray) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ShortArray) SetAttribute(key string, value interface{}) { func (n ShortArray) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ShortArray) Position() *node.Position { func (n ShortArray) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type ShortList struct { type ShortList struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
} }
@ -32,8 +32,9 @@ func (n ShortList) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n ShortList) SetAttribute(key string, value interface{}) { func (n ShortList) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n ShortList) Position() *node.Position { func (n ShortList) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type StaticCall struct { type StaticCall struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node class node.Node
call node.Node call node.Node
arguments []node.Node arguments []node.Node
@ -36,8 +36,9 @@ func (n StaticCall) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n StaticCall) SetAttribute(key string, value interface{}) { func (n StaticCall) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n StaticCall) Position() *node.Position { func (n StaticCall) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node class node.Node
property node.Node property node.Node
} }
@ -34,8 +34,9 @@ func (n StaticPropertyFetch) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n StaticPropertyFetch) SetAttribute(key string, value interface{}) { func (n StaticPropertyFetch) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n StaticPropertyFetch) Position() *node.Position { func (n StaticPropertyFetch) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Ternary struct { type Ternary struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
condition node.Node condition node.Node
ifTrue node.Node ifTrue node.Node
ifFalse node.Node ifFalse node.Node
@ -36,8 +36,9 @@ func (n Ternary) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Ternary) SetAttribute(key string, value interface{}) { func (n Ternary) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Ternary) Position() *node.Position { func (n Ternary) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type UnaryMinus struct { type UnaryMinus struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n UnaryMinus) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n UnaryMinus) SetAttribute(key string, value interface{}) { func (n UnaryMinus) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n UnaryMinus) Position() *node.Position { func (n UnaryMinus) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type UnaryPlus struct { type UnaryPlus struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n UnaryPlus) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n UnaryPlus) SetAttribute(key string, value interface{}) { func (n UnaryPlus) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n UnaryPlus) Position() *node.Position { func (n UnaryPlus) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Variable struct { type Variable struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
varName node.Node varName node.Node
} }
@ -32,8 +32,9 @@ func (n Variable) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Variable) SetAttribute(key string, value interface{}) { func (n Variable) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Variable) Position() *node.Position { func (n Variable) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Yield struct { type Yield struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
key node.Node key node.Node
value node.Node value node.Node
} }
@ -34,8 +34,9 @@ func (n Yield) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Yield) SetAttribute(key string, value interface{}) { func (n Yield) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Yield) Position() *node.Position { func (n Yield) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type YieldFrom struct { type YieldFrom struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
} }
@ -32,8 +32,9 @@ func (n YieldFrom) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n YieldFrom) SetAttribute(key string, value interface{}) { func (n YieldFrom) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n YieldFrom) Position() *node.Position { func (n YieldFrom) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Identifier) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Identifier) SetAttribute(key string, value interface{}) { func (n Identifier) SetAttribute(key string, value interface{}) Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Identifier) Position() *Position { func (n Identifier) Position() *Position {

View File

@ -7,7 +7,7 @@ import (
type NameNode struct { type NameNode struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
parts []node.Node parts []node.Node
} }
@ -32,8 +32,9 @@ func (n NameNode) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n NameNode) SetAttribute(key string, value interface{}) { func (n NameNode) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n NameNode) Position() *node.Position { func (n NameNode) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type NamePart struct { type NamePart struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
} }
func NewNamePart(value string) node.Node { func NewNamePart(value string) node.Node {
@ -32,8 +32,9 @@ func (n NamePart) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n NamePart) SetAttribute(key string, value interface{}) { func (n NamePart) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n NamePart) Position() *node.Position { func (n NamePart) Position() *node.Position {

View File

@ -10,7 +10,7 @@ type Node interface {
type Attributer interface { type Attributer interface {
Attributes() map[string]interface{} Attributes() map[string]interface{}
Attribute(key string) interface{} Attribute(key string) interface{}
SetAttribute(key string, value interface{}) SetAttribute(key string, value interface{}) Node
} }
type Positioner interface { type Positioner interface {

View File

@ -28,8 +28,9 @@ func (n Nullable) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Nullable) SetAttribute(key string, value interface{}) { func (n Nullable) SetAttribute(key string, value interface{}) Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Nullable) Position() *Position { func (n Nullable) Position() *Position {

View File

@ -35,8 +35,9 @@ func (n Parameter) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Parameter) SetAttribute(key string, value interface{}) { func (n Parameter) SetAttribute(key string, value interface{}) Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Parameter) Position() *Position { func (n Parameter) Position() *Position {

View File

@ -7,7 +7,7 @@ import (
type Dnumber struct { type Dnumber struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
} }
func NewDnumber(value string) node.Node { func NewDnumber(value string) node.Node {
@ -32,8 +32,9 @@ func (n Dnumber) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Dnumber) SetAttribute(key string, value interface{}) { func (n Dnumber) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Dnumber) Position() *node.Position { func (n Dnumber) Position() *node.Position {

View File

@ -32,8 +32,9 @@ func (n Encapsed) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Encapsed) SetAttribute(key string, value interface{}) { func (n Encapsed) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Encapsed) Position() *node.Position { func (n Encapsed) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type EncapsedStringPart struct { type EncapsedStringPart struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
} }
func NewEncapsedStringPart(value string) node.Node { func NewEncapsedStringPart(value string) node.Node {
@ -32,8 +32,9 @@ func (n EncapsedStringPart) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n EncapsedStringPart) SetAttribute(key string, value interface{}) { func (n EncapsedStringPart) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n EncapsedStringPart) Position() *node.Position { func (n EncapsedStringPart) Position() *node.Position {

View File

@ -7,7 +7,7 @@ import (
type Lnumber struct { type Lnumber struct {
name string name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
} }
func NewLnumber(value string) node.Node { func NewLnumber(value string) node.Node {
@ -32,8 +32,9 @@ func (n Lnumber) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n Lnumber) SetAttribute(key string, value interface{}) { func (n Lnumber) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n
} }
func (n Lnumber) Position() *node.Position { func (n Lnumber) Position() *node.Position {

Some files were not shown because too many files have changed in this diff Show More