diff --git a/node/argument.go b/node/argument.go index 63faf22..c5b83b7 100644 --- a/node/argument.go +++ b/node/argument.go @@ -1,10 +1,10 @@ package node type Argument struct { - name string - arguments map[string]interface{} - expr Node - variadic bool + name string + attributes map[string]interface{} + expr Node + variadic bool } func NewArgument(expression Node, variadic bool) Node { @@ -23,7 +23,15 @@ func (n Argument) Name() string { } func (n Argument) Attributes() map[string]interface{} { - return n.arguments + return n.attributes +} + +func (n Argument) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Argument) SetAttribute(key string, value interface{}) { + n.attributes[key] = value } func (n Argument) Walk(v Visitor) { diff --git a/node/expr/array.go b/node/expr/array.go index 1c5f07e..b1d9631 100644 --- a/node/expr/array.go +++ b/node/expr/array.go @@ -26,6 +26,14 @@ func (n Array) Attributes() map[string]interface{} { return n.attributes } +func (n Array) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Array) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Array) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/array_dim_fetch.go b/node/expr/array_dim_fetch.go index e0a4da4..d7889ed 100644 --- a/node/expr/array_dim_fetch.go +++ b/node/expr/array_dim_fetch.go @@ -28,6 +28,14 @@ func (n ArrayDimFetch) Attributes() map[string]interface{} { return n.attributes } +func (n ArrayDimFetch) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ArrayDimFetch) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ArrayDimFetch) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/array_item.go b/node/expr/array_item.go index cfdb92c..1e4a8dc 100644 --- a/node/expr/array_item.go +++ b/node/expr/array_item.go @@ -30,6 +30,14 @@ func (n ArrayItem) Attributes() map[string]interface{} { return n.attributes } +func (n ArrayItem) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ArrayItem) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ArrayItem) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/assign.go b/node/expr/assign_op/assign.go index d6f121f..57f740b 100644 --- a/node/expr/assign_op/assign.go +++ b/node/expr/assign_op/assign.go @@ -27,6 +27,14 @@ func (n Assign) Attributes() map[string]interface{} { return n.attributes } +func (n Assign) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Assign) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Assign) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/assign_ref.go b/node/expr/assign_op/assign_ref.go index 4dbd952..e2287a9 100644 --- a/node/expr/assign_op/assign_ref.go +++ b/node/expr/assign_op/assign_ref.go @@ -27,6 +27,14 @@ func (n AssignRef) Attributes() map[string]interface{} { return n.attributes } +func (n AssignRef) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n AssignRef) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n AssignRef) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/bitwise_and.go b/node/expr/assign_op/bitwise_and.go index 8f99304..32d9343 100644 --- a/node/expr/assign_op/bitwise_and.go +++ b/node/expr/assign_op/bitwise_and.go @@ -27,6 +27,14 @@ func (n BitwiseAnd) Attributes() map[string]interface{} { return n.attributes } +func (n BitwiseAnd) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BitwiseAnd) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BitwiseAnd) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/bitwise_or.go b/node/expr/assign_op/bitwise_or.go index a609b00..eefa2f5 100644 --- a/node/expr/assign_op/bitwise_or.go +++ b/node/expr/assign_op/bitwise_or.go @@ -27,6 +27,14 @@ func (n BitwiseOr) Attributes() map[string]interface{} { return n.attributes } +func (n BitwiseOr) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BitwiseOr) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BitwiseOr) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/bitwise_xor.go b/node/expr/assign_op/bitwise_xor.go index 0490510..0ba31bb 100644 --- a/node/expr/assign_op/bitwise_xor.go +++ b/node/expr/assign_op/bitwise_xor.go @@ -23,6 +23,14 @@ func (n BitwiseXor) Attributes() map[string]interface{} { return n.attributes } +func (n BitwiseXor) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BitwiseXor) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BitwiseXor) Name() string { return "BitwiseXor" } diff --git a/node/expr/assign_op/concat.go b/node/expr/assign_op/concat.go index 9df20e2..b7401b2 100644 --- a/node/expr/assign_op/concat.go +++ b/node/expr/assign_op/concat.go @@ -27,6 +27,14 @@ func (n Concat) Attributes() map[string]interface{} { return n.attributes } +func (n Concat) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Concat) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Concat) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/div.go b/node/expr/assign_op/div.go index 21a9a3d..01c5326 100644 --- a/node/expr/assign_op/div.go +++ b/node/expr/assign_op/div.go @@ -27,6 +27,14 @@ func (n Div) Attributes() map[string]interface{} { return n.attributes } +func (n Div) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Div) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Div) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/minus.go b/node/expr/assign_op/minus.go index 41624d4..db77a7b 100644 --- a/node/expr/assign_op/minus.go +++ b/node/expr/assign_op/minus.go @@ -27,6 +27,14 @@ func (n Minus) Attributes() map[string]interface{} { return n.attributes } +func (n Minus) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Minus) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Minus) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/mod.go b/node/expr/assign_op/mod.go index f107fe9..afdcad5 100644 --- a/node/expr/assign_op/mod.go +++ b/node/expr/assign_op/mod.go @@ -27,6 +27,14 @@ func (n Mod) Attributes() map[string]interface{} { return n.attributes } +func (n Mod) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Mod) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Mod) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/mul.go b/node/expr/assign_op/mul.go index 34ae8e7..e09cf06 100644 --- a/node/expr/assign_op/mul.go +++ b/node/expr/assign_op/mul.go @@ -27,6 +27,14 @@ func (n Mul) Attributes() map[string]interface{} { return n.attributes } +func (n Mul) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Mul) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Mul) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/plus.go b/node/expr/assign_op/plus.go index 31942d4..705d419 100644 --- a/node/expr/assign_op/plus.go +++ b/node/expr/assign_op/plus.go @@ -27,6 +27,14 @@ func (n Plus) Attributes() map[string]interface{} { return n.attributes } +func (n Plus) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Plus) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Plus) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/pow.go b/node/expr/assign_op/pow.go index 950cc97..f15cbf1 100644 --- a/node/expr/assign_op/pow.go +++ b/node/expr/assign_op/pow.go @@ -27,6 +27,14 @@ func (n Pow) Attributes() map[string]interface{} { return n.attributes } +func (n Pow) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Pow) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Pow) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/shift_left.go b/node/expr/assign_op/shift_left.go index a3888a7..91efb9e 100644 --- a/node/expr/assign_op/shift_left.go +++ b/node/expr/assign_op/shift_left.go @@ -27,6 +27,14 @@ func (n ShiftLeft) Attributes() map[string]interface{} { return n.attributes } +func (n ShiftLeft) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ShiftLeft) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ShiftLeft) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/assign_op/shift_right.go b/node/expr/assign_op/shift_right.go index d3f9094..e61cf5f 100644 --- a/node/expr/assign_op/shift_right.go +++ b/node/expr/assign_op/shift_right.go @@ -27,6 +27,14 @@ func (n ShiftRight) Attributes() map[string]interface{} { return n.attributes } +func (n ShiftRight) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ShiftRight) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ShiftRight) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/bitwise_and.go b/node/expr/binary_op/bitwise_and.go index 8d05d6e..ab81ba1 100644 --- a/node/expr/binary_op/bitwise_and.go +++ b/node/expr/binary_op/bitwise_and.go @@ -27,6 +27,14 @@ func (n BitwiseAnd) Attributes() map[string]interface{} { return n.attributes } +func (n BitwiseAnd) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BitwiseAnd) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BitwiseAnd) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/bitwise_or.go b/node/expr/binary_op/bitwise_or.go index 1e90370..80f82fa 100644 --- a/node/expr/binary_op/bitwise_or.go +++ b/node/expr/binary_op/bitwise_or.go @@ -23,6 +23,14 @@ func (n BitwiseOr) Attributes() map[string]interface{} { return n.attributes } +func (n BitwiseOr) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BitwiseOr) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BitwiseOr) Name() string { return "BitwiseOr" } diff --git a/node/expr/binary_op/bitwise_xor.go b/node/expr/binary_op/bitwise_xor.go index 0d80770..fa3fe7d 100644 --- a/node/expr/binary_op/bitwise_xor.go +++ b/node/expr/binary_op/bitwise_xor.go @@ -23,6 +23,14 @@ func (n BitwiseXor) Attributes() map[string]interface{} { return n.attributes } +func (n BitwiseXor) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BitwiseXor) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BitwiseXor) Name() string { return "BitwiseXor" } diff --git a/node/expr/binary_op/boolean_and.go b/node/expr/binary_op/boolean_and.go index 9755724..f5cf5f7 100644 --- a/node/expr/binary_op/boolean_and.go +++ b/node/expr/binary_op/boolean_and.go @@ -27,6 +27,14 @@ func (n BooleanAnd) Attributes() map[string]interface{} { return n.attributes } +func (n BooleanAnd) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BooleanAnd) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BooleanAnd) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/boolean_or.go b/node/expr/binary_op/boolean_or.go index 77a97cd..5a1fe15 100644 --- a/node/expr/binary_op/boolean_or.go +++ b/node/expr/binary_op/boolean_or.go @@ -27,6 +27,14 @@ func (n BooleanOr) Attributes() map[string]interface{} { return n.attributes } +func (n BooleanOr) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BooleanOr) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BooleanOr) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/coalesce.go b/node/expr/binary_op/coalesce.go index 71009d2..8088269 100644 --- a/node/expr/binary_op/coalesce.go +++ b/node/expr/binary_op/coalesce.go @@ -27,6 +27,14 @@ func (n Coalesce) Attributes() map[string]interface{} { return n.attributes } +func (n Coalesce) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Coalesce) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Coalesce) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/concat.go b/node/expr/binary_op/concat.go index 147122a..fa09506 100644 --- a/node/expr/binary_op/concat.go +++ b/node/expr/binary_op/concat.go @@ -27,6 +27,14 @@ func (n Concat) Attributes() map[string]interface{} { return n.attributes } +func (n Concat) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Concat) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Concat) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/div.go b/node/expr/binary_op/div.go index cd56239..bd98153 100644 --- a/node/expr/binary_op/div.go +++ b/node/expr/binary_op/div.go @@ -27,6 +27,14 @@ func (n Div) Attributes() map[string]interface{} { return n.attributes } +func (n Div) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Div) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Div) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/equal.go b/node/expr/binary_op/equal.go index 9f893f6..6594e59 100644 --- a/node/expr/binary_op/equal.go +++ b/node/expr/binary_op/equal.go @@ -27,6 +27,14 @@ func (n Equal) Attributes() map[string]interface{} { return n.attributes } +func (n Equal) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Equal) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Equal) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/greater.go b/node/expr/binary_op/greater.go index 145a8bf..217b4fa 100644 --- a/node/expr/binary_op/greater.go +++ b/node/expr/binary_op/greater.go @@ -27,6 +27,14 @@ func (n Greater) Attributes() map[string]interface{} { return n.attributes } +func (n Greater) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Greater) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Greater) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/greater_or_equal.go b/node/expr/binary_op/greater_or_equal.go index 2777739..464cd83 100644 --- a/node/expr/binary_op/greater_or_equal.go +++ b/node/expr/binary_op/greater_or_equal.go @@ -27,6 +27,14 @@ func (n GreaterOrEqual) Attributes() map[string]interface{} { return n.attributes } +func (n GreaterOrEqual) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n GreaterOrEqual) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n GreaterOrEqual) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/identical.go b/node/expr/binary_op/identical.go index acec2a9..455ce7d 100644 --- a/node/expr/binary_op/identical.go +++ b/node/expr/binary_op/identical.go @@ -27,6 +27,14 @@ func (n Identical) Attributes() map[string]interface{} { return n.attributes } +func (n Identical) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Identical) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Identical) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/logical_and.go b/node/expr/binary_op/logical_and.go index ec6ef58..ba22f56 100644 --- a/node/expr/binary_op/logical_and.go +++ b/node/expr/binary_op/logical_and.go @@ -27,6 +27,14 @@ func (n LogicalAnd) Attributes() map[string]interface{} { return n.attributes } +func (n LogicalAnd) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n LogicalAnd) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n LogicalAnd) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/logical_or.go b/node/expr/binary_op/logical_or.go index 15c995c..a8d99e7 100644 --- a/node/expr/binary_op/logical_or.go +++ b/node/expr/binary_op/logical_or.go @@ -27,6 +27,14 @@ func (n LogicalOr) Attributes() map[string]interface{} { return n.attributes } +func (n LogicalOr) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n LogicalOr) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n LogicalOr) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/logical_xor.go b/node/expr/binary_op/logical_xor.go index 5b51708..4e9f022 100644 --- a/node/expr/binary_op/logical_xor.go +++ b/node/expr/binary_op/logical_xor.go @@ -27,6 +27,14 @@ func (n LogicalXor) Attributes() map[string]interface{} { return n.attributes } +func (n LogicalXor) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n LogicalXor) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n LogicalXor) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/minus.go b/node/expr/binary_op/minus.go index 7a5a011..2e6a7af 100644 --- a/node/expr/binary_op/minus.go +++ b/node/expr/binary_op/minus.go @@ -27,6 +27,14 @@ func (n Minus) Attributes() map[string]interface{} { return n.attributes } +func (n Minus) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Minus) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Minus) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/mod.go b/node/expr/binary_op/mod.go index dc24cf7..5dfa0db 100644 --- a/node/expr/binary_op/mod.go +++ b/node/expr/binary_op/mod.go @@ -27,6 +27,14 @@ func (n Mod) Attributes() map[string]interface{} { return n.attributes } +func (n Mod) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Mod) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Mod) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/mul.go b/node/expr/binary_op/mul.go index fa2faaa..849c454 100644 --- a/node/expr/binary_op/mul.go +++ b/node/expr/binary_op/mul.go @@ -27,6 +27,14 @@ func (n Mul) Attributes() map[string]interface{} { return n.attributes } +func (n Mul) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Mul) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Mul) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/not_equal.go b/node/expr/binary_op/not_equal.go index f5f697b..7b4d890 100644 --- a/node/expr/binary_op/not_equal.go +++ b/node/expr/binary_op/not_equal.go @@ -27,6 +27,14 @@ func (n NotEqual) Attributes() map[string]interface{} { return n.attributes } +func (n NotEqual) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n NotEqual) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n NotEqual) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/not_identical.go b/node/expr/binary_op/not_identical.go index 52bd110..92452f2 100644 --- a/node/expr/binary_op/not_identical.go +++ b/node/expr/binary_op/not_identical.go @@ -27,6 +27,14 @@ func (n NotIdentical) Attributes() map[string]interface{} { return n.attributes } +func (n NotIdentical) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n NotIdentical) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n NotIdentical) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/plus.go b/node/expr/binary_op/plus.go index 7f25a80..9b63c6d 100644 --- a/node/expr/binary_op/plus.go +++ b/node/expr/binary_op/plus.go @@ -27,6 +27,14 @@ func (n Plus) Attributes() map[string]interface{} { return n.attributes } +func (n Plus) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Plus) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Plus) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/pow.go b/node/expr/binary_op/pow.go index e610f5b..e45022f 100644 --- a/node/expr/binary_op/pow.go +++ b/node/expr/binary_op/pow.go @@ -27,6 +27,14 @@ func (n Pow) Attributes() map[string]interface{} { return n.attributes } +func (n Pow) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Pow) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Pow) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/shift_left.go b/node/expr/binary_op/shift_left.go index d56fae6..80195ec 100644 --- a/node/expr/binary_op/shift_left.go +++ b/node/expr/binary_op/shift_left.go @@ -27,6 +27,14 @@ func (n ShiftLeft) Attributes() map[string]interface{} { return n.attributes } +func (n ShiftLeft) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ShiftLeft) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ShiftLeft) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/shift_right.go b/node/expr/binary_op/shift_right.go index 06fdcd5..e1e0281 100644 --- a/node/expr/binary_op/shift_right.go +++ b/node/expr/binary_op/shift_right.go @@ -27,6 +27,14 @@ func (n ShiftRight) Attributes() map[string]interface{} { return n.attributes } +func (n ShiftRight) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ShiftRight) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ShiftRight) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/smaller.go b/node/expr/binary_op/smaller.go index 21c70ba..4be0eaf 100644 --- a/node/expr/binary_op/smaller.go +++ b/node/expr/binary_op/smaller.go @@ -27,6 +27,14 @@ func (n Smaller) Attributes() map[string]interface{} { return n.attributes } +func (n Smaller) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Smaller) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Smaller) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/smaller_or_equal.go b/node/expr/binary_op/smaller_or_equal.go index fe60274..71f9607 100644 --- a/node/expr/binary_op/smaller_or_equal.go +++ b/node/expr/binary_op/smaller_or_equal.go @@ -27,6 +27,14 @@ func (n SmallerOrEqual) Attributes() map[string]interface{} { return n.attributes } +func (n SmallerOrEqual) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n SmallerOrEqual) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n SmallerOrEqual) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/binary_op/spaceship.go b/node/expr/binary_op/spaceship.go index 2663fcc..41ccd1e 100644 --- a/node/expr/binary_op/spaceship.go +++ b/node/expr/binary_op/spaceship.go @@ -27,6 +27,14 @@ func (n Spaceship) Attributes() map[string]interface{} { return n.attributes } +func (n Spaceship) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Spaceship) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Spaceship) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/bitwise_not.go b/node/expr/bitwise_not.go index d3f9c8e..638b14a 100644 --- a/node/expr/bitwise_not.go +++ b/node/expr/bitwise_not.go @@ -26,6 +26,14 @@ func (n BitwiseNot) Attributes() map[string]interface{} { return n.attributes } +func (n BitwiseNot) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BitwiseNot) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BitwiseNot) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/boolean_not.go b/node/expr/boolean_not.go index ff8d838..d97fccc 100644 --- a/node/expr/boolean_not.go +++ b/node/expr/boolean_not.go @@ -26,6 +26,14 @@ func (n BooleanNot) Attributes() map[string]interface{} { return n.attributes } +func (n BooleanNot) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n BooleanNot) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n BooleanNot) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/cast/cast_array.go b/node/expr/cast/cast_array.go index 3287480..dd3ca08 100644 --- a/node/expr/cast/cast_array.go +++ b/node/expr/cast/cast_array.go @@ -26,6 +26,14 @@ func (n CastArray) Attributes() map[string]interface{} { return n.attributes } +func (n CastArray) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n CastArray) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n CastArray) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/cast/cast_bool.go b/node/expr/cast/cast_bool.go index 3e6046e..58a7770 100644 --- a/node/expr/cast/cast_bool.go +++ b/node/expr/cast/cast_bool.go @@ -26,6 +26,14 @@ func (n CastBool) Attributes() map[string]interface{} { return n.attributes } +func (n CastBool) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n CastBool) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n CastBool) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/cast/cast_double.go b/node/expr/cast/cast_double.go index ee2d258..05fe718 100644 --- a/node/expr/cast/cast_double.go +++ b/node/expr/cast/cast_double.go @@ -26,6 +26,14 @@ func (n CastDouble) Attributes() map[string]interface{} { return n.attributes } +func (n CastDouble) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n CastDouble) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n CastDouble) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/cast/cast_int.go b/node/expr/cast/cast_int.go index 7834b18..24e57de 100644 --- a/node/expr/cast/cast_int.go +++ b/node/expr/cast/cast_int.go @@ -26,6 +26,14 @@ func (n CastInt) Attributes() map[string]interface{} { return n.attributes } +func (n CastInt) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n CastInt) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n CastInt) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/cast/cast_object.go b/node/expr/cast/cast_object.go index 80838e4..06f877f 100644 --- a/node/expr/cast/cast_object.go +++ b/node/expr/cast/cast_object.go @@ -26,6 +26,14 @@ func (n CastObject) Attributes() map[string]interface{} { return n.attributes } +func (n CastObject) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n CastObject) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n CastObject) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/cast/cast_string.go b/node/expr/cast/cast_string.go index 4b42c8a..e7bcd57 100644 --- a/node/expr/cast/cast_string.go +++ b/node/expr/cast/cast_string.go @@ -26,6 +26,14 @@ func (n CastString) Attributes() map[string]interface{} { return n.attributes } +func (n CastString) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n CastString) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n CastString) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/cast/cast_unset.go b/node/expr/cast/cast_unset.go index 1e322ad..bd79ecc 100644 --- a/node/expr/cast/cast_unset.go +++ b/node/expr/cast/cast_unset.go @@ -26,6 +26,14 @@ func (n CastUnset) Attributes() map[string]interface{} { return n.attributes } +func (n CastUnset) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n CastUnset) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n CastUnset) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/class_const_fetch.go b/node/expr/class_const_fetch.go index cbd702e..6cae135 100644 --- a/node/expr/class_const_fetch.go +++ b/node/expr/class_const_fetch.go @@ -8,6 +8,14 @@ func (n ClassConstFetch) Attributes() map[string]interface{} { return n.attributes } +func (n ClassConstFetch) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ClassConstFetch) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ClassConstFetch) Name() string { return "ClassConstFetch" } diff --git a/node/expr/clone.go b/node/expr/clone.go index 3988738..8b683d8 100644 --- a/node/expr/clone.go +++ b/node/expr/clone.go @@ -26,6 +26,14 @@ func (n Clone) Attributes() map[string]interface{} { return n.attributes } +func (n Clone) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Clone) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Clone) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/closure.go b/node/expr/closure.go index 25da24d..2f701d6 100644 --- a/node/expr/closure.go +++ b/node/expr/closure.go @@ -35,6 +35,14 @@ func (n Closure) Attributes() map[string]interface{} { return n.attributes } +func (n Closure) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Closure) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Closure) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/closure_use.go b/node/expr/closure_use.go index 8fc1f2f..1ffd894 100644 --- a/node/expr/closure_use.go +++ b/node/expr/closure_use.go @@ -28,6 +28,14 @@ func (n ClusureUse) Attributes() map[string]interface{} { return n.attributes } +func (n ClusureUse) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ClusureUse) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ClusureUse) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/const_fetch.go b/node/expr/const_fetch.go index 6dba0fd..1202d98 100644 --- a/node/expr/const_fetch.go +++ b/node/expr/const_fetch.go @@ -26,6 +26,14 @@ func (n ConstFetch) Attributes() map[string]interface{} { return n.attributes } +func (n ConstFetch) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ConstFetch) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ConstFetch) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/empty.go b/node/expr/empty.go index 10addd2..517831f 100644 --- a/node/expr/empty.go +++ b/node/expr/empty.go @@ -26,6 +26,14 @@ func (n Empty) Attributes() map[string]interface{} { return n.attributes } +func (n Empty) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Empty) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Empty) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/error_suppress.go b/node/expr/error_suppress.go index 32fc614..cd9a36e 100644 --- a/node/expr/error_suppress.go +++ b/node/expr/error_suppress.go @@ -26,6 +26,14 @@ func (n ErrorSuppress) Attributes() map[string]interface{} { return n.attributes } +func (n ErrorSuppress) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ErrorSuppress) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ErrorSuppress) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/eval.go b/node/expr/eval.go index ca849ba..78c5fd4 100644 --- a/node/expr/eval.go +++ b/node/expr/eval.go @@ -26,6 +26,14 @@ func (n Eval) Attributes() map[string]interface{} { return n.attributes } +func (n Eval) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Eval) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Eval) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/exit.go b/node/expr/exit.go index b753d23..394c46e 100644 --- a/node/expr/exit.go +++ b/node/expr/exit.go @@ -28,6 +28,14 @@ func (n Exit) Attributes() map[string]interface{} { return n.attributes } +func (n Exit) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Exit) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Exit) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/function_call.go b/node/expr/function_call.go index 9511398..8c9847c 100644 --- a/node/expr/function_call.go +++ b/node/expr/function_call.go @@ -28,6 +28,14 @@ func (n FunctionCall) Attributes() map[string]interface{} { return n.attributes } +func (n FunctionCall) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n FunctionCall) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n FunctionCall) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/include.go b/node/expr/include.go index 0d2e09d..4df0525 100644 --- a/node/expr/include.go +++ b/node/expr/include.go @@ -26,6 +26,14 @@ func (n Include) Attributes() map[string]interface{} { return n.attributes } +func (n Include) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Include) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Include) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/include_once.go b/node/expr/include_once.go index cdd8c63..496ad00 100644 --- a/node/expr/include_once.go +++ b/node/expr/include_once.go @@ -26,6 +26,14 @@ func (n IncludeOnce) Attributes() map[string]interface{} { return n.attributes } +func (n IncludeOnce) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n IncludeOnce) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n IncludeOnce) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/instance_of.go b/node/expr/instance_of.go index e4feaa7..5456ff4 100644 --- a/node/expr/instance_of.go +++ b/node/expr/instance_of.go @@ -28,6 +28,14 @@ func (n InstanceOf) Attributes() map[string]interface{} { return n.attributes } +func (n InstanceOf) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n InstanceOf) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n InstanceOf) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/isset.go b/node/expr/isset.go index 048c214..d930272 100644 --- a/node/expr/isset.go +++ b/node/expr/isset.go @@ -26,6 +26,14 @@ func (n Isset) Attributes() map[string]interface{} { return n.attributes } +func (n Isset) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Isset) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Isset) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/list.go b/node/expr/list.go index 0877374..aecf4ae 100644 --- a/node/expr/list.go +++ b/node/expr/list.go @@ -26,6 +26,14 @@ func (n List) Attributes() map[string]interface{} { return n.attributes } +func (n List) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n List) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n List) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/method_call.go b/node/expr/method_call.go index 0750016..86595a6 100644 --- a/node/expr/method_call.go +++ b/node/expr/method_call.go @@ -30,6 +30,14 @@ func (n MethodCall) Attributes() map[string]interface{} { return n.attributes } +func (n MethodCall) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n MethodCall) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n MethodCall) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/new.go b/node/expr/new.go index 1f56a73..a9462b9 100644 --- a/node/expr/new.go +++ b/node/expr/new.go @@ -28,6 +28,14 @@ func (n New) Attributes() map[string]interface{} { return n.attributes } +func (n New) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n New) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n New) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/post_dec.go b/node/expr/post_dec.go index a72c4a2..55f4105 100644 --- a/node/expr/post_dec.go +++ b/node/expr/post_dec.go @@ -26,6 +26,14 @@ func (n PostDec) Attributes() map[string]interface{} { return n.attributes } +func (n PostDec) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n PostDec) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n PostDec) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/post_inc.go b/node/expr/post_inc.go index 807996c..11944aa 100644 --- a/node/expr/post_inc.go +++ b/node/expr/post_inc.go @@ -26,6 +26,14 @@ func (n PostInc) Attributes() map[string]interface{} { return n.attributes } +func (n PostInc) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n PostInc) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n PostInc) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/pre_dec.go b/node/expr/pre_dec.go index 89d9e8e..23692d3 100644 --- a/node/expr/pre_dec.go +++ b/node/expr/pre_dec.go @@ -26,6 +26,14 @@ func (n PreDec) Attributes() map[string]interface{} { return n.attributes } +func (n PreDec) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n PreDec) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n PreDec) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/pre_inc.go b/node/expr/pre_inc.go index 8139e41..88107f5 100644 --- a/node/expr/pre_inc.go +++ b/node/expr/pre_inc.go @@ -26,6 +26,14 @@ func (n PreInc) Attributes() map[string]interface{} { return n.attributes } +func (n PreInc) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n PreInc) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n PreInc) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/print.go b/node/expr/print.go index 857befd..2b0cfc4 100644 --- a/node/expr/print.go +++ b/node/expr/print.go @@ -26,6 +26,14 @@ func (n Print) Attributes() map[string]interface{} { return n.attributes } +func (n Print) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Print) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Print) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/property_fetch.go b/node/expr/property_fetch.go index f235719..d3be295 100644 --- a/node/expr/property_fetch.go +++ b/node/expr/property_fetch.go @@ -28,6 +28,14 @@ func (n PropertyFetch) Attributes() map[string]interface{} { return n.attributes } +func (n PropertyFetch) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n PropertyFetch) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n PropertyFetch) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/require.go b/node/expr/require.go index 99f8c69..bbf7dc7 100644 --- a/node/expr/require.go +++ b/node/expr/require.go @@ -26,6 +26,14 @@ func (n Require) Attributes() map[string]interface{} { return n.attributes } +func (n Require) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Require) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Require) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/require_once.go b/node/expr/require_once.go index 965dfe5..33c9099 100644 --- a/node/expr/require_once.go +++ b/node/expr/require_once.go @@ -26,6 +26,14 @@ func (n RequireOnce) Attributes() map[string]interface{} { return n.attributes } +func (n RequireOnce) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n RequireOnce) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n RequireOnce) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/shell_exec.go b/node/expr/shell_exec.go index 21c58e5..1795d1f 100644 --- a/node/expr/shell_exec.go +++ b/node/expr/shell_exec.go @@ -26,6 +26,14 @@ func (n ShellExec) Attributes() map[string]interface{} { return n.attributes } +func (n ShellExec) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ShellExec) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ShellExec) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/short_array.go b/node/expr/short_array.go index af1f8e8..467d9f1 100644 --- a/node/expr/short_array.go +++ b/node/expr/short_array.go @@ -26,6 +26,14 @@ func (n ShortArray) Attributes() map[string]interface{} { return n.attributes } +func (n ShortArray) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ShortArray) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ShortArray) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/short_list.go b/node/expr/short_list.go index cbf7a72..85a42b9 100644 --- a/node/expr/short_list.go +++ b/node/expr/short_list.go @@ -26,6 +26,14 @@ func (n ShortList) Attributes() map[string]interface{} { return n.attributes } +func (n ShortList) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ShortList) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ShortList) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/static_call.go b/node/expr/static_call.go index fb45fda..a0a689b 100644 --- a/node/expr/static_call.go +++ b/node/expr/static_call.go @@ -30,6 +30,14 @@ func (n StaticCall) Attributes() map[string]interface{} { return n.attributes } +func (n StaticCall) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n StaticCall) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n StaticCall) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/static_property_fetch.go b/node/expr/static_property_fetch.go index 4b4a5c5..322da9a 100644 --- a/node/expr/static_property_fetch.go +++ b/node/expr/static_property_fetch.go @@ -28,6 +28,14 @@ func (n StaticPropertyFetch) Attributes() map[string]interface{} { return n.attributes } +func (n StaticPropertyFetch) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n StaticPropertyFetch) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n StaticPropertyFetch) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/ternary.go b/node/expr/ternary.go index 880f288..b1dc0d7 100644 --- a/node/expr/ternary.go +++ b/node/expr/ternary.go @@ -30,6 +30,14 @@ func (n Ternary) Attributes() map[string]interface{} { return n.attributes } +func (n Ternary) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Ternary) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Ternary) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/unary_minus.go b/node/expr/unary_minus.go index 76f252a..d02807b 100644 --- a/node/expr/unary_minus.go +++ b/node/expr/unary_minus.go @@ -26,6 +26,14 @@ func (n UnaryMinus) Attributes() map[string]interface{} { return n.attributes } +func (n UnaryMinus) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n UnaryMinus) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n UnaryMinus) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/unary_plus.go b/node/expr/unary_plus.go index 739d63b..9556876 100644 --- a/node/expr/unary_plus.go +++ b/node/expr/unary_plus.go @@ -26,6 +26,14 @@ func (n UnaryPlus) Attributes() map[string]interface{} { return n.attributes } +func (n UnaryPlus) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n UnaryPlus) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n UnaryPlus) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/variable.go b/node/expr/variable.go index 9812bdd..001af0a 100644 --- a/node/expr/variable.go +++ b/node/expr/variable.go @@ -26,6 +26,14 @@ func (n Variable) Attributes() map[string]interface{} { return n.attributes } +func (n Variable) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Variable) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Variable) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/yield.go b/node/expr/yield.go index 64d4816..2df2911 100644 --- a/node/expr/yield.go +++ b/node/expr/yield.go @@ -28,6 +28,14 @@ func (n Yield) Attributes() map[string]interface{} { return n.attributes } +func (n Yield) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Yield) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Yield) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/expr/yield_from.go b/node/expr/yield_from.go index 11de4d4..f0ee6ec 100644 --- a/node/expr/yield_from.go +++ b/node/expr/yield_from.go @@ -26,6 +26,14 @@ func (n YieldFrom) Attributes() map[string]interface{} { return n.attributes } +func (n YieldFrom) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n YieldFrom) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n YieldFrom) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/identifier.go b/node/identifier.go index ec173a6..03193d1 100644 --- a/node/identifier.go +++ b/node/identifier.go @@ -26,6 +26,14 @@ func (n Identifier) Attributes() map[string]interface{} { return n.attributes } +func (n Identifier) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Identifier) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Identifier) Walk(v Visitor) { if v.EnterNode(n) == false { return diff --git a/node/name/name.go b/node/name/name.go index 036592b..dd54699 100644 --- a/node/name/name.go +++ b/node/name/name.go @@ -26,6 +26,14 @@ func (n NameNode) Attributes() map[string]interface{} { return n.attributes } +func (n NameNode) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n NameNode) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n NameNode) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/name/name_part.go b/node/name/name_part.go index ed3e3de..ebf56ac 100644 --- a/node/name/name_part.go +++ b/node/name/name_part.go @@ -26,6 +26,14 @@ func (n NamePart) Attributes() map[string]interface{} { return n.attributes } +func (n NamePart) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n NamePart) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n NamePart) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/node.go b/node/node.go index e4af1dc..2e49ab3 100644 --- a/node/node.go +++ b/node/node.go @@ -1,7 +1,13 @@ package node -type Node interface { - Name() string +type Attributer interface { Attributes() map[string]interface{} + Attribute(key string) interface{} + SetAttribute(key string, value interface{}) +} + +type Node interface { + Attributer + Name() string Walk(v Visitor) } diff --git a/node/nullable.go b/node/nullable.go index d8b425d..2f0c35d 100644 --- a/node/nullable.go +++ b/node/nullable.go @@ -22,6 +22,14 @@ func (n Nullable) Attributes() map[string]interface{} { return n.attributes } +func (n Nullable) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Nullable) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Nullable) Walk(v Visitor) { if v.EnterNode(n) == false { return diff --git a/node/parameter.go b/node/parameter.go index d5b0331..4723e5e 100644 --- a/node/parameter.go +++ b/node/parameter.go @@ -29,6 +29,14 @@ func (n Parameter) Attributes() map[string]interface{} { return n.attributes } +func (n Parameter) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Parameter) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Parameter) Walk(v Visitor) { if v.EnterNode(n) == false { return diff --git a/node/scalar/dnumber.go b/node/scalar/dnumber.go index e787cfa..437ab1f 100644 --- a/node/scalar/dnumber.go +++ b/node/scalar/dnumber.go @@ -26,6 +26,14 @@ func (n Dnumber) Attributes() map[string]interface{} { return n.attributes } +func (n Dnumber) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Dnumber) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Dnumber) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/scalar/encapsed.go b/node/scalar/encapsed.go index 72dc22b..f603dc2 100644 --- a/node/scalar/encapsed.go +++ b/node/scalar/encapsed.go @@ -26,6 +26,14 @@ func (n Encapsed) Attributes() map[string]interface{} { return n.attributes } +func (n Encapsed) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Encapsed) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Encapsed) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/scalar/encapsed_string_part.go b/node/scalar/encapsed_string_part.go index 6fe73c5..b765ee1 100644 --- a/node/scalar/encapsed_string_part.go +++ b/node/scalar/encapsed_string_part.go @@ -26,6 +26,14 @@ func (n EncapsedStringPart) Attributes() map[string]interface{} { return n.attributes } +func (n EncapsedStringPart) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n EncapsedStringPart) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n EncapsedStringPart) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/scalar/lnumber.go b/node/scalar/lnumber.go index 1327a00..b9be7c7 100644 --- a/node/scalar/lnumber.go +++ b/node/scalar/lnumber.go @@ -26,6 +26,14 @@ func (n Lnumber) Attributes() map[string]interface{} { return n.attributes } +func (n Lnumber) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Lnumber) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Lnumber) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/scalar/magic_constant.go b/node/scalar/magic_constant.go index cb14ddb..f1330ca 100644 --- a/node/scalar/magic_constant.go +++ b/node/scalar/magic_constant.go @@ -26,6 +26,14 @@ func (n MagicConstant) Attributes() map[string]interface{} { return n.attributes } +func (n MagicConstant) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n MagicConstant) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n MagicConstant) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/scalar/string.go b/node/scalar/string.go index bfadf01..2bade24 100644 --- a/node/scalar/string.go +++ b/node/scalar/string.go @@ -27,6 +27,14 @@ func (n String) Attributes() map[string]interface{} { return n.attributes } +func (n String) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n String) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n String) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/alt_else.go b/node/stmt/alt_else.go index c417ef1..a64b0ee 100644 --- a/node/stmt/alt_else.go +++ b/node/stmt/alt_else.go @@ -26,6 +26,14 @@ func (n AltElse) Attributes() map[string]interface{} { return n.attributes } +func (n AltElse) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n AltElse) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n AltElse) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/alt_else_if.go b/node/stmt/alt_else_if.go index ebac101..d2f38e3 100644 --- a/node/stmt/alt_else_if.go +++ b/node/stmt/alt_else_if.go @@ -28,6 +28,14 @@ func (n AltElseIf) Attributes() map[string]interface{} { return n.attributes } +func (n AltElseIf) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n AltElseIf) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n AltElseIf) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/alt_if.go b/node/stmt/alt_if.go index e0cf945..17e4f5c 100644 --- a/node/stmt/alt_if.go +++ b/node/stmt/alt_if.go @@ -32,6 +32,14 @@ func (n AltIf) Attributes() map[string]interface{} { return n.attributes } +func (n AltIf) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n AltIf) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n AltIf) AddElseIf(elseIf node.Node) node.Node { if n.elseIf == nil { n.elseIf = make([]node.Node, 0) diff --git a/node/stmt/break.go b/node/stmt/break.go index 2fcf670..814535b 100644 --- a/node/stmt/break.go +++ b/node/stmt/break.go @@ -26,6 +26,14 @@ func (n Break) Attributes() map[string]interface{} { return n.attributes } +func (n Break) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Break) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Break) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/case.go b/node/stmt/case.go index 45a9fe9..657e927 100644 --- a/node/stmt/case.go +++ b/node/stmt/case.go @@ -28,6 +28,14 @@ func (n Case) Attributes() map[string]interface{} { return n.attributes } +func (n Case) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Case) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Case) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/catch.go b/node/stmt/catch.go index b12563a..a4ec410 100644 --- a/node/stmt/catch.go +++ b/node/stmt/catch.go @@ -30,6 +30,14 @@ func (n Catch) Attributes() map[string]interface{} { return n.attributes } +func (n Catch) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Catch) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Catch) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/class.go b/node/stmt/class.go index b73ddba..d034422 100644 --- a/node/stmt/class.go +++ b/node/stmt/class.go @@ -36,6 +36,14 @@ func (n Class) Attributes() map[string]interface{} { return n.attributes } +func (n Class) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Class) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Class) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/class_const_list.go b/node/stmt/class_const_list.go index 252f7df..a5f5ff9 100644 --- a/node/stmt/class_const_list.go +++ b/node/stmt/class_const_list.go @@ -28,6 +28,14 @@ func (n ClassConstList) Attributes() map[string]interface{} { return n.attributes } +func (n ClassConstList) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ClassConstList) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ClassConstList) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/class_method.go b/node/stmt/class_method.go index 45af768..fd64cf5 100644 --- a/node/stmt/class_method.go +++ b/node/stmt/class_method.go @@ -36,6 +36,14 @@ func (n ClassMethod) Attributes() map[string]interface{} { return n.attributes } +func (n ClassMethod) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ClassMethod) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ClassMethod) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/const_list.go b/node/stmt/const_list.go index ce051b3..0efca5f 100644 --- a/node/stmt/const_list.go +++ b/node/stmt/const_list.go @@ -26,6 +26,14 @@ func (n ConstList) Attributes() map[string]interface{} { return n.attributes } +func (n ConstList) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ConstList) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ConstList) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/constant.go b/node/stmt/constant.go index dd1424d..ee537f5 100644 --- a/node/stmt/constant.go +++ b/node/stmt/constant.go @@ -28,6 +28,14 @@ func (n Constant) Attributes() map[string]interface{} { return n.attributes } +func (n Constant) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Constant) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Constant) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/continue.go b/node/stmt/continue.go index 528ffd4..cc6d1fb 100644 --- a/node/stmt/continue.go +++ b/node/stmt/continue.go @@ -26,6 +26,14 @@ func (n Continue) Attributes() map[string]interface{} { return n.attributes } +func (n Continue) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Continue) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Continue) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/declare.go b/node/stmt/declare.go index b9d8de0..c42f458 100644 --- a/node/stmt/declare.go +++ b/node/stmt/declare.go @@ -28,6 +28,14 @@ func (n Declare) Attributes() map[string]interface{} { return n.attributes } +func (n Declare) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Declare) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Declare) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/default.go b/node/stmt/default.go index 4edfd9d..2d35ad8 100644 --- a/node/stmt/default.go +++ b/node/stmt/default.go @@ -26,6 +26,14 @@ func (n Default) Attributes() map[string]interface{} { return n.attributes } +func (n Default) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Default) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Default) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/do.go b/node/stmt/do.go index c68a01f..aabbfdc 100644 --- a/node/stmt/do.go +++ b/node/stmt/do.go @@ -28,6 +28,14 @@ func (n Do) Attributes() map[string]interface{} { return n.attributes } +func (n Do) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Do) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Do) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/echo.go b/node/stmt/echo.go index e7c4651..78f7611 100644 --- a/node/stmt/echo.go +++ b/node/stmt/echo.go @@ -26,6 +26,14 @@ func (n Echo) Attributes() map[string]interface{} { return n.attributes } +func (n Echo) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Echo) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Echo) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/else.go b/node/stmt/else.go index d12a62c..fe1cf1b 100644 --- a/node/stmt/else.go +++ b/node/stmt/else.go @@ -26,6 +26,14 @@ func (n Else) Attributes() map[string]interface{} { return n.attributes } +func (n Else) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Else) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Else) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/else_if.go b/node/stmt/else_if.go index 1b0fcca..72c73d8 100644 --- a/node/stmt/else_if.go +++ b/node/stmt/else_if.go @@ -28,6 +28,14 @@ func (n ElseIf) Attributes() map[string]interface{} { return n.attributes } +func (n ElseIf) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n ElseIf) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n ElseIf) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/expression.go b/node/stmt/expression.go index cff348e..7d186ea 100644 --- a/node/stmt/expression.go +++ b/node/stmt/expression.go @@ -26,6 +26,14 @@ func (n Expression) Attributes() map[string]interface{} { return n.attributes } +func (n Expression) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Expression) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Expression) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/finally.go b/node/stmt/finally.go index 5af5221..4de81a4 100644 --- a/node/stmt/finally.go +++ b/node/stmt/finally.go @@ -26,6 +26,14 @@ func (n Finally) Attributes() map[string]interface{} { return n.attributes } +func (n Finally) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Finally) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Finally) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/for.go b/node/stmt/for.go index 5af930d..35a3508 100644 --- a/node/stmt/for.go +++ b/node/stmt/for.go @@ -32,6 +32,14 @@ func (n For) Attributes() map[string]interface{} { return n.attributes } +func (n For) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n For) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n For) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/foreach.go b/node/stmt/foreach.go index fd5f9ff..1e8b527 100644 --- a/node/stmt/foreach.go +++ b/node/stmt/foreach.go @@ -34,6 +34,14 @@ func (n Foreach) Attributes() map[string]interface{} { return n.attributes } +func (n Foreach) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Foreach) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Foreach) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/function.go b/node/stmt/function.go index c73cc41..9bc7cbe 100644 --- a/node/stmt/function.go +++ b/node/stmt/function.go @@ -34,6 +34,14 @@ func (n Function) Attributes() map[string]interface{} { return n.attributes } +func (n Function) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Function) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Function) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/global.go b/node/stmt/global.go index ca47179..6d18e7c 100644 --- a/node/stmt/global.go +++ b/node/stmt/global.go @@ -26,6 +26,14 @@ func (n Global) Attributes() map[string]interface{} { return n.attributes } +func (n Global) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Global) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Global) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/goto.go b/node/stmt/goto.go index 5c9c949..a52ced3 100644 --- a/node/stmt/goto.go +++ b/node/stmt/goto.go @@ -26,6 +26,14 @@ func (n Goto) Attributes() map[string]interface{} { return n.attributes } +func (n Goto) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Goto) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Goto) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/group_use.go b/node/stmt/group_use.go index 23af26f..2259730 100644 --- a/node/stmt/group_use.go +++ b/node/stmt/group_use.go @@ -30,6 +30,14 @@ func (n GroupUse) Attributes() map[string]interface{} { return n.attributes } +func (n GroupUse) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n GroupUse) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n GroupUse) SetUseType(useType node.Node) node.Node { n.useType = useType return n diff --git a/node/stmt/halt_compiler.go b/node/stmt/halt_compiler.go index ee24a6e..d5ccb7a 100644 --- a/node/stmt/halt_compiler.go +++ b/node/stmt/halt_compiler.go @@ -24,6 +24,14 @@ func (n HaltCompiler) Attributes() map[string]interface{} { return n.attributes } +func (n HaltCompiler) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n HaltCompiler) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n HaltCompiler) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/if.go b/node/stmt/if.go index bb55acb..85f0add 100644 --- a/node/stmt/if.go +++ b/node/stmt/if.go @@ -32,6 +32,14 @@ func (n If) Attributes() map[string]interface{} { return n.attributes } +func (n If) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n If) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n If) AddElseIf(elseIf node.Node) node.Node { if n.elseIf == nil { n.elseIf = make([]node.Node, 0) diff --git a/node/stmt/inline_html.go b/node/stmt/inline_html.go index 268d7dd..d0b0a1c 100644 --- a/node/stmt/inline_html.go +++ b/node/stmt/inline_html.go @@ -26,6 +26,14 @@ func (n InlineHtml) Attributes() map[string]interface{} { return n.attributes } +func (n InlineHtml) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n InlineHtml) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n InlineHtml) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/interface.go b/node/stmt/interface.go index 5d3553f..7daa1dc 100644 --- a/node/stmt/interface.go +++ b/node/stmt/interface.go @@ -30,6 +30,14 @@ func (n Interface) Attributes() map[string]interface{} { return n.attributes } +func (n Interface) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Interface) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Interface) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/label.go b/node/stmt/label.go index cd12738..029a2b8 100644 --- a/node/stmt/label.go +++ b/node/stmt/label.go @@ -26,6 +26,14 @@ func (n Label) Attributes() map[string]interface{} { return n.attributes } +func (n Label) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Label) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Label) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/namespace.go b/node/stmt/namespace.go index aa42879..ca6e984 100644 --- a/node/stmt/namespace.go +++ b/node/stmt/namespace.go @@ -28,6 +28,14 @@ func (n Namespace) Attributes() map[string]interface{} { return n.attributes } +func (n Namespace) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Namespace) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Namespace) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/nop.go b/node/stmt/nop.go index a65a08e..32c69e0 100644 --- a/node/stmt/nop.go +++ b/node/stmt/nop.go @@ -24,6 +24,14 @@ func (n Nop) Attributes() map[string]interface{} { return n.attributes } +func (n Nop) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Nop) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Nop) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/property.go b/node/stmt/property.go index b7c8b8d..6e09da8 100644 --- a/node/stmt/property.go +++ b/node/stmt/property.go @@ -27,6 +27,14 @@ func (n Property) Attributes() map[string]interface{} { return n.attributes } +func (n Property) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Property) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Property) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/property_list.go b/node/stmt/property_list.go index 9f48fa6..a43f96f 100644 --- a/node/stmt/property_list.go +++ b/node/stmt/property_list.go @@ -28,6 +28,14 @@ func (n PropertyList) Attributes() map[string]interface{} { return n.attributes } +func (n PropertyList) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n PropertyList) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n PropertyList) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/return.go b/node/stmt/return.go index 0625128..4097291 100644 --- a/node/stmt/return.go +++ b/node/stmt/return.go @@ -26,6 +26,14 @@ func (n Return) Attributes() map[string]interface{} { return n.attributes } +func (n Return) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Return) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Return) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/static.go b/node/stmt/static.go index 3f11bca..9a05552 100644 --- a/node/stmt/static.go +++ b/node/stmt/static.go @@ -26,6 +26,14 @@ func (n Static) Attributes() map[string]interface{} { return n.attributes } +func (n Static) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Static) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Static) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/static_var.go b/node/stmt/static_var.go index 0257b21..a9287b5 100644 --- a/node/stmt/static_var.go +++ b/node/stmt/static_var.go @@ -28,6 +28,14 @@ func (n StaticVar) Attributes() map[string]interface{} { return n.attributes } +func (n StaticVar) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n StaticVar) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n StaticVar) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/stmt_list.go b/node/stmt/stmt_list.go index 567c438..e566b94 100644 --- a/node/stmt/stmt_list.go +++ b/node/stmt/stmt_list.go @@ -26,6 +26,14 @@ func (n StmtList) Attributes() map[string]interface{} { return n.attributes } +func (n StmtList) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n StmtList) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n StmtList) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/switch.go b/node/stmt/switch.go index a4f55b7..91d03f5 100644 --- a/node/stmt/switch.go +++ b/node/stmt/switch.go @@ -9,6 +9,14 @@ func (n Switch) Attributes() map[string]interface{} { return n.attributes } +func (n Switch) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Switch) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Switch) Name() string { return "Switch" } diff --git a/node/stmt/throw.go b/node/stmt/throw.go index 0200889..a29f662 100644 --- a/node/stmt/throw.go +++ b/node/stmt/throw.go @@ -26,6 +26,14 @@ func (n Throw) Attributes() map[string]interface{} { return n.attributes } +func (n Throw) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Throw) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Throw) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/trait.go b/node/stmt/trait.go index ec6cb88..903e662 100644 --- a/node/stmt/trait.go +++ b/node/stmt/trait.go @@ -28,6 +28,14 @@ func (n Trait) Attributes() map[string]interface{} { return n.attributes } +func (n Trait) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Trait) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Trait) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/trait_method_ref.go b/node/stmt/trait_method_ref.go index 048eccb..f44a500 100644 --- a/node/stmt/trait_method_ref.go +++ b/node/stmt/trait_method_ref.go @@ -28,6 +28,14 @@ func (n TraitMethodRef) Attributes() map[string]interface{} { return n.attributes } +func (n TraitMethodRef) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n TraitMethodRef) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n TraitMethodRef) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/trait_use.go b/node/stmt/trait_use.go index a95e7e8..c526838 100644 --- a/node/stmt/trait_use.go +++ b/node/stmt/trait_use.go @@ -28,6 +28,14 @@ func (n TraitUse) Attributes() map[string]interface{} { return n.attributes } +func (n TraitUse) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n TraitUse) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n TraitUse) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/trait_use_alias.go b/node/stmt/trait_use_alias.go index 884699f..035aae9 100644 --- a/node/stmt/trait_use_alias.go +++ b/node/stmt/trait_use_alias.go @@ -30,6 +30,14 @@ func (n TraitUseAlias) Attributes() map[string]interface{} { return n.attributes } +func (n TraitUseAlias) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n TraitUseAlias) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n TraitUseAlias) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/trait_use_precedence.go b/node/stmt/trait_use_precedence.go index cf389c3..155c532 100644 --- a/node/stmt/trait_use_precedence.go +++ b/node/stmt/trait_use_precedence.go @@ -28,6 +28,14 @@ func (n TraitUsePrecedence) Attributes() map[string]interface{} { return n.attributes } +func (n TraitUsePrecedence) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n TraitUsePrecedence) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n TraitUsePrecedence) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/try.go b/node/stmt/try.go index 5626fa6..68b7986 100644 --- a/node/stmt/try.go +++ b/node/stmt/try.go @@ -30,6 +30,14 @@ func (n Try) Attributes() map[string]interface{} { return n.attributes } +func (n Try) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Try) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Try) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/unset.go b/node/stmt/unset.go index e28ec67..1dbcba6 100644 --- a/node/stmt/unset.go +++ b/node/stmt/unset.go @@ -26,6 +26,14 @@ func (n Unset) Attributes() map[string]interface{} { return n.attributes } +func (n Unset) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Unset) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Unset) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/use.go b/node/stmt/use.go index 14c4246..55eeef6 100644 --- a/node/stmt/use.go +++ b/node/stmt/use.go @@ -30,6 +30,14 @@ func (n Use) Attributes() map[string]interface{} { return n.attributes } +func (n Use) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n Use) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n Use) SetUseType(useType node.Node) node.Node { n.useType = useType return n diff --git a/node/stmt/use_list.go b/node/stmt/use_list.go index a28fda0..124c6cd 100644 --- a/node/stmt/use_list.go +++ b/node/stmt/use_list.go @@ -28,6 +28,14 @@ func (n UseList) Attributes() map[string]interface{} { return n.attributes } +func (n UseList) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n UseList) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n UseList) Walk(v node.Visitor) { if v.EnterNode(n) == false { return diff --git a/node/stmt/while.go b/node/stmt/while.go index 27fc899..456af5c 100644 --- a/node/stmt/while.go +++ b/node/stmt/while.go @@ -31,6 +31,14 @@ func (n While) Attributes() map[string]interface{} { return n.attributes } +func (n While) Attribute(key string) interface{} { + return n.attributes[key] +} + +func (n While) SetAttribute(key string, value interface{}) { + n.attributes[key] = value +} + func (n While) Walk(v node.Visitor) { if v.EnterNode(n) == false { return