From 02807502d3a9eb20a693f19ce165cbb088df9587 Mon Sep 17 00:00:00 2001 From: z7zmey Date: Thu, 4 Jan 2018 22:09:48 +0200 Subject: [PATCH] remove Attribute SetAttributes methods --- node/expr/array.go | 9 ---- node/expr/array_dim_fetch.go | 9 ---- node/expr/array_item.go | 9 ---- node/expr/assign_op/assign.go | 9 ---- node/expr/assign_op/assign_ref.go | 9 ---- node/expr/assign_op/bitwise_and.go | 9 ---- node/expr/assign_op/bitwise_or.go | 9 ---- node/expr/assign_op/bitwise_xor.go | 9 ---- node/expr/assign_op/concat.go | 9 ---- node/expr/assign_op/div.go | 9 ---- node/expr/assign_op/minus.go | 9 ---- node/expr/assign_op/mod.go | 9 ---- node/expr/assign_op/mul.go | 9 ---- node/expr/assign_op/plus.go | 9 ---- node/expr/assign_op/pow.go | 9 ---- node/expr/assign_op/shift_left.go | 9 ---- node/expr/assign_op/shift_right.go | 9 ---- node/expr/binary_op/bitwise_and.go | 9 ---- node/expr/binary_op/bitwise_or.go | 9 ---- node/expr/binary_op/bitwise_xor.go | 9 ---- node/expr/binary_op/boolean_and.go | 9 ---- node/expr/binary_op/boolean_or.go | 9 ---- node/expr/binary_op/coalesce.go | 9 ---- node/expr/binary_op/concat.go | 9 ---- node/expr/binary_op/div.go | 9 ---- node/expr/binary_op/equal.go | 9 ---- node/expr/binary_op/greater.go | 9 ---- node/expr/binary_op/greater_or_equal.go | 9 ---- node/expr/binary_op/identical.go | 9 ---- node/expr/binary_op/logical_and.go | 9 ---- node/expr/binary_op/logical_or.go | 9 ---- node/expr/binary_op/logical_xor.go | 9 ---- node/expr/binary_op/minus.go | 9 ---- node/expr/binary_op/mod.go | 9 ---- node/expr/binary_op/mul.go | 9 ---- node/expr/binary_op/not_equal.go | 9 ---- node/expr/binary_op/not_identical.go | 9 ---- node/expr/binary_op/plus.go | 9 ---- node/expr/binary_op/pow.go | 9 ---- node/expr/binary_op/shift_left.go | 9 ---- node/expr/binary_op/shift_right.go | 9 ---- node/expr/binary_op/smaller.go | 9 ---- node/expr/binary_op/smaller_or_equal.go | 9 ---- node/expr/binary_op/spaceship.go | 9 ---- node/expr/bitwise_not.go | 9 ---- node/expr/boolean_not.go | 9 ---- node/expr/cast/cast_array.go | 9 ---- node/expr/cast/cast_bool.go | 9 ---- node/expr/cast/cast_double.go | 9 ---- node/expr/cast/cast_int.go | 9 ---- node/expr/cast/cast_object.go | 9 ---- node/expr/cast/cast_string.go | 9 ---- node/expr/cast/cast_unset.go | 9 ---- node/expr/class_const_fetch.go | 9 ---- node/expr/clone.go | 9 ---- node/expr/closure.go | 9 ---- node/expr/closure_use.go | 9 ---- node/expr/const_fetch.go | 9 ---- node/expr/empty.go | 9 ---- node/expr/error_suppress.go | 9 ---- node/expr/eval.go | 9 ---- node/expr/exit.go | 9 ---- node/expr/function_call.go | 9 ---- node/expr/include.go | 9 ---- node/expr/include_once.go | 9 ---- node/expr/instance_of.go | 9 ---- node/expr/isset.go | 9 ---- node/expr/list.go | 9 ---- node/expr/method_call.go | 9 ---- node/expr/new.go | 9 ---- node/expr/post_dec.go | 9 ---- node/expr/post_inc.go | 9 ---- node/expr/pre_dec.go | 9 ---- node/expr/pre_inc.go | 9 ---- node/expr/print.go | 9 ---- node/expr/property_fetch.go | 9 ---- node/expr/require.go | 9 ---- node/expr/require_once.go | 9 ---- node/expr/shell_exec.go | 9 ---- node/expr/short_array.go | 9 ---- node/expr/short_list.go | 9 ---- node/expr/static_call.go | 9 ---- node/expr/static_property_fetch.go | 9 ---- node/expr/ternary.go | 9 ---- node/expr/unary_minus.go | 9 ---- node/expr/unary_plus.go | 9 ---- node/expr/variable.go | 9 ---- node/expr/yield.go | 9 ---- node/expr/yield_from.go | 9 ---- node/name/name.go | 9 ---- node/name/name_part.go | 9 ---- node/node.go | 8 +-- node/scalar/dnumber.go | 9 ---- node/scalar/encapsed.go | 9 ---- node/scalar/encapsed_string_part.go | 9 ---- node/scalar/lnumber.go | 9 ---- node/scalar/magic_constant.go | 9 ---- node/scalar/string.go | 9 ---- node/stmt/alt_else.go | 9 ---- node/stmt/alt_else_if.go | 9 ---- node/stmt/alt_if.go | 9 ---- node/stmt/break.go | 9 ---- node/stmt/case.go | 9 ---- node/stmt/catch.go | 9 ---- node/stmt/class.go | 9 ---- node/stmt/class_const_list.go | 9 ---- node/stmt/class_method.go | 9 ---- node/stmt/const_list.go | 9 ---- node/stmt/constant.go | 9 ---- node/stmt/continue.go | 9 ---- node/stmt/declare.go | 9 ---- node/stmt/default.go | 9 ---- node/stmt/do.go | 9 ---- node/stmt/echo.go | 9 ---- node/stmt/else.go | 9 ---- node/stmt/else_if.go | 9 ---- node/stmt/expression.go | 9 ---- node/stmt/finally.go | 9 ---- node/stmt/for.go | 9 ---- node/stmt/foreach.go | 9 ---- node/stmt/function.go | 69 ++++++++++++------------- node/stmt/global.go | 9 ---- node/stmt/goto.go | 9 ---- node/stmt/group_use.go | 9 ---- node/stmt/halt_compiler.go | 9 ---- node/stmt/if.go | 9 ---- node/stmt/inline_html.go | 9 ---- node/stmt/interface.go | 9 ---- node/stmt/label.go | 9 ---- node/stmt/namespace.go | 9 ---- node/stmt/nop.go | 9 ---- node/stmt/property.go | 9 ---- node/stmt/property_list.go | 9 ---- node/stmt/return.go | 9 ---- node/stmt/static.go | 9 ---- node/stmt/static_var.go | 9 ---- node/stmt/stmt_list.go | 9 ---- node/stmt/switch.go | 9 ---- node/stmt/throw.go | 9 ---- node/stmt/trait.go | 9 ---- node/stmt/trait_method_ref.go | 9 ---- node/stmt/trait_use.go | 9 ---- node/stmt/trait_use_alias.go | 9 ---- node/stmt/trait_use_precedence.go | 9 ---- node/stmt/try.go | 9 ---- node/stmt/unset.go | 9 ---- node/stmt/use.go | 9 ---- node/stmt/use_list.go | 9 ---- node/stmt/while.go | 9 ---- 149 files changed, 35 insertions(+), 1365 deletions(-) diff --git a/node/expr/array.go b/node/expr/array.go index 9cc89d5..b55442c 100644 --- a/node/expr/array.go +++ b/node/expr/array.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Array) Position() *node.Position { return n.position } diff --git a/node/expr/array_dim_fetch.go b/node/expr/array_dim_fetch.go index 4495e46..a4e851e 100644 --- a/node/expr/array_dim_fetch.go +++ b/node/expr/array_dim_fetch.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ArrayDimFetch) Position() *node.Position { return n.position } diff --git a/node/expr/array_item.go b/node/expr/array_item.go index 2828638..06e71de 100644 --- a/node/expr/array_item.go +++ b/node/expr/array_item.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ArrayItem) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/assign.go b/node/expr/assign_op/assign.go index f621173..c0c42f3 100644 --- a/node/expr/assign_op/assign.go +++ b/node/expr/assign_op/assign.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Assign) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/assign_ref.go b/node/expr/assign_op/assign_ref.go index e9bcde5..d324348 100644 --- a/node/expr/assign_op/assign_ref.go +++ b/node/expr/assign_op/assign_ref.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n AssignRef) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/bitwise_and.go b/node/expr/assign_op/bitwise_and.go index f0ec6f7..ad970ca 100644 --- a/node/expr/assign_op/bitwise_and.go +++ b/node/expr/assign_op/bitwise_and.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BitwiseAnd) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/bitwise_or.go b/node/expr/assign_op/bitwise_or.go index 445a960..826cdfb 100644 --- a/node/expr/assign_op/bitwise_or.go +++ b/node/expr/assign_op/bitwise_or.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BitwiseOr) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/bitwise_xor.go b/node/expr/assign_op/bitwise_xor.go index 6e87d88..0de044b 100644 --- a/node/expr/assign_op/bitwise_xor.go +++ b/node/expr/assign_op/bitwise_xor.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BitwiseXor) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/concat.go b/node/expr/assign_op/concat.go index 3250791..23b6ecd 100644 --- a/node/expr/assign_op/concat.go +++ b/node/expr/assign_op/concat.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Concat) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/div.go b/node/expr/assign_op/div.go index 7bbec81..2ada1a1 100644 --- a/node/expr/assign_op/div.go +++ b/node/expr/assign_op/div.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Div) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/minus.go b/node/expr/assign_op/minus.go index 2aa54b7..988a896 100644 --- a/node/expr/assign_op/minus.go +++ b/node/expr/assign_op/minus.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Minus) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/mod.go b/node/expr/assign_op/mod.go index f06c1f8..3f15ee6 100644 --- a/node/expr/assign_op/mod.go +++ b/node/expr/assign_op/mod.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Mod) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/mul.go b/node/expr/assign_op/mul.go index 6e6947d..77da737 100644 --- a/node/expr/assign_op/mul.go +++ b/node/expr/assign_op/mul.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Mul) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/plus.go b/node/expr/assign_op/plus.go index 7e3cbf1..712f321 100644 --- a/node/expr/assign_op/plus.go +++ b/node/expr/assign_op/plus.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Plus) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/pow.go b/node/expr/assign_op/pow.go index 2e98a6c..d455fd1 100644 --- a/node/expr/assign_op/pow.go +++ b/node/expr/assign_op/pow.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Pow) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/shift_left.go b/node/expr/assign_op/shift_left.go index ef5e13b..bf4fa67 100644 --- a/node/expr/assign_op/shift_left.go +++ b/node/expr/assign_op/shift_left.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ShiftLeft) Position() *node.Position { return n.position } diff --git a/node/expr/assign_op/shift_right.go b/node/expr/assign_op/shift_right.go index 370841f..fb70a47 100644 --- a/node/expr/assign_op/shift_right.go +++ b/node/expr/assign_op/shift_right.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ShiftRight) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/bitwise_and.go b/node/expr/binary_op/bitwise_and.go index 0c3c73d..fa638f9 100644 --- a/node/expr/binary_op/bitwise_and.go +++ b/node/expr/binary_op/bitwise_and.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BitwiseAnd) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/bitwise_or.go b/node/expr/binary_op/bitwise_or.go index 1e5d366..2505979 100644 --- a/node/expr/binary_op/bitwise_or.go +++ b/node/expr/binary_op/bitwise_or.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BitwiseOr) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/bitwise_xor.go b/node/expr/binary_op/bitwise_xor.go index 6861962..a48ea3f 100644 --- a/node/expr/binary_op/bitwise_xor.go +++ b/node/expr/binary_op/bitwise_xor.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BitwiseXor) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/boolean_and.go b/node/expr/binary_op/boolean_and.go index 25256de..6ebc6b8 100644 --- a/node/expr/binary_op/boolean_and.go +++ b/node/expr/binary_op/boolean_and.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BooleanAnd) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/boolean_or.go b/node/expr/binary_op/boolean_or.go index 73de47e..28a9848 100644 --- a/node/expr/binary_op/boolean_or.go +++ b/node/expr/binary_op/boolean_or.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BooleanOr) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/coalesce.go b/node/expr/binary_op/coalesce.go index 35ab0fa..2f4ae2e 100644 --- a/node/expr/binary_op/coalesce.go +++ b/node/expr/binary_op/coalesce.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Coalesce) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/concat.go b/node/expr/binary_op/concat.go index 865f901..f95af5d 100644 --- a/node/expr/binary_op/concat.go +++ b/node/expr/binary_op/concat.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Concat) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/div.go b/node/expr/binary_op/div.go index 39f18b0..585d412 100644 --- a/node/expr/binary_op/div.go +++ b/node/expr/binary_op/div.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Div) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/equal.go b/node/expr/binary_op/equal.go index 0c57959..d22dd27 100644 --- a/node/expr/binary_op/equal.go +++ b/node/expr/binary_op/equal.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Equal) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/greater.go b/node/expr/binary_op/greater.go index 93284bb..4ae7991 100644 --- a/node/expr/binary_op/greater.go +++ b/node/expr/binary_op/greater.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Greater) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/greater_or_equal.go b/node/expr/binary_op/greater_or_equal.go index 06927b0..6e0510a 100644 --- a/node/expr/binary_op/greater_or_equal.go +++ b/node/expr/binary_op/greater_or_equal.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n GreaterOrEqual) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/identical.go b/node/expr/binary_op/identical.go index f52a908..e3f7d1c 100644 --- a/node/expr/binary_op/identical.go +++ b/node/expr/binary_op/identical.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Identical) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/logical_and.go b/node/expr/binary_op/logical_and.go index 7e4fd40..f800632 100644 --- a/node/expr/binary_op/logical_and.go +++ b/node/expr/binary_op/logical_and.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n LogicalAnd) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/logical_or.go b/node/expr/binary_op/logical_or.go index 3062408..c9ecd6a 100644 --- a/node/expr/binary_op/logical_or.go +++ b/node/expr/binary_op/logical_or.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n LogicalOr) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/logical_xor.go b/node/expr/binary_op/logical_xor.go index ade1c3b..81ea410 100644 --- a/node/expr/binary_op/logical_xor.go +++ b/node/expr/binary_op/logical_xor.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n LogicalXor) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/minus.go b/node/expr/binary_op/minus.go index 6a97efc..11020e1 100644 --- a/node/expr/binary_op/minus.go +++ b/node/expr/binary_op/minus.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Minus) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/mod.go b/node/expr/binary_op/mod.go index 1bd9d9b..dc94963 100644 --- a/node/expr/binary_op/mod.go +++ b/node/expr/binary_op/mod.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Mod) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/mul.go b/node/expr/binary_op/mul.go index 260f0df..949ff9b 100644 --- a/node/expr/binary_op/mul.go +++ b/node/expr/binary_op/mul.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Mul) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/not_equal.go b/node/expr/binary_op/not_equal.go index 3c36fa4..60be0f1 100644 --- a/node/expr/binary_op/not_equal.go +++ b/node/expr/binary_op/not_equal.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n NotEqual) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/not_identical.go b/node/expr/binary_op/not_identical.go index b2649c7..1fdc448 100644 --- a/node/expr/binary_op/not_identical.go +++ b/node/expr/binary_op/not_identical.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n NotIdentical) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/plus.go b/node/expr/binary_op/plus.go index 0ff6216..c0d2c4d 100644 --- a/node/expr/binary_op/plus.go +++ b/node/expr/binary_op/plus.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Plus) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/pow.go b/node/expr/binary_op/pow.go index ab34c41..42ed810 100644 --- a/node/expr/binary_op/pow.go +++ b/node/expr/binary_op/pow.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Pow) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/shift_left.go b/node/expr/binary_op/shift_left.go index afe7bee..208a59e 100644 --- a/node/expr/binary_op/shift_left.go +++ b/node/expr/binary_op/shift_left.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ShiftLeft) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/shift_right.go b/node/expr/binary_op/shift_right.go index 795b033..9671861 100644 --- a/node/expr/binary_op/shift_right.go +++ b/node/expr/binary_op/shift_right.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ShiftRight) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/smaller.go b/node/expr/binary_op/smaller.go index 85716d0..a00c070 100644 --- a/node/expr/binary_op/smaller.go +++ b/node/expr/binary_op/smaller.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Smaller) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/smaller_or_equal.go b/node/expr/binary_op/smaller_or_equal.go index 144861e..4397509 100644 --- a/node/expr/binary_op/smaller_or_equal.go +++ b/node/expr/binary_op/smaller_or_equal.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n SmallerOrEqual) Position() *node.Position { return n.position } diff --git a/node/expr/binary_op/spaceship.go b/node/expr/binary_op/spaceship.go index 10d6542..4913b5e 100644 --- a/node/expr/binary_op/spaceship.go +++ b/node/expr/binary_op/spaceship.go @@ -23,15 +23,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Spaceship) Position() *node.Position { return n.position } diff --git a/node/expr/bitwise_not.go b/node/expr/bitwise_not.go index 61b117f..e80233e 100644 --- a/node/expr/bitwise_not.go +++ b/node/expr/bitwise_not.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BitwiseNot) Position() *node.Position { return n.position } diff --git a/node/expr/boolean_not.go b/node/expr/boolean_not.go index 152d9c4..dcbcbf0 100644 --- a/node/expr/boolean_not.go +++ b/node/expr/boolean_not.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n BooleanNot) Position() *node.Position { return n.position } diff --git a/node/expr/cast/cast_array.go b/node/expr/cast/cast_array.go index ef08232..4734017 100644 --- a/node/expr/cast/cast_array.go +++ b/node/expr/cast/cast_array.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n CastArray) Position() *node.Position { return n.position } diff --git a/node/expr/cast/cast_bool.go b/node/expr/cast/cast_bool.go index f19963c..def78bd 100644 --- a/node/expr/cast/cast_bool.go +++ b/node/expr/cast/cast_bool.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n CastBool) Position() *node.Position { return n.position } diff --git a/node/expr/cast/cast_double.go b/node/expr/cast/cast_double.go index abbaa78..6e0097e 100644 --- a/node/expr/cast/cast_double.go +++ b/node/expr/cast/cast_double.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n CastDouble) Position() *node.Position { return n.position } diff --git a/node/expr/cast/cast_int.go b/node/expr/cast/cast_int.go index 97b8b6c..84dddb6 100644 --- a/node/expr/cast/cast_int.go +++ b/node/expr/cast/cast_int.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n CastInt) Position() *node.Position { return n.position } diff --git a/node/expr/cast/cast_object.go b/node/expr/cast/cast_object.go index daa3e86..14c9bf9 100644 --- a/node/expr/cast/cast_object.go +++ b/node/expr/cast/cast_object.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n CastObject) Position() *node.Position { return n.position } diff --git a/node/expr/cast/cast_string.go b/node/expr/cast/cast_string.go index 5f2dc48..e08b466 100644 --- a/node/expr/cast/cast_string.go +++ b/node/expr/cast/cast_string.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n CastString) Position() *node.Position { return n.position } diff --git a/node/expr/cast/cast_unset.go b/node/expr/cast/cast_unset.go index 0207f59..5930bb1 100644 --- a/node/expr/cast/cast_unset.go +++ b/node/expr/cast/cast_unset.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n CastUnset) Position() *node.Position { return n.position } diff --git a/node/expr/class_const_fetch.go b/node/expr/class_const_fetch.go index d970079..6983dbd 100644 --- a/node/expr/class_const_fetch.go +++ b/node/expr/class_const_fetch.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ClassConstFetch) Position() *node.Position { return n.position } diff --git a/node/expr/clone.go b/node/expr/clone.go index e35374d..1ff6e81 100644 --- a/node/expr/clone.go +++ b/node/expr/clone.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Clone) Position() *node.Position { return n.position } diff --git a/node/expr/closure.go b/node/expr/closure.go index 2dd4522..8cfcdfc 100644 --- a/node/expr/closure.go +++ b/node/expr/closure.go @@ -32,15 +32,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Closure) Position() *node.Position { return n.position } diff --git a/node/expr/closure_use.go b/node/expr/closure_use.go index dd3fb44..a1ae1bc 100644 --- a/node/expr/closure_use.go +++ b/node/expr/closure_use.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ClusureUse) Position() *node.Position { return n.position } diff --git a/node/expr/const_fetch.go b/node/expr/const_fetch.go index a339aec..c73d331 100644 --- a/node/expr/const_fetch.go +++ b/node/expr/const_fetch.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ConstFetch) Position() *node.Position { return n.position } diff --git a/node/expr/empty.go b/node/expr/empty.go index 4a8d63a..70dad47 100644 --- a/node/expr/empty.go +++ b/node/expr/empty.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Empty) Position() *node.Position { return n.position } diff --git a/node/expr/error_suppress.go b/node/expr/error_suppress.go index 39e1555..7d81119 100644 --- a/node/expr/error_suppress.go +++ b/node/expr/error_suppress.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ErrorSuppress) Position() *node.Position { return n.position } diff --git a/node/expr/eval.go b/node/expr/eval.go index a56e612..39283c6 100644 --- a/node/expr/eval.go +++ b/node/expr/eval.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Eval) Position() *node.Position { return n.position } diff --git a/node/expr/exit.go b/node/expr/exit.go index 6ac783e..c680e2c 100644 --- a/node/expr/exit.go +++ b/node/expr/exit.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Exit) Position() *node.Position { return n.position } diff --git a/node/expr/function_call.go b/node/expr/function_call.go index 5cef8dd..aa5f0cc 100644 --- a/node/expr/function_call.go +++ b/node/expr/function_call.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n FunctionCall) Position() *node.Position { return n.position } diff --git a/node/expr/include.go b/node/expr/include.go index c5218c1..5e1b670 100644 --- a/node/expr/include.go +++ b/node/expr/include.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Include) Position() *node.Position { return n.position } diff --git a/node/expr/include_once.go b/node/expr/include_once.go index b687e2a..57eb81e 100644 --- a/node/expr/include_once.go +++ b/node/expr/include_once.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n IncludeOnce) Position() *node.Position { return n.position } diff --git a/node/expr/instance_of.go b/node/expr/instance_of.go index d7cff55..91fc558 100644 --- a/node/expr/instance_of.go +++ b/node/expr/instance_of.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n InstanceOf) Position() *node.Position { return n.position } diff --git a/node/expr/isset.go b/node/expr/isset.go index 748f8d3..50ab30d 100644 --- a/node/expr/isset.go +++ b/node/expr/isset.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Isset) Position() *node.Position { return n.position } diff --git a/node/expr/list.go b/node/expr/list.go index 20acf36..53969b2 100644 --- a/node/expr/list.go +++ b/node/expr/list.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n List) Position() *node.Position { return n.position } diff --git a/node/expr/method_call.go b/node/expr/method_call.go index 62367fe..a3ec5b7 100644 --- a/node/expr/method_call.go +++ b/node/expr/method_call.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n MethodCall) Position() *node.Position { return n.position } diff --git a/node/expr/new.go b/node/expr/new.go index f17ae5c..408c84e 100644 --- a/node/expr/new.go +++ b/node/expr/new.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n New) Position() *node.Position { return n.position } diff --git a/node/expr/post_dec.go b/node/expr/post_dec.go index 67fdce9..86b2f29 100644 --- a/node/expr/post_dec.go +++ b/node/expr/post_dec.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n PostDec) Position() *node.Position { return n.position } diff --git a/node/expr/post_inc.go b/node/expr/post_inc.go index d7c55a1..f88c8d9 100644 --- a/node/expr/post_inc.go +++ b/node/expr/post_inc.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n PostInc) Position() *node.Position { return n.position } diff --git a/node/expr/pre_dec.go b/node/expr/pre_dec.go index 07b6566..c6e5615 100644 --- a/node/expr/pre_dec.go +++ b/node/expr/pre_dec.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n PreDec) Position() *node.Position { return n.position } diff --git a/node/expr/pre_inc.go b/node/expr/pre_inc.go index 0f0ea3d..639870b 100644 --- a/node/expr/pre_inc.go +++ b/node/expr/pre_inc.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n PreInc) Position() *node.Position { return n.position } diff --git a/node/expr/print.go b/node/expr/print.go index 8e0bfc6..e2e5ceb 100644 --- a/node/expr/print.go +++ b/node/expr/print.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Print) Position() *node.Position { return n.position } diff --git a/node/expr/property_fetch.go b/node/expr/property_fetch.go index 16b8ef0..fc6445c 100644 --- a/node/expr/property_fetch.go +++ b/node/expr/property_fetch.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n PropertyFetch) Position() *node.Position { return n.position } diff --git a/node/expr/require.go b/node/expr/require.go index d4bd2f6..fb1a0ee 100644 --- a/node/expr/require.go +++ b/node/expr/require.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Require) Position() *node.Position { return n.position } diff --git a/node/expr/require_once.go b/node/expr/require_once.go index 85abf83..99f04c4 100644 --- a/node/expr/require_once.go +++ b/node/expr/require_once.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n RequireOnce) Position() *node.Position { return n.position } diff --git a/node/expr/shell_exec.go b/node/expr/shell_exec.go index 28db5fb..4adb16a 100644 --- a/node/expr/shell_exec.go +++ b/node/expr/shell_exec.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ShellExec) Position() *node.Position { return n.position } diff --git a/node/expr/short_array.go b/node/expr/short_array.go index 590c9ec..50f6601 100644 --- a/node/expr/short_array.go +++ b/node/expr/short_array.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ShortArray) Position() *node.Position { return n.position } diff --git a/node/expr/short_list.go b/node/expr/short_list.go index cd91d7e..079f952 100644 --- a/node/expr/short_list.go +++ b/node/expr/short_list.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ShortList) Position() *node.Position { return n.position } diff --git a/node/expr/static_call.go b/node/expr/static_call.go index 6e542bf..6183951 100644 --- a/node/expr/static_call.go +++ b/node/expr/static_call.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n StaticCall) Position() *node.Position { return n.position } diff --git a/node/expr/static_property_fetch.go b/node/expr/static_property_fetch.go index 63cd4d5..6fab554 100644 --- a/node/expr/static_property_fetch.go +++ b/node/expr/static_property_fetch.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n StaticPropertyFetch) Position() *node.Position { return n.position } diff --git a/node/expr/ternary.go b/node/expr/ternary.go index f4efd6f..56984a5 100644 --- a/node/expr/ternary.go +++ b/node/expr/ternary.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Ternary) Position() *node.Position { return n.position } diff --git a/node/expr/unary_minus.go b/node/expr/unary_minus.go index 146a7c9..038fea4 100644 --- a/node/expr/unary_minus.go +++ b/node/expr/unary_minus.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n UnaryMinus) Position() *node.Position { return n.position } diff --git a/node/expr/unary_plus.go b/node/expr/unary_plus.go index ea45fb3..584a2b5 100644 --- a/node/expr/unary_plus.go +++ b/node/expr/unary_plus.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n UnaryPlus) Position() *node.Position { return n.position } diff --git a/node/expr/variable.go b/node/expr/variable.go index 430932a..b5b3180 100644 --- a/node/expr/variable.go +++ b/node/expr/variable.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Variable) Position() *node.Position { return n.position } diff --git a/node/expr/yield.go b/node/expr/yield.go index 2e172ff..5921d3c 100644 --- a/node/expr/yield.go +++ b/node/expr/yield.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Yield) Position() *node.Position { return n.position } diff --git a/node/expr/yield_from.go b/node/expr/yield_from.go index 3051f3f..561e230 100644 --- a/node/expr/yield_from.go +++ b/node/expr/yield_from.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n YieldFrom) Position() *node.Position { return n.position } diff --git a/node/name/name.go b/node/name/name.go index b3dad56..7333708 100644 --- a/node/name/name.go +++ b/node/name/name.go @@ -22,15 +22,6 @@ func (n Name) Attributes() map[string]interface{} { return n.attributes } -func (n Name) Attribute(key string) interface{} { - return n.attributes[key] -} - -func (n Name) SetAttribute(key string, value interface{}) node.Node { - n.attributes[key] = value - return n -} - func (n Name) Position() *node.Position { return n.position } diff --git a/node/name/name_part.go b/node/name/name_part.go index c8c2003..10d876e 100644 --- a/node/name/name_part.go +++ b/node/name/name_part.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n NamePart) Position() *node.Position { return n.position } diff --git a/node/node.go b/node/node.go index 39f94b9..01b4fed 100644 --- a/node/node.go +++ b/node/node.go @@ -1,15 +1,9 @@ package node type Node interface { - Attributer Positioner - Walk(v Visitor) -} - -type Attributer interface { Attributes() map[string]interface{} - Attribute(key string) interface{} - SetAttribute(key string, value interface{}) Node + Walk(v Visitor) } type Positioner interface { diff --git a/node/scalar/dnumber.go b/node/scalar/dnumber.go index 9d46efb..b5ccc48 100644 --- a/node/scalar/dnumber.go +++ b/node/scalar/dnumber.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Dnumber) Position() *node.Position { return n.position } diff --git a/node/scalar/encapsed.go b/node/scalar/encapsed.go index 82cb054..ce0c1fd 100644 --- a/node/scalar/encapsed.go +++ b/node/scalar/encapsed.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Encapsed) Position() *node.Position { return n.position } diff --git a/node/scalar/encapsed_string_part.go b/node/scalar/encapsed_string_part.go index 2e68611..a46d921 100644 --- a/node/scalar/encapsed_string_part.go +++ b/node/scalar/encapsed_string_part.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n EncapsedStringPart) Position() *node.Position { return n.position } diff --git a/node/scalar/lnumber.go b/node/scalar/lnumber.go index 6b0b8db..5fddfe1 100644 --- a/node/scalar/lnumber.go +++ b/node/scalar/lnumber.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Lnumber) Position() *node.Position { return n.position } diff --git a/node/scalar/magic_constant.go b/node/scalar/magic_constant.go index d82b643..4aea514 100644 --- a/node/scalar/magic_constant.go +++ b/node/scalar/magic_constant.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n MagicConstant) Position() *node.Position { return n.position } diff --git a/node/scalar/string.go b/node/scalar/string.go index bdf3986..f2a8ef3 100644 --- a/node/scalar/string.go +++ b/node/scalar/string.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n String) Position() *node.Position { return n.position } diff --git a/node/stmt/alt_else.go b/node/stmt/alt_else.go index 7ae992c..66540d4 100644 --- a/node/stmt/alt_else.go +++ b/node/stmt/alt_else.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n AltElse) Position() *node.Position { return n.position } diff --git a/node/stmt/alt_else_if.go b/node/stmt/alt_else_if.go index b12c103..362a31c 100644 --- a/node/stmt/alt_else_if.go +++ b/node/stmt/alt_else_if.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n AltElseIf) Position() *node.Position { return n.position } diff --git a/node/stmt/alt_if.go b/node/stmt/alt_if.go index a64945d..82ca6c7 100644 --- a/node/stmt/alt_if.go +++ b/node/stmt/alt_if.go @@ -28,15 +28,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n AltIf) Position() *node.Position { return n.position } diff --git a/node/stmt/break.go b/node/stmt/break.go index 8c925f1..bffa774 100644 --- a/node/stmt/break.go +++ b/node/stmt/break.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Break) Position() *node.Position { return n.position } diff --git a/node/stmt/case.go b/node/stmt/case.go index bd6772e..f703381 100644 --- a/node/stmt/case.go +++ b/node/stmt/case.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Case) Position() *node.Position { return n.position } diff --git a/node/stmt/catch.go b/node/stmt/catch.go index f3bf60c..ba39382 100644 --- a/node/stmt/catch.go +++ b/node/stmt/catch.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Catch) Position() *node.Position { return n.position } diff --git a/node/stmt/class.go b/node/stmt/class.go index 003fd0b..b60f343 100644 --- a/node/stmt/class.go +++ b/node/stmt/class.go @@ -34,15 +34,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Class) Position() *node.Position { return n.position } diff --git a/node/stmt/class_const_list.go b/node/stmt/class_const_list.go index 9754da4..b397967 100644 --- a/node/stmt/class_const_list.go +++ b/node/stmt/class_const_list.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ClassConstList) Position() *node.Position { return n.position } diff --git a/node/stmt/class_method.go b/node/stmt/class_method.go index 5bc5d4c..c662b22 100644 --- a/node/stmt/class_method.go +++ b/node/stmt/class_method.go @@ -33,15 +33,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ClassMethod) Position() *node.Position { return n.position } diff --git a/node/stmt/const_list.go b/node/stmt/const_list.go index 56689f9..f6d050e 100644 --- a/node/stmt/const_list.go +++ b/node/stmt/const_list.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ConstList) Position() *node.Position { return n.position } diff --git a/node/stmt/constant.go b/node/stmt/constant.go index 0f45810..1538d6b 100644 --- a/node/stmt/constant.go +++ b/node/stmt/constant.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Constant) Position() *node.Position { return n.position } diff --git a/node/stmt/continue.go b/node/stmt/continue.go index a738337..d3df806 100644 --- a/node/stmt/continue.go +++ b/node/stmt/continue.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Continue) Position() *node.Position { return n.position } diff --git a/node/stmt/declare.go b/node/stmt/declare.go index 4a3e42c..8333ed4 100644 --- a/node/stmt/declare.go +++ b/node/stmt/declare.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Declare) Position() *node.Position { return n.position } diff --git a/node/stmt/default.go b/node/stmt/default.go index f4e4597..2f51111 100644 --- a/node/stmt/default.go +++ b/node/stmt/default.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Default) Position() *node.Position { return n.position } diff --git a/node/stmt/do.go b/node/stmt/do.go index b0c9646..5663d84 100644 --- a/node/stmt/do.go +++ b/node/stmt/do.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Do) Position() *node.Position { return n.position } diff --git a/node/stmt/echo.go b/node/stmt/echo.go index 2cc11f6..c6c03cc 100644 --- a/node/stmt/echo.go +++ b/node/stmt/echo.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Echo) Position() *node.Position { return n.position } diff --git a/node/stmt/else.go b/node/stmt/else.go index 387d12b..f800c26 100644 --- a/node/stmt/else.go +++ b/node/stmt/else.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Else) Position() *node.Position { return n.position } diff --git a/node/stmt/else_if.go b/node/stmt/else_if.go index cc1c3e8..bca2d76 100644 --- a/node/stmt/else_if.go +++ b/node/stmt/else_if.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n ElseIf) Position() *node.Position { return n.position } diff --git a/node/stmt/expression.go b/node/stmt/expression.go index e9db12a..506ee22 100644 --- a/node/stmt/expression.go +++ b/node/stmt/expression.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Expression) Position() *node.Position { return n.position } diff --git a/node/stmt/finally.go b/node/stmt/finally.go index 821a1c2..8c17dd6 100644 --- a/node/stmt/finally.go +++ b/node/stmt/finally.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Finally) Position() *node.Position { return n.position } diff --git a/node/stmt/for.go b/node/stmt/for.go index 3a7e6fe..93bc1cc 100644 --- a/node/stmt/for.go +++ b/node/stmt/for.go @@ -28,15 +28,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n For) Position() *node.Position { return n.position } diff --git a/node/stmt/foreach.go b/node/stmt/foreach.go index b5e9eff..2b046a1 100644 --- a/node/stmt/foreach.go +++ b/node/stmt/foreach.go @@ -30,15 +30,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Foreach) Position() *node.Position { return n.position } diff --git a/node/stmt/function.go b/node/stmt/function.go index ebd8fc0..15dfd3f 100644 --- a/node/stmt/function.go +++ b/node/stmt/function.go @@ -5,39 +5,38 @@ import ( ) type Function struct { - attributes map[string]interface{} - position *node.Position - functionName node.Node - params []node.Node - returnType node.Node - stmts []node.Node + attributes map[string]interface{} + position *node.Position + ReturnsRef bool + PhpDocComment string + FunctionName node.Node + Params []node.Node + ReturnType node.Node + Stmts []node.Node } -func NewFunction(functionName node.Node, returnsRef bool, params []node.Node, returnType node.Node, stmts []node.Node, phpDocComment string) node.Node { +func NewFunction(FunctionName node.Node, ReturnsRef bool, Params []node.Node, ReturnType node.Node, Stmts []node.Node, PhpDocComment string) node.Node { return &Function{ map[string]interface{}{ - "returnsRef": returnsRef, - "phpDocComment": phpDocComment, + "ReturnsRef": ReturnsRef, + "PhpDocComment": PhpDocComment, }, nil, - functionName, - params, - returnType, - stmts, + ReturnsRef, + PhpDocComment, + FunctionName, + Params, + ReturnType, + Stmts, } } 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{}) node.Node { - n.attributes[key] = value - return n + // return n.attributes + return map[string]interface{}{ + "ReturnsRef": n.ReturnsRef, + "PhpDocComment": n.PhpDocComment, + } } func (n Function) Position() *node.Position { @@ -54,26 +53,26 @@ func (n Function) Walk(v node.Visitor) { return } - if n.functionName != nil { - vv := v.GetChildrenVisitor("functionName") - n.functionName.Walk(vv) + if n.FunctionName != nil { + vv := v.GetChildrenVisitor("FunctionName") + n.FunctionName.Walk(vv) } - if n.params != nil { - vv := v.GetChildrenVisitor("params") - for _, nn := range n.params { + if n.Params != nil { + vv := v.GetChildrenVisitor("Params") + for _, nn := range n.Params { nn.Walk(vv) } } - if n.returnType != nil { - vv := v.GetChildrenVisitor("returnType") - n.returnType.Walk(vv) + if n.ReturnType != nil { + vv := v.GetChildrenVisitor("ReturnType") + n.ReturnType.Walk(vv) } - if n.stmts != nil { - vv := v.GetChildrenVisitor("stmts") - for _, nn := range n.stmts { + if n.Stmts != nil { + vv := v.GetChildrenVisitor("Stmts") + for _, nn := range n.Stmts { nn.Walk(vv) } } diff --git a/node/stmt/global.go b/node/stmt/global.go index 5e89212..f54d4b5 100644 --- a/node/stmt/global.go +++ b/node/stmt/global.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Global) Position() *node.Position { return n.position } diff --git a/node/stmt/goto.go b/node/stmt/goto.go index e99170c..d410950 100644 --- a/node/stmt/goto.go +++ b/node/stmt/goto.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Goto) Position() *node.Position { return n.position } diff --git a/node/stmt/group_use.go b/node/stmt/group_use.go index f6a65a7..c617295 100644 --- a/node/stmt/group_use.go +++ b/node/stmt/group_use.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n GroupUse) Position() *node.Position { return n.position } diff --git a/node/stmt/halt_compiler.go b/node/stmt/halt_compiler.go index 4231847..92e2189 100644 --- a/node/stmt/halt_compiler.go +++ b/node/stmt/halt_compiler.go @@ -20,15 +20,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n HaltCompiler) Position() *node.Position { return n.position } diff --git a/node/stmt/if.go b/node/stmt/if.go index fa6d1b3..d1a1388 100644 --- a/node/stmt/if.go +++ b/node/stmt/if.go @@ -28,15 +28,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n If) Position() *node.Position { return n.position } diff --git a/node/stmt/inline_html.go b/node/stmt/inline_html.go index a28d9b8..c23b1d9 100644 --- a/node/stmt/inline_html.go +++ b/node/stmt/inline_html.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n InlineHtml) Position() *node.Position { return n.position } diff --git a/node/stmt/interface.go b/node/stmt/interface.go index 31242ac..4badbc6 100644 --- a/node/stmt/interface.go +++ b/node/stmt/interface.go @@ -28,15 +28,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Interface) Position() *node.Position { return n.position } diff --git a/node/stmt/label.go b/node/stmt/label.go index ce384af..cc8f0d3 100644 --- a/node/stmt/label.go +++ b/node/stmt/label.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Label) Position() *node.Position { return n.position } diff --git a/node/stmt/namespace.go b/node/stmt/namespace.go index d370e1e..5b17310 100644 --- a/node/stmt/namespace.go +++ b/node/stmt/namespace.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Namespace) Position() *node.Position { return n.position } diff --git a/node/stmt/nop.go b/node/stmt/nop.go index 53df4f8..62a0ac8 100644 --- a/node/stmt/nop.go +++ b/node/stmt/nop.go @@ -20,15 +20,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Nop) Position() *node.Position { return n.position } diff --git a/node/stmt/property.go b/node/stmt/property.go index fc889ab..864fd31 100644 --- a/node/stmt/property.go +++ b/node/stmt/property.go @@ -25,15 +25,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Property) Position() *node.Position { return n.position } diff --git a/node/stmt/property_list.go b/node/stmt/property_list.go index 1d99f25..a233558 100644 --- a/node/stmt/property_list.go +++ b/node/stmt/property_list.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n PropertyList) Position() *node.Position { return n.position } diff --git a/node/stmt/return.go b/node/stmt/return.go index eae30d0..01c8240 100644 --- a/node/stmt/return.go +++ b/node/stmt/return.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Return) Position() *node.Position { return n.position } diff --git a/node/stmt/static.go b/node/stmt/static.go index 34eeff6..72b756d 100644 --- a/node/stmt/static.go +++ b/node/stmt/static.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Static) Position() *node.Position { return n.position } diff --git a/node/stmt/static_var.go b/node/stmt/static_var.go index 5256c91..9e3a805 100644 --- a/node/stmt/static_var.go +++ b/node/stmt/static_var.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n StaticVar) Position() *node.Position { return n.position } diff --git a/node/stmt/stmt_list.go b/node/stmt/stmt_list.go index a4b610b..54847b4 100644 --- a/node/stmt/stmt_list.go +++ b/node/stmt/stmt_list.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n StmtList) Position() *node.Position { return n.position } diff --git a/node/stmt/switch.go b/node/stmt/switch.go index 9c7072d..611226e 100644 --- a/node/stmt/switch.go +++ b/node/stmt/switch.go @@ -27,15 +27,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Switch) Position() *node.Position { return n.position } diff --git a/node/stmt/throw.go b/node/stmt/throw.go index 5c05b00..92162a7 100644 --- a/node/stmt/throw.go +++ b/node/stmt/throw.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Throw) Position() *node.Position { return n.position } diff --git a/node/stmt/trait.go b/node/stmt/trait.go index 5d9f8d8..e6b5209 100644 --- a/node/stmt/trait.go +++ b/node/stmt/trait.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Trait) Position() *node.Position { return n.position } diff --git a/node/stmt/trait_method_ref.go b/node/stmt/trait_method_ref.go index 1d27953..5750426 100644 --- a/node/stmt/trait_method_ref.go +++ b/node/stmt/trait_method_ref.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n TraitMethodRef) Position() *node.Position { return n.position } diff --git a/node/stmt/trait_use.go b/node/stmt/trait_use.go index 25737fe..94001d3 100644 --- a/node/stmt/trait_use.go +++ b/node/stmt/trait_use.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n TraitUse) Position() *node.Position { return n.position } diff --git a/node/stmt/trait_use_alias.go b/node/stmt/trait_use_alias.go index 1bf3911..3a29b7a 100644 --- a/node/stmt/trait_use_alias.go +++ b/node/stmt/trait_use_alias.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n TraitUseAlias) Position() *node.Position { return n.position } diff --git a/node/stmt/trait_use_precedence.go b/node/stmt/trait_use_precedence.go index c321bf4..f858efa 100644 --- a/node/stmt/trait_use_precedence.go +++ b/node/stmt/trait_use_precedence.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n TraitUsePrecedence) Position() *node.Position { return n.position } diff --git a/node/stmt/try.go b/node/stmt/try.go index cd33188..e67ac75 100644 --- a/node/stmt/try.go +++ b/node/stmt/try.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Try) Position() *node.Position { return n.position } diff --git a/node/stmt/unset.go b/node/stmt/unset.go index 278b166..2a13506 100644 --- a/node/stmt/unset.go +++ b/node/stmt/unset.go @@ -22,15 +22,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Unset) Position() *node.Position { return n.position } diff --git a/node/stmt/use.go b/node/stmt/use.go index d97e3f3..e2668e2 100644 --- a/node/stmt/use.go +++ b/node/stmt/use.go @@ -26,15 +26,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n Use) Position() *node.Position { return n.position } diff --git a/node/stmt/use_list.go b/node/stmt/use_list.go index b8d8b5a..f1f4ad4 100644 --- a/node/stmt/use_list.go +++ b/node/stmt/use_list.go @@ -24,15 +24,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n UseList) Position() *node.Position { return n.position } diff --git a/node/stmt/while.go b/node/stmt/while.go index 874cdb7..9b726df 100644 --- a/node/stmt/while.go +++ b/node/stmt/while.go @@ -27,15 +27,6 @@ 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{}) node.Node { - n.attributes[key] = value - return n -} - func (n While) Position() *node.Position { return n.position }