From 3cd45ecac586d3c1b5ae7a81d0c3b58ccd8eada6 Mon Sep 17 00:00:00 2001 From: z7zmey Date: Mon, 25 Jun 2018 15:38:31 +0300 Subject: [PATCH] #25: save comments within node --- comment/comment.go | 26 +- comment/comment_test.go | 26 +- node/expr/assign/n_assign.go | 13 + node/expr/assign/n_assign_ref.go | 13 + node/expr/assign/n_bitwise_and.go | 13 + node/expr/assign/n_bitwise_or.go | 13 + node/expr/assign/n_bitwise_xor.go | 13 + node/expr/assign/n_concat.go | 13 + node/expr/assign/n_div.go | 13 + node/expr/assign/n_minus.go | 13 + node/expr/assign/n_mod.go | 13 + node/expr/assign/n_mul.go | 13 + node/expr/assign/n_plus.go | 13 + node/expr/assign/n_pow.go | 13 + node/expr/assign/n_shift_left.go | 13 + node/expr/assign/n_shift_right.go | 13 + node/expr/binary/n_bitwise_and.go | 13 + node/expr/binary/n_bitwise_or.go | 13 + node/expr/binary/n_bitwise_xor.go | 13 + node/expr/binary/n_boolean_and.go | 13 + node/expr/binary/n_boolean_or.go | 13 + node/expr/binary/n_coalesce.go | 13 + node/expr/binary/n_concat.go | 13 + node/expr/binary/n_div.go | 13 + node/expr/binary/n_equal.go | 13 + node/expr/binary/n_greater.go | 13 + node/expr/binary/n_greater_or_equal.go | 13 + node/expr/binary/n_identical.go | 13 + node/expr/binary/n_logical_and.go | 13 + node/expr/binary/n_logical_or.go | 13 + node/expr/binary/n_logical_xor.go | 13 + node/expr/binary/n_minus.go | 13 + node/expr/binary/n_mod.go | 13 + node/expr/binary/n_mul.go | 13 + node/expr/binary/n_not_equal.go | 13 + node/expr/binary/n_not_identical.go | 13 + node/expr/binary/n_plus.go | 13 + node/expr/binary/n_pow.go | 13 + node/expr/binary/n_shift_left.go | 13 + node/expr/binary/n_shift_right.go | 13 + node/expr/binary/n_smaller.go | 13 + node/expr/binary/n_smaller_or_equal.go | 13 + node/expr/binary/n_spaceship.go | 13 + node/expr/cast/n_cast_array.go | 13 + node/expr/cast/n_cast_bool.go | 13 + node/expr/cast/n_cast_double.go | 13 + node/expr/cast/n_cast_int.go | 13 + node/expr/cast/n_cast_object.go | 13 + node/expr/cast/n_cast_string.go | 13 + node/expr/cast/n_cast_unset.go | 13 + node/expr/n_array.go | 13 + node/expr/n_array_dim_fetch.go | 13 + node/expr/n_array_item.go | 13 + node/expr/n_bitwise_not.go | 13 + node/expr/n_boolean_not.go | 13 + node/expr/n_class_const_fetch.go | 13 + node/expr/n_clone.go | 13 + node/expr/n_closure.go | 13 + node/expr/n_closure_use.go | 13 + node/expr/n_const_fetch.go | 13 + node/expr/n_die.go | 13 + node/expr/n_empty.go | 13 + node/expr/n_error_suppress.go | 13 + node/expr/n_eval.go | 13 + node/expr/n_exit.go | 13 + node/expr/n_function_call.go | 13 + node/expr/n_include.go | 13 + node/expr/n_include_once.go | 13 + node/expr/n_instance_of.go | 13 + node/expr/n_isset.go | 13 + node/expr/n_list.go | 13 + node/expr/n_method_call.go | 13 + node/expr/n_new.go | 13 + node/expr/n_post_dec.go | 13 + node/expr/n_post_inc.go | 13 + node/expr/n_pre_dec.go | 13 + node/expr/n_pre_inc.go | 13 + node/expr/n_print.go | 13 + node/expr/n_property_fetch.go | 13 + node/expr/n_reference.go | 13 + node/expr/n_require.go | 13 + node/expr/n_require_once.go | 13 + node/expr/n_shell_exec.go | 13 + node/expr/n_short_array.go | 13 + node/expr/n_short_list.go | 13 + node/expr/n_static_call.go | 13 + node/expr/n_static_property_fetch.go | 13 + node/expr/n_ternary.go | 13 + node/expr/n_unary_minus.go | 13 + node/expr/n_unary_plus.go | 13 + node/expr/n_variable.go | 13 + node/expr/n_yield.go | 13 + node/expr/n_yield_from.go | 13 + node/n_argument.go | 13 + node/n_argument_list.go | 14 + node/n_identifier.go | 13 + node/n_nullable.go | 13 + node/n_parameter.go | 13 + node/n_root.go | 13 + node/name/n_fully_qualified.go | 13 + node/name/n_name.go | 13 + node/name/n_name_part.go | 13 + node/name/n_relative.go | 13 + node/node.go | 3 + node/scalar/node_dnumber.go | 13 + node/scalar/node_encapsed.go | 13 + node/scalar/node_encapsed_string_part.go | 13 + node/scalar/node_heredoc.go | 13 + node/scalar/node_lnumber.go | 13 + node/scalar/node_magic_constant.go | 13 + node/scalar/node_string.go | 13 + node/stmt/n_alt_else.go | 13 + node/stmt/n_alt_else_if.go | 13 + node/stmt/n_alt_for.go | 13 + node/stmt/n_alt_foreach.go | 13 + node/stmt/n_alt_if.go | 13 + node/stmt/n_alt_switch.go | 13 + node/stmt/n_alt_while.go | 13 + node/stmt/n_break.go | 13 + node/stmt/n_case.go | 13 + node/stmt/n_case_list.go | 13 + node/stmt/n_catch.go | 13 + node/stmt/n_class.go | 13 + node/stmt/n_class_const_list.go | 13 + node/stmt/n_class_extends.go | 13 + node/stmt/n_class_implements.go | 13 + node/stmt/n_class_method.go | 13 + node/stmt/n_const_list.go | 13 + node/stmt/n_constant.go | 13 + node/stmt/n_continue.go | 13 + node/stmt/n_declare.go | 13 + node/stmt/n_default.go | 13 + node/stmt/n_do.go | 13 + node/stmt/n_echo.go | 13 + node/stmt/n_else.go | 13 + node/stmt/n_else_if.go | 13 + node/stmt/n_expression.go | 13 + node/stmt/n_finally.go | 13 + node/stmt/n_for.go | 13 + node/stmt/n_foreach.go | 13 + node/stmt/n_function.go | 13 + node/stmt/n_global.go | 13 + node/stmt/n_goto.go | 13 + node/stmt/n_group_use.go | 13 + node/stmt/n_halt_compiler.go | 13 + node/stmt/n_if.go | 13 + node/stmt/n_inline_html.go | 13 + node/stmt/n_interface.go | 13 + node/stmt/n_interface_extends.go | 13 + node/stmt/n_label.go | 13 + node/stmt/n_namespace.go | 13 + node/stmt/n_nop.go | 13 + node/stmt/n_property.go | 13 + node/stmt/n_property_list.go | 13 + node/stmt/n_return.go | 13 + node/stmt/n_static.go | 13 + node/stmt/n_static_var.go | 13 + node/stmt/n_stmt_list.go | 13 + node/stmt/n_switch.go | 13 + node/stmt/n_throw.go | 13 + node/stmt/n_trait.go | 13 + node/stmt/n_trait_adaptation_list.go | 13 + node/stmt/n_trait_method_ref.go | 13 + node/stmt/n_trait_use.go | 13 + node/stmt/n_trait_use_alias.go | 13 + node/stmt/n_trait_use_precedence.go | 13 + node/stmt/n_try.go | 13 + node/stmt/n_unset.go | 13 + node/stmt/n_use.go | 13 + node/stmt/n_use_list.go | 13 + node/stmt/n_while.go | 13 + node/t_node_test.go | 21 +- php5/php5.go | 1623 +-- php5/php5.y | 1172 +- php5/php5_test.go | 12891 ++++++++++----------- php7/php7.go | 1014 +- php7/php7.y | 1012 +- php7/php7_test.go | 11325 +++++++++--------- visitor/dumper.go | 10 +- visitor/go_dumper.go | 38 + visitor/go_dumper_test.go | 12 + visitor/json_dumper.go | 20 +- visitor/pretty_json_dumper.go | 36 +- 183 files changed, 16743 insertions(+), 14671 deletions(-) diff --git a/comment/comment.go b/comment/comment.go index 943bd60..87252e9 100644 --- a/comment/comment.go +++ b/comment/comment.go @@ -6,35 +6,25 @@ import ( // Comment aggrigates information about comment /** type Comment struct { - value string - position *position.Position - tokenName TokenName + Value string + Position *position.Position + TokenName TokenName } // NewComment - Comment constructor func NewComment(value string, pos *position.Position) *Comment { return &Comment{ - value, - pos, - UnknownToken, + Value: value, + Position: pos, + TokenName: UnknownToken, } } // SetTokenName sets token name func (c *Comment) SetTokenName(tokenName TokenName) { - c.tokenName = tokenName -} - -// TokenName returns token name -func (c *Comment) TokenName() TokenName { - return c.tokenName + c.TokenName = tokenName } func (c *Comment) String() string { - return c.value -} - -// Position returns comment position -func (c *Comment) Position() *position.Position { - return c.position + return c.Value } diff --git a/comment/comment_test.go b/comment/comment_test.go index 72e1981..d9e671a 100644 --- a/comment/comment_test.go +++ b/comment/comment_test.go @@ -3,23 +3,9 @@ package comment_test import ( "testing" - "github.com/z7zmey/php-parser/position" - "github.com/z7zmey/php-parser/comment" ) -func TestCommentGetPosition(t *testing.T) { - expected := position.NewPosition(0, 0, 0, 0) - - comment := comment.NewComment("/** hello world */", expected) - - actual := comment.Position() - - if expected != actual { - t.Errorf("expected and actual are not equal\n") - } -} - func TestCommentPrint(t *testing.T) { expected := "/** hello world */" @@ -31,3 +17,15 @@ func TestCommentPrint(t *testing.T) { t.Errorf("expected and actual are not equal\n") } } + +func TestCommentSetTokenName(t *testing.T) { + expected := comment.ArrayToken + c := comment.NewComment("/** hello world */", nil) + c.SetTokenName(expected) + + actual := c.TokenName + + if expected != actual { + t.Errorf("expected and actual are not equal\n") + } +} diff --git a/node/expr/assign/n_assign.go b/node/expr/assign/n_assign.go index 7d99267..7f53f2a 100644 --- a/node/expr/assign/n_assign.go +++ b/node/expr/assign/n_assign.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Assign node type Assign struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Assign) GetPosition() *position.Position { return n.Position } +func (n *Assign) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Assign) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Assign) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_assign_ref.go b/node/expr/assign/n_assign_ref.go index 92fbd45..9469162 100644 --- a/node/expr/assign/n_assign_ref.go +++ b/node/expr/assign/n_assign_ref.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Reference node type Reference struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Reference) GetPosition() *position.Position { return n.Position } +func (n *Reference) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Reference) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Reference) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_bitwise_and.go b/node/expr/assign/n_bitwise_and.go index bc43e00..8ee3e06 100644 --- a/node/expr/assign/n_bitwise_and.go +++ b/node/expr/assign/n_bitwise_and.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BitwiseAnd node type BitwiseAnd struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *BitwiseAnd) GetPosition() *position.Position { return n.Position } +func (n *BitwiseAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BitwiseAnd) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BitwiseAnd) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_bitwise_or.go b/node/expr/assign/n_bitwise_or.go index c758efc..b1662c2 100644 --- a/node/expr/assign/n_bitwise_or.go +++ b/node/expr/assign/n_bitwise_or.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BitwiseOr node type BitwiseOr struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *BitwiseOr) GetPosition() *position.Position { return n.Position } +func (n *BitwiseOr) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BitwiseOr) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BitwiseOr) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_bitwise_xor.go b/node/expr/assign/n_bitwise_xor.go index 76da08a..8dfca55 100644 --- a/node/expr/assign/n_bitwise_xor.go +++ b/node/expr/assign/n_bitwise_xor.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BitwiseXor node type BitwiseXor struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *BitwiseXor) GetPosition() *position.Position { return n.Position } +func (n *BitwiseXor) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BitwiseXor) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BitwiseXor) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_concat.go b/node/expr/assign/n_concat.go index 14484cf..2c818d4 100644 --- a/node/expr/assign/n_concat.go +++ b/node/expr/assign/n_concat.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Concat node type Concat struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Concat) GetPosition() *position.Position { return n.Position } +func (n *Concat) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Concat) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Concat) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_div.go b/node/expr/assign/n_div.go index a10fdb6..58a9488 100644 --- a/node/expr/assign/n_div.go +++ b/node/expr/assign/n_div.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Div node type Div struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Div) GetPosition() *position.Position { return n.Position } +func (n *Div) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Div) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Div) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_minus.go b/node/expr/assign/n_minus.go index 1b29561..a9e77ca 100644 --- a/node/expr/assign/n_minus.go +++ b/node/expr/assign/n_minus.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Minus node type Minus struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Minus) GetPosition() *position.Position { return n.Position } +func (n *Minus) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Minus) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Minus) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_mod.go b/node/expr/assign/n_mod.go index ba98537..2ce65b4 100644 --- a/node/expr/assign/n_mod.go +++ b/node/expr/assign/n_mod.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Mod node type Mod struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Mod) GetPosition() *position.Position { return n.Position } +func (n *Mod) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Mod) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Mod) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_mul.go b/node/expr/assign/n_mul.go index 8abc7c6..8278719 100644 --- a/node/expr/assign/n_mul.go +++ b/node/expr/assign/n_mul.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Mul node type Mul struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Mul) GetPosition() *position.Position { return n.Position } +func (n *Mul) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Mul) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Mul) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_plus.go b/node/expr/assign/n_plus.go index b12f948..4a6e4ba 100644 --- a/node/expr/assign/n_plus.go +++ b/node/expr/assign/n_plus.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Plus node type Plus struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Plus) GetPosition() *position.Position { return n.Position } +func (n *Plus) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Plus) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Plus) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_pow.go b/node/expr/assign/n_pow.go index 4b4edcf..538f73c 100644 --- a/node/expr/assign/n_pow.go +++ b/node/expr/assign/n_pow.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Pow node type Pow struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *Pow) GetPosition() *position.Position { return n.Position } +func (n *Pow) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Pow) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Pow) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_shift_left.go b/node/expr/assign/n_shift_left.go index 2d60059..d56a06f 100644 --- a/node/expr/assign/n_shift_left.go +++ b/node/expr/assign/n_shift_left.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ShiftLeft node type ShiftLeft struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *ShiftLeft) GetPosition() *position.Position { return n.Position } +func (n *ShiftLeft) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ShiftLeft) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ShiftLeft) Attributes() map[string]interface{} { return nil diff --git a/node/expr/assign/n_shift_right.go b/node/expr/assign/n_shift_right.go index 715002d..ab3971b 100644 --- a/node/expr/assign/n_shift_right.go +++ b/node/expr/assign/n_shift_right.go @@ -1,6 +1,7 @@ package assign import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ShiftRight node type ShiftRight struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expression node.Node @@ -31,6 +33,17 @@ func (n *ShiftRight) GetPosition() *position.Position { return n.Position } +func (n *ShiftRight) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ShiftRight) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ShiftRight) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_bitwise_and.go b/node/expr/binary/n_bitwise_and.go index 1e18f70..fe66522 100644 --- a/node/expr/binary/n_bitwise_and.go +++ b/node/expr/binary/n_bitwise_and.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BitwiseAnd node type BitwiseAnd struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *BitwiseAnd) GetPosition() *position.Position { return n.Position } +func (n *BitwiseAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BitwiseAnd) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BitwiseAnd) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_bitwise_or.go b/node/expr/binary/n_bitwise_or.go index 77449a6..3d4c1d1 100644 --- a/node/expr/binary/n_bitwise_or.go +++ b/node/expr/binary/n_bitwise_or.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BitwiseOr node type BitwiseOr struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *BitwiseOr) GetPosition() *position.Position { return n.Position } +func (n *BitwiseOr) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BitwiseOr) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BitwiseOr) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_bitwise_xor.go b/node/expr/binary/n_bitwise_xor.go index cbf6359..98dace5 100644 --- a/node/expr/binary/n_bitwise_xor.go +++ b/node/expr/binary/n_bitwise_xor.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BitwiseXor node type BitwiseXor struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *BitwiseXor) GetPosition() *position.Position { return n.Position } +func (n *BitwiseXor) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BitwiseXor) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BitwiseXor) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_boolean_and.go b/node/expr/binary/n_boolean_and.go index e47bcf4..ecfd326 100644 --- a/node/expr/binary/n_boolean_and.go +++ b/node/expr/binary/n_boolean_and.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BooleanAnd node type BooleanAnd struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *BooleanAnd) GetPosition() *position.Position { return n.Position } +func (n *BooleanAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BooleanAnd) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BooleanAnd) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_boolean_or.go b/node/expr/binary/n_boolean_or.go index d374639..7d85a4b 100644 --- a/node/expr/binary/n_boolean_or.go +++ b/node/expr/binary/n_boolean_or.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BooleanOr node type BooleanOr struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *BooleanOr) GetPosition() *position.Position { return n.Position } +func (n *BooleanOr) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BooleanOr) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BooleanOr) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_coalesce.go b/node/expr/binary/n_coalesce.go index f852c26..2efd1a7 100644 --- a/node/expr/binary/n_coalesce.go +++ b/node/expr/binary/n_coalesce.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Coalesce node type Coalesce struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Coalesce) GetPosition() *position.Position { return n.Position } +func (n *Coalesce) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Coalesce) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Coalesce) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_concat.go b/node/expr/binary/n_concat.go index a2949cc..c81dc4f 100644 --- a/node/expr/binary/n_concat.go +++ b/node/expr/binary/n_concat.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Concat node type Concat struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Concat) GetPosition() *position.Position { return n.Position } +func (n *Concat) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Concat) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Concat) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_div.go b/node/expr/binary/n_div.go index 958c376..e165d96 100644 --- a/node/expr/binary/n_div.go +++ b/node/expr/binary/n_div.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Div node type Div struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Div) GetPosition() *position.Position { return n.Position } +func (n *Div) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Div) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Div) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_equal.go b/node/expr/binary/n_equal.go index 6db8bd5..1086fa7 100644 --- a/node/expr/binary/n_equal.go +++ b/node/expr/binary/n_equal.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Equal node type Equal struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Equal) GetPosition() *position.Position { return n.Position } +func (n *Equal) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Equal) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Equal) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_greater.go b/node/expr/binary/n_greater.go index 58f81e8..686dd1a 100644 --- a/node/expr/binary/n_greater.go +++ b/node/expr/binary/n_greater.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Greater node type Greater struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Greater) GetPosition() *position.Position { return n.Position } +func (n *Greater) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Greater) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Greater) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_greater_or_equal.go b/node/expr/binary/n_greater_or_equal.go index f42b82c..9a84f83 100644 --- a/node/expr/binary/n_greater_or_equal.go +++ b/node/expr/binary/n_greater_or_equal.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // GreaterOrEqual node type GreaterOrEqual struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *GreaterOrEqual) GetPosition() *position.Position { return n.Position } +func (n *GreaterOrEqual) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *GreaterOrEqual) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *GreaterOrEqual) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_identical.go b/node/expr/binary/n_identical.go index 31d913f..0aed14d 100644 --- a/node/expr/binary/n_identical.go +++ b/node/expr/binary/n_identical.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Identical node type Identical struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Identical) GetPosition() *position.Position { return n.Position } +func (n *Identical) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Identical) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Identical) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_logical_and.go b/node/expr/binary/n_logical_and.go index 50b2749..3232bf9 100644 --- a/node/expr/binary/n_logical_and.go +++ b/node/expr/binary/n_logical_and.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // LogicalAnd node type LogicalAnd struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *LogicalAnd) GetPosition() *position.Position { return n.Position } +func (n *LogicalAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *LogicalAnd) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *LogicalAnd) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_logical_or.go b/node/expr/binary/n_logical_or.go index 17c9099..b96fcf6 100644 --- a/node/expr/binary/n_logical_or.go +++ b/node/expr/binary/n_logical_or.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // LogicalOr node type LogicalOr struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *LogicalOr) GetPosition() *position.Position { return n.Position } +func (n *LogicalOr) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *LogicalOr) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *LogicalOr) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_logical_xor.go b/node/expr/binary/n_logical_xor.go index 6811160..49dc951 100644 --- a/node/expr/binary/n_logical_xor.go +++ b/node/expr/binary/n_logical_xor.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // LogicalXor node type LogicalXor struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *LogicalXor) GetPosition() *position.Position { return n.Position } +func (n *LogicalXor) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *LogicalXor) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *LogicalXor) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_minus.go b/node/expr/binary/n_minus.go index 1e76457..9001cda 100644 --- a/node/expr/binary/n_minus.go +++ b/node/expr/binary/n_minus.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Minus node type Minus struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Minus) GetPosition() *position.Position { return n.Position } +func (n *Minus) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Minus) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Minus) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_mod.go b/node/expr/binary/n_mod.go index 46d3f74..e9f5b42 100644 --- a/node/expr/binary/n_mod.go +++ b/node/expr/binary/n_mod.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Mod node type Mod struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Mod) GetPosition() *position.Position { return n.Position } +func (n *Mod) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Mod) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Mod) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_mul.go b/node/expr/binary/n_mul.go index ea029a5..083ed1e 100644 --- a/node/expr/binary/n_mul.go +++ b/node/expr/binary/n_mul.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Mul node type Mul struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Mul) GetPosition() *position.Position { return n.Position } +func (n *Mul) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Mul) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Mul) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_not_equal.go b/node/expr/binary/n_not_equal.go index 21ef277..e713676 100644 --- a/node/expr/binary/n_not_equal.go +++ b/node/expr/binary/n_not_equal.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // NotEqual node type NotEqual struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *NotEqual) GetPosition() *position.Position { return n.Position } +func (n *NotEqual) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *NotEqual) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *NotEqual) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_not_identical.go b/node/expr/binary/n_not_identical.go index b013fbe..41491dc 100644 --- a/node/expr/binary/n_not_identical.go +++ b/node/expr/binary/n_not_identical.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // NotIdentical node type NotIdentical struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *NotIdentical) GetPosition() *position.Position { return n.Position } +func (n *NotIdentical) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *NotIdentical) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *NotIdentical) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_plus.go b/node/expr/binary/n_plus.go index 2753099..10561b4 100644 --- a/node/expr/binary/n_plus.go +++ b/node/expr/binary/n_plus.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Plus node type Plus struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Plus) GetPosition() *position.Position { return n.Position } +func (n *Plus) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Plus) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Plus) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_pow.go b/node/expr/binary/n_pow.go index 371c6bd..25af5c9 100644 --- a/node/expr/binary/n_pow.go +++ b/node/expr/binary/n_pow.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Pow node type Pow struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Pow) GetPosition() *position.Position { return n.Position } +func (n *Pow) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Pow) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Pow) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_shift_left.go b/node/expr/binary/n_shift_left.go index f48b559..d6028fa 100644 --- a/node/expr/binary/n_shift_left.go +++ b/node/expr/binary/n_shift_left.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ShiftLeft node type ShiftLeft struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *ShiftLeft) GetPosition() *position.Position { return n.Position } +func (n *ShiftLeft) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ShiftLeft) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ShiftLeft) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_shift_right.go b/node/expr/binary/n_shift_right.go index 2ff7ea8..14b4f95 100644 --- a/node/expr/binary/n_shift_right.go +++ b/node/expr/binary/n_shift_right.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ShiftRight node type ShiftRight struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *ShiftRight) GetPosition() *position.Position { return n.Position } +func (n *ShiftRight) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ShiftRight) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ShiftRight) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_smaller.go b/node/expr/binary/n_smaller.go index 1e380a0..b3deb82 100644 --- a/node/expr/binary/n_smaller.go +++ b/node/expr/binary/n_smaller.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Smaller node type Smaller struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Smaller) GetPosition() *position.Position { return n.Position } +func (n *Smaller) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Smaller) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Smaller) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_smaller_or_equal.go b/node/expr/binary/n_smaller_or_equal.go index de00106..d2b2aef 100644 --- a/node/expr/binary/n_smaller_or_equal.go +++ b/node/expr/binary/n_smaller_or_equal.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // SmallerOrEqual node type SmallerOrEqual struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *SmallerOrEqual) GetPosition() *position.Position { return n.Position } +func (n *SmallerOrEqual) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *SmallerOrEqual) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *SmallerOrEqual) Attributes() map[string]interface{} { return nil diff --git a/node/expr/binary/n_spaceship.go b/node/expr/binary/n_spaceship.go index 955fc72..99945d3 100644 --- a/node/expr/binary/n_spaceship.go +++ b/node/expr/binary/n_spaceship.go @@ -1,6 +1,7 @@ package binary import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Spaceship node type Spaceship struct { + Comments []*comment.Comment Position *position.Position Left node.Node Right node.Node @@ -31,6 +33,17 @@ func (n *Spaceship) GetPosition() *position.Position { return n.Position } +func (n *Spaceship) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Spaceship) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Spaceship) Attributes() map[string]interface{} { return nil diff --git a/node/expr/cast/n_cast_array.go b/node/expr/cast/n_cast_array.go index fbaafd3..47b5524 100644 --- a/node/expr/cast/n_cast_array.go +++ b/node/expr/cast/n_cast_array.go @@ -1,6 +1,7 @@ package cast import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Array node type Array struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Array) GetPosition() *position.Position { return n.Position } +func (n *Array) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Array) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Array) Attributes() map[string]interface{} { return nil diff --git a/node/expr/cast/n_cast_bool.go b/node/expr/cast/n_cast_bool.go index e580328..8af7697 100644 --- a/node/expr/cast/n_cast_bool.go +++ b/node/expr/cast/n_cast_bool.go @@ -1,6 +1,7 @@ package cast import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Bool node type Bool struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Bool) GetPosition() *position.Position { return n.Position } +func (n *Bool) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Bool) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Bool) Attributes() map[string]interface{} { return nil diff --git a/node/expr/cast/n_cast_double.go b/node/expr/cast/n_cast_double.go index 2240d0d..56715e5 100644 --- a/node/expr/cast/n_cast_double.go +++ b/node/expr/cast/n_cast_double.go @@ -1,6 +1,7 @@ package cast import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Double node type Double struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Double) GetPosition() *position.Position { return n.Position } +func (n *Double) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Double) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Double) Attributes() map[string]interface{} { return nil diff --git a/node/expr/cast/n_cast_int.go b/node/expr/cast/n_cast_int.go index d4ed5a3..4c6e730 100644 --- a/node/expr/cast/n_cast_int.go +++ b/node/expr/cast/n_cast_int.go @@ -1,6 +1,7 @@ package cast import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Int node type Int struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Int) GetPosition() *position.Position { return n.Position } +func (n *Int) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Int) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Int) Attributes() map[string]interface{} { return nil diff --git a/node/expr/cast/n_cast_object.go b/node/expr/cast/n_cast_object.go index 6497b77..b44aa9c 100644 --- a/node/expr/cast/n_cast_object.go +++ b/node/expr/cast/n_cast_object.go @@ -1,6 +1,7 @@ package cast import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Object node type Object struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Object) GetPosition() *position.Position { return n.Position } +func (n *Object) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Object) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Object) Attributes() map[string]interface{} { return nil diff --git a/node/expr/cast/n_cast_string.go b/node/expr/cast/n_cast_string.go index 3b026a9..7081b26 100644 --- a/node/expr/cast/n_cast_string.go +++ b/node/expr/cast/n_cast_string.go @@ -1,6 +1,7 @@ package cast import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // String node type String struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *String) GetPosition() *position.Position { return n.Position } +func (n *String) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *String) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *String) Attributes() map[string]interface{} { return nil diff --git a/node/expr/cast/n_cast_unset.go b/node/expr/cast/n_cast_unset.go index cdc8fea..7eadb26 100644 --- a/node/expr/cast/n_cast_unset.go +++ b/node/expr/cast/n_cast_unset.go @@ -1,6 +1,7 @@ package cast import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Unset node type Unset struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Unset) GetPosition() *position.Position { return n.Position } +func (n *Unset) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Unset) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Unset) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_array.go b/node/expr/n_array.go index 2a0f09b..e032563 100644 --- a/node/expr/n_array.go +++ b/node/expr/n_array.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Array node type Array struct { + Comments []*comment.Comment Position *position.Position Items []node.Node } @@ -29,6 +31,17 @@ func (n *Array) GetPosition() *position.Position { return n.Position } +func (n *Array) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Array) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Array) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_array_dim_fetch.go b/node/expr/n_array_dim_fetch.go index f5d4a20..9e61c68 100644 --- a/node/expr/n_array_dim_fetch.go +++ b/node/expr/n_array_dim_fetch.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ArrayDimFetch node type ArrayDimFetch struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Dim node.Node @@ -31,6 +33,17 @@ func (n *ArrayDimFetch) GetPosition() *position.Position { return n.Position } +func (n *ArrayDimFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ArrayDimFetch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ArrayDimFetch) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_array_item.go b/node/expr/n_array_item.go index 5022650..48c01a4 100644 --- a/node/expr/n_array_item.go +++ b/node/expr/n_array_item.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ArrayItem node type ArrayItem struct { + Comments []*comment.Comment Position *position.Position Key node.Node Val node.Node @@ -31,6 +33,17 @@ func (n *ArrayItem) GetPosition() *position.Position { return n.Position } +func (n *ArrayItem) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ArrayItem) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ArrayItem) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_bitwise_not.go b/node/expr/n_bitwise_not.go index fd7fe76..37cc08f 100644 --- a/node/expr/n_bitwise_not.go +++ b/node/expr/n_bitwise_not.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BitwiseNot node type BitwiseNot struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *BitwiseNot) GetPosition() *position.Position { return n.Position } +func (n *BitwiseNot) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BitwiseNot) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BitwiseNot) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_boolean_not.go b/node/expr/n_boolean_not.go index a3aa720..c5d8e0a 100644 --- a/node/expr/n_boolean_not.go +++ b/node/expr/n_boolean_not.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // BooleanNot node type BooleanNot struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *BooleanNot) GetPosition() *position.Position { return n.Position } +func (n *BooleanNot) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *BooleanNot) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *BooleanNot) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_class_const_fetch.go b/node/expr/n_class_const_fetch.go index 84a16ff..c223ebc 100644 --- a/node/expr/n_class_const_fetch.go +++ b/node/expr/n_class_const_fetch.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ClassConstFetch node type ClassConstFetch struct { + Comments []*comment.Comment Position *position.Position Class node.Node ConstantName node.Node @@ -31,6 +33,17 @@ func (n *ClassConstFetch) GetPosition() *position.Position { return n.Position } +func (n *ClassConstFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ClassConstFetch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ClassConstFetch) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_clone.go b/node/expr/n_clone.go index e126341..61b81dd 100644 --- a/node/expr/n_clone.go +++ b/node/expr/n_clone.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Clone node type Clone struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Clone) GetPosition() *position.Position { return n.Position } +func (n *Clone) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Clone) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Clone) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_closure.go b/node/expr/n_closure.go index c88c056..48e7e9a 100644 --- a/node/expr/n_closure.go +++ b/node/expr/n_closure.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Closure node type Closure struct { + Comments []*comment.Comment Position *position.Position ReturnsRef bool Static bool @@ -41,6 +43,17 @@ func (n *Closure) GetPosition() *position.Position { return n.Position } +func (n *Closure) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Closure) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Closure) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/expr/n_closure_use.go b/node/expr/n_closure_use.go index 053fe3f..fd944f1 100644 --- a/node/expr/n_closure_use.go +++ b/node/expr/n_closure_use.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ClosureUse node type ClosureUse struct { + Comments []*comment.Comment Position *position.Position Uses []node.Node } @@ -29,6 +31,17 @@ func (n *ClosureUse) GetPosition() *position.Position { return n.Position } +func (n *ClosureUse) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ClosureUse) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ClosureUse) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_const_fetch.go b/node/expr/n_const_fetch.go index 1a97105..d10b0b4 100644 --- a/node/expr/n_const_fetch.go +++ b/node/expr/n_const_fetch.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ConstFetch node type ConstFetch struct { + Comments []*comment.Comment Position *position.Position Constant node.Node } @@ -29,6 +31,17 @@ func (n *ConstFetch) GetPosition() *position.Position { return n.Position } +func (n *ConstFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ConstFetch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ConstFetch) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_die.go b/node/expr/n_die.go index 9e57064..f4dcc9d 100644 --- a/node/expr/n_die.go +++ b/node/expr/n_die.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Die node type Die struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Die) GetPosition() *position.Position { return n.Position } +func (n *Die) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Die) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Die) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_empty.go b/node/expr/n_empty.go index b138a19..71eb94a 100644 --- a/node/expr/n_empty.go +++ b/node/expr/n_empty.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Empty node type Empty struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Empty) GetPosition() *position.Position { return n.Position } +func (n *Empty) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Empty) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Empty) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_error_suppress.go b/node/expr/n_error_suppress.go index 0aef767..f3b7371 100644 --- a/node/expr/n_error_suppress.go +++ b/node/expr/n_error_suppress.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ErrorSuppress node type ErrorSuppress struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *ErrorSuppress) GetPosition() *position.Position { return n.Position } +func (n *ErrorSuppress) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ErrorSuppress) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ErrorSuppress) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_eval.go b/node/expr/n_eval.go index 33af462..6b002c2 100644 --- a/node/expr/n_eval.go +++ b/node/expr/n_eval.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Eval node type Eval struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Eval) GetPosition() *position.Position { return n.Position } +func (n *Eval) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Eval) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Eval) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_exit.go b/node/expr/n_exit.go index 2c11da3..306169a 100644 --- a/node/expr/n_exit.go +++ b/node/expr/n_exit.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Exit node type Exit struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Exit) GetPosition() *position.Position { return n.Position } +func (n *Exit) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Exit) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Exit) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_function_call.go b/node/expr/n_function_call.go index 1f0f96f..2762e09 100644 --- a/node/expr/n_function_call.go +++ b/node/expr/n_function_call.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // FunctionCall node type FunctionCall struct { + Comments []*comment.Comment Position *position.Position Function node.Node ArgumentList *node.ArgumentList @@ -31,6 +33,17 @@ func (n *FunctionCall) GetPosition() *position.Position { return n.Position } +func (n *FunctionCall) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *FunctionCall) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *FunctionCall) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_include.go b/node/expr/n_include.go index 31bc192..1b15cb9 100644 --- a/node/expr/n_include.go +++ b/node/expr/n_include.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Include node type Include struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Include) GetPosition() *position.Position { return n.Position } +func (n *Include) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Include) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Include) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_include_once.go b/node/expr/n_include_once.go index 26c1b03..66a927e 100644 --- a/node/expr/n_include_once.go +++ b/node/expr/n_include_once.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // IncludeOnce node type IncludeOnce struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *IncludeOnce) GetPosition() *position.Position { return n.Position } +func (n *IncludeOnce) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *IncludeOnce) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *IncludeOnce) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_instance_of.go b/node/expr/n_instance_of.go index b661145..19a6472 100644 --- a/node/expr/n_instance_of.go +++ b/node/expr/n_instance_of.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // InstanceOf node type InstanceOf struct { + Comments []*comment.Comment Position *position.Position Expr node.Node Class node.Node @@ -31,6 +33,17 @@ func (n *InstanceOf) GetPosition() *position.Position { return n.Position } +func (n *InstanceOf) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *InstanceOf) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *InstanceOf) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_isset.go b/node/expr/n_isset.go index 5629209..d09e18a 100644 --- a/node/expr/n_isset.go +++ b/node/expr/n_isset.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Isset node type Isset struct { + Comments []*comment.Comment Position *position.Position Variables []node.Node } @@ -29,6 +31,17 @@ func (n *Isset) GetPosition() *position.Position { return n.Position } +func (n *Isset) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Isset) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Isset) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_list.go b/node/expr/n_list.go index 31dd820..0f368c8 100644 --- a/node/expr/n_list.go +++ b/node/expr/n_list.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // List node type List struct { + Comments []*comment.Comment Position *position.Position Items []node.Node } @@ -29,6 +31,17 @@ func (n *List) GetPosition() *position.Position { return n.Position } +func (n *List) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *List) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *List) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_method_call.go b/node/expr/n_method_call.go index 2620fa1..e2d8415 100644 --- a/node/expr/n_method_call.go +++ b/node/expr/n_method_call.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // MethodCall node type MethodCall struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Method node.Node @@ -33,6 +35,17 @@ func (n *MethodCall) GetPosition() *position.Position { return n.Position } +func (n *MethodCall) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *MethodCall) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *MethodCall) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_new.go b/node/expr/n_new.go index e8d80fb..7f28ae5 100644 --- a/node/expr/n_new.go +++ b/node/expr/n_new.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // New node type New struct { + Comments []*comment.Comment Position *position.Position Class node.Node ArgumentList *node.ArgumentList @@ -31,6 +33,17 @@ func (n *New) GetPosition() *position.Position { return n.Position } +func (n *New) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *New) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *New) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_post_dec.go b/node/expr/n_post_dec.go index dccd05c..476d572 100644 --- a/node/expr/n_post_dec.go +++ b/node/expr/n_post_dec.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // PostDec node type PostDec struct { + Comments []*comment.Comment Position *position.Position Variable node.Node } @@ -29,6 +31,17 @@ func (n *PostDec) GetPosition() *position.Position { return n.Position } +func (n *PostDec) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *PostDec) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *PostDec) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_post_inc.go b/node/expr/n_post_inc.go index 6c982ec..f9aaf0e 100644 --- a/node/expr/n_post_inc.go +++ b/node/expr/n_post_inc.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // PostInc node type PostInc struct { + Comments []*comment.Comment Position *position.Position Variable node.Node } @@ -29,6 +31,17 @@ func (n *PostInc) GetPosition() *position.Position { return n.Position } +func (n *PostInc) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *PostInc) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *PostInc) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_pre_dec.go b/node/expr/n_pre_dec.go index c0ce7a1..93c65e5 100644 --- a/node/expr/n_pre_dec.go +++ b/node/expr/n_pre_dec.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // PreDec node type PreDec struct { + Comments []*comment.Comment Position *position.Position Variable node.Node } @@ -29,6 +31,17 @@ func (n *PreDec) GetPosition() *position.Position { return n.Position } +func (n *PreDec) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *PreDec) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *PreDec) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_pre_inc.go b/node/expr/n_pre_inc.go index e2baed2..aac0747 100644 --- a/node/expr/n_pre_inc.go +++ b/node/expr/n_pre_inc.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // PreInc node type PreInc struct { + Comments []*comment.Comment Position *position.Position Variable node.Node } @@ -29,6 +31,17 @@ func (n *PreInc) GetPosition() *position.Position { return n.Position } +func (n *PreInc) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *PreInc) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *PreInc) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_print.go b/node/expr/n_print.go index 6bc151c..cdfd4fb 100644 --- a/node/expr/n_print.go +++ b/node/expr/n_print.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Print node type Print struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Print) GetPosition() *position.Position { return n.Position } +func (n *Print) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Print) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Print) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_property_fetch.go b/node/expr/n_property_fetch.go index 15341d1..7256011 100644 --- a/node/expr/n_property_fetch.go +++ b/node/expr/n_property_fetch.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // PropertyFetch node type PropertyFetch struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Property node.Node @@ -31,6 +33,17 @@ func (n *PropertyFetch) GetPosition() *position.Position { return n.Position } +func (n *PropertyFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *PropertyFetch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *PropertyFetch) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_reference.go b/node/expr/n_reference.go index eab0fbb..df0cd5f 100644 --- a/node/expr/n_reference.go +++ b/node/expr/n_reference.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Reference node type Reference struct { + Comments []*comment.Comment Position *position.Position Variable node.Node } @@ -29,6 +31,17 @@ func (n *Reference) GetPosition() *position.Position { return n.Position } +func (n *Reference) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Reference) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Reference) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_require.go b/node/expr/n_require.go index c9dbae3..b145288 100644 --- a/node/expr/n_require.go +++ b/node/expr/n_require.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Require node type Require struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Require) GetPosition() *position.Position { return n.Position } +func (n *Require) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Require) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Require) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_require_once.go b/node/expr/n_require_once.go index 723f12c..b36ab63 100644 --- a/node/expr/n_require_once.go +++ b/node/expr/n_require_once.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // RequireOnce node type RequireOnce struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *RequireOnce) GetPosition() *position.Position { return n.Position } +func (n *RequireOnce) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *RequireOnce) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *RequireOnce) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_shell_exec.go b/node/expr/n_shell_exec.go index fb56a61..bbcf24d 100644 --- a/node/expr/n_shell_exec.go +++ b/node/expr/n_shell_exec.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ShellExec node type ShellExec struct { + Comments []*comment.Comment Position *position.Position Parts []node.Node } @@ -29,6 +31,17 @@ func (n *ShellExec) GetPosition() *position.Position { return n.Position } +func (n *ShellExec) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ShellExec) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ShellExec) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_short_array.go b/node/expr/n_short_array.go index 3f955a1..b6f5ebb 100644 --- a/node/expr/n_short_array.go +++ b/node/expr/n_short_array.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ShortArray node type ShortArray struct { + Comments []*comment.Comment Position *position.Position Items []node.Node } @@ -29,6 +31,17 @@ func (n *ShortArray) GetPosition() *position.Position { return n.Position } +func (n *ShortArray) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ShortArray) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ShortArray) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_short_list.go b/node/expr/n_short_list.go index 93d7042..3714832 100644 --- a/node/expr/n_short_list.go +++ b/node/expr/n_short_list.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ShortList node type ShortList struct { + Comments []*comment.Comment Position *position.Position Items []node.Node } @@ -29,6 +31,17 @@ func (n *ShortList) GetPosition() *position.Position { return n.Position } +func (n *ShortList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ShortList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ShortList) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_static_call.go b/node/expr/n_static_call.go index 6e16aae..be0c7f2 100644 --- a/node/expr/n_static_call.go +++ b/node/expr/n_static_call.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // StaticCall node type StaticCall struct { + Comments []*comment.Comment Position *position.Position Class node.Node Call node.Node @@ -33,6 +35,17 @@ func (n *StaticCall) GetPosition() *position.Position { return n.Position } +func (n *StaticCall) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *StaticCall) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *StaticCall) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_static_property_fetch.go b/node/expr/n_static_property_fetch.go index d363f08..1e52c37 100644 --- a/node/expr/n_static_property_fetch.go +++ b/node/expr/n_static_property_fetch.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // StaticPropertyFetch node type StaticPropertyFetch struct { + Comments []*comment.Comment Position *position.Position Class node.Node Property node.Node @@ -31,6 +33,17 @@ func (n *StaticPropertyFetch) GetPosition() *position.Position { return n.Position } +func (n *StaticPropertyFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *StaticPropertyFetch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *StaticPropertyFetch) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_ternary.go b/node/expr/n_ternary.go index fcb2b12..f94aef3 100644 --- a/node/expr/n_ternary.go +++ b/node/expr/n_ternary.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Ternary node type Ternary struct { + Comments []*comment.Comment Position *position.Position Condition node.Node IfTrue node.Node @@ -33,6 +35,17 @@ func (n *Ternary) GetPosition() *position.Position { return n.Position } +func (n *Ternary) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Ternary) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Ternary) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_unary_minus.go b/node/expr/n_unary_minus.go index fdbac5c..f1c21eb 100644 --- a/node/expr/n_unary_minus.go +++ b/node/expr/n_unary_minus.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // UnaryMinus node type UnaryMinus struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *UnaryMinus) GetPosition() *position.Position { return n.Position } +func (n *UnaryMinus) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *UnaryMinus) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *UnaryMinus) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_unary_plus.go b/node/expr/n_unary_plus.go index d0d5812..5e50fcd 100644 --- a/node/expr/n_unary_plus.go +++ b/node/expr/n_unary_plus.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // UnaryPlus node type UnaryPlus struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *UnaryPlus) GetPosition() *position.Position { return n.Position } +func (n *UnaryPlus) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *UnaryPlus) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *UnaryPlus) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_variable.go b/node/expr/n_variable.go index 3420eeb..b0dc735 100644 --- a/node/expr/n_variable.go +++ b/node/expr/n_variable.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Variable node type Variable struct { + Comments []*comment.Comment Position *position.Position VarName node.Node } @@ -29,6 +31,17 @@ func (n *Variable) GetPosition() *position.Position { return n.Position } +func (n *Variable) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Variable) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Variable) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_yield.go b/node/expr/n_yield.go index 9f6be45..999f0bf 100644 --- a/node/expr/n_yield.go +++ b/node/expr/n_yield.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Yield node type Yield struct { + Comments []*comment.Comment Position *position.Position Key node.Node Value node.Node @@ -31,6 +33,17 @@ func (n *Yield) GetPosition() *position.Position { return n.Position } +func (n *Yield) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Yield) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Yield) Attributes() map[string]interface{} { return nil diff --git a/node/expr/n_yield_from.go b/node/expr/n_yield_from.go index ef2ceda..6651856 100644 --- a/node/expr/n_yield_from.go +++ b/node/expr/n_yield_from.go @@ -1,6 +1,7 @@ package expr import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // YieldFrom node type YieldFrom struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *YieldFrom) GetPosition() *position.Position { return n.Position } +func (n *YieldFrom) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *YieldFrom) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *YieldFrom) Attributes() map[string]interface{} { return nil diff --git a/node/n_argument.go b/node/n_argument.go index f31b173..c32582a 100644 --- a/node/n_argument.go +++ b/node/n_argument.go @@ -1,12 +1,14 @@ package node import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Argument node type Argument struct { + Comments []*comment.Comment Position *position.Position Variadic bool // if ... before variable IsReference bool // if & before variable @@ -32,6 +34,17 @@ func (n *Argument) GetPosition() *position.Position { return n.Position } +func (n *Argument) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Argument) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Argument) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/n_argument_list.go b/node/n_argument_list.go index f01d3a1..49de0cc 100644 --- a/node/n_argument_list.go +++ b/node/n_argument_list.go @@ -1,12 +1,14 @@ package node import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // ArgumentList node type ArgumentList struct { + Comments []*comment.Comment Position *position.Position Arguments []Node } @@ -28,6 +30,18 @@ func (n *ArgumentList) GetPosition() *position.Position { return n.Position } +func (n *ArgumentList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + + n.Comments = append(n.Comments, cc...) +} + +func (n *ArgumentList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ArgumentList) Attributes() map[string]interface{} { return nil diff --git a/node/n_identifier.go b/node/n_identifier.go index 3e0d829..5d3ad0a 100644 --- a/node/n_identifier.go +++ b/node/n_identifier.go @@ -1,12 +1,14 @@ package node import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Identifier node type Identifier struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *Identifier) GetPosition() *position.Position { return n.Position } +func (n *Identifier) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Identifier) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Identifier) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/n_nullable.go b/node/n_nullable.go index 3ebd4cc..5354efd 100644 --- a/node/n_nullable.go +++ b/node/n_nullable.go @@ -1,12 +1,14 @@ package node import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Nullable node type Nullable struct { + Comments []*comment.Comment Position *position.Position Expr Node } @@ -28,6 +30,17 @@ func (n *Nullable) GetPosition() *position.Position { return n.Position } +func (n *Nullable) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Nullable) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Nullable) Attributes() map[string]interface{} { return nil diff --git a/node/n_parameter.go b/node/n_parameter.go index 127d314..236690e 100644 --- a/node/n_parameter.go +++ b/node/n_parameter.go @@ -1,12 +1,14 @@ package node import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Parameter node type Parameter struct { + Comments []*comment.Comment Position *position.Position ByRef bool Variadic bool @@ -36,6 +38,17 @@ func (n *Parameter) GetPosition() *position.Position { return n.Position } +func (n *Parameter) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Parameter) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Parameter) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/n_root.go b/node/n_root.go index 58cf200..9f2ee53 100644 --- a/node/n_root.go +++ b/node/n_root.go @@ -1,12 +1,14 @@ package node import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Root node type Root struct { + Comments []*comment.Comment Position *position.Position Stmts []Node } @@ -28,6 +30,17 @@ func (n *Root) GetPosition() *position.Position { return n.Position } +func (n *Root) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Root) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Root) Attributes() map[string]interface{} { return nil diff --git a/node/name/n_fully_qualified.go b/node/name/n_fully_qualified.go index c921dfd..eb239bb 100644 --- a/node/name/n_fully_qualified.go +++ b/node/name/n_fully_qualified.go @@ -1,6 +1,7 @@ package name import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // FullyQualified node type FullyQualified struct { + Comments []*comment.Comment Position *position.Position Parts []node.Node } @@ -29,6 +31,17 @@ func (n *FullyQualified) GetPosition() *position.Position { return n.Position } +func (n *FullyQualified) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *FullyQualified) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *FullyQualified) Attributes() map[string]interface{} { return nil diff --git a/node/name/n_name.go b/node/name/n_name.go index bde31ed..d032b3c 100644 --- a/node/name/n_name.go +++ b/node/name/n_name.go @@ -1,6 +1,7 @@ package name import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Name node type Name struct { + Comments []*comment.Comment Position *position.Position Parts []node.Node } @@ -29,6 +31,17 @@ func (n *Name) GetPosition() *position.Position { return n.Position } +func (n *Name) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Name) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Name) Attributes() map[string]interface{} { return nil diff --git a/node/name/n_name_part.go b/node/name/n_name_part.go index 4ebc524..a331231 100644 --- a/node/name/n_name_part.go +++ b/node/name/n_name_part.go @@ -1,12 +1,14 @@ package name import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // NamePart node type NamePart struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *NamePart) GetPosition() *position.Position { return n.Position } +func (n *NamePart) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *NamePart) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *NamePart) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/name/n_relative.go b/node/name/n_relative.go index b4487e7..56230a1 100644 --- a/node/name/n_relative.go +++ b/node/name/n_relative.go @@ -1,6 +1,7 @@ package name import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Relative node type Relative struct { + Comments []*comment.Comment Position *position.Position Parts []node.Node } @@ -29,6 +31,17 @@ func (n *Relative) GetPosition() *position.Position { return n.Position } +func (n *Relative) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Relative) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Relative) Attributes() map[string]interface{} { return nil diff --git a/node/node.go b/node/node.go index 9ef1621..dd53b20 100644 --- a/node/node.go +++ b/node/node.go @@ -1,6 +1,7 @@ package node import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) @@ -11,4 +12,6 @@ type Node interface { Attributes() map[string]interface{} // Attributes returns node attributes as map SetPosition(p *position.Position) GetPosition() *position.Position + AddComments(c []*comment.Comment, t comment.TokenName) + GetComments() []*comment.Comment } diff --git a/node/scalar/node_dnumber.go b/node/scalar/node_dnumber.go index 8b2b6e6..fa65f0a 100644 --- a/node/scalar/node_dnumber.go +++ b/node/scalar/node_dnumber.go @@ -1,12 +1,14 @@ package scalar import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Dnumber node type Dnumber struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *Dnumber) GetPosition() *position.Position { return n.Position } +func (n *Dnumber) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Dnumber) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Dnumber) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/scalar/node_encapsed.go b/node/scalar/node_encapsed.go index e8bd5e7..98b312d 100644 --- a/node/scalar/node_encapsed.go +++ b/node/scalar/node_encapsed.go @@ -1,6 +1,7 @@ package scalar import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Encapsed node type Encapsed struct { + Comments []*comment.Comment Position *position.Position Parts []node.Node } @@ -29,6 +31,17 @@ func (n *Encapsed) GetPosition() *position.Position { return n.Position } +func (n *Encapsed) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Encapsed) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Encapsed) Attributes() map[string]interface{} { return nil diff --git a/node/scalar/node_encapsed_string_part.go b/node/scalar/node_encapsed_string_part.go index d1a12e3..71e596c 100644 --- a/node/scalar/node_encapsed_string_part.go +++ b/node/scalar/node_encapsed_string_part.go @@ -1,12 +1,14 @@ package scalar import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // EncapsedStringPart node type EncapsedStringPart struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *EncapsedStringPart) GetPosition() *position.Position { return n.Position } +func (n *EncapsedStringPart) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *EncapsedStringPart) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *EncapsedStringPart) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/scalar/node_heredoc.go b/node/scalar/node_heredoc.go index 7fd19c0..31f72f5 100644 --- a/node/scalar/node_heredoc.go +++ b/node/scalar/node_heredoc.go @@ -1,6 +1,7 @@ package scalar import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Heredoc node type Heredoc struct { + Comments []*comment.Comment Position *position.Position Label string Parts []node.Node @@ -31,6 +33,17 @@ func (n *Heredoc) GetPosition() *position.Position { return n.Position } +func (n *Heredoc) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Heredoc) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Heredoc) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/scalar/node_lnumber.go b/node/scalar/node_lnumber.go index 0d65f9a..198d9e2 100644 --- a/node/scalar/node_lnumber.go +++ b/node/scalar/node_lnumber.go @@ -1,12 +1,14 @@ package scalar import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Lnumber node type Lnumber struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *Lnumber) GetPosition() *position.Position { return n.Position } +func (n *Lnumber) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Lnumber) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Lnumber) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/scalar/node_magic_constant.go b/node/scalar/node_magic_constant.go index 5df0130..0f06f7b 100644 --- a/node/scalar/node_magic_constant.go +++ b/node/scalar/node_magic_constant.go @@ -1,12 +1,14 @@ package scalar import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // MagicConstant node type MagicConstant struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *MagicConstant) GetPosition() *position.Position { return n.Position } +func (n *MagicConstant) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *MagicConstant) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *MagicConstant) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/scalar/node_string.go b/node/scalar/node_string.go index 849881a..bbabf35 100644 --- a/node/scalar/node_string.go +++ b/node/scalar/node_string.go @@ -1,12 +1,14 @@ package scalar import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // String node type String struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *String) GetPosition() *position.Position { return n.Position } +func (n *String) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *String) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *String) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_alt_else.go b/node/stmt/n_alt_else.go index e02f86b..682a155 100644 --- a/node/stmt/n_alt_else.go +++ b/node/stmt/n_alt_else.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // AltElse node type AltElse struct { + Comments []*comment.Comment Position *position.Position Stmt node.Node } @@ -29,6 +31,17 @@ func (n *AltElse) GetPosition() *position.Position { return n.Position } +func (n *AltElse) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *AltElse) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *AltElse) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_alt_else_if.go b/node/stmt/n_alt_else_if.go index f6dd7ec..e2cb2dd 100644 --- a/node/stmt/n_alt_else_if.go +++ b/node/stmt/n_alt_else_if.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // AltElseIf node type AltElseIf struct { + Comments []*comment.Comment Position *position.Position Cond node.Node Stmt node.Node @@ -31,6 +33,17 @@ func (n *AltElseIf) GetPosition() *position.Position { return n.Position } +func (n *AltElseIf) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *AltElseIf) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *AltElseIf) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_alt_for.go b/node/stmt/n_alt_for.go index 39078d2..e4fa03f 100644 --- a/node/stmt/n_alt_for.go +++ b/node/stmt/n_alt_for.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // AltFor node type AltFor struct { + Comments []*comment.Comment Position *position.Position Init []node.Node Cond []node.Node @@ -35,6 +37,17 @@ func (n *AltFor) GetPosition() *position.Position { return n.Position } +func (n *AltFor) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *AltFor) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *AltFor) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_alt_foreach.go b/node/stmt/n_alt_foreach.go index 2e7cbe1..066fbc8 100644 --- a/node/stmt/n_alt_foreach.go +++ b/node/stmt/n_alt_foreach.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // AltForeach node type AltForeach struct { + Comments []*comment.Comment Position *position.Position Expr node.Node Key node.Node @@ -35,6 +37,17 @@ func (n *AltForeach) GetPosition() *position.Position { return n.Position } +func (n *AltForeach) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *AltForeach) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *AltForeach) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_alt_if.go b/node/stmt/n_alt_if.go index 63e3b76..17ce857 100644 --- a/node/stmt/n_alt_if.go +++ b/node/stmt/n_alt_if.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // AltIf node type AltIf struct { + Comments []*comment.Comment Position *position.Position Cond node.Node Stmt node.Node @@ -35,6 +37,17 @@ func (n *AltIf) GetPosition() *position.Position { return n.Position } +func (n *AltIf) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *AltIf) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *AltIf) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_alt_switch.go b/node/stmt/n_alt_switch.go index 3d93de3..8a5d6fe 100644 --- a/node/stmt/n_alt_switch.go +++ b/node/stmt/n_alt_switch.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // AltSwitch node type AltSwitch struct { + Comments []*comment.Comment Position *position.Position Cond node.Node CaseList *CaseList @@ -31,6 +33,17 @@ func (n *AltSwitch) GetPosition() *position.Position { return n.Position } +func (n *AltSwitch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *AltSwitch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *AltSwitch) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_alt_while.go b/node/stmt/n_alt_while.go index a17b45d..e68abcc 100644 --- a/node/stmt/n_alt_while.go +++ b/node/stmt/n_alt_while.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // AltWhile node type AltWhile struct { + Comments []*comment.Comment Position *position.Position Cond node.Node Stmt node.Node @@ -31,6 +33,17 @@ func (n *AltWhile) GetPosition() *position.Position { return n.Position } +func (n *AltWhile) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *AltWhile) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *AltWhile) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_break.go b/node/stmt/n_break.go index 06e49d8..3e037ec 100644 --- a/node/stmt/n_break.go +++ b/node/stmt/n_break.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Break node type Break struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Break) GetPosition() *position.Position { return n.Position } +func (n *Break) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Break) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Break) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_case.go b/node/stmt/n_case.go index 662136f..0da6917 100644 --- a/node/stmt/n_case.go +++ b/node/stmt/n_case.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Case node type Case struct { + Comments []*comment.Comment Position *position.Position Cond node.Node Stmts []node.Node @@ -31,6 +33,17 @@ func (n *Case) GetPosition() *position.Position { return n.Position } +func (n *Case) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Case) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Case) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_case_list.go b/node/stmt/n_case_list.go index 0fe6610..aa7ba24 100644 --- a/node/stmt/n_case_list.go +++ b/node/stmt/n_case_list.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // CaseList node type CaseList struct { + Comments []*comment.Comment Position *position.Position Cases []node.Node } @@ -29,6 +31,17 @@ func (n *CaseList) GetPosition() *position.Position { return n.Position } +func (n *CaseList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *CaseList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *CaseList) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_catch.go b/node/stmt/n_catch.go index 3cc5b0d..826f0a1 100644 --- a/node/stmt/n_catch.go +++ b/node/stmt/n_catch.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Catch node type Catch struct { + Comments []*comment.Comment Position *position.Position Types []node.Node Variable node.Node @@ -33,6 +35,17 @@ func (n *Catch) GetPosition() *position.Position { return n.Position } +func (n *Catch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Catch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Catch) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_class.go b/node/stmt/n_class.go index 0362c60..564cd8c 100644 --- a/node/stmt/n_class.go +++ b/node/stmt/n_class.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Class node type Class struct { + Comments []*comment.Comment Position *position.Position PhpDocComment string ClassName node.Node @@ -41,6 +43,17 @@ func (n *Class) GetPosition() *position.Position { return n.Position } +func (n *Class) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Class) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Class) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_class_const_list.go b/node/stmt/n_class_const_list.go index b27f804..240f271 100644 --- a/node/stmt/n_class_const_list.go +++ b/node/stmt/n_class_const_list.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ClassConstList node type ClassConstList struct { + Comments []*comment.Comment Position *position.Position Modifiers []node.Node Consts []node.Node @@ -31,6 +33,17 @@ func (n *ClassConstList) GetPosition() *position.Position { return n.Position } +func (n *ClassConstList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ClassConstList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ClassConstList) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_class_extends.go b/node/stmt/n_class_extends.go index 45dba61..b95dbd7 100644 --- a/node/stmt/n_class_extends.go +++ b/node/stmt/n_class_extends.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ClassExtends node type ClassExtends struct { + Comments []*comment.Comment Position *position.Position ClassName node.Node } @@ -29,6 +31,17 @@ func (n *ClassExtends) GetPosition() *position.Position { return n.Position } +func (n *ClassExtends) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ClassExtends) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ClassExtends) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_class_implements.go b/node/stmt/n_class_implements.go index 720a345..f8f823f 100644 --- a/node/stmt/n_class_implements.go +++ b/node/stmt/n_class_implements.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ClassImplements node type ClassImplements struct { + Comments []*comment.Comment Position *position.Position InterfaceNames []node.Node } @@ -29,6 +31,17 @@ func (n *ClassImplements) GetPosition() *position.Position { return n.Position } +func (n *ClassImplements) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ClassImplements) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ClassImplements) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_class_method.go b/node/stmt/n_class_method.go index 38edf23..599e1e8 100644 --- a/node/stmt/n_class_method.go +++ b/node/stmt/n_class_method.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ClassMethod node type ClassMethod struct { + Comments []*comment.Comment Position *position.Position ReturnsRef bool PhpDocComment string @@ -41,6 +43,17 @@ func (n *ClassMethod) GetPosition() *position.Position { return n.Position } +func (n *ClassMethod) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ClassMethod) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ClassMethod) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_const_list.go b/node/stmt/n_const_list.go index e01ee76..65d758d 100644 --- a/node/stmt/n_const_list.go +++ b/node/stmt/n_const_list.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ConstList node type ConstList struct { + Comments []*comment.Comment Position *position.Position Consts []node.Node } @@ -29,6 +31,17 @@ func (n *ConstList) GetPosition() *position.Position { return n.Position } +func (n *ConstList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ConstList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ConstList) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_constant.go b/node/stmt/n_constant.go index c84a396..8a7dd43 100644 --- a/node/stmt/n_constant.go +++ b/node/stmt/n_constant.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Constant node type Constant struct { + Comments []*comment.Comment Position *position.Position PhpDocComment string ConstantName node.Node @@ -33,6 +35,17 @@ func (n *Constant) GetPosition() *position.Position { return n.Position } +func (n *Constant) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Constant) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Constant) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_continue.go b/node/stmt/n_continue.go index aaf1cec..c553b4c 100644 --- a/node/stmt/n_continue.go +++ b/node/stmt/n_continue.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Continue node type Continue struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Continue) GetPosition() *position.Position { return n.Position } +func (n *Continue) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Continue) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Continue) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_declare.go b/node/stmt/n_declare.go index 7cb7c91..1b71c9c 100644 --- a/node/stmt/n_declare.go +++ b/node/stmt/n_declare.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Declare node type Declare struct { + Comments []*comment.Comment Position *position.Position Consts []node.Node Stmt node.Node @@ -31,6 +33,17 @@ func (n *Declare) GetPosition() *position.Position { return n.Position } +func (n *Declare) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Declare) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Declare) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_default.go b/node/stmt/n_default.go index b5403e4..8c34e50 100644 --- a/node/stmt/n_default.go +++ b/node/stmt/n_default.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Default node type Default struct { + Comments []*comment.Comment Position *position.Position Stmts []node.Node } @@ -29,6 +31,17 @@ func (n *Default) GetPosition() *position.Position { return n.Position } +func (n *Default) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Default) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Default) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_do.go b/node/stmt/n_do.go index 845ab04..4786d07 100644 --- a/node/stmt/n_do.go +++ b/node/stmt/n_do.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Do node type Do struct { + Comments []*comment.Comment Position *position.Position Stmt node.Node Cond node.Node @@ -31,6 +33,17 @@ func (n *Do) GetPosition() *position.Position { return n.Position } +func (n *Do) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Do) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Do) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_echo.go b/node/stmt/n_echo.go index 24f1b2e..5e61660 100644 --- a/node/stmt/n_echo.go +++ b/node/stmt/n_echo.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Echo node type Echo struct { + Comments []*comment.Comment Position *position.Position Exprs []node.Node } @@ -29,6 +31,17 @@ func (n *Echo) GetPosition() *position.Position { return n.Position } +func (n *Echo) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Echo) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Echo) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_else.go b/node/stmt/n_else.go index e493a85..d97438a 100644 --- a/node/stmt/n_else.go +++ b/node/stmt/n_else.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Else node type Else struct { + Comments []*comment.Comment Position *position.Position Stmt node.Node } @@ -29,6 +31,17 @@ func (n *Else) GetPosition() *position.Position { return n.Position } +func (n *Else) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Else) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Else) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_else_if.go b/node/stmt/n_else_if.go index 321f253..06b6dbc 100644 --- a/node/stmt/n_else_if.go +++ b/node/stmt/n_else_if.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // ElseIf node type ElseIf struct { + Comments []*comment.Comment Position *position.Position Cond node.Node Stmt node.Node @@ -31,6 +33,17 @@ func (n *ElseIf) GetPosition() *position.Position { return n.Position } +func (n *ElseIf) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *ElseIf) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *ElseIf) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_expression.go b/node/stmt/n_expression.go index 1c8d127..87d3fbd 100644 --- a/node/stmt/n_expression.go +++ b/node/stmt/n_expression.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Expression node type Expression struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Expression) GetPosition() *position.Position { return n.Position } +func (n *Expression) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Expression) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Expression) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_finally.go b/node/stmt/n_finally.go index 588098c..333e0fe 100644 --- a/node/stmt/n_finally.go +++ b/node/stmt/n_finally.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Finally node type Finally struct { + Comments []*comment.Comment Position *position.Position Stmts []node.Node } @@ -29,6 +31,17 @@ func (n *Finally) GetPosition() *position.Position { return n.Position } +func (n *Finally) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Finally) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Finally) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_for.go b/node/stmt/n_for.go index 940ba28..b4f8477 100644 --- a/node/stmt/n_for.go +++ b/node/stmt/n_for.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // For node type For struct { + Comments []*comment.Comment Position *position.Position Init []node.Node Cond []node.Node @@ -35,6 +37,17 @@ func (n *For) GetPosition() *position.Position { return n.Position } +func (n *For) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *For) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *For) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_foreach.go b/node/stmt/n_foreach.go index 6410784..acea5f0 100644 --- a/node/stmt/n_foreach.go +++ b/node/stmt/n_foreach.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Foreach node type Foreach struct { + Comments []*comment.Comment Position *position.Position Expr node.Node Key node.Node @@ -35,6 +37,17 @@ func (n *Foreach) GetPosition() *position.Position { return n.Position } +func (n *Foreach) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Foreach) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Foreach) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_function.go b/node/stmt/n_function.go index f9984a8..eb62219 100644 --- a/node/stmt/n_function.go +++ b/node/stmt/n_function.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Function node type Function struct { + Comments []*comment.Comment Position *position.Position ReturnsRef bool PhpDocComment string @@ -39,6 +41,17 @@ func (n *Function) GetPosition() *position.Position { return n.Position } +func (n *Function) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Function) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Function) Attributes() map[string]interface{} { // return n.attributes diff --git a/node/stmt/n_global.go b/node/stmt/n_global.go index d82c6a6..51c8deb 100644 --- a/node/stmt/n_global.go +++ b/node/stmt/n_global.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Global node type Global struct { + Comments []*comment.Comment Position *position.Position Vars []node.Node } @@ -29,6 +31,17 @@ func (n *Global) GetPosition() *position.Position { return n.Position } +func (n *Global) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Global) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Global) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_goto.go b/node/stmt/n_goto.go index df33bc1..f5d12ad 100644 --- a/node/stmt/n_goto.go +++ b/node/stmt/n_goto.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Goto node type Goto struct { + Comments []*comment.Comment Position *position.Position Label node.Node } @@ -29,6 +31,17 @@ func (n *Goto) GetPosition() *position.Position { return n.Position } +func (n *Goto) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Goto) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Goto) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_group_use.go b/node/stmt/n_group_use.go index 361ec67..e3f5946 100644 --- a/node/stmt/n_group_use.go +++ b/node/stmt/n_group_use.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // GroupUse node type GroupUse struct { + Comments []*comment.Comment Position *position.Position UseType node.Node Prefix node.Node @@ -33,6 +35,17 @@ func (n *GroupUse) GetPosition() *position.Position { return n.Position } +func (n *GroupUse) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *GroupUse) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *GroupUse) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_halt_compiler.go b/node/stmt/n_halt_compiler.go index f1d6395..3b4e856 100644 --- a/node/stmt/n_halt_compiler.go +++ b/node/stmt/n_halt_compiler.go @@ -1,12 +1,14 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // HaltCompiler node type HaltCompiler struct { + Comments []*comment.Comment Position *position.Position } @@ -25,6 +27,17 @@ func (n *HaltCompiler) GetPosition() *position.Position { return n.Position } +func (n *HaltCompiler) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *HaltCompiler) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *HaltCompiler) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_if.go b/node/stmt/n_if.go index 5b14608..eb39917 100644 --- a/node/stmt/n_if.go +++ b/node/stmt/n_if.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // If node type If struct { + Comments []*comment.Comment Position *position.Position Cond node.Node Stmt node.Node @@ -35,6 +37,17 @@ func (n *If) GetPosition() *position.Position { return n.Position } +func (n *If) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *If) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *If) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_inline_html.go b/node/stmt/n_inline_html.go index cf3b467..d16f45d 100644 --- a/node/stmt/n_inline_html.go +++ b/node/stmt/n_inline_html.go @@ -1,12 +1,14 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // InlineHtml node type InlineHtml struct { + Comments []*comment.Comment Position *position.Position Value string } @@ -28,6 +30,17 @@ func (n *InlineHtml) GetPosition() *position.Position { return n.Position } +func (n *InlineHtml) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *InlineHtml) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *InlineHtml) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_interface.go b/node/stmt/n_interface.go index 7d9029a..0a5d0fc 100644 --- a/node/stmt/n_interface.go +++ b/node/stmt/n_interface.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Interface node type Interface struct { + Comments []*comment.Comment Position *position.Position PhpDocComment string InterfaceName node.Node @@ -35,6 +37,17 @@ func (n *Interface) GetPosition() *position.Position { return n.Position } +func (n *Interface) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Interface) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Interface) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_interface_extends.go b/node/stmt/n_interface_extends.go index 3bab9ae..7422a67 100644 --- a/node/stmt/n_interface_extends.go +++ b/node/stmt/n_interface_extends.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // InterfaceExtends node type InterfaceExtends struct { + Comments []*comment.Comment Position *position.Position InterfaceNames []node.Node } @@ -29,6 +31,17 @@ func (n *InterfaceExtends) GetPosition() *position.Position { return n.Position } +func (n *InterfaceExtends) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *InterfaceExtends) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *InterfaceExtends) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_label.go b/node/stmt/n_label.go index 76b6daa..d337797 100644 --- a/node/stmt/n_label.go +++ b/node/stmt/n_label.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Label node type Label struct { + Comments []*comment.Comment Position *position.Position LabelName node.Node } @@ -29,6 +31,17 @@ func (n *Label) GetPosition() *position.Position { return n.Position } +func (n *Label) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Label) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Label) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_namespace.go b/node/stmt/n_namespace.go index 2e643b4..96b4fea 100644 --- a/node/stmt/n_namespace.go +++ b/node/stmt/n_namespace.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Namespace node type Namespace struct { + Comments []*comment.Comment Position *position.Position NamespaceName node.Node Stmts []node.Node @@ -31,6 +33,17 @@ func (n *Namespace) GetPosition() *position.Position { return n.Position } +func (n *Namespace) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Namespace) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Namespace) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_nop.go b/node/stmt/n_nop.go index 26e460c..e5d92dd 100644 --- a/node/stmt/n_nop.go +++ b/node/stmt/n_nop.go @@ -1,12 +1,14 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Nop node type Nop struct { + Comments []*comment.Comment Position *position.Position } @@ -25,6 +27,17 @@ func (n *Nop) GetPosition() *position.Position { return n.Position } +func (n *Nop) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Nop) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Nop) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_property.go b/node/stmt/n_property.go index 9693e67..0e02bcc 100644 --- a/node/stmt/n_property.go +++ b/node/stmt/n_property.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Property node type Property struct { + Comments []*comment.Comment Position *position.Position PhpDocComment string Variable node.Node @@ -33,6 +35,17 @@ func (n *Property) GetPosition() *position.Position { return n.Position } +func (n *Property) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Property) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Property) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_property_list.go b/node/stmt/n_property_list.go index 8710d0c..ba2af4b 100644 --- a/node/stmt/n_property_list.go +++ b/node/stmt/n_property_list.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // PropertyList node type PropertyList struct { + Comments []*comment.Comment Position *position.Position Modifiers []node.Node Properties []node.Node @@ -31,6 +33,17 @@ func (n *PropertyList) GetPosition() *position.Position { return n.Position } +func (n *PropertyList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *PropertyList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *PropertyList) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_return.go b/node/stmt/n_return.go index 92b3273..5b5fe1e 100644 --- a/node/stmt/n_return.go +++ b/node/stmt/n_return.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Return node type Return struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Return) GetPosition() *position.Position { return n.Position } +func (n *Return) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Return) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Return) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_static.go b/node/stmt/n_static.go index e4bc183..717bfd3 100644 --- a/node/stmt/n_static.go +++ b/node/stmt/n_static.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Static node type Static struct { + Comments []*comment.Comment Position *position.Position Vars []node.Node } @@ -29,6 +31,17 @@ func (n *Static) GetPosition() *position.Position { return n.Position } +func (n *Static) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Static) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Static) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_static_var.go b/node/stmt/n_static_var.go index 5dda91e..6ee8ef6 100644 --- a/node/stmt/n_static_var.go +++ b/node/stmt/n_static_var.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // StaticVar node type StaticVar struct { + Comments []*comment.Comment Position *position.Position Variable node.Node Expr node.Node @@ -31,6 +33,17 @@ func (n *StaticVar) GetPosition() *position.Position { return n.Position } +func (n *StaticVar) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *StaticVar) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *StaticVar) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_stmt_list.go b/node/stmt/n_stmt_list.go index 3b012e0..ae3e699 100644 --- a/node/stmt/n_stmt_list.go +++ b/node/stmt/n_stmt_list.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // StmtList node type StmtList struct { + Comments []*comment.Comment Position *position.Position Stmts []node.Node } @@ -29,6 +31,17 @@ func (n *StmtList) GetPosition() *position.Position { return n.Position } +func (n *StmtList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *StmtList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *StmtList) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_switch.go b/node/stmt/n_switch.go index e4e9f7e..c8ff240 100644 --- a/node/stmt/n_switch.go +++ b/node/stmt/n_switch.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Switch node type Switch struct { + Comments []*comment.Comment Position *position.Position Cond node.Node CaseList *CaseList @@ -31,6 +33,17 @@ func (n *Switch) GetPosition() *position.Position { return n.Position } +func (n *Switch) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Switch) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Switch) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_throw.go b/node/stmt/n_throw.go index 7788ac5..aa4caef 100644 --- a/node/stmt/n_throw.go +++ b/node/stmt/n_throw.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Throw node type Throw struct { + Comments []*comment.Comment Position *position.Position Expr node.Node } @@ -29,6 +31,17 @@ func (n *Throw) GetPosition() *position.Position { return n.Position } +func (n *Throw) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Throw) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Throw) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_trait.go b/node/stmt/n_trait.go index a3531e6..8c8a3cd 100644 --- a/node/stmt/n_trait.go +++ b/node/stmt/n_trait.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Trait node type Trait struct { + Comments []*comment.Comment Position *position.Position PhpDocComment string TraitName node.Node @@ -33,6 +35,17 @@ func (n *Trait) GetPosition() *position.Position { return n.Position } +func (n *Trait) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Trait) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Trait) Attributes() map[string]interface{} { return map[string]interface{}{ diff --git a/node/stmt/n_trait_adaptation_list.go b/node/stmt/n_trait_adaptation_list.go index 427781e..80d6902 100644 --- a/node/stmt/n_trait_adaptation_list.go +++ b/node/stmt/n_trait_adaptation_list.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // TraitAdaptationList node type TraitAdaptationList struct { + Comments []*comment.Comment Position *position.Position Adaptations []node.Node } @@ -29,6 +31,17 @@ func (n *TraitAdaptationList) GetPosition() *position.Position { return n.Position } +func (n *TraitAdaptationList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *TraitAdaptationList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *TraitAdaptationList) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_trait_method_ref.go b/node/stmt/n_trait_method_ref.go index 9557883..9f7cd1f 100644 --- a/node/stmt/n_trait_method_ref.go +++ b/node/stmt/n_trait_method_ref.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // TraitMethodRef node type TraitMethodRef struct { + Comments []*comment.Comment Position *position.Position Trait node.Node Method node.Node @@ -31,6 +33,17 @@ func (n *TraitMethodRef) GetPosition() *position.Position { return n.Position } +func (n *TraitMethodRef) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *TraitMethodRef) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *TraitMethodRef) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_trait_use.go b/node/stmt/n_trait_use.go index 2091c8e..1c5b49a 100644 --- a/node/stmt/n_trait_use.go +++ b/node/stmt/n_trait_use.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // TraitUse node type TraitUse struct { + Comments []*comment.Comment Position *position.Position Traits []node.Node TraitAdaptationList *TraitAdaptationList @@ -31,6 +33,17 @@ func (n *TraitUse) GetPosition() *position.Position { return n.Position } +func (n *TraitUse) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *TraitUse) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *TraitUse) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_trait_use_alias.go b/node/stmt/n_trait_use_alias.go index 76f4ec2..32c311b 100644 --- a/node/stmt/n_trait_use_alias.go +++ b/node/stmt/n_trait_use_alias.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // TraitUseAlias node type TraitUseAlias struct { + Comments []*comment.Comment Position *position.Position Ref node.Node Modifier node.Node @@ -33,6 +35,17 @@ func (n *TraitUseAlias) GetPosition() *position.Position { return n.Position } +func (n *TraitUseAlias) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *TraitUseAlias) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *TraitUseAlias) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_trait_use_precedence.go b/node/stmt/n_trait_use_precedence.go index 567711e..24f388c 100644 --- a/node/stmt/n_trait_use_precedence.go +++ b/node/stmt/n_trait_use_precedence.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // TraitUsePrecedence node type TraitUsePrecedence struct { + Comments []*comment.Comment Position *position.Position Ref node.Node Insteadof []node.Node @@ -31,6 +33,17 @@ func (n *TraitUsePrecedence) GetPosition() *position.Position { return n.Position } +func (n *TraitUsePrecedence) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *TraitUsePrecedence) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *TraitUsePrecedence) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_try.go b/node/stmt/n_try.go index 08eb36f..865f6d4 100644 --- a/node/stmt/n_try.go +++ b/node/stmt/n_try.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Try node type Try struct { + Comments []*comment.Comment Position *position.Position Stmts []node.Node Catches []node.Node @@ -33,6 +35,17 @@ func (n *Try) GetPosition() *position.Position { return n.Position } +func (n *Try) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Try) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Try) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_unset.go b/node/stmt/n_unset.go index 995b123..d7480a2 100644 --- a/node/stmt/n_unset.go +++ b/node/stmt/n_unset.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Unset node type Unset struct { + Comments []*comment.Comment Position *position.Position Vars []node.Node } @@ -29,6 +31,17 @@ func (n *Unset) GetPosition() *position.Position { return n.Position } +func (n *Unset) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Unset) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Unset) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_use.go b/node/stmt/n_use.go index e484ca0..fd46664 100644 --- a/node/stmt/n_use.go +++ b/node/stmt/n_use.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // Use node type Use struct { + Comments []*comment.Comment Position *position.Position UseType node.Node Use node.Node @@ -33,6 +35,17 @@ func (n *Use) GetPosition() *position.Position { return n.Position } +func (n *Use) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *Use) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *Use) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_use_list.go b/node/stmt/n_use_list.go index 34cb005..6dbf295 100644 --- a/node/stmt/n_use_list.go +++ b/node/stmt/n_use_list.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // UseList node type UseList struct { + Comments []*comment.Comment Position *position.Position UseType node.Node Uses []node.Node @@ -31,6 +33,17 @@ func (n *UseList) GetPosition() *position.Position { return n.Position } +func (n *UseList) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *UseList) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *UseList) Attributes() map[string]interface{} { return nil diff --git a/node/stmt/n_while.go b/node/stmt/n_while.go index efd1131..2252928 100644 --- a/node/stmt/n_while.go +++ b/node/stmt/n_while.go @@ -1,6 +1,7 @@ package stmt import ( + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -8,6 +9,7 @@ import ( // While node type While struct { + Comments []*comment.Comment Position *position.Position Cond node.Node Stmt node.Node @@ -31,6 +33,17 @@ func (n *While) GetPosition() *position.Position { return n.Position } +func (n *While) AddComments(cc []*comment.Comment, tn comment.TokenName) { + for _, c := range cc { + c.SetTokenName(tn) + } + n.Comments = append(n.Comments, cc...) +} + +func (n *While) GetComments() []*comment.Comment { + return n.Comments +} + // Attributes returns node attributes as map func (n *While) Attributes() map[string]interface{} { return nil diff --git a/node/t_node_test.go b/node/t_node_test.go index 8f66023..374dc6a 100644 --- a/node/t_node_test.go +++ b/node/t_node_test.go @@ -5,6 +5,7 @@ import ( "reflect" "testing" + "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node/name" "github.com/z7zmey/php-parser/position" @@ -148,8 +149,8 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 11, EndPos: 12, }, - IsReference: false, Variadic: false, + IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 2, @@ -351,8 +352,8 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 54, EndPos: 55, }, - Variadic: false, IsReference: false, + Variadic: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 4, @@ -486,8 +487,8 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 81, EndPos: 85, }, - IsReference: false, Variadic: true, + IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 5, @@ -565,8 +566,8 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 101, EndPos: 102, }, - IsReference: false, Variadic: false, + IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 6, @@ -729,6 +730,18 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 162, EndPos: 185, }, + Comments: []*comment.Comment{ + { + Position: &position.Position{ + StartLine: 8, + EndLine: 8, + StartPos: 137, + EndPos: 158, + }, + Value: "/** anonymous class */", + TokenName: 'O', + }, + }, Class: &stmt.Class{ Position: &position.Position{ StartLine: 9, diff --git a/php5/php5.go b/php5/php5.go index 2c5bfad..87693f8 100644 --- a/php5/php5.go +++ b/php5/php5.go @@ -346,8 +346,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line php5/php5.y:6783 - +//line php5/php5.y:6785 type simpleIndirectReference struct { all []*expr.Variable last *expr.Variable @@ -2362,7 +2361,7 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(namePart, yyDollar[1].token, comment.StringToken) + namePart.AddComments(yyDollar[1].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2377,8 +2376,8 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(namePart, yyDollar[3].token, comment.StringToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + namePart.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2425,10 +2424,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.HaltCompilerToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2444,8 +2443,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2461,9 +2460,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2477,9 +2476,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2493,8 +2492,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2510,9 +2509,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(useType, yyDollar[2].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + useType.AddComments(yyDollar[2].token.Comments, comment.UseToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2528,9 +2527,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(useType, yyDollar[2].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + useType.AddComments(yyDollar[2].token.Comments, comment.UseToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2544,7 +2543,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2555,7 +2554,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2594,8 +2593,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[3].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2611,7 +2610,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition(yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2629,9 +2628,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AsToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2642,7 +2641,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2681,8 +2680,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[3].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2698,7 +2697,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition(yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2716,9 +2715,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AsToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2729,7 +2728,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2768,8 +2767,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[3].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2785,7 +2784,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition(yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2803,9 +2802,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AsToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2825,9 +2824,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, constList.Consts)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(constList.Consts), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[3].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, yyDollar[4].token, comment.EqualToken) + lastNode(constList.Consts).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + name.AddComments(yyDollar[3].token.Comments, comment.StringToken) + constant.AddComments(yyDollar[4].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2846,9 +2845,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, constList)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, yyDollar[3].token, comment.EqualToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringToken) + constant.AddComments(yyDollar[3].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2913,10 +2912,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.HaltCompilerToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2940,8 +2939,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(label, yyDollar[1].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ColonToken) + label.AddComments(yyDollar[1].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2955,8 +2954,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2976,7 +2975,7 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IfToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IfToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2992,10 +2991,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IfToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.EndifToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IfToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.EndifToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3016,7 +3015,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.WhileToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.WhileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3030,9 +3029,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DoToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.WhileToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.WhileToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3057,11 +3056,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ForToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.ForInitSemicolonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.ForCondSemicolonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ForToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ForInitSemicolonToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.ForCondSemicolonToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3084,7 +3083,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SwitchToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SwitchToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3098,8 +3097,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.BreakToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BreakToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3113,8 +3112,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.BreakToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BreakToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3128,8 +3127,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ContinueToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ContinueToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3143,8 +3142,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ContinueToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ContinueToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3158,8 +3157,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3173,8 +3172,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3188,8 +3187,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3203,7 +3202,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3217,8 +3216,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.GlobalToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.GlobalToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3232,8 +3231,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3247,8 +3246,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EchoToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EchoToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3262,7 +3261,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.InlineHTMLToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.InlineHTMLToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3276,7 +3275,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3290,10 +3289,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UnsetToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UnsetToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3329,10 +3328,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[8].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ForeachToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.AsToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3368,10 +3367,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[8].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ForeachToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.AsToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3385,9 +3384,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DeclareToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DeclareToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3401,7 +3400,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3419,9 +3418,9 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TryToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TryToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3435,8 +3434,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ThrowToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ThrowToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3452,9 +3451,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.GotoToken) - yylex.(*Parser).comments.AddFromToken(label, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.GotoToken) + label.AddComments(yyDollar[2].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3481,12 +3480,12 @@ yydefault: catch.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[1].token, comment.CatchToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[4].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[5].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[6].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[8].token, comment.CloseCurlyBracesToken) + catch.AddComments(yyDollar[1].token.Comments, comment.CatchToken) + catch.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + variable.AddComments(yyDollar[4].token.Comments, comment.StringToken) + catch.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) + catch.AddComments(yyDollar[6].token.Comments, comment.OpenCurlyBracesToken) + catch.AddComments(yyDollar[8].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3508,9 +3507,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FinallyToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinallyToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3560,12 +3559,12 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.CatchToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[4].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CatchToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + variable.AddComments(yyDollar[4].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3584,7 +3583,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3648,15 +3647,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[9].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, yyDollar[3].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[9].token, comment.CloseCurlyBracesToken) + name.AddComments(yyDollar[3].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[9].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3684,9 +3683,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[7].token)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseCurlyBracesToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3702,9 +3701,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseCurlyBracesToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3718,7 +3717,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ClassToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3734,8 +3733,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(classModifier, yyDollar[1].token, comment.AbstractToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ClassToken) + classModifier.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3749,7 +3748,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TraitToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TraitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3765,8 +3764,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(classModifier, yyDollar[1].token, comment.FinalToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ClassToken) + classModifier.AddComments(yyDollar[1].token.Comments, comment.FinalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3788,7 +3787,7 @@ yydefault: yyVAL.ClassExtends.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.ClassExtends, yyDollar[1].token, comment.ExtendsToken) + yyVAL.ClassExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3816,7 +3815,7 @@ yydefault: yyVAL.InterfaceExtends.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.InterfaceExtends, yyDollar[1].token, comment.ExtendsToken) + yyVAL.InterfaceExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3838,7 +3837,7 @@ yydefault: yyVAL.ClassImplements.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.ClassImplements, yyDollar[1].token, comment.ImplementsToken) + yyVAL.ClassImplements.AddComments(yyDollar[1].token.Comments, comment.ImplementsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3857,7 +3856,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3876,7 +3875,7 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DoubleArrowToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3898,7 +3897,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3912,9 +3911,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ListToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3941,9 +3940,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EndforToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EndforToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3970,9 +3969,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EndforeachToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EndforeachToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3994,9 +3993,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EnddeclareToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EnddeclareToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4013,8 +4012,8 @@ yydefault: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[1].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, yyDollar[2].token, comment.EqualToken) + name.AddComments(yyDollar[1].token.Comments, comment.StringToken) + constant.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4031,9 +4030,9 @@ yydefault: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[3].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, yyDollar[4].token, comment.EqualToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + name.AddComments(yyDollar[3].token.Comments, comment.StringToken) + constant.AddComments(yyDollar[4].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4049,8 +4048,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[3].token, comment.CloseCurlyBracesToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4066,9 +4065,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[2].token, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[4].token, comment.CloseCurlyBracesToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + caseList.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4084,9 +4083,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[3].token, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + caseList.AddComments(yyDollar[3].token.Comments, comment.EndswitchToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4103,10 +4102,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[2].token, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[4].token, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.SemiColonToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + caseList.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + caseList.AddComments(yyDollar[4].token.Comments, comment.EndswitchToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4129,8 +4128,8 @@ yydefault: _case.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) // save comments - yylex.(*Parser).comments.AddFromToken(_case, yyDollar[2].token, comment.CaseToken) - yylex.(*Parser).comments.AddFromToken(_case, yyDollar[4].token, comment.CaseSeparatorToken) + _case.AddComments(yyDollar[2].token.Comments, comment.CaseToken) + _case.AddComments(yyDollar[4].token.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4145,8 +4144,8 @@ yydefault: _default.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[4].list)) // save comments - yylex.(*Parser).comments.AddFromToken(_default, yyDollar[2].token, comment.DefaultToken) - yylex.(*Parser).comments.AddFromToken(_default, yyDollar[3].token, comment.CaseSeparatorToken) + _default.AddComments(yyDollar[2].token.Comments, comment.DefaultToken) + _default.AddComments(yyDollar[3].token.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4185,9 +4184,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EndwhileToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EndwhileToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4210,7 +4209,7 @@ yydefault: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[2].token, comment.ElseifToken) + _elseIf.AddComments(yyDollar[2].token.Comments, comment.ElseifToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4235,8 +4234,8 @@ yydefault: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[2].token, comment.ElseifToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[4].token, comment.ColonToken) + _elseIf.AddComments(yyDollar[2].token.Comments, comment.ElseifToken) + _elseIf.AddComments(yyDollar[4].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4258,7 +4257,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ElseToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ElseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4282,8 +4281,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ElseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ElseToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4318,7 +4317,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4345,12 +4344,12 @@ yydefault: // save comments if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EllipsisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[4].token, comment.VariableToken) + variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4377,13 +4376,13 @@ yydefault: // save comments if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EllipsisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[4].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.EqualToken) + variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4405,7 +4404,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ArrayToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4419,7 +4418,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.CallableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4441,8 +4440,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4456,8 +4455,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4473,8 +4472,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4493,7 +4492,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4529,7 +4528,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4543,7 +4542,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EllipsisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4554,7 +4553,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4578,7 +4577,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4592,7 +4591,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4606,9 +4605,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4627,8 +4626,8 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[3].token, comment.VariableToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4647,9 +4646,9 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[3].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(staticVar, yyDollar[4].token, comment.EqualToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) + staticVar.AddComments(yyDollar[4].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4668,7 +4667,7 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4687,8 +4686,8 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(staticVar, yyDollar[2].token, comment.EqualToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + staticVar.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4718,7 +4717,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4732,7 +4731,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4760,13 +4759,13 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, yyDollar[4].token, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseParenthesisToken) + name.AddComments(yyDollar[4].token.Comments, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4787,7 +4786,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4806,7 +4805,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4819,7 +4818,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4832,8 +4831,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4876,7 +4875,7 @@ yydefault: yyVAL.node = yyDollar[1].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4887,7 +4886,7 @@ yydefault: yyVAL.node = yyDollar[1].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4901,7 +4900,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, yyDollar[3].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.InsteadofToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4920,7 +4919,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4936,7 +4935,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[1].token, comment.IdentifierToken) + name.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4960,8 +4959,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, yyDollar[3].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4977,8 +4976,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[4].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[4].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4992,7 +4991,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5022,7 +5021,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5036,8 +5035,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5060,7 +5059,7 @@ yydefault: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(modifier, yyDollar[1].token, comment.VarToken) + modifier.AddComments(yyDollar[1].token.Comments, comment.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5106,7 +5105,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PublicToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5120,7 +5119,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ProtectedToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5134,7 +5133,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PrivateToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5148,7 +5147,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5162,7 +5161,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AbstractToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5176,7 +5175,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FinalToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5195,8 +5194,8 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[3].token, comment.VariableToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5215,9 +5214,9 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[3].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(property, yyDollar[4].token, comment.EqualToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) + property.AddComments(yyDollar[4].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5236,7 +5235,7 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5255,8 +5254,8 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(property, yyDollar[2].token, comment.EqualToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + property.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5276,9 +5275,9 @@ yydefault: yyDollar[1].node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(constList.Consts), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[3].token, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken(constant, yyDollar[4].token, comment.EqualToken) + lastNode(constList.Consts).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + name.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) + constant.AddComments(yyDollar[4].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5296,9 +5295,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken(constant, yyDollar[3].token, comment.EqualToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstToken) + name.AddComments(yyDollar[2].token.Comments, comment.IdentifierToken) + constant.AddComments(yyDollar[3].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5309,7 +5308,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5344,7 +5343,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5383,8 +5382,8 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[4].token, comment.CloseSquareBracket) + fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5399,8 +5398,8 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[1].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[3].token, comment.CloseSquareBracket) + fetch.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) + fetch.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5458,7 +5457,7 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NewToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5474,10 +5473,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) // save comments - yylex.(*Parser).comments.AddFromToken(list, yyDollar[1].token, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[4].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.EqualToken) + list.AddComments(yyDollar[1].token.Comments, comment.ListToken) + list.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + list.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5491,7 +5490,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5505,8 +5504,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5532,9 +5531,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, _new)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AmpersandToken) - yylex.(*Parser).comments.AddFromToken(_new, yyDollar[4].token, comment.NewToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + _new.AddComments(yyDollar[4].token.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5548,7 +5547,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.CloneToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5562,7 +5561,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PlusEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5576,7 +5575,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.MinusEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5590,7 +5589,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.MulEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5604,7 +5603,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PowEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5618,7 +5617,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DivEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5632,7 +5631,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ConcatEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5646,7 +5645,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ModEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5660,7 +5659,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AndEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5674,7 +5673,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5688,7 +5687,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.XorEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5702,7 +5701,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5716,7 +5715,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5730,7 +5729,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IncToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5744,7 +5743,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IncToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5758,7 +5757,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DecToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5772,7 +5771,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DecToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5786,7 +5785,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.BooleanOrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5800,7 +5799,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.BooleanAndToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5814,7 +5813,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalOrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5828,7 +5827,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalAndToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5842,7 +5841,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalXorToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5856,7 +5855,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.VerticalBarToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5870,7 +5869,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5884,7 +5883,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CaretToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5898,7 +5897,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DotToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5912,7 +5911,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PlusToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5926,7 +5925,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.MinusToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5940,7 +5939,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsteriskToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5954,7 +5953,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PowToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5968,7 +5967,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlashToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5982,7 +5981,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PercentToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5996,7 +5995,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6010,7 +6009,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6024,7 +6023,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PlusToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6038,7 +6037,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.MinusToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6052,7 +6051,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ExclamationMarkToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6066,7 +6065,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TildeToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6080,7 +6079,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsIdenticalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6094,7 +6093,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsNotIdenticalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6108,7 +6107,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6122,7 +6121,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsNotEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6136,7 +6135,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LessToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6150,7 +6149,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsSmallerOrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6164,7 +6163,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.GreaterToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6178,7 +6177,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsGreaterOrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6192,7 +6191,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.InstanceofToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6238,8 +6237,8 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6253,8 +6252,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6268,8 +6267,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6291,7 +6290,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IntCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6305,7 +6304,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DoubleCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6319,7 +6318,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StringCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6333,7 +6332,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ArrayCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6347,7 +6346,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ObjectCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6361,7 +6360,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.BoolCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6375,7 +6374,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UnsetCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6398,12 +6397,14 @@ yydefault: // save position if yyDollar[2].node == nil { yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) + } else if yylex.(*Parser).currentToken.Value == ")" { + yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yylex.(*Parser).currentToken)) } else { yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ExitToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExitToken) if yyDollar[2].node != nil { yylex.(*Parser).comments.AddFromChildNode(yyVAL.node, yyDollar[2].node) @@ -6413,7 +6414,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4061 + //line php5/php5.y:4063 { yyVAL.node = expr.NewErrorSuppress(yyDollar[2].node) @@ -6421,13 +6422,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AtToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 298: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4073 + //line php5/php5.y:4075 { yyVAL.node = yyDollar[1].node @@ -6435,7 +6436,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4079 + //line php5/php5.y:4081 { yyVAL.node = yyDollar[1].node @@ -6443,7 +6444,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4085 + //line php5/php5.y:4087 { yyVAL.node = yyDollar[1].node @@ -6451,7 +6452,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4091 + //line php5/php5.y:4093 { yyVAL.node = expr.NewShellExec(yyDollar[2].list) @@ -6459,14 +6460,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.BackquoteToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.BackquoteToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BackquoteToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 302: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4104 + //line php5/php5.y:4106 { yyVAL.node = expr.NewPrint(yyDollar[2].node) @@ -6474,13 +6475,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PrintToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 303: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4116 + //line php5/php5.y:4118 { yyVAL.node = expr.NewYield(nil, nil) @@ -6488,13 +6489,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 304: yyDollar = yyS[yypt-9 : yypt+1] - //line php5/php5.y:4128 + //line php5/php5.y:4130 { yyVAL.node = expr.NewClosure(yyDollar[4].list, yyDollar[6].ClosureUse, nil, yyDollar[8].list, false, yyDollar[2].token != nil, "") @@ -6502,20 +6503,20 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[9].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[9].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[9].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 305: yyDollar = yyS[yypt-10 : yypt+1] - //line php5/php5.y:4147 + //line php5/php5.y:4149 { yyVAL.node = expr.NewClosure(yyDollar[5].list, yyDollar[7].ClosureUse, nil, yyDollar[9].list, true, yyDollar[3].token != nil, "") @@ -6523,21 +6524,21 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[10].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[10].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[10].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 306: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4170 + //line php5/php5.y:4172 { yyVAL.node = expr.NewYield(nil, yyDollar[2].node) @@ -6545,13 +6546,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 307: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4182 + //line php5/php5.y:4184 { yyVAL.node = expr.NewYield(nil, yyDollar[2].node) @@ -6559,13 +6560,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 308: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4194 + //line php5/php5.y:4196 { yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) @@ -6573,14 +6574,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.DoubleArrowToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 309: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4207 + //line php5/php5.y:4209 { yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) @@ -6588,14 +6589,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.DoubleArrowToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 310: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4223 + //line php5/php5.y:4225 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -6603,14 +6604,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 311: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4236 + //line php5/php5.y:4238 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -6618,14 +6619,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 312: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4249 + //line php5/php5.y:4251 { str := scalar.NewString(yyDollar[1].token.Value) yyVAL.node = expr.NewArrayDimFetch(str, yyDollar[3].node) @@ -6635,14 +6636,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(str, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 313: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4264 + //line php5/php5.y:4266 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -6650,14 +6651,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 314: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4280 + //line php5/php5.y:4282 { yyVAL.node = expr.NewArray(yyDollar[3].list) @@ -6665,15 +6666,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ArrayToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 315: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4294 + //line php5/php5.y:4296 { yyVAL.node = expr.NewShortArray(yyDollar[2].list) @@ -6681,20 +6682,20 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 316: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4310 + //line php5/php5.y:4312 { yyVAL.token = yyDollar[1].token } case 317: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4317 + //line php5/php5.y:4319 { yyVAL.ClosureUse = nil @@ -6702,7 +6703,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4323 + //line php5/php5.y:4325 { yyVAL.ClosureUse = expr.NewClosureUse(yyDollar[3].list) @@ -6712,7 +6713,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4334 + //line php5/php5.y:4336 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[3].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6723,14 +6724,14 @@ yydefault: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[3].token, comment.VariableToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 320: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4350 + //line php5/php5.y:4352 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[4].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6743,15 +6744,15 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[3].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[3].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[4].token, comment.VariableToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + reference.AddComments(yyDollar[3].token.Comments, comment.VariableToken) + variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 321: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4369 + //line php5/php5.y:4371 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6762,13 +6763,13 @@ yydefault: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 322: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4384 + //line php5/php5.y:4386 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[2].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6781,14 +6782,14 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[2].token, comment.VariableToken) + reference.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + variable.AddComments(yyDollar[2].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 323: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4405 + //line php5/php5.y:4407 { name := name.NewName(yyDollar[1].list) yyVAL.node = expr.NewFunctionCall(name, yyDollar[2].node.(*node.ArgumentList)) @@ -6801,7 +6802,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4416 + //line php5/php5.y:4418 { funcName := name.NewRelative(yyDollar[3].list) yyVAL.node = expr.NewFunctionCall(funcName, yyDollar[4].node.(*node.ArgumentList)) @@ -6811,14 +6812,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(funcName, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(funcName, yyDollar[2].token, comment.NsSeparatorToken) + funcName.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + funcName.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 325: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4431 + //line php5/php5.y:4433 { funcName := name.NewFullyQualified(yyDollar[2].list) yyVAL.node = expr.NewFunctionCall(funcName, yyDollar[3].node.(*node.ArgumentList)) @@ -6828,13 +6829,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(funcName, yyDollar[1].token, comment.NsSeparatorToken) + funcName.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 326: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4445 + //line php5/php5.y:4447 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6842,13 +6843,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 327: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4457 + //line php5/php5.y:4459 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6856,13 +6857,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 328: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4469 + //line php5/php5.y:4471 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6870,13 +6871,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 329: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4481 + //line php5/php5.y:4483 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6884,13 +6885,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 330: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4493 + //line php5/php5.y:4495 { yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].node.(*node.ArgumentList)) @@ -6901,7 +6902,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4505 + //line php5/php5.y:4507 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -6909,13 +6910,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 332: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4517 + //line php5/php5.y:4519 { yyVAL.node = name.NewName(yyDollar[1].list) @@ -6926,7 +6927,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4526 + //line php5/php5.y:4528 { yyVAL.node = name.NewRelative(yyDollar[3].list) @@ -6934,14 +6935,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 334: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4539 + //line php5/php5.y:4541 { yyVAL.node = name.NewFullyQualified(yyDollar[2].list) @@ -6949,13 +6950,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 335: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4554 + //line php5/php5.y:4556 { yyVAL.node = name.NewName(yyDollar[1].list) @@ -6966,7 +6967,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4563 + //line php5/php5.y:4565 { yyVAL.node = name.NewRelative(yyDollar[3].list) @@ -6974,14 +6975,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 337: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4576 + //line php5/php5.y:4578 { yyVAL.node = name.NewFullyQualified(yyDollar[2].list) @@ -6989,13 +6990,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 338: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4591 + //line php5/php5.y:4593 { yyVAL.node = yyDollar[1].node @@ -7003,7 +7004,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4597 + //line php5/php5.y:4599 { yyVAL.node = yyDollar[1].node @@ -7011,12 +7012,12 @@ yydefault: } case 340: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4606 + //line php5/php5.y:4608 { yyVAL.node = yyDollar[1].node // save comments - yylex.(*Parser).comments.AddFromToken(yyDollar[3].list[0], yyDollar[2].token, comment.ObjectOperatorToken) + yyDollar[3].list[0].AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) for _, n := range yyDollar[3].list { switch nn := n.(type) { @@ -7050,7 +7051,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4643 + //line php5/php5.y:4645 { yyVAL.node = yyDollar[1].node @@ -7058,7 +7059,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4653 + //line php5/php5.y:4655 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -7066,7 +7067,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4659 + //line php5/php5.y:4661 { yyVAL.list = []node.Node{} @@ -7074,18 +7075,18 @@ yydefault: } case 344: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4669 + //line php5/php5.y:4671 { yyVAL.list = yyDollar[2].list // save comments - yylex.(*Parser).comments.AddFromToken(yyDollar[2].list[0], yyDollar[1].token, comment.ObjectOperatorToken) + yyDollar[2].list[0].AddComments(yyDollar[1].token.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 345: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4681 + //line php5/php5.y:4683 { yyVAL.node = nil @@ -7093,7 +7094,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4687 + //line php5/php5.y:4689 { yyVAL.node = expr.NewExit(nil) @@ -7101,14 +7102,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 347: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4700 + //line php5/php5.y:4702 { yyVAL.node = expr.NewExit(yyDollar[1].node) @@ -7119,7 +7120,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4712 + //line php5/php5.y:4714 { yyVAL.list = []node.Node{} @@ -7127,7 +7128,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4718 + //line php5/php5.y:4720 { yyVAL.list = []node.Node{scalar.NewEncapsedStringPart(yyDollar[1].token.Value)} @@ -7135,7 +7136,7 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4724 + //line php5/php5.y:4726 { yyVAL.list = yyDollar[1].list @@ -7143,7 +7144,7 @@ yydefault: } case 351: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4733 + //line php5/php5.y:4735 { yyVAL.node = nil @@ -7151,7 +7152,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4739 + //line php5/php5.y:4741 { yyVAL.node = yyDollar[1].node @@ -7159,7 +7160,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4748 + //line php5/php5.y:4750 { yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) @@ -7167,13 +7168,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.LnumberToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 354: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4760 + //line php5/php5.y:4762 { yyVAL.node = scalar.NewDnumber(yyDollar[1].token.Value) @@ -7181,13 +7182,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DnumberToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 355: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4772 + //line php5/php5.y:4774 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) @@ -7195,13 +7196,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ConstantEncapsedStringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 356: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4784 + //line php5/php5.y:4786 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7209,13 +7210,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.LineToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 357: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4796 + //line php5/php5.y:4798 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7223,13 +7224,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FileToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 358: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4808 + //line php5/php5.y:4810 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7237,13 +7238,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DirToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 359: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4820 + //line php5/php5.y:4822 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7251,13 +7252,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TraitCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 360: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4832 + //line php5/php5.y:4834 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7265,13 +7266,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.MethodCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 361: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4844 + //line php5/php5.y:4846 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7279,13 +7280,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FuncCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 362: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4856 + //line php5/php5.y:4858 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7293,13 +7294,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 363: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4868 + //line php5/php5.y:4870 { encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, []node.Node{encapsed}) @@ -7309,13 +7310,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StartHeredocToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 364: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4882 + //line php5/php5.y:4884 { yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, nil) @@ -7323,13 +7324,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StartHeredocToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 365: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4897 + //line php5/php5.y:4899 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -7339,14 +7340,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, yyDollar[3].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 366: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4915 + //line php5/php5.y:4917 { yyVAL.node = yyDollar[1].node @@ -7354,7 +7355,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4924 + //line php5/php5.y:4926 { yyVAL.node = yyDollar[1].node @@ -7362,7 +7363,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4930 + //line php5/php5.y:4932 { yyVAL.node = yyDollar[1].node @@ -7370,7 +7371,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4936 + //line php5/php5.y:4938 { name := name.NewName(yyDollar[1].list) yyVAL.node = expr.NewConstFetch(name) @@ -7383,7 +7384,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4947 + //line php5/php5.y:4949 { name := name.NewRelative(yyDollar[3].list) yyVAL.node = expr.NewConstFetch(name) @@ -7393,14 +7394,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 371: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4962 + //line php5/php5.y:4964 { name := name.NewFullyQualified(yyDollar[2].list) yyVAL.node = expr.NewConstFetch(name) @@ -7410,13 +7411,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 372: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4976 + //line php5/php5.y:4978 { yyVAL.node = expr.NewArray(yyDollar[3].list) @@ -7424,15 +7425,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ArrayToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 373: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4990 + //line php5/php5.y:4992 { yyVAL.node = expr.NewShortArray(yyDollar[2].list) @@ -7440,14 +7441,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 374: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5003 + //line php5/php5.y:5005 { yyVAL.node = yyDollar[1].node @@ -7455,7 +7456,7 @@ yydefault: } case 375: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5009 + //line php5/php5.y:5011 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7463,13 +7464,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ClassCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 376: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5021 + //line php5/php5.y:5023 { yyVAL.node = yyDollar[1].node @@ -7477,7 +7478,7 @@ yydefault: } case 377: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5030 + //line php5/php5.y:5032 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -7485,14 +7486,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 378: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5043 + //line php5/php5.y:5045 { yyVAL.node = binary.NewPlus(yyDollar[1].node, yyDollar[3].node) @@ -7500,13 +7501,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PlusToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 379: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5055 + //line php5/php5.y:5057 { yyVAL.node = binary.NewMinus(yyDollar[1].node, yyDollar[3].node) @@ -7514,13 +7515,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.MinusToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 380: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5067 + //line php5/php5.y:5069 { yyVAL.node = binary.NewMul(yyDollar[1].node, yyDollar[3].node) @@ -7528,13 +7529,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsteriskToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 381: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5079 + //line php5/php5.y:5081 { yyVAL.node = binary.NewPow(yyDollar[1].node, yyDollar[3].node) @@ -7542,13 +7543,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PowToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 382: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5091 + //line php5/php5.y:5093 { yyVAL.node = binary.NewDiv(yyDollar[1].node, yyDollar[3].node) @@ -7556,13 +7557,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlashToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 383: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5103 + //line php5/php5.y:5105 { yyVAL.node = binary.NewMod(yyDollar[1].node, yyDollar[3].node) @@ -7570,13 +7571,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PercentToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 384: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5115 + //line php5/php5.y:5117 { yyVAL.node = expr.NewBooleanNot(yyDollar[2].node) @@ -7584,13 +7585,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ExclamationMarkToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 385: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5127 + //line php5/php5.y:5129 { yyVAL.node = expr.NewBitwiseNot(yyDollar[2].node) @@ -7598,13 +7599,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TildeToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 386: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5139 + //line php5/php5.y:5141 { yyVAL.node = binary.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) @@ -7612,13 +7613,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.VerticalBarToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 387: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5151 + //line php5/php5.y:5153 { yyVAL.node = binary.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) @@ -7626,13 +7627,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 388: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5163 + //line php5/php5.y:5165 { yyVAL.node = binary.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) @@ -7640,13 +7641,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CaretToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 389: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5175 + //line php5/php5.y:5177 { yyVAL.node = binary.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) @@ -7654,13 +7655,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 390: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5187 + //line php5/php5.y:5189 { yyVAL.node = binary.NewShiftRight(yyDollar[1].node, yyDollar[3].node) @@ -7668,13 +7669,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 391: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5199 + //line php5/php5.y:5201 { yyVAL.node = binary.NewConcat(yyDollar[1].node, yyDollar[3].node) @@ -7682,13 +7683,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DotToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 392: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5211 + //line php5/php5.y:5213 { yyVAL.node = binary.NewLogicalXor(yyDollar[1].node, yyDollar[3].node) @@ -7696,13 +7697,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalXorToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 393: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5223 + //line php5/php5.y:5225 { yyVAL.node = binary.NewLogicalAnd(yyDollar[1].node, yyDollar[3].node) @@ -7710,13 +7711,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalAndToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 394: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5235 + //line php5/php5.y:5237 { yyVAL.node = binary.NewLogicalOr(yyDollar[1].node, yyDollar[3].node) @@ -7724,13 +7725,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalOrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 395: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5247 + //line php5/php5.y:5249 { yyVAL.node = binary.NewBooleanAnd(yyDollar[1].node, yyDollar[3].node) @@ -7738,13 +7739,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.BooleanAndToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 396: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5259 + //line php5/php5.y:5261 { yyVAL.node = binary.NewBooleanOr(yyDollar[1].node, yyDollar[3].node) @@ -7752,13 +7753,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.BooleanOrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 397: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5271 + //line php5/php5.y:5273 { yyVAL.node = binary.NewIdentical(yyDollar[1].node, yyDollar[3].node) @@ -7766,13 +7767,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsIdenticalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 398: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5283 + //line php5/php5.y:5285 { yyVAL.node = binary.NewNotIdentical(yyDollar[1].node, yyDollar[3].node) @@ -7780,13 +7781,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsNotIdenticalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 399: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5295 + //line php5/php5.y:5297 { yyVAL.node = binary.NewEqual(yyDollar[1].node, yyDollar[3].node) @@ -7794,13 +7795,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 400: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5307 + //line php5/php5.y:5309 { yyVAL.node = binary.NewNotEqual(yyDollar[1].node, yyDollar[3].node) @@ -7808,13 +7809,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsNotEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 401: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5319 + //line php5/php5.y:5321 { yyVAL.node = binary.NewSmaller(yyDollar[1].node, yyDollar[3].node) @@ -7822,13 +7823,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LessToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 402: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5331 + //line php5/php5.y:5333 { yyVAL.node = binary.NewGreater(yyDollar[1].node, yyDollar[3].node) @@ -7836,13 +7837,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.GreaterToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 403: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5343 + //line php5/php5.y:5345 { yyVAL.node = binary.NewSmallerOrEqual(yyDollar[1].node, yyDollar[3].node) @@ -7850,13 +7851,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsSmallerOrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 404: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5355 + //line php5/php5.y:5357 { yyVAL.node = binary.NewGreaterOrEqual(yyDollar[1].node, yyDollar[3].node) @@ -7864,13 +7865,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsGreaterOrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 405: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5367 + //line php5/php5.y:5369 { yyVAL.node = expr.NewTernary(yyDollar[1].node, nil, yyDollar[4].node) @@ -7878,14 +7879,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 406: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:5380 + //line php5/php5.y:5382 { yyVAL.node = expr.NewTernary(yyDollar[1].node, yyDollar[3].node, yyDollar[5].node) @@ -7893,14 +7894,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 407: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5393 + //line php5/php5.y:5395 { yyVAL.node = expr.NewUnaryPlus(yyDollar[2].node) @@ -7908,13 +7909,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PlusToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 408: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5405 + //line php5/php5.y:5407 { yyVAL.node = expr.NewUnaryMinus(yyDollar[2].node) @@ -7922,25 +7923,25 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.MinusToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 409: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5417 + //line php5/php5.y:5419 { yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 410: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5430 + //line php5/php5.y:5432 { yyVAL.node = yyDollar[1].node @@ -7948,7 +7949,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5436 + //line php5/php5.y:5438 { name := name.NewName(yyDollar[1].list) yyVAL.node = expr.NewConstFetch(name) @@ -7961,7 +7962,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5447 + //line php5/php5.y:5449 { name := name.NewRelative(yyDollar[3].list) yyVAL.node = expr.NewConstFetch(name) @@ -7969,14 +7970,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 413: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5460 + //line php5/php5.y:5462 { name := name.NewFullyQualified(yyDollar[2].list) yyVAL.node = expr.NewConstFetch(name) @@ -7986,13 +7987,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 414: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5477 + //line php5/php5.y:5479 { name := node.NewIdentifier(yyDollar[1].token.Value) yyVAL.node = expr.NewVariable(name) @@ -8002,13 +8003,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[1].token, comment.StringVarnameToken) + name.AddComments(yyDollar[1].token.Comments, comment.StringVarnameToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 415: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5491 + //line php5/php5.y:5493 { yyVAL.node = yyDollar[1].node @@ -8016,7 +8017,7 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5497 + //line php5/php5.y:5499 { yyVAL.node = yyDollar[1].node @@ -8024,7 +8025,7 @@ yydefault: } case 417: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5503 + //line php5/php5.y:5505 { yyVAL.node = yyDollar[1].node @@ -8032,7 +8033,7 @@ yydefault: } case 418: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5509 + //line php5/php5.y:5511 { yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) @@ -8040,13 +8041,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DoubleQuoteToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 419: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5521 + //line php5/php5.y:5523 { yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, yyDollar[2].list) @@ -8054,13 +8055,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StartHeredocToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 420: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5533 + //line php5/php5.y:5535 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -8068,13 +8069,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ClassCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 421: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5548 + //line php5/php5.y:5550 { yyVAL.list = nil @@ -8082,32 +8083,32 @@ yydefault: } case 422: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5554 + //line php5/php5.y:5556 { yyVAL.list = yyDollar[1].list // save comments if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 423: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5568 + //line php5/php5.y:5570 { yyVAL.token = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5572 + //line php5/php5.y:5574 { yyVAL.token = yyDollar[1].token } case 425: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:5579 + //line php5/php5.y:5581 { arrayItem := expr.NewArrayItem(yyDollar[3].node, yyDollar[5].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8116,14 +8117,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(arrayItem, yyDollar[4].token, comment.DoubleArrowToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + arrayItem.AddComments(yyDollar[4].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 426: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5593 + //line php5/php5.y:5595 { arrayItem := expr.NewArrayItem(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8132,13 +8133,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 427: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5606 + //line php5/php5.y:5608 { arrayItem := expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node) yyVAL.list = []node.Node{arrayItem} @@ -8147,13 +8148,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(arrayItem, yyDollar[2].token, comment.DoubleArrowToken) + arrayItem.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 428: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5619 + //line php5/php5.y:5621 { arrayItem := expr.NewArrayItem(nil, yyDollar[1].node) yyVAL.list = []node.Node{arrayItem} @@ -8165,7 +8166,7 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5632 + //line php5/php5.y:5634 { yyVAL.node = yyDollar[1].node @@ -8173,7 +8174,7 @@ yydefault: } case 430: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5638 + //line php5/php5.y:5640 { yyVAL.node = yyDollar[1].node @@ -8181,7 +8182,7 @@ yydefault: } case 431: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5647 + //line php5/php5.y:5649 { yyVAL.node = yyDollar[2].node @@ -8189,7 +8190,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5653 + //line php5/php5.y:5655 { yyVAL.node = yyDollar[2].node @@ -8197,7 +8198,7 @@ yydefault: } case 433: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5663 + //line php5/php5.y:5665 { yyVAL.node = yyDollar[1].node @@ -8205,7 +8206,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5673 + //line php5/php5.y:5675 { yyVAL.node = yyDollar[1].node @@ -8213,7 +8214,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5682 + //line php5/php5.y:5684 { yyVAL.node = yyDollar[1].node @@ -8221,7 +8222,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:5691 + //line php5/php5.y:5693 { yyVAL.node = yyDollar[1].node @@ -8231,7 +8232,7 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyDollar[3].list[0], yyDollar[2].token, comment.ObjectOperatorToken) + yyDollar[3].list[0].AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) for _, n := range yyDollar[3].list { switch nn := n.(type) { @@ -8275,7 +8276,7 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5743 + //line php5/php5.y:5745 { yyVAL.node = yyDollar[1].node @@ -8283,7 +8284,7 @@ yydefault: } case 438: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5752 + //line php5/php5.y:5754 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -8291,7 +8292,7 @@ yydefault: } case 439: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5758 + //line php5/php5.y:5760 { yyVAL.list = []node.Node{} @@ -8299,7 +8300,7 @@ yydefault: } case 440: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5768 + //line php5/php5.y:5770 { if yyDollar[3].list != nil { yyDollar[3].list[0].(*expr.MethodCall).Method = yyDollar[2].list[len(yyDollar[2].list)-1].(*expr.PropertyFetch).Property @@ -8309,13 +8310,13 @@ yydefault: yyVAL.list = yyDollar[2].list // save comments - yylex.(*Parser).comments.AddFromToken(yyDollar[2].list[0], yyDollar[1].token, comment.ObjectOperatorToken) + yyDollar[2].list[0].AddComments(yyDollar[1].token.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 441: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5785 + //line php5/php5.y:5787 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, fetch) @@ -8324,14 +8325,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[4].token, comment.CloseSquareBracket) + fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 442: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5799 + //line php5/php5.y:5801 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = []node.Node{yyDollar[1].node, fetch} @@ -8340,14 +8341,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[4].token, comment.CloseSquareBracket) + fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 443: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5816 + //line php5/php5.y:5818 { yyVAL.node = expr.NewMethodCall(nil, nil, yyDollar[1].node.(*node.ArgumentList)) @@ -8358,7 +8359,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5828 + //line php5/php5.y:5830 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -8366,7 +8367,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5834 + //line php5/php5.y:5836 { yyVAL.list = yyDollar[1].list @@ -8374,7 +8375,7 @@ yydefault: } case 446: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5840 + //line php5/php5.y:5842 { yyVAL.list = nil @@ -8382,7 +8383,7 @@ yydefault: } case 447: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5849 + //line php5/php5.y:5851 { yyVAL.node = yyDollar[1].node @@ -8390,7 +8391,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5855 + //line php5/php5.y:5857 { yyDollar[1].simpleIndirectReference.last.SetVarName(yyDollar[2].node) @@ -8404,7 +8405,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5870 + //line php5/php5.y:5872 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -8412,13 +8413,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 450: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5882 + //line php5/php5.y:5884 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -8426,13 +8427,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 451: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5897 + //line php5/php5.y:5899 { yyVAL.node = yyDollar[1].node @@ -8440,7 +8441,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5906 + //line php5/php5.y:5908 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8448,14 +8449,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 453: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5919 + //line php5/php5.y:5921 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8463,14 +8464,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 454: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5935 + //line php5/php5.y:5937 { yyVAL.node = yyDollar[1].node @@ -8478,7 +8479,7 @@ yydefault: } case 455: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5941 + //line php5/php5.y:5943 { yyVAL.node = yyDollar[1].node @@ -8486,7 +8487,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5947 + //line php5/php5.y:5949 { yyVAL.node = yyDollar[1].node @@ -8494,7 +8495,7 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5957 + //line php5/php5.y:5959 { yyVAL.node = yyDollar[1].node @@ -8502,7 +8503,7 @@ yydefault: } case 458: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5963 + //line php5/php5.y:5965 { yyDollar[1].simpleIndirectReference.last.SetVarName(yyDollar[2].node) @@ -8516,7 +8517,7 @@ yydefault: } case 459: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5975 + //line php5/php5.y:5977 { yyVAL.node = yyDollar[1].node @@ -8524,7 +8525,7 @@ yydefault: } case 460: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5984 + //line php5/php5.y:5986 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8532,14 +8533,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 461: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5997 + //line php5/php5.y:5999 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8547,14 +8548,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 462: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6010 + //line php5/php5.y:6012 { yyVAL.node = yyDollar[1].node @@ -8562,7 +8563,7 @@ yydefault: } case 463: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6020 + //line php5/php5.y:6022 { name := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(name) @@ -8572,13 +8573,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 464: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6034 + //line php5/php5.y:6036 { yyVAL.node = expr.NewVariable(yyDollar[3].node) @@ -8586,15 +8587,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 465: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:6051 + //line php5/php5.y:6053 { yyVAL.node = nil @@ -8602,7 +8603,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6057 + //line php5/php5.y:6059 { yyVAL.node = yyDollar[1].node @@ -8610,7 +8611,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6067 + //line php5/php5.y:6069 { yyVAL.list = yyDollar[1].list @@ -8618,7 +8619,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6073 + //line php5/php5.y:6075 { fetch := expr.NewPropertyFetch(nil, yyDollar[1].node) yyVAL.list = []node.Node{fetch} @@ -8630,7 +8631,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6086 + //line php5/php5.y:6088 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, fetch) @@ -8639,14 +8640,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[4].token, comment.CloseSquareBracket) + fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 470: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6100 + //line php5/php5.y:6102 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, fetch) @@ -8655,14 +8656,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[4].token, comment.CloseCurlyBracesToken) + fetch.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + fetch.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 471: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6114 + //line php5/php5.y:6116 { fetch := expr.NewPropertyFetch(nil, yyDollar[1].node) yyVAL.list = []node.Node{fetch} @@ -8674,7 +8675,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6127 + //line php5/php5.y:6129 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -8682,13 +8683,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 473: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6139 + //line php5/php5.y:6141 { yyVAL.node = yyDollar[2].node @@ -8696,14 +8697,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 474: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6155 + //line php5/php5.y:6157 { n := expr.NewVariable(nil) yyVAL.simpleIndirectReference = simpleIndirectReference{[]*expr.Variable{n}, n} @@ -8712,13 +8713,13 @@ yydefault: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(n, yyDollar[1].token, comment.DollarToken) + n.AddComments(yyDollar[1].token.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 475: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6168 + //line php5/php5.y:6170 { n := expr.NewVariable(nil) @@ -8731,24 +8732,24 @@ yydefault: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(n, yyDollar[2].token, comment.DollarToken) + n.AddComments(yyDollar[2].token.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 476: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6188 + //line php5/php5.y:6190 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 477: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6197 + //line php5/php5.y:6199 { if yyDollar[1].node == nil { yyVAL.list = []node.Node{} @@ -8760,7 +8761,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6211 + //line php5/php5.y:6213 { yyVAL.node = expr.NewArrayItem(nil, yyDollar[1].node) @@ -8771,7 +8772,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6220 + //line php5/php5.y:6222 { item := expr.NewList(yyDollar[3].list) yyVAL.node = expr.NewArrayItem(nil, item) @@ -8781,15 +8782,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(item)) // save comments - yylex.(*Parser).comments.AddFromToken(item, yyDollar[1].token, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(item, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(item, yyDollar[4].token, comment.CloseParenthesisToken) + item.AddComments(yyDollar[1].token.Comments, comment.ListToken) + item.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + item.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 480: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:6236 + //line php5/php5.y:6238 { yyVAL.node = nil @@ -8797,7 +8798,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:6246 + //line php5/php5.y:6248 { yyVAL.list = []node.Node{} @@ -8805,20 +8806,20 @@ yydefault: } case 482: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6252 + //line php5/php5.y:6254 { yyVAL.list = yyDollar[1].list // save comments if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 483: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:6266 + //line php5/php5.y:6268 { arrayItem := expr.NewArrayItem(yyDollar[3].node, yyDollar[5].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8827,14 +8828,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(arrayItem, yyDollar[4].token, comment.DoubleArrowToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + arrayItem.AddComments(yyDollar[4].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 484: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6280 + //line php5/php5.y:6282 { arrayItem := expr.NewArrayItem(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8843,13 +8844,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 485: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6293 + //line php5/php5.y:6295 { arrayItem := expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node) yyVAL.list = []node.Node{arrayItem} @@ -8858,13 +8859,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(arrayItem, yyDollar[2].token, comment.DoubleArrowToken) + arrayItem.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 486: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6306 + //line php5/php5.y:6308 { arrayItem := expr.NewArrayItem(nil, yyDollar[1].node) yyVAL.list = []node.Node{arrayItem} @@ -8876,7 +8877,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:6316 + //line php5/php5.y:6318 { reference := expr.NewReference(yyDollar[6].node) arrayItem := expr.NewArrayItem(yyDollar[3].node, reference) @@ -8887,15 +8888,15 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[6].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(arrayItem, yyDollar[4].token, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[5].token, comment.AmpersandToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + arrayItem.AddComments(yyDollar[4].token.Comments, comment.DoubleArrowToken) + reference.AddComments(yyDollar[5].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 488: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6333 + //line php5/php5.y:6335 { reference := expr.NewReference(yyDollar[4].node) arrayItem := expr.NewArrayItem(nil, reference) @@ -8906,14 +8907,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[3].token, comment.AmpersandToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + reference.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 489: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6349 + //line php5/php5.y:6351 { reference := expr.NewReference(yyDollar[4].node) arrayItem := expr.NewArrayItem(yyDollar[1].node, reference) @@ -8924,14 +8925,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(arrayItem, yyDollar[2].token, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[3].token, comment.AmpersandToken) + arrayItem.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) + reference.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 490: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6365 + //line php5/php5.y:6367 { reference := expr.NewReference(yyDollar[2].node) arrayItem := expr.NewArrayItem(nil, reference) @@ -8942,13 +8943,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[1].token, comment.AmpersandToken) + reference.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 491: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6383 + //line php5/php5.y:6385 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -8956,7 +8957,7 @@ yydefault: } case 492: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6389 + //line php5/php5.y:6391 { encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) yyVAL.list = append(yyDollar[1].list, encapsed) @@ -8965,13 +8966,13 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, yyDollar[2].token, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments(yyDollar[2].token.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 493: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6402 + //line php5/php5.y:6404 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -8979,7 +8980,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6408 + //line php5/php5.y:6410 { encapsed := scalar.NewEncapsedStringPart(yyDollar[1].token.Value) yyVAL.list = []node.Node{encapsed, yyDollar[2].node} @@ -8988,13 +8989,13 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, yyDollar[1].token, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments(yyDollar[1].token.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 495: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6424 + //line php5/php5.y:6426 { name := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(name) @@ -9004,13 +9005,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 496: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6438 + //line php5/php5.y:6440 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -9022,15 +9023,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 497: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6456 + //line php5/php5.y:6458 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -9044,15 +9045,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ObjectOperatorToken) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[3].token, comment.StringToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) + fetch.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 498: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6476 + //line php5/php5.y:6478 { yyVAL.node = expr.NewVariable(yyDollar[2].node) @@ -9060,14 +9061,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 499: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6489 + //line php5/php5.y:6491 { name := node.NewIdentifier(yyDollar[2].token.Value) yyVAL.node = expr.NewVariable(name) @@ -9077,15 +9078,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringVarnameToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 500: yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:6505 + //line php5/php5.y:6507 { identifier := node.NewIdentifier(yyDollar[2].token.Value) variable := expr.NewVariable(identifier) @@ -9097,17 +9098,17 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[2].token, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) + variable.AddComments(yyDollar[2].token.Comments, comment.StringVarnameToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 501: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6525 + //line php5/php5.y:6527 { yyVAL.node = yyDollar[2].node @@ -9115,7 +9116,7 @@ yydefault: } case 502: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6534 + //line php5/php5.y:6536 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) @@ -9123,13 +9124,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 503: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6546 + //line php5/php5.y:6548 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(yyDollar[1].token.Value); err == nil { @@ -9142,13 +9143,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NumStringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 504: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6563 + //line php5/php5.y:6565 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(identifier) @@ -9158,13 +9159,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 505: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6580 + //line php5/php5.y:6582 { yyVAL.node = expr.NewIsset(yyDollar[3].list) @@ -9172,15 +9173,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IssetToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IssetToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 506: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6594 + //line php5/php5.y:6596 { yyVAL.node = expr.NewEmpty(yyDollar[3].node) @@ -9188,15 +9189,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EmptyToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EmptyToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 507: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6608 + //line php5/php5.y:6610 { yyVAL.node = expr.NewEmpty(yyDollar[3].node) @@ -9204,15 +9205,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EmptyToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EmptyToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 508: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6622 + //line php5/php5.y:6624 { yyVAL.node = expr.NewInclude(yyDollar[2].node) @@ -9220,13 +9221,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IncludeToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 509: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6634 + //line php5/php5.y:6636 { yyVAL.node = expr.NewIncludeOnce(yyDollar[2].node) @@ -9234,13 +9235,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IncludeOnceToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 510: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6646 + //line php5/php5.y:6648 { yyVAL.node = expr.NewEval(yyDollar[3].node) @@ -9248,15 +9249,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EvalToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EvalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 511: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6660 + //line php5/php5.y:6662 { yyVAL.node = expr.NewRequire(yyDollar[2].node) @@ -9264,13 +9265,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.RequireToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 512: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6672 + //line php5/php5.y:6674 { yyVAL.node = expr.NewRequireOnce(yyDollar[2].node) @@ -9278,13 +9279,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.RequireOnceToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 513: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6687 + //line php5/php5.y:6689 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -9292,18 +9293,18 @@ yydefault: } case 514: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6693 + //line php5/php5.y:6695 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 515: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6705 + //line php5/php5.y:6707 { yyVAL.node = yyDollar[1].node @@ -9311,7 +9312,7 @@ yydefault: } case 516: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6711 + //line php5/php5.y:6713 { yyVAL.node = yyDollar[1].node @@ -9319,7 +9320,7 @@ yydefault: } case 517: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6720 + //line php5/php5.y:6722 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9329,13 +9330,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 518: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6734 + //line php5/php5.y:6736 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9345,13 +9346,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 519: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6751 + //line php5/php5.y:6753 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9361,13 +9362,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 520: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6768 + //line php5/php5.y:6770 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9377,7 +9378,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/php5/php5.y b/php5/php5.y index c923ef8..e3963e4 100644 --- a/php5/php5.y +++ b/php5/php5.y @@ -313,7 +313,7 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(namePart, $1, comment.StringToken) + namePart.AddComments($1.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -326,8 +326,8 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(namePart, $3, comment.StringToken) + lastNode($1).AddComments($2.Comments, comment.NsSeparatorToken) + namePart.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -367,10 +367,10 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.HaltCompilerToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -384,8 +384,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -399,9 +399,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($5.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -413,9 +413,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -427,8 +427,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UseToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -442,9 +442,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(useType, $2, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UseToken) + useType.AddComments($2.Comments, comment.UseToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -458,9 +458,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(useType, $2, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UseToken) + useType.AddComments($2.Comments, comment.UseToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -472,7 +472,7 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -484,7 +484,7 @@ use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -520,8 +520,8 @@ use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $3, comment.StringToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -535,7 +535,7 @@ use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -551,9 +551,9 @@ use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($2, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AsToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.StringToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) + $$.AddComments($3.Comments, comment.AsToken) + $$.AddComments($4.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -565,7 +565,7 @@ use_function_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -601,8 +601,8 @@ use_function_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $3, comment.StringToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -616,7 +616,7 @@ use_function_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -632,9 +632,9 @@ use_function_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($2, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AsToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.StringToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) + $$.AddComments($3.Comments, comment.AsToken) + $$.AddComments($4.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -646,7 +646,7 @@ use_const_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -682,8 +682,8 @@ use_const_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $3, comment.StringToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -697,7 +697,7 @@ use_const_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -713,9 +713,9 @@ use_const_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($2, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AsToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.StringToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) + $$.AddComments($3.Comments, comment.AsToken) + $$.AddComments($4.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -736,9 +736,9 @@ constant_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition($1, constList.Consts)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(constList.Consts), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(name, $3, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, $4, comment.EqualToken) + lastNode(constList.Consts).AddComments($2.Comments, comment.CommaToken) + name.AddComments($3.Comments, comment.StringToken) + constant.AddComments($4.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -755,9 +755,9 @@ constant_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, constList)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, $3, comment.EqualToken) + $$.AddComments($1.Comments, comment.ConstToken) + name.AddComments($2.Comments, comment.StringToken) + constant.AddComments($3.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -815,10 +815,10 @@ inner_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.HaltCompilerToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -842,8 +842,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken(label, $1, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ColonToken) + label.AddComments($1.Comments, comment.StringToken) + $$.AddComments($2.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -858,8 +858,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -877,7 +877,7 @@ unticked_statement: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IfToken) + $$.AddComments($1.Comments, comment.IfToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -891,10 +891,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IfToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.EndifToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.IfToken) + $$.AddComments($3.Comments, comment.ColonToken) + $$.AddComments($7.Comments, comment.EndifToken) + $$.AddComments($8.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -913,7 +913,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.WhileToken) + $$.AddComments($1.Comments, comment.WhileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -925,9 +925,9 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DoToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.WhileToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.DoToken) + $$.AddComments($3.Comments, comment.WhileToken) + $$.AddComments($5.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -950,11 +950,11 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $9)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ForToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.ForInitSemicolonToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.ForCondSemicolonToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ForToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.ForInitSemicolonToken) + $$.AddComments($6.Comments, comment.ForCondSemicolonToken) + $$.AddComments($8.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -975,7 +975,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SwitchToken) + $$.AddComments($1.Comments, comment.SwitchToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -987,8 +987,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.BreakToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.BreakToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1000,8 +1000,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.BreakToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.BreakToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1013,8 +1013,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ContinueToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ContinueToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1026,8 +1026,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ContinueToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ContinueToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1039,8 +1039,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ReturnToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1052,8 +1052,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ReturnToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1065,8 +1065,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ReturnToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1078,7 +1078,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1090,8 +1090,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.GlobalToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.GlobalToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1103,8 +1103,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.StaticToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1116,8 +1116,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EchoToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.EchoToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1129,7 +1129,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.InlineHTMLToken) + $$.AddComments($1.Comments, comment.InlineHTMLToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1141,7 +1141,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1153,10 +1153,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UnsetToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UnsetToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) + $$.AddComments($5.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1190,10 +1190,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $8)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.AsToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ForeachToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.AsToken) + $$.AddComments($7.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1227,10 +1227,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $8)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.AsToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ForeachToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.AsToken) + $$.AddComments($7.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1242,9 +1242,9 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DeclareToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.DeclareToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1256,7 +1256,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1272,9 +1272,9 @@ unticked_statement: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TryToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.TryToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1286,8 +1286,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ThrowToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ThrowToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1301,9 +1301,9 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.GotoToken) - yylex.(*Parser).comments.AddFromToken(label, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.GotoToken) + label.AddComments($2.Comments, comment.StringToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1329,12 +1329,12 @@ catch_statement: catch.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - yylex.(*Parser).comments.AddFromToken(catch, $1, comment.CatchToken) - yylex.(*Parser).comments.AddFromToken(catch, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(variable, $4, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(catch, $5, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(catch, $6, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(catch, $8, comment.CloseCurlyBracesToken) + catch.AddComments($1.Comments, comment.CatchToken) + catch.AddComments($2.Comments, comment.OpenParenthesisToken) + variable.AddComments($4.Comments, comment.StringToken) + catch.AddComments($5.Comments, comment.CloseParenthesisToken) + catch.AddComments($6.Comments, comment.OpenCurlyBracesToken) + catch.AddComments($8.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1355,9 +1355,9 @@ finally_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FinallyToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.FinallyToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1406,12 +1406,12 @@ additional_catch: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.CatchToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(variable, $4, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.CatchToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + variable.AddComments($4.Comments, comment.StringToken) + $$.AddComments($5.Comments, comment.CloseParenthesisToken) + $$.AddComments($6.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($8.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1429,7 +1429,7 @@ unset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1495,15 +1495,15 @@ unticked_function_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $9)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FunctionToken) + $$.AddComments($1.Comments, comment.FunctionToken) if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, $3, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $9, comment.CloseCurlyBracesToken) + name.AddComments($3.Comments, comment.StringToken) + $$.AddComments($4.Comments, comment.OpenParenthesisToken) + $$.AddComments($6.Comments, comment.CloseParenthesisToken) + $$.AddComments($7.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($9.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1532,9 +1532,9 @@ unticked_class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $7)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseCurlyBracesToken) + name.AddComments($2.Comments, comment.StringToken) + $$.AddComments($5.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1548,9 +1548,9 @@ unticked_class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseCurlyBracesToken) + name.AddComments($2.Comments, comment.StringToken) + $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1566,7 +1566,7 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ClassToken) + $$.AddComments($1.Comments, comment.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1580,8 +1580,8 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken(classModifier, $1, comment.AbstractToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ClassToken) + classModifier.AddComments($1.Comments, comment.AbstractToken) + $$.AddComments($2.Comments, comment.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1593,7 +1593,7 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TraitToken) + $$.AddComments($1.Comments, comment.TraitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1607,8 +1607,8 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken(classModifier, $1, comment.FinalToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ClassToken) + classModifier.AddComments($1.Comments, comment.FinalToken) + $$.AddComments($2.Comments, comment.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1629,7 +1629,7 @@ extends_from: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExtendsToken) + $$.AddComments($1.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1657,7 +1657,7 @@ interface_extends_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExtendsToken) + $$.AddComments($1.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1678,7 +1678,7 @@ implements_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ImplementsToken) + $$.AddComments($1.Comments, comment.ImplementsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1696,7 +1696,7 @@ interface_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1714,7 +1714,7 @@ foreach_optional_arg: $$ = $2 // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DoubleArrowToken) + $$.AddComments($1.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1735,7 +1735,7 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AmpersandToken) + $$.AddComments($1.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1747,9 +1747,9 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ListToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ListToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1775,9 +1775,9 @@ for_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EndforToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EndforToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1803,9 +1803,9 @@ foreach_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EndforeachToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EndforeachToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1827,9 +1827,9 @@ declare_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EnddeclareToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EnddeclareToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1848,8 +1848,8 @@ declare_list: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $1, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, $2, comment.EqualToken) + name.AddComments($1.Comments, comment.StringToken) + constant.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1864,9 +1864,9 @@ declare_list: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(name, $3, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(constant, $4, comment.EqualToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + name.AddComments($3.Comments, comment.StringToken) + constant.AddComments($4.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1884,8 +1884,8 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, $3, comment.CloseCurlyBracesToken) + caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1899,9 +1899,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, $2, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $4, comment.CloseCurlyBracesToken) + caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments($2.Comments, comment.SemiColonToken) + caseList.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1915,9 +1915,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $3, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + caseList.AddComments($1.Comments, comment.ColonToken) + caseList.AddComments($3.Comments, comment.EndswitchToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1932,10 +1932,10 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $2, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $4, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.SemiColonToken) + caseList.AddComments($1.Comments, comment.ColonToken) + caseList.AddComments($2.Comments, comment.SemiColonToken) + caseList.AddComments($4.Comments, comment.EndswitchToken) + $$.AddComments($5.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1958,8 +1958,8 @@ case_list: _case.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(_case, $2, comment.CaseToken) - yylex.(*Parser).comments.AddFromToken(_case, $4, comment.CaseSeparatorToken) + _case.AddComments($2.Comments, comment.CaseToken) + _case.AddComments($4.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1972,8 +1972,8 @@ case_list: _default.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(_default, $2, comment.DefaultToken) - yylex.(*Parser).comments.AddFromToken(_default, $3, comment.CaseSeparatorToken) + _default.AddComments($2.Comments, comment.DefaultToken) + _default.AddComments($3.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2012,9 +2012,9 @@ while_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EndwhileToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EndwhileToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2038,7 +2038,7 @@ elseif_list: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($2, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, $2, comment.ElseifToken) + _elseIf.AddComments($2.Comments, comment.ElseifToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2063,8 +2063,8 @@ new_elseif_list: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, $2, comment.ElseifToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, $4, comment.ColonToken) + _elseIf.AddComments($2.Comments, comment.ElseifToken) + _elseIf.AddComments($4.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2086,7 +2086,7 @@ else_single: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ElseToken) + $$.AddComments($1.Comments, comment.ElseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2110,8 +2110,8 @@ new_else_single: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ElseToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ColonToken) + $$.AddComments($1.Comments, comment.ElseToken) + $$.AddComments($2.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2145,7 +2145,7 @@ non_empty_parameter_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2173,12 +2173,12 @@ parameter: // save comments if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EllipsisToken) + $$.AddComments($3.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, $4, comment.VariableToken) + variable.AddComments($4.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2203,13 +2203,13 @@ parameter: // save comments if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EllipsisToken) + $$.AddComments($3.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, $4, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.EqualToken) + variable.AddComments($4.Comments, comment.VariableToken) + $$.AddComments($5.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2231,7 +2231,7 @@ optional_class_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ArrayToken) + $$.AddComments($1.Comments, comment.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2243,7 +2243,7 @@ optional_class_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.CallableToken) + $$.AddComments($1.Comments, comment.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2265,8 +2265,8 @@ function_call_parameter_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($2.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2278,8 +2278,8 @@ function_call_parameter_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2293,8 +2293,8 @@ function_call_parameter_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2313,7 +2313,7 @@ non_empty_function_call_parameter_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2346,7 +2346,7 @@ function_call_parameter: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AmpersandToken) + $$.AddComments($1.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2358,7 +2358,7 @@ function_call_parameter: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EllipsisToken) + $$.AddComments($1.Comments, comment.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2370,7 +2370,7 @@ global_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2394,7 +2394,7 @@ global_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2406,7 +2406,7 @@ global_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarToken) + $$.AddComments($1.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2418,9 +2418,9 @@ global_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2441,8 +2441,8 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, $3, comment.VariableToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + variable.AddComments($3.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2459,9 +2459,9 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, $3, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(staticVar, $4, comment.EqualToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + variable.AddComments($3.Comments, comment.VariableToken) + staticVar.AddComments($4.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2478,7 +2478,7 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) + variable.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2495,8 +2495,8 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(staticVar, $2, comment.EqualToken) + variable.AddComments($1.Comments, comment.VariableToken) + staticVar.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2528,7 +2528,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2540,7 +2540,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2564,13 +2564,13 @@ class_statement: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.FunctionToken) + $$.AddComments($2.Comments, comment.FunctionToken) if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AmpersandToken) + $$.AddComments($3.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, $4, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseParenthesisToken) + name.AddComments($4.Comments, comment.IdentifierToken) + $$.AddComments($5.Comments, comment.OpenParenthesisToken) + $$.AddComments($7.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2592,7 +2592,7 @@ trait_use_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) + $$.AddComments($1.Comments, comment.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2610,7 +2610,7 @@ trait_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2624,7 +2624,7 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2636,8 +2636,8 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2679,7 +2679,7 @@ trait_adaptation_statement: $$ = $1; // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2688,7 +2688,7 @@ trait_adaptation_statement: $$ = $1; // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2703,7 +2703,7 @@ trait_precedence: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.InsteadofToken) + $$.AddComments($2.Comments, comment.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2721,7 +2721,7 @@ trait_reference_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2738,7 +2738,7 @@ trait_method_reference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $1, comment.IdentifierToken) + name.AddComments($1.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2761,8 +2761,8 @@ trait_method_reference_fully_qualified: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, $3, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + target.AddComments($3.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2779,8 +2779,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $4, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($4.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2792,7 +2792,7 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) + $$.AddComments($2.Comments, comment.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2822,7 +2822,7 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2834,8 +2834,8 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2857,7 +2857,7 @@ variable_modifiers: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(modifier, $1, comment.VarToken) + modifier.AddComments($1.Comments, comment.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2902,7 +2902,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PublicToken) + $$.AddComments($1.Comments, comment.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2914,7 +2914,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ProtectedToken) + $$.AddComments($1.Comments, comment.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2926,7 +2926,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PrivateToken) + $$.AddComments($1.Comments, comment.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2938,7 +2938,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) + $$.AddComments($1.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2950,7 +2950,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AbstractToken) + $$.AddComments($1.Comments, comment.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2962,7 +2962,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FinalToken) + $$.AddComments($1.Comments, comment.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2982,8 +2982,8 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, $3, comment.VariableToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + variable.AddComments($3.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3000,9 +3000,9 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, $3, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(property, $4, comment.EqualToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + variable.AddComments($3.Comments, comment.VariableToken) + property.AddComments($4.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3019,7 +3019,7 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) + variable.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3036,8 +3036,8 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(property, $2, comment.EqualToken) + variable.AddComments($1.Comments, comment.VariableToken) + property.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3058,9 +3058,9 @@ class_constant_declaration: $1.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(constList.Consts), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(name, $3, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken(constant, $4, comment.EqualToken) + lastNode(constList.Consts).AddComments($2.Comments, comment.CommaToken) + name.AddComments($3.Comments, comment.IdentifierToken) + constant.AddComments($4.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3076,9 +3076,9 @@ class_constant_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken(name, $2, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken(constant, $3, comment.EqualToken) + $$.AddComments($1.Comments, comment.ConstToken) + name.AddComments($2.Comments, comment.IdentifierToken) + constant.AddComments($3.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3090,7 +3090,7 @@ echo_expr_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3124,7 +3124,7 @@ non_empty_for_expr: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3161,8 +3161,8 @@ chaining_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, $4, comment.CloseSquareBracket) + fetch.AddComments($2.Comments, comment.OpenSquareBracket) + fetch.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3175,8 +3175,8 @@ chaining_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, $1, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, $3, comment.CloseSquareBracket) + fetch.AddComments($1.Comments, comment.OpenSquareBracket) + fetch.AddComments($3.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3231,7 +3231,7 @@ new_expr: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NewToken) + $$.AddComments($1.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3248,10 +3248,10 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken(list, $1, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, $4, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.EqualToken) + list.AddComments($1.Comments, comment.ListToken) + list.AddComments($2.Comments, comment.OpenParenthesisToken) + list.AddComments($4.Comments, comment.CloseParenthesisToken) + $$.AddComments($5.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3263,7 +3263,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) + $$.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3275,8 +3275,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.EqualToken) + $$.AddComments($3.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3300,9 +3300,9 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, _new)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AmpersandToken) - yylex.(*Parser).comments.AddFromToken(_new, $4, comment.NewToken) + $$.AddComments($2.Comments, comment.EqualToken) + $$.AddComments($3.Comments, comment.AmpersandToken) + _new.AddComments($4.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3314,7 +3314,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.CloneToken) + $$.AddComments($1.Comments, comment.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3326,7 +3326,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PlusEqualToken) + $$.AddComments($2.Comments, comment.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3338,7 +3338,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.MinusEqualToken) + $$.AddComments($2.Comments, comment.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3350,7 +3350,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.MulEqualToken) + $$.AddComments($2.Comments, comment.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3362,7 +3362,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PowEqualToken) + $$.AddComments($2.Comments, comment.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3374,7 +3374,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DivEqualToken) + $$.AddComments($2.Comments, comment.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3386,7 +3386,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ConcatEqualToken) + $$.AddComments($2.Comments, comment.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3398,7 +3398,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ModEqualToken) + $$.AddComments($2.Comments, comment.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3410,7 +3410,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AndEqualToken) + $$.AddComments($2.Comments, comment.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3422,7 +3422,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OrEqualToken) + $$.AddComments($2.Comments, comment.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3434,7 +3434,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.XorEqualToken) + $$.AddComments($2.Comments, comment.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3446,7 +3446,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlEqualToken) + $$.AddComments($2.Comments, comment.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3458,7 +3458,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SrEqualToken) + $$.AddComments($2.Comments, comment.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3470,7 +3470,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IncToken) + $$.AddComments($2.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3482,7 +3482,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IncToken) + $$.AddComments($1.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3494,7 +3494,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DecToken) + $$.AddComments($2.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3506,7 +3506,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DecToken) + $$.AddComments($1.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3518,7 +3518,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.BooleanOrToken) + $$.AddComments($2.Comments, comment.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3530,7 +3530,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.BooleanAndToken) + $$.AddComments($2.Comments, comment.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3542,7 +3542,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalOrToken) + $$.AddComments($2.Comments, comment.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3554,7 +3554,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalAndToken) + $$.AddComments($2.Comments, comment.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3566,7 +3566,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalXorToken) + $$.AddComments($2.Comments, comment.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3578,7 +3578,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.VerticalBarToken) + $$.AddComments($2.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3590,7 +3590,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3602,7 +3602,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CaretToken) + $$.AddComments($2.Comments, comment.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3614,7 +3614,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DotToken) + $$.AddComments($2.Comments, comment.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3626,7 +3626,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PlusToken) + $$.AddComments($2.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3638,7 +3638,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.MinusToken) + $$.AddComments($2.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3650,7 +3650,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsteriskToken) + $$.AddComments($2.Comments, comment.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3662,7 +3662,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PowToken) + $$.AddComments($2.Comments, comment.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3674,7 +3674,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlashToken) + $$.AddComments($2.Comments, comment.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3686,7 +3686,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PercentToken) + $$.AddComments($2.Comments, comment.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3698,7 +3698,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlToken) + $$.AddComments($2.Comments, comment.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3710,7 +3710,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SrToken) + $$.AddComments($2.Comments, comment.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3722,7 +3722,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PlusToken) + $$.AddComments($1.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3734,7 +3734,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.MinusToken) + $$.AddComments($1.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3746,7 +3746,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExclamationMarkToken) + $$.AddComments($1.Comments, comment.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3758,7 +3758,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TildeToken) + $$.AddComments($1.Comments, comment.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3770,7 +3770,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsIdenticalToken) + $$.AddComments($2.Comments, comment.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3782,7 +3782,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsNotIdenticalToken) + $$.AddComments($2.Comments, comment.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3794,7 +3794,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsEqualToken) + $$.AddComments($2.Comments, comment.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3806,7 +3806,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsNotEqualToken) + $$.AddComments($2.Comments, comment.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3818,7 +3818,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LessToken) + $$.AddComments($2.Comments, comment.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3830,7 +3830,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsSmallerOrEqualToken) + $$.AddComments($2.Comments, comment.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3842,7 +3842,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.GreaterToken) + $$.AddComments($2.Comments, comment.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3854,7 +3854,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsGreaterOrEqualToken) + $$.AddComments($2.Comments, comment.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3866,7 +3866,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.InstanceofToken) + $$.AddComments($2.Comments, comment.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3906,8 +3906,8 @@ expr_without_variable: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3919,8 +3919,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.ColonToken) + $$.AddComments($2.Comments, comment.QuestionMarkToken) + $$.AddComments($4.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3932,8 +3932,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.ColonToken) + $$.AddComments($2.Comments, comment.QuestionMarkToken) + $$.AddComments($3.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3951,7 +3951,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IntCastToken) + $$.AddComments($1.Comments, comment.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3963,7 +3963,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DoubleCastToken) + $$.AddComments($1.Comments, comment.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3975,7 +3975,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StringCastToken) + $$.AddComments($1.Comments, comment.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3987,7 +3987,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ArrayCastToken) + $$.AddComments($1.Comments, comment.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3999,7 +3999,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ObjectCastToken) + $$.AddComments($1.Comments, comment.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4011,7 +4011,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.BoolCastToken) + $$.AddComments($1.Comments, comment.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4023,7 +4023,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UnsetCastToken) + $$.AddComments($1.Comments, comment.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4044,12 +4044,14 @@ expr_without_variable: // save position if $2 == nil { $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) + } else if yylex.(*Parser).currentToken.Value == ")" { + $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, yylex.(*Parser).currentToken)) } else { $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExitToken) + $$.AddComments($1.Comments, comment.ExitToken) if $2 != nil { yylex.(*Parser).comments.AddFromChildNode($$, $2) @@ -4065,7 +4067,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AtToken) + $$.AddComments($1.Comments, comment.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4095,8 +4097,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.BackquoteToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.BackquoteToken) + $$.AddComments($1.Comments, comment.BackquoteToken) + $$.AddComments($3.Comments, comment.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4108,7 +4110,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PrintToken) + $$.AddComments($1.Comments, comment.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4120,7 +4122,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) + $$.AddComments($1.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4132,14 +4134,14 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $9)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FunctionToken) + $$.AddComments($1.Comments, comment.FunctionToken) if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken($$, $3, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $9, comment.CloseCurlyBracesToken) + $$.AddComments($3.Comments, comment.OpenParenthesisToken) + $$.AddComments($5.Comments, comment.CloseParenthesisToken) + $$.AddComments($7.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($9.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4151,15 +4153,15 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $10)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.FunctionToken) + $$.AddComments($1.Comments, comment.StaticToken) + $$.AddComments($2.Comments, comment.FunctionToken) if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AmpersandToken) + $$.AddComments($3.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $10, comment.CloseCurlyBracesToken) + $$.AddComments($4.Comments, comment.OpenParenthesisToken) + $$.AddComments($6.Comments, comment.CloseParenthesisToken) + $$.AddComments($8.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($10.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4174,7 +4176,7 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) + $$.AddComments($1.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4186,7 +4188,7 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) + $$.AddComments($1.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4198,8 +4200,8 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.DoubleArrowToken) + $$.AddComments($1.Comments, comment.YieldToken) + $$.AddComments($3.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4211,8 +4213,8 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.DoubleArrowToken) + $$.AddComments($1.Comments, comment.YieldToken) + $$.AddComments($3.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4227,8 +4229,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4240,8 +4242,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4255,8 +4257,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(str, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4268,8 +4270,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4284,9 +4286,9 @@ combined_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ArrayToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ArrayToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4298,8 +4300,8 @@ combined_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseSquareBracket) + $$.AddComments($1.Comments, comment.OpenSquareBracket) + $$.AddComments($3.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4341,8 +4343,8 @@ lexical_var_list: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(variable, $3, comment.VariableToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + variable.AddComments($3.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4359,9 +4361,9 @@ lexical_var_list: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($3, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(reference, $3, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(variable, $4, comment.VariableToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + reference.AddComments($3.Comments, comment.VariableToken) + variable.AddComments($4.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4376,7 +4378,7 @@ lexical_var_list: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) + variable.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4393,8 +4395,8 @@ lexical_var_list: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken(reference, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(variable, $2, comment.VariableToken) + reference.AddComments($1.Comments, comment.VariableToken) + variable.AddComments($2.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4422,8 +4424,8 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(funcName, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(funcName, $2, comment.NsSeparatorToken) + funcName.AddComments($1.Comments, comment.NamespaceToken) + funcName.AddComments($2.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4437,7 +4439,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(funcName, $1, comment.NsSeparatorToken) + funcName.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4449,7 +4451,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4461,7 +4463,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4473,7 +4475,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4485,7 +4487,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4509,7 +4511,7 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) + $$.AddComments($1.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4530,8 +4532,8 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($2.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4543,7 +4545,7 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4567,8 +4569,8 @@ fully_qualified_class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($2.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4580,7 +4582,7 @@ fully_qualified_class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4607,7 +4609,7 @@ dynamic_class_name_reference: $$ = $1 // save comments - yylex.(*Parser).comments.AddFromToken($3[0], $2, comment.ObjectOperatorToken) + $3[0].AddComments($2.Comments, comment.ObjectOperatorToken) for _, n := range($3) { switch nn := n.(type) { @@ -4670,7 +4672,7 @@ dynamic_class_name_variable_property: $$ = $2 // save comments - yylex.(*Parser).comments.AddFromToken($2[0], $1, comment.ObjectOperatorToken) + $2[0].AddComments($1.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4691,8 +4693,8 @@ exit_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($2.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4752,7 +4754,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.LnumberToken) + $$.AddComments($1.Comments, comment.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4764,7 +4766,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DnumberToken) + $$.AddComments($1.Comments, comment.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4776,7 +4778,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ConstantEncapsedStringToken) + $$.AddComments($1.Comments, comment.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4788,7 +4790,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.LineToken) + $$.AddComments($1.Comments, comment.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4800,7 +4802,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FileToken) + $$.AddComments($1.Comments, comment.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4812,7 +4814,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DirToken) + $$.AddComments($1.Comments, comment.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4824,7 +4826,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TraitCToken) + $$.AddComments($1.Comments, comment.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4836,7 +4838,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.MethodCToken) + $$.AddComments($1.Comments, comment.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4848,7 +4850,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FuncCToken) + $$.AddComments($1.Comments, comment.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4860,7 +4862,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsCToken) + $$.AddComments($1.Comments, comment.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4874,7 +4876,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StartHeredocToken) + $$.AddComments($1.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4886,7 +4888,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StartHeredocToken) + $$.AddComments($1.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4903,8 +4905,8 @@ static_class_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, $3, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + target.AddComments($3.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4953,8 +4955,8 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($2.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4968,7 +4970,7 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4980,9 +4982,9 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ArrayToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ArrayToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4994,8 +4996,8 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseSquareBracket) + $$.AddComments($1.Comments, comment.OpenSquareBracket) + $$.AddComments($3.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5013,7 +5015,7 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ClassCToken) + $$.AddComments($1.Comments, comment.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5034,8 +5036,8 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5047,7 +5049,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PlusToken) + $$.AddComments($2.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5059,7 +5061,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.MinusToken) + $$.AddComments($2.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5071,7 +5073,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsteriskToken) + $$.AddComments($2.Comments, comment.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5083,7 +5085,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PowToken) + $$.AddComments($2.Comments, comment.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5095,7 +5097,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlashToken) + $$.AddComments($2.Comments, comment.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5107,7 +5109,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PercentToken) + $$.AddComments($2.Comments, comment.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5119,7 +5121,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExclamationMarkToken) + $$.AddComments($1.Comments, comment.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5131,7 +5133,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TildeToken) + $$.AddComments($1.Comments, comment.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5143,7 +5145,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.VerticalBarToken) + $$.AddComments($2.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5155,7 +5157,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5167,7 +5169,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CaretToken) + $$.AddComments($2.Comments, comment.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5179,7 +5181,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlToken) + $$.AddComments($2.Comments, comment.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5191,7 +5193,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SrToken) + $$.AddComments($2.Comments, comment.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5203,7 +5205,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DotToken) + $$.AddComments($2.Comments, comment.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5215,7 +5217,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalXorToken) + $$.AddComments($2.Comments, comment.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5227,7 +5229,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalAndToken) + $$.AddComments($2.Comments, comment.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5239,7 +5241,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalOrToken) + $$.AddComments($2.Comments, comment.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5251,7 +5253,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.BooleanAndToken) + $$.AddComments($2.Comments, comment.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5263,7 +5265,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.BooleanOrToken) + $$.AddComments($2.Comments, comment.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5275,7 +5277,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsIdenticalToken) + $$.AddComments($2.Comments, comment.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5287,7 +5289,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsNotIdenticalToken) + $$.AddComments($2.Comments, comment.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5299,7 +5301,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsEqualToken) + $$.AddComments($2.Comments, comment.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5311,7 +5313,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsNotEqualToken) + $$.AddComments($2.Comments, comment.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5323,7 +5325,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LessToken) + $$.AddComments($2.Comments, comment.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5335,7 +5337,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.GreaterToken) + $$.AddComments($2.Comments, comment.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5347,7 +5349,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsSmallerOrEqualToken) + $$.AddComments($2.Comments, comment.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5359,7 +5361,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsGreaterOrEqualToken) + $$.AddComments($2.Comments, comment.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5371,8 +5373,8 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.ColonToken) + $$.AddComments($2.Comments, comment.QuestionMarkToken) + $$.AddComments($3.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5384,8 +5386,8 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.ColonToken) + $$.AddComments($2.Comments, comment.QuestionMarkToken) + $$.AddComments($4.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5397,7 +5399,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PlusToken) + $$.AddComments($1.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5409,7 +5411,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.MinusToken) + $$.AddComments($1.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5418,8 +5420,8 @@ static_operation: $$ = $2 // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5451,8 +5453,8 @@ general_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($2.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5466,7 +5468,7 @@ general_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5483,7 +5485,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $1, comment.StringVarnameToken) + name.AddComments($1.Comments, comment.StringVarnameToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5513,7 +5515,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DoubleQuoteToken) + $$.AddComments($1.Comments, comment.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5525,7 +5527,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StartHeredocToken) + $$.AddComments($1.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5537,7 +5539,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ClassCToken) + $$.AddComments($1.Comments, comment.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5556,7 +5558,7 @@ static_array_pair_list: // save comments if $2 != nil { - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -5584,8 +5586,8 @@ non_empty_static_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($3, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(arrayItem, $4, comment.DoubleArrowToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + arrayItem.AddComments($4.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5598,7 +5600,7 @@ non_empty_static_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5611,7 +5613,7 @@ non_empty_static_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(arrayItem, $2, comment.DoubleArrowToken) + arrayItem.AddComments($2.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5697,7 +5699,7 @@ variable: } // save comments - yylex.(*Parser).comments.AddFromToken($3[0], $2, comment.ObjectOperatorToken) + $3[0].AddComments($2.Comments, comment.ObjectOperatorToken) for _, n := range($3) { switch nn := n.(type) { @@ -5774,7 +5776,7 @@ variable_property: $$ = $2 // save comments - yylex.(*Parser).comments.AddFromToken($2[0], $1, comment.ObjectOperatorToken) + $2[0].AddComments($1.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5790,8 +5792,8 @@ array_method_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, $4, comment.CloseSquareBracket) + fetch.AddComments($2.Comments, comment.OpenSquareBracket) + fetch.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5804,8 +5806,8 @@ array_method_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, $4, comment.CloseSquareBracket) + fetch.AddComments($2.Comments, comment.OpenSquareBracket) + fetch.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5874,7 +5876,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5886,7 +5888,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5910,8 +5912,8 @@ array_function_dereference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5923,8 +5925,8 @@ array_function_dereference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5988,8 +5990,8 @@ reference_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6001,8 +6003,8 @@ reference_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6026,7 +6028,7 @@ compound_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6038,9 +6040,9 @@ compound_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6091,8 +6093,8 @@ object_dim_list: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(fetch, $4, comment.CloseSquareBracket) + fetch.AddComments($2.Comments, comment.OpenSquareBracket) + fetch.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6105,8 +6107,8 @@ object_dim_list: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(fetch, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(fetch, $4, comment.CloseCurlyBracesToken) + fetch.AddComments($2.Comments, comment.OpenCurlyBracesToken) + fetch.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6131,7 +6133,7 @@ variable_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StringToken) + $$.AddComments($1.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6143,8 +6145,8 @@ variable_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6160,7 +6162,7 @@ simple_indirect_reference: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(n, $1, comment.DollarToken) + n.AddComments($1.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6177,7 +6179,7 @@ simple_indirect_reference: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken(n, $2, comment.DollarToken) + n.AddComments($2.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6189,7 +6191,7 @@ assignment_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6226,9 +6228,9 @@ assignment_list_element: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(item)) // save comments - yylex.(*Parser).comments.AddFromToken(item, $1, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(item, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(item, $4, comment.CloseParenthesisToken) + item.AddComments($1.Comments, comment.ListToken) + item.AddComments($2.Comments, comment.OpenParenthesisToken) + item.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6254,7 +6256,7 @@ array_pair_list: // save comments if $2 != nil { - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -6271,8 +6273,8 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($3, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(arrayItem, $4, comment.DoubleArrowToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + arrayItem.AddComments($4.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6285,7 +6287,7 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6298,7 +6300,7 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(arrayItem, $2, comment.DoubleArrowToken) + arrayItem.AddComments($2.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6323,9 +6325,9 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($3, $6)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(arrayItem, $4, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(reference, $5, comment.AmpersandToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + arrayItem.AddComments($4.Comments, comment.DoubleArrowToken) + reference.AddComments($5.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6340,8 +6342,8 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) - yylex.(*Parser).comments.AddFromToken(reference, $3, comment.AmpersandToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) + reference.AddComments($3.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6356,8 +6358,8 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(arrayItem, $2, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(reference, $3, comment.AmpersandToken) + arrayItem.AddComments($2.Comments, comment.DoubleArrowToken) + reference.AddComments($3.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6372,7 +6374,7 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken(reference, $1, comment.AmpersandToken) + reference.AddComments($1.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6394,7 +6396,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, $2, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments($2.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6413,7 +6415,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, $1, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments($1.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6430,7 +6432,7 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6446,9 +6448,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + variable.AddComments($1.Comments, comment.VariableToken) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6466,9 +6468,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ObjectOperatorToken) - yylex.(*Parser).comments.AddFromToken(fetch, $3, comment.StringToken) + variable.AddComments($1.Comments, comment.VariableToken) + $$.AddComments($2.Comments, comment.ObjectOperatorToken) + fetch.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6480,8 +6482,8 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6495,9 +6497,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) + name.AddComments($2.Comments, comment.StringVarnameToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6513,11 +6515,11 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(variable, $2, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) + variable.AddComments($2.Comments, comment.StringVarnameToken) + $$.AddComments($3.Comments, comment.OpenSquareBracket) + $$.AddComments($5.Comments, comment.CloseSquareBracket) + $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6538,7 +6540,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StringToken) + $$.AddComments($1.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6555,7 +6557,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NumStringToken) + $$.AddComments($1.Comments, comment.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6569,7 +6571,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6584,9 +6586,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IssetToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.IssetToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6598,9 +6600,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EmptyToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.EmptyToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6612,9 +6614,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EmptyToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.EmptyToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6626,7 +6628,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IncludeToken) + $$.AddComments($1.Comments, comment.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6638,7 +6640,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IncludeOnceToken) + $$.AddComments($1.Comments, comment.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6650,9 +6652,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EvalToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.EvalToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6664,7 +6666,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.RequireToken) + $$.AddComments($1.Comments, comment.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6676,7 +6678,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.RequireOnceToken) + $$.AddComments($1.Comments, comment.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6694,7 +6696,7 @@ isset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6726,7 +6728,7 @@ class_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6740,7 +6742,7 @@ class_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6757,7 +6759,7 @@ static_class_name_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6774,7 +6776,7 @@ class_name_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/php5/php5_test.go b/php5/php5_test.go index 52c634c..61aa16b 100644 --- a/php5/php5_test.go +++ b/php5/php5_test.go @@ -12,8 +12,8 @@ import ( "github.com/z7zmey/php-parser/node/expr/cast" "github.com/z7zmey/php-parser/node/name" "github.com/z7zmey/php-parser/node/scalar" - "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/php5" + "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/stmt" @@ -417,39 +417,39 @@ func TestPhp5(t *testing.T) { expected := &node.Root{ Position: &position.Position{ StartLine: 2, - EndLine: 379, - StartPos: 6, - EndPos: 6965, + EndLine: 379, + StartPos: 6, + EndPos: 6965, }, Stmts: []node.Node{ &stmt.Expression{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 20, + EndLine: 2, + StartPos: 6, + EndPos: 20, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 19, + EndLine: 2, + StartPos: 6, + EndPos: 19, }, Function: &name.Name{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 8, + EndLine: 2, + StartPos: 6, + EndPos: 8, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 8, + EndLine: 2, + StartPos: 6, + EndPos: 8, }, Value: "foo", }, @@ -458,33 +458,33 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 9, - EndPos: 19, + EndLine: 2, + StartPos: 9, + EndPos: 19, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 10, - EndPos: 11, + EndLine: 2, + StartPos: 10, + EndPos: 11, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 10, - EndPos: 11, + EndLine: 2, + StartPos: 10, + EndPos: 11, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 10, - EndPos: 11, + EndLine: 2, + StartPos: 10, + EndPos: 11, }, Value: "a", }, @@ -493,25 +493,25 @@ func TestPhp5(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 14, - EndPos: 18, + EndLine: 2, + StartPos: 14, + EndPos: 18, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 17, - EndPos: 18, + EndLine: 2, + StartPos: 17, + EndPos: 18, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 17, - EndPos: 18, + EndLine: 2, + StartPos: 17, + EndPos: 18, }, Value: "b", }, @@ -524,30 +524,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 39, + EndLine: 3, + StartPos: 24, + EndPos: 39, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 38, + EndLine: 3, + StartPos: 24, + EndPos: 38, }, Function: &expr.Variable{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 27, + EndLine: 3, + StartPos: 24, + EndPos: 27, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 27, + EndLine: 3, + StartPos: 24, + EndPos: 27, }, Value: "foo", }, @@ -555,33 +555,33 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 28, - EndPos: 38, + EndLine: 3, + StartPos: 28, + EndPos: 38, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 29, - EndPos: 30, + EndLine: 3, + StartPos: 29, + EndPos: 30, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 29, - EndPos: 30, + EndLine: 3, + StartPos: 29, + EndPos: 30, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 29, - EndPos: 30, + EndLine: 3, + StartPos: 29, + EndPos: 30, }, Value: "a", }, @@ -590,25 +590,25 @@ func TestPhp5(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 33, - EndPos: 37, + EndLine: 3, + StartPos: 33, + EndPos: 37, }, - Variadic: true, IsReference: false, + Variadic: true, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 36, - EndPos: 37, + EndLine: 3, + StartPos: 36, + EndPos: 37, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 36, - EndPos: 37, + EndLine: 3, + StartPos: 36, + EndPos: 37, }, Value: "b", }, @@ -621,30 +621,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 63, + EndLine: 4, + StartPos: 43, + EndPos: 63, }, Expr: &expr.MethodCall{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 62, + EndLine: 4, + StartPos: 43, + EndPos: 62, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 46, + EndLine: 4, + StartPos: 43, + EndPos: 46, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 46, + EndLine: 4, + StartPos: 43, + EndPos: 46, }, Value: "foo", }, @@ -652,42 +652,42 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 49, - EndPos: 51, + EndLine: 4, + StartPos: 49, + EndPos: 51, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 52, - EndPos: 62, + EndLine: 4, + StartPos: 52, + EndPos: 62, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 53, - EndPos: 54, + EndLine: 4, + StartPos: 53, + EndPos: 54, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 53, - EndPos: 54, + EndLine: 4, + StartPos: 53, + EndPos: 54, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 53, - EndPos: 54, + EndLine: 4, + StartPos: 53, + EndPos: 54, }, Value: "a", }, @@ -696,25 +696,25 @@ func TestPhp5(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 57, - EndPos: 61, + EndLine: 4, + StartPos: 57, + EndPos: 61, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 60, - EndPos: 61, + EndLine: 4, + StartPos: 60, + EndPos: 61, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 60, - EndPos: 61, + EndLine: 4, + StartPos: 60, + EndPos: 61, }, Value: "b", }, @@ -727,31 +727,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 86, + EndLine: 5, + StartPos: 67, + EndPos: 86, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 85, + EndLine: 5, + StartPos: 67, + EndPos: 85, }, Class: &name.Name{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 69, + EndLine: 5, + StartPos: 67, + EndPos: 69, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 69, + EndLine: 5, + StartPos: 67, + EndPos: 69, }, Value: "foo", }, @@ -760,42 +760,42 @@ func TestPhp5(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 72, - EndPos: 74, + EndLine: 5, + StartPos: 72, + EndPos: 74, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 75, - EndPos: 85, + EndLine: 5, + StartPos: 75, + EndPos: 85, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 76, - EndPos: 77, + EndLine: 5, + StartPos: 76, + EndPos: 77, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 76, - EndPos: 77, + EndLine: 5, + StartPos: 76, + EndPos: 77, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 76, - EndPos: 77, + EndLine: 5, + StartPos: 76, + EndPos: 77, }, Value: "a", }, @@ -804,25 +804,25 @@ func TestPhp5(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 80, - EndPos: 84, + EndLine: 5, + StartPos: 80, + EndPos: 84, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 83, - EndPos: 84, + EndLine: 5, + StartPos: 83, + EndPos: 84, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 83, - EndPos: 84, + EndLine: 5, + StartPos: 83, + EndPos: 84, }, Value: "b", }, @@ -835,30 +835,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 110, + EndLine: 6, + StartPos: 90, + EndPos: 110, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 109, + EndLine: 6, + StartPos: 90, + EndPos: 109, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 93, + EndLine: 6, + StartPos: 90, + EndPos: 93, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 93, + EndLine: 6, + StartPos: 90, + EndPos: 93, }, Value: "foo", }, @@ -866,42 +866,42 @@ func TestPhp5(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 96, - EndPos: 98, + EndLine: 6, + StartPos: 96, + EndPos: 98, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 99, - EndPos: 109, + EndLine: 6, + StartPos: 99, + EndPos: 109, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 100, - EndPos: 101, + EndLine: 6, + StartPos: 100, + EndPos: 101, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 100, - EndPos: 101, + EndLine: 6, + StartPos: 100, + EndPos: 101, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 100, - EndPos: 101, + EndLine: 6, + StartPos: 100, + EndPos: 101, }, Value: "a", }, @@ -910,25 +910,25 @@ func TestPhp5(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 104, - EndPos: 108, + EndLine: 6, + StartPos: 104, + EndPos: 108, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 107, - EndPos: 108, + EndLine: 6, + StartPos: 107, + EndPos: 108, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 107, - EndPos: 108, + EndLine: 6, + StartPos: 107, + EndPos: 108, }, Value: "b", }, @@ -941,31 +941,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 114, - EndPos: 132, + EndLine: 7, + StartPos: 114, + EndPos: 132, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 114, - EndPos: 131, + EndLine: 7, + StartPos: 114, + EndPos: 131, }, Class: &name.Name{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 118, - EndPos: 120, + EndLine: 7, + StartPos: 118, + EndPos: 120, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 118, - EndPos: 120, + EndLine: 7, + StartPos: 118, + EndPos: 120, }, Value: "foo", }, @@ -974,33 +974,33 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 121, - EndPos: 131, + EndLine: 7, + StartPos: 121, + EndPos: 131, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 122, - EndPos: 123, + EndLine: 7, + StartPos: 122, + EndPos: 123, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 122, - EndPos: 123, + EndLine: 7, + StartPos: 122, + EndPos: 123, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 122, - EndPos: 123, + EndLine: 7, + StartPos: 122, + EndPos: 123, }, Value: "a", }, @@ -1009,25 +1009,25 @@ func TestPhp5(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 126, - EndPos: 130, + EndLine: 7, + StartPos: 126, + EndPos: 130, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 129, - EndPos: 130, + EndLine: 7, + StartPos: 129, + EndPos: 130, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 129, - EndPos: 130, + EndLine: 7, + StartPos: 129, + EndPos: 130, }, Value: "b", }, @@ -1040,18 +1040,18 @@ func TestPhp5(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 137, - EndPos: 180, + EndLine: 9, + StartPos: 137, + EndPos: 180, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 146, - EndPos: 148, + EndLine: 9, + StartPos: 146, + EndPos: 148, }, Value: "foo", }, @@ -1059,26 +1059,26 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 150, - EndPos: 162, + EndLine: 9, + StartPos: 150, + EndPos: 162, }, + ByRef: false, Variadic: false, - ByRef: false, VariableType: &name.Name{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 150, - EndPos: 152, + EndLine: 9, + StartPos: 150, + EndPos: 152, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 150, - EndPos: 152, + EndLine: 9, + StartPos: 150, + EndPos: 152, }, Value: "bar", }, @@ -1087,16 +1087,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 154, - EndPos: 157, + EndLine: 9, + StartPos: 154, + EndPos: 157, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 154, - EndPos: 157, + EndLine: 9, + StartPos: 154, + EndPos: 157, }, Value: "bar", }, @@ -1104,24 +1104,24 @@ func TestPhp5(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 159, - EndPos: 162, + EndLine: 9, + StartPos: 159, + EndPos: 162, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 159, - EndPos: 162, + EndLine: 9, + StartPos: 159, + EndPos: 162, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 159, - EndPos: 162, + EndLine: 9, + StartPos: 159, + EndPos: 162, }, Value: "null", }, @@ -1132,26 +1132,26 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 165, - EndPos: 176, + EndLine: 9, + StartPos: 165, + EndPos: 176, }, Variadic: true, - ByRef: true, + ByRef: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 165, - EndPos: 167, + EndLine: 9, + StartPos: 165, + EndPos: 167, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 165, - EndPos: 167, + EndLine: 9, + StartPos: 165, + EndPos: 167, }, Value: "baz", }, @@ -1160,39 +1160,38 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 173, - EndPos: 176, + EndLine: 9, + StartPos: 173, + EndPos: 176, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 173, - EndPos: 176, + EndLine: 9, + StartPos: 173, + EndPos: 176, }, Value: "baz", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 184, - EndPos: 246, + EndLine: 10, + StartPos: 184, + EndPos: 246, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 190, - EndPos: 192, + EndLine: 10, + StartPos: 190, + EndPos: 192, }, Value: "foo", }, @@ -1200,18 +1199,18 @@ func TestPhp5(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 195, - EndPos: 245, + EndLine: 10, + StartPos: 195, + EndPos: 245, }, PhpDocComment: "", - ReturnsRef: false, + ReturnsRef: false, MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 211, - EndPos: 213, + EndLine: 10, + StartPos: 211, + EndPos: 213, }, Value: "foo", }, @@ -1219,9 +1218,9 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 195, - EndPos: 200, + EndLine: 10, + StartPos: 195, + EndPos: 200, }, Value: "public", }, @@ -1230,26 +1229,26 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 215, - EndPos: 227, + EndLine: 10, + StartPos: 215, + EndPos: 227, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &name.Name{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 215, - EndPos: 217, + EndLine: 10, + StartPos: 215, + EndPos: 217, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 215, - EndPos: 217, + EndLine: 10, + StartPos: 215, + EndPos: 217, }, Value: "bar", }, @@ -1258,16 +1257,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 219, - EndPos: 222, + EndLine: 10, + StartPos: 219, + EndPos: 222, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 219, - EndPos: 222, + EndLine: 10, + StartPos: 219, + EndPos: 222, }, Value: "bar", }, @@ -1275,24 +1274,24 @@ func TestPhp5(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 224, - EndPos: 227, + EndLine: 10, + StartPos: 224, + EndPos: 227, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 224, - EndPos: 227, + EndLine: 10, + StartPos: 224, + EndPos: 227, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 224, - EndPos: 227, + EndLine: 10, + StartPos: 224, + EndPos: 227, }, Value: "null", }, @@ -1303,26 +1302,26 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 230, - EndPos: 241, + EndLine: 10, + StartPos: 230, + EndPos: 241, }, - ByRef: true, + ByRef: true, Variadic: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 230, - EndPos: 232, + EndLine: 10, + StartPos: 230, + EndPos: 232, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 230, - EndPos: 232, + EndLine: 10, + StartPos: 230, + EndPos: 232, }, Value: "baz", }, @@ -1331,16 +1330,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 238, - EndPos: 241, + EndLine: 10, + StartPos: 238, + EndPos: 241, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 238, - EndPos: 241, + EndLine: 10, + StartPos: 238, + EndPos: 241, }, Value: "baz", }, @@ -1350,12 +1349,11 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 244, - EndPos: 245, - }, - Stmts: []node.Node{ + EndLine: 10, + StartPos: 244, + EndPos: 245, }, + Stmts: []node.Node{}, }, }, }, @@ -1363,44 +1361,44 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 250, - EndPos: 290, + EndLine: 11, + StartPos: 250, + EndPos: 290, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 250, - EndPos: 289, + EndLine: 11, + StartPos: 250, + EndPos: 289, }, - ReturnsRef: false, - Static: false, + ReturnsRef: false, + Static: false, PhpDocComment: "", Params: []node.Node{ &node.Parameter{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 259, - EndPos: 271, + EndLine: 11, + StartPos: 259, + EndPos: 271, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &name.Name{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 259, - EndPos: 261, + EndLine: 11, + StartPos: 259, + EndPos: 261, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 259, - EndPos: 261, + EndLine: 11, + StartPos: 259, + EndPos: 261, }, Value: "bar", }, @@ -1409,16 +1407,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 263, - EndPos: 266, + EndLine: 11, + StartPos: 263, + EndPos: 266, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 263, - EndPos: 266, + EndLine: 11, + StartPos: 263, + EndPos: 266, }, Value: "bar", }, @@ -1426,24 +1424,24 @@ func TestPhp5(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 268, - EndPos: 271, + EndLine: 11, + StartPos: 268, + EndPos: 271, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 268, - EndPos: 271, + EndLine: 11, + StartPos: 268, + EndPos: 271, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 268, - EndPos: 271, + EndLine: 11, + StartPos: 268, + EndPos: 271, }, Value: "null", }, @@ -1454,26 +1452,26 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 274, - EndPos: 285, + EndLine: 11, + StartPos: 274, + EndPos: 285, }, - ByRef: true, + ByRef: true, Variadic: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 274, - EndPos: 276, + EndLine: 11, + StartPos: 274, + EndPos: 276, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 274, - EndPos: 276, + EndLine: 11, + StartPos: 274, + EndPos: 276, }, Value: "baz", }, @@ -1482,67 +1480,66 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 282, - EndPos: 285, + EndLine: 11, + StartPos: 282, + EndPos: 285, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 282, - EndPos: 285, + EndLine: 11, + StartPos: 282, + EndPos: 285, }, Value: "baz", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 294, - EndPos: 341, + EndLine: 12, + StartPos: 294, + EndPos: 341, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 294, - EndPos: 340, + EndLine: 12, + StartPos: 294, + EndPos: 340, }, - ReturnsRef: false, - Static: true, + ReturnsRef: false, + Static: true, PhpDocComment: "", Params: []node.Node{ &node.Parameter{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 310, - EndPos: 322, + EndLine: 12, + StartPos: 310, + EndPos: 322, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &name.Name{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 310, - EndPos: 312, + EndLine: 12, + StartPos: 310, + EndPos: 312, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 310, - EndPos: 312, + EndLine: 12, + StartPos: 310, + EndPos: 312, }, Value: "bar", }, @@ -1551,16 +1548,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 314, - EndPos: 317, + EndLine: 12, + StartPos: 314, + EndPos: 317, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 314, - EndPos: 317, + EndLine: 12, + StartPos: 314, + EndPos: 317, }, Value: "bar", }, @@ -1568,24 +1565,24 @@ func TestPhp5(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 319, - EndPos: 322, + EndLine: 12, + StartPos: 319, + EndPos: 322, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 319, - EndPos: 322, + EndLine: 12, + StartPos: 319, + EndPos: 322, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 319, - EndPos: 322, + EndLine: 12, + StartPos: 319, + EndPos: 322, }, Value: "null", }, @@ -1596,26 +1593,26 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 325, - EndPos: 336, + EndLine: 12, + StartPos: 325, + EndPos: 336, }, - ByRef: true, + ByRef: true, Variadic: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 325, - EndPos: 327, + EndLine: 12, + StartPos: 325, + EndPos: 327, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 325, - EndPos: 327, + EndLine: 12, + StartPos: 325, + EndPos: 327, }, Value: "baz", }, @@ -1624,39 +1621,38 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 333, - EndPos: 336, + EndLine: 12, + StartPos: 333, + EndPos: 336, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 333, - EndPos: 336, + EndLine: 12, + StartPos: 333, + EndPos: 336, }, Value: "baz", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 346, - EndPos: 365, + EndLine: 14, + StartPos: 346, + EndPos: 365, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 346, - EndPos: 364, + EndLine: 14, + StartPos: 346, + EndPos: 364, }, Value: "1234567890123456789", }, @@ -1664,16 +1660,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 369, - EndPos: 389, + EndLine: 15, + StartPos: 369, + EndPos: 389, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 369, - EndPos: 388, + EndLine: 15, + StartPos: 369, + EndPos: 388, }, Value: "12345678901234567890", }, @@ -1681,16 +1677,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 393, - EndPos: 395, + EndLine: 16, + StartPos: 393, + EndPos: 395, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 393, - EndPos: 394, + EndLine: 16, + StartPos: 393, + EndPos: 394, }, Value: "0.", }, @@ -1698,16 +1694,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 17, - EndLine: 17, - StartPos: 399, - EndPos: 465, + EndLine: 17, + StartPos: 399, + EndPos: 465, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 17, - EndLine: 17, - StartPos: 399, - EndPos: 464, + EndLine: 17, + StartPos: 399, + EndPos: 464, }, Value: "0b0111111111111111111111111111111111111111111111111111111111111111", }, @@ -1715,16 +1711,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 469, - EndPos: 535, + EndLine: 18, + StartPos: 469, + EndPos: 535, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 469, - EndPos: 534, + EndLine: 18, + StartPos: 469, + EndPos: 534, }, Value: "0b1111111111111111111111111111111111111111111111111111111111111111", }, @@ -1732,16 +1728,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 539, - EndPos: 559, + EndLine: 19, + StartPos: 539, + EndPos: 559, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 539, - EndPos: 558, + EndLine: 19, + StartPos: 539, + EndPos: 558, }, Value: "0x007111111111111111", }, @@ -1749,16 +1745,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 563, - EndPos: 581, + EndLine: 20, + StartPos: 563, + EndPos: 581, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 563, - EndPos: 580, + EndLine: 20, + StartPos: 563, + EndPos: 580, }, Value: "0x8111111111111111", }, @@ -1766,16 +1762,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 585, - EndPos: 594, + EndLine: 21, + StartPos: 585, + EndPos: 594, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 585, - EndPos: 593, + EndLine: 21, + StartPos: 585, + EndPos: 593, }, Value: "__CLASS__", }, @@ -1783,16 +1779,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 22, - EndLine: 22, - StartPos: 598, - EndPos: 605, + EndLine: 22, + StartPos: 598, + EndPos: 605, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 22, - EndLine: 22, - StartPos: 598, - EndPos: 604, + EndLine: 22, + StartPos: 598, + EndPos: 604, }, Value: "__DIR__", }, @@ -1800,16 +1796,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 23, - EndLine: 23, - StartPos: 609, - EndPos: 617, + EndLine: 23, + StartPos: 609, + EndPos: 617, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 23, - EndLine: 23, - StartPos: 609, - EndPos: 616, + EndLine: 23, + StartPos: 609, + EndPos: 616, }, Value: "__FILE__", }, @@ -1817,16 +1813,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 24, - EndLine: 24, - StartPos: 621, - EndPos: 633, + EndLine: 24, + StartPos: 621, + EndPos: 633, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 24, - EndLine: 24, - StartPos: 621, - EndPos: 632, + EndLine: 24, + StartPos: 621, + EndPos: 632, }, Value: "__FUNCTION__", }, @@ -1834,16 +1830,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 25, - EndLine: 25, - StartPos: 637, - EndPos: 645, + EndLine: 25, + StartPos: 637, + EndPos: 645, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 25, - EndLine: 25, - StartPos: 637, - EndPos: 644, + EndLine: 25, + StartPos: 637, + EndPos: 644, }, Value: "__LINE__", }, @@ -1851,16 +1847,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 26, - EndLine: 26, - StartPos: 649, - EndPos: 662, + EndLine: 26, + StartPos: 649, + EndPos: 662, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 26, - EndLine: 26, - StartPos: 649, - EndPos: 661, + EndLine: 26, + StartPos: 649, + EndPos: 661, }, Value: "__NAMESPACE__", }, @@ -1868,16 +1864,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 27, - EndLine: 27, - StartPos: 666, - EndPos: 676, + EndLine: 27, + StartPos: 666, + EndPos: 676, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 27, - EndLine: 27, - StartPos: 666, - EndPos: 675, + EndLine: 27, + StartPos: 666, + EndPos: 675, }, Value: "__METHOD__", }, @@ -1885,16 +1881,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 28, - EndLine: 28, - StartPos: 680, - EndPos: 689, + EndLine: 28, + StartPos: 680, + EndPos: 689, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 28, - EndLine: 28, - StartPos: 680, - EndPos: 688, + EndLine: 28, + StartPos: 680, + EndPos: 688, }, Value: "__TRAIT__", }, @@ -1902,40 +1898,40 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 30, - EndLine: 30, - StartPos: 694, - EndPos: 705, + EndLine: 30, + StartPos: 694, + EndPos: 705, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 30, - EndLine: 30, - StartPos: 694, - EndPos: 704, + EndLine: 30, + StartPos: 694, + EndPos: 704, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 30, - EndLine: 30, - StartPos: 695, - EndPos: 699, + EndLine: 30, + StartPos: 695, + EndPos: 699, }, Value: "test ", }, &expr.Variable{ Position: &position.Position{ StartLine: 30, - EndLine: 30, - StartPos: 700, - EndPos: 703, + EndLine: 30, + StartPos: 700, + EndPos: 703, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 30, - EndLine: 30, - StartPos: 700, - EndPos: 703, + EndLine: 30, + StartPos: 700, + EndPos: 703, }, Value: "var", }, @@ -1946,47 +1942,47 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 709, - EndPos: 723, + EndLine: 31, + StartPos: 709, + EndPos: 723, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 709, - EndPos: 722, + EndLine: 31, + StartPos: 709, + EndPos: 722, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 710, - EndPos: 714, + EndLine: 31, + StartPos: 710, + EndPos: 714, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 715, - EndPos: 721, + EndLine: 31, + StartPos: 715, + EndPos: 721, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 715, - EndPos: 718, + EndLine: 31, + StartPos: 715, + EndPos: 718, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 715, - EndPos: 718, + EndLine: 31, + StartPos: 715, + EndPos: 718, }, Value: "var", }, @@ -1994,9 +1990,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 720, - EndPos: 720, + EndLine: 31, + StartPos: 720, + EndPos: 720, }, Value: "1", }, @@ -2007,47 +2003,47 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 727, - EndPos: 780, + EndLine: 32, + StartPos: 727, + EndPos: 780, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 727, - EndPos: 779, + EndLine: 32, + StartPos: 727, + EndPos: 779, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 728, - EndPos: 732, + EndLine: 32, + StartPos: 728, + EndPos: 732, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 733, - EndPos: 778, + EndLine: 32, + StartPos: 733, + EndPos: 778, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 733, - EndPos: 736, + EndLine: 32, + StartPos: 733, + EndPos: 736, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 733, - EndPos: 736, + EndLine: 32, + StartPos: 733, + EndPos: 736, }, Value: "var", }, @@ -2055,9 +2051,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.String{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 738, - EndPos: 777, + EndLine: 32, + StartPos: 738, + EndPos: 777, }, Value: "1234567890123456789012345678901234567890", }, @@ -2068,47 +2064,47 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 784, - EndPos: 800, + EndLine: 33, + StartPos: 784, + EndPos: 800, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 784, - EndPos: 799, + EndLine: 33, + StartPos: 784, + EndPos: 799, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 785, - EndPos: 789, + EndLine: 33, + StartPos: 785, + EndPos: 789, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 790, - EndPos: 798, + EndLine: 33, + StartPos: 790, + EndPos: 798, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 790, - EndPos: 793, + EndLine: 33, + StartPos: 790, + EndPos: 793, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 790, - EndPos: 793, + EndLine: 33, + StartPos: 790, + EndPos: 793, }, Value: "var", }, @@ -2116,9 +2112,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.String{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 795, - EndPos: 797, + EndLine: 33, + StartPos: 795, + EndPos: 797, }, Value: "bar", }, @@ -2129,47 +2125,47 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 804, - EndPos: 821, + EndLine: 34, + StartPos: 804, + EndPos: 821, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 804, - EndPos: 820, + EndLine: 34, + StartPos: 804, + EndPos: 820, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 805, - EndPos: 809, + EndLine: 34, + StartPos: 805, + EndPos: 809, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 810, - EndPos: 819, + EndLine: 34, + StartPos: 810, + EndPos: 819, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 810, - EndPos: 813, + EndLine: 34, + StartPos: 810, + EndPos: 813, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 810, - EndPos: 813, + EndLine: 34, + StartPos: 810, + EndPos: 813, }, Value: "var", }, @@ -2177,16 +2173,16 @@ func TestPhp5(t *testing.T) { Dim: &expr.Variable{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 815, - EndPos: 818, + EndLine: 34, + StartPos: 815, + EndPos: 818, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 815, - EndPos: 818, + EndLine: 34, + StartPos: 815, + EndPos: 818, }, Value: "bar", }, @@ -2198,31 +2194,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 825, - EndPos: 836, + EndLine: 35, + StartPos: 825, + EndPos: 836, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 825, - EndPos: 835, + EndLine: 35, + StartPos: 825, + EndPos: 835, }, Parts: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 826, - EndPos: 829, + EndLine: 35, + StartPos: 826, + EndPos: 829, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 826, - EndPos: 829, + EndLine: 35, + StartPos: 826, + EndPos: 829, }, Value: "foo", }, @@ -2230,25 +2226,25 @@ func TestPhp5(t *testing.T) { &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 830, - EndPos: 830, + EndLine: 35, + StartPos: 830, + EndPos: 830, }, Value: " ", }, &expr.Variable{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 831, - EndPos: 834, + EndLine: 35, + StartPos: 831, + EndPos: 834, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 831, - EndPos: 834, + EndLine: 35, + StartPos: 831, + EndPos: 834, }, Value: "bar", }, @@ -2259,47 +2255,47 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 840, - EndPos: 858, + EndLine: 36, + StartPos: 840, + EndPos: 858, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 840, - EndPos: 857, + EndLine: 36, + StartPos: 840, + EndPos: 857, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 841, - EndPos: 845, + EndLine: 36, + StartPos: 841, + EndPos: 845, }, Value: "test ", }, &expr.PropertyFetch{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 846, - EndPos: 854, + EndLine: 36, + StartPos: 846, + EndPos: 854, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 846, - EndPos: 849, + EndLine: 36, + StartPos: 846, + EndPos: 849, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 846, - EndPos: 849, + EndLine: 36, + StartPos: 846, + EndPos: 849, }, Value: "foo", }, @@ -2307,9 +2303,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 852, - EndPos: 854, + EndLine: 36, + StartPos: 852, + EndPos: 854, }, Value: "bar", }, @@ -2317,9 +2313,9 @@ func TestPhp5(t *testing.T) { &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 855, - EndPos: 856, + EndLine: 36, + StartPos: 855, + EndPos: 856, }, Value: "()", }, @@ -2329,40 +2325,40 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 37, - EndLine: 37, - StartPos: 862, - EndPos: 875, + EndLine: 37, + StartPos: 862, + EndPos: 875, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 37, - EndLine: 37, - StartPos: 862, - EndPos: 874, + EndLine: 37, + StartPos: 862, + EndPos: 874, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 37, - EndLine: 37, - StartPos: 863, - EndPos: 867, + EndLine: 37, + StartPos: 863, + EndPos: 867, }, Value: "test ", }, &expr.Variable{ Position: &position.Position{ StartLine: 37, - EndLine: 37, - StartPos: 868, - EndPos: 873, + EndLine: 37, + StartPos: 868, + EndPos: 873, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 37, - EndLine: 37, - StartPos: 870, - EndPos: 872, + EndLine: 37, + StartPos: 870, + EndPos: 872, }, Value: "foo", }, @@ -2373,47 +2369,47 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 38, - EndLine: 38, - StartPos: 879, - EndPos: 895, + EndLine: 38, + StartPos: 879, + EndPos: 895, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 38, - EndLine: 38, - StartPos: 879, - EndPos: 894, + EndLine: 38, + StartPos: 879, + EndPos: 894, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 38, - EndLine: 38, - StartPos: 880, - EndPos: 884, + EndLine: 38, + StartPos: 880, + EndPos: 884, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 38, - EndLine: 38, - StartPos: 885, - EndPos: 893, + EndLine: 38, + StartPos: 885, + EndPos: 893, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 38, - EndLine: 38, - StartPos: 887, - EndPos: 889, + EndLine: 38, + StartPos: 887, + EndPos: 889, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 38, - EndLine: 38, - StartPos: 887, - EndPos: 889, + EndLine: 38, + StartPos: 887, + EndPos: 889, }, Value: "foo", }, @@ -2421,9 +2417,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 38, - EndLine: 38, - StartPos: 891, - EndPos: 891, + EndLine: 38, + StartPos: 891, + EndPos: 891, }, Value: "0", }, @@ -2434,47 +2430,47 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 899, - EndPos: 919, + EndLine: 39, + StartPos: 899, + EndPos: 919, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 899, - EndPos: 918, + EndLine: 39, + StartPos: 899, + EndPos: 918, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 900, - EndPos: 904, + EndLine: 39, + StartPos: 900, + EndPos: 904, }, Value: "test ", }, &expr.MethodCall{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 906, - EndPos: 916, + EndLine: 39, + StartPos: 906, + EndPos: 916, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 906, - EndPos: 909, + EndLine: 39, + StartPos: 906, + EndPos: 909, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 906, - EndPos: 909, + EndLine: 39, + StartPos: 906, + EndPos: 909, }, Value: "foo", }, @@ -2482,18 +2478,18 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 912, - EndPos: 914, + EndLine: 39, + StartPos: 912, + EndPos: 914, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 915, - EndPos: 916, + EndLine: 39, + StartPos: 915, + EndPos: 916, }, }, }, @@ -2503,23 +2499,23 @@ func TestPhp5(t *testing.T) { &stmt.AltIf{ Position: &position.Position{ StartLine: 41, - EndLine: 42, - StartPos: 924, - EndPos: 941, + EndLine: 42, + StartPos: 924, + EndPos: 941, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 928, - EndPos: 929, + EndLine: 41, + StartPos: 928, + EndPos: 929, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 928, - EndPos: 929, + EndLine: 41, + StartPos: 928, + EndPos: 929, }, Value: "a", }, @@ -2527,34 +2523,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.AltIf{ Position: &position.Position{ StartLine: 43, - EndLine: 45, - StartPos: 945, - EndPos: 977, + EndLine: 45, + StartPos: 945, + EndPos: 977, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 949, - EndPos: 950, + EndLine: 43, + StartPos: 949, + EndPos: 950, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 949, - EndPos: 950, + EndLine: 43, + StartPos: 949, + EndPos: 950, }, Value: "a", }, @@ -2562,34 +2557,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.AltElseIf{ Position: &position.Position{ StartLine: 44, - EndLine: -1, - StartPos: 957, - EndPos: -1, + EndLine: -1, + StartPos: 957, + EndPos: -1, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 965, - EndPos: 966, + EndLine: 44, + StartPos: 965, + EndPos: 966, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 965, - EndPos: 966, + EndLine: 44, + StartPos: 965, + EndPos: 966, }, Value: "b", }, @@ -2597,12 +2591,11 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, @@ -2610,23 +2603,23 @@ func TestPhp5(t *testing.T) { &stmt.AltIf{ Position: &position.Position{ StartLine: 46, - EndLine: 48, - StartPos: 981, - EndPos: 1006, + EndLine: 48, + StartPos: 981, + EndPos: 1006, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 985, - EndPos: 986, + EndLine: 46, + StartPos: 985, + EndPos: 986, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 985, - EndPos: 986, + EndLine: 46, + StartPos: 985, + EndPos: 986, }, Value: "a", }, @@ -2634,52 +2627,50 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, Else: &stmt.AltElse{ Position: &position.Position{ StartLine: 47, - EndLine: -1, - StartPos: 993, - EndPos: -1, + EndLine: -1, + StartPos: 993, + EndPos: -1, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, &stmt.AltIf{ Position: &position.Position{ StartLine: 49, - EndLine: 53, - StartPos: 1010, - EndPos: 1065, + EndLine: 53, + StartPos: 1010, + EndPos: 1065, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1014, - EndPos: 1015, + EndLine: 49, + StartPos: 1014, + EndPos: 1015, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1014, - EndPos: 1015, + EndLine: 49, + StartPos: 1014, + EndPos: 1015, }, Value: "a", }, @@ -2687,34 +2678,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.AltElseIf{ Position: &position.Position{ StartLine: 50, - EndLine: -1, - StartPos: 1022, - EndPos: -1, + EndLine: -1, + StartPos: 1022, + EndPos: -1, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1030, - EndPos: 1031, + EndLine: 50, + StartPos: 1030, + EndPos: 1031, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1030, - EndPos: 1031, + EndLine: 50, + StartPos: 1030, + EndPos: 1031, }, Value: "b", }, @@ -2722,34 +2712,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.AltElseIf{ Position: &position.Position{ StartLine: 51, - EndLine: -1, - StartPos: 1037, - EndPos: -1, + EndLine: -1, + StartPos: 1037, + EndPos: -1, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1045, - EndPos: 1046, + EndLine: 51, + StartPos: 1045, + EndPos: 1046, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1045, - EndPos: 1046, + EndLine: 51, + StartPos: 1045, + EndPos: 1046, }, Value: "c", }, @@ -2757,64 +2746,62 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, Else: &stmt.AltElse{ Position: &position.Position{ StartLine: 52, - EndLine: -1, - StartPos: 1052, - EndPos: -1, + EndLine: -1, + StartPos: 1052, + EndPos: -1, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, &stmt.While{ Position: &position.Position{ StartLine: 55, - EndLine: 55, - StartPos: 1070, - EndPos: 1089, + EndLine: 55, + StartPos: 1070, + EndPos: 1089, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 55, - EndLine: 55, - StartPos: 1077, - EndPos: 1077, + EndLine: 55, + StartPos: 1077, + EndPos: 1077, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 55, - EndLine: 55, - StartPos: 1080, - EndPos: 1089, + EndLine: 55, + StartPos: 1080, + EndPos: 1089, }, Stmts: []node.Node{ &stmt.Break{ Position: &position.Position{ StartLine: 55, - EndLine: 55, - StartPos: 1082, - EndPos: 1087, + EndLine: 55, + StartPos: 1082, + EndPos: 1087, }, }, }, @@ -2823,40 +2810,40 @@ func TestPhp5(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 56, - EndLine: 56, - StartPos: 1093, - EndPos: 1114, + EndLine: 56, + StartPos: 1093, + EndPos: 1114, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 56, - EndLine: 56, - StartPos: 1100, - EndPos: 1100, + EndLine: 56, + StartPos: 1100, + EndPos: 1100, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 56, - EndLine: 56, - StartPos: 1103, - EndPos: 1114, + EndLine: 56, + StartPos: 1103, + EndPos: 1114, }, Stmts: []node.Node{ &stmt.Break{ Position: &position.Position{ StartLine: 56, - EndLine: 56, - StartPos: 1105, - EndPos: 1112, + EndLine: 56, + StartPos: 1105, + EndPos: 1112, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 56, - EndLine: 56, - StartPos: 1111, - EndPos: 1111, + EndLine: 56, + StartPos: 1111, + EndPos: 1111, }, Value: "2", }, @@ -2867,40 +2854,40 @@ func TestPhp5(t *testing.T) { &stmt.AltWhile{ Position: &position.Position{ StartLine: 57, - EndLine: 57, - StartPos: 1118, - EndPos: 1148, + EndLine: 57, + StartPos: 1118, + EndPos: 1148, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 57, - EndLine: 57, - StartPos: 1125, - EndPos: 1125, + EndLine: 57, + StartPos: 1125, + EndPos: 1125, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 57, - EndLine: 57, - StartPos: 1130, - EndPos: 1138, + EndLine: 57, + StartPos: 1130, + EndPos: 1138, }, Stmts: []node.Node{ &stmt.Break{ Position: &position.Position{ StartLine: 57, - EndLine: 57, - StartPos: 1130, - EndPos: 1138, + EndLine: 57, + StartPos: 1130, + EndPos: 1138, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 57, - EndLine: 57, - StartPos: 1136, - EndPos: 1136, + EndLine: 57, + StartPos: 1136, + EndPos: 1136, }, Value: "3", }, @@ -2911,17 +2898,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1152, - EndPos: 1187, + EndLine: 58, + StartPos: 1152, + EndPos: 1187, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1158, - EndPos: 1160, + EndLine: 58, + StartPos: 1158, + EndPos: 1160, }, Value: "foo", }, @@ -2929,34 +2916,34 @@ func TestPhp5(t *testing.T) { &stmt.ClassConstList{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1163, - EndPos: 1185, + EndLine: 58, + StartPos: 1163, + EndPos: 1185, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1169, - EndPos: 1175, + EndLine: 58, + StartPos: 1169, + EndPos: 1175, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1169, - EndPos: 1171, + EndLine: 58, + StartPos: 1169, + EndPos: 1171, }, Value: "FOO", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1175, - EndPos: 1175, + EndLine: 58, + StartPos: 1175, + EndPos: 1175, }, Value: "1", }, @@ -2964,26 +2951,26 @@ func TestPhp5(t *testing.T) { &stmt.Constant{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1178, - EndPos: 1184, + EndLine: 58, + StartPos: 1178, + EndPos: 1184, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1178, - EndPos: 1180, + EndLine: 58, + StartPos: 1178, + EndPos: 1180, }, Value: "BAR", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1184, - EndPos: 1184, + EndLine: 58, + StartPos: 1184, + EndPos: 1184, }, Value: "2", }, @@ -2995,17 +2982,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 59, - EndLine: 59, - StartPos: 1191, - EndPos: 1220, + EndLine: 59, + StartPos: 1191, + EndPos: 1220, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 59, - EndLine: 59, - StartPos: 1197, - EndPos: 1199, + EndLine: 59, + StartPos: 1197, + EndPos: 1199, }, Value: "foo", }, @@ -3013,30 +3000,29 @@ func TestPhp5(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 59, - EndLine: 59, - StartPos: 1202, - EndPos: 1218, + EndLine: 59, + StartPos: 1202, + EndPos: 1218, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 59, - EndLine: 59, - StartPos: 1211, - EndPos: 1213, + EndLine: 59, + StartPos: 1211, + EndPos: 1213, }, Value: "bar", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 59, - EndLine: 59, - StartPos: 1217, - EndPos: 1218, - }, - Stmts: []node.Node{ + EndLine: 59, + StartPos: 1217, + EndPos: 1218, }, + Stmts: []node.Node{}, }, }, }, @@ -3044,17 +3030,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1224, - EndPos: 1268, + EndLine: 60, + StartPos: 1224, + EndPos: 1268, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1230, - EndPos: 1232, + EndLine: 60, + StartPos: 1230, + EndPos: 1232, }, Value: "foo", }, @@ -3062,18 +3048,18 @@ func TestPhp5(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1235, - EndPos: 1266, + EndLine: 60, + StartPos: 1235, + EndPos: 1266, }, - ReturnsRef: true, + ReturnsRef: true, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1259, - EndPos: 1261, + EndLine: 60, + StartPos: 1259, + EndPos: 1261, }, Value: "bar", }, @@ -3081,18 +3067,18 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1235, - EndPos: 1240, + EndLine: 60, + StartPos: 1235, + EndPos: 1240, }, Value: "public", }, &node.Identifier{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1242, - EndPos: 1247, + EndLine: 60, + StartPos: 1242, + EndPos: 1247, }, Value: "static", }, @@ -3100,12 +3086,11 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1265, - EndPos: 1266, - }, - Stmts: []node.Node{ + EndLine: 60, + StartPos: 1265, + EndPos: 1266, }, + Stmts: []node.Node{}, }, }, }, @@ -3113,17 +3098,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1272, - EndPos: 1343, + EndLine: 61, + StartPos: 1272, + EndPos: 1343, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1278, - EndPos: 1280, + EndLine: 61, + StartPos: 1278, + EndPos: 1280, }, Value: "foo", }, @@ -3131,18 +3116,18 @@ func TestPhp5(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1283, - EndPos: 1313, + EndLine: 61, + StartPos: 1283, + EndPos: 1313, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1306, - EndPos: 1308, + EndLine: 61, + StartPos: 1306, + EndPos: 1308, }, Value: "bar", }, @@ -3150,18 +3135,18 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1283, - EndPos: 1287, + EndLine: 61, + StartPos: 1283, + EndPos: 1287, }, Value: "final", }, &node.Identifier{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1289, - EndPos: 1295, + EndLine: 61, + StartPos: 1289, + EndPos: 1295, }, Value: "private", }, @@ -3169,29 +3154,28 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1312, - EndPos: 1313, - }, - Stmts: []node.Node{ + EndLine: 61, + StartPos: 1312, + EndPos: 1313, }, + Stmts: []node.Node{}, }, }, &stmt.ClassMethod{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1315, - EndPos: 1341, + EndLine: 61, + StartPos: 1315, + EndPos: 1341, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1334, - EndPos: 1336, + EndLine: 61, + StartPos: 1334, + EndPos: 1336, }, Value: "baz", }, @@ -3199,9 +3183,9 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1315, - EndPos: 1323, + EndLine: 61, + StartPos: 1315, + EndPos: 1323, }, Value: "protected", }, @@ -3209,12 +3193,11 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1340, - EndPos: 1341, - }, - Stmts: []node.Node{ + EndLine: 61, + StartPos: 1340, + EndPos: 1341, }, + Stmts: []node.Node{}, }, }, }, @@ -3222,17 +3205,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1347, - EndPos: 1399, + EndLine: 62, + StartPos: 1347, + EndPos: 1399, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1362, - EndPos: 1364, + EndLine: 62, + StartPos: 1362, + EndPos: 1364, }, Value: "foo", }, @@ -3240,9 +3223,9 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1347, - EndPos: 1354, + EndLine: 62, + StartPos: 1347, + EndPos: 1354, }, Value: "abstract", }, @@ -3251,18 +3234,18 @@ func TestPhp5(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1367, - EndPos: 1397, + EndLine: 62, + StartPos: 1367, + EndPos: 1397, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1392, - EndPos: 1394, + EndLine: 62, + StartPos: 1392, + EndPos: 1394, }, Value: "bar", }, @@ -3270,18 +3253,18 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1367, - EndPos: 1374, + EndLine: 62, + StartPos: 1367, + EndPos: 1374, }, Value: "abstract", }, &node.Identifier{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1376, - EndPos: 1381, + EndLine: 62, + StartPos: 1376, + EndPos: 1381, }, Value: "public", }, @@ -3289,9 +3272,9 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.Nop{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1397, - EndPos: 1397, + EndLine: 62, + StartPos: 1397, + EndPos: 1397, }, }, }, @@ -3300,17 +3283,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1403, - EndPos: 1433, + EndLine: 63, + StartPos: 1403, + EndPos: 1433, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1415, - EndPos: 1417, + EndLine: 63, + StartPos: 1415, + EndPos: 1417, }, Value: "foo", }, @@ -3318,9 +3301,9 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1403, - EndPos: 1407, + EndLine: 63, + StartPos: 1403, + EndPos: 1407, }, Value: "final", }, @@ -3328,47 +3311,46 @@ func TestPhp5(t *testing.T) { Extends: &stmt.ClassExtends{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1419, - EndPos: 1429, + EndLine: 63, + StartPos: 1419, + EndPos: 1429, }, ClassName: &name.Name{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1427, - EndPos: 1429, + EndLine: 63, + StartPos: 1427, + EndPos: 1429, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1427, - EndPos: 1429, + EndLine: 63, + StartPos: 1427, + EndPos: 1429, }, Value: "bar", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 64, - EndLine: 64, - StartPos: 1437, - EndPos: 1470, + EndLine: 64, + StartPos: 1437, + EndPos: 1470, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 64, - EndLine: 64, - StartPos: 1449, - EndPos: 1451, + EndLine: 64, + StartPos: 1449, + EndPos: 1451, }, Value: "foo", }, @@ -3376,9 +3358,9 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 64, - EndLine: 64, - StartPos: 1437, - EndPos: 1441, + EndLine: 64, + StartPos: 1437, + EndPos: 1441, }, Value: "final", }, @@ -3386,25 +3368,25 @@ func TestPhp5(t *testing.T) { Implements: &stmt.ClassImplements{ Position: &position.Position{ StartLine: 64, - EndLine: 64, - StartPos: 1453, - EndPos: 1466, + EndLine: 64, + StartPos: 1453, + EndPos: 1466, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 64, - EndLine: 64, - StartPos: 1464, - EndPos: 1466, + EndLine: 64, + StartPos: 1464, + EndPos: 1466, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 64, - EndLine: 64, - StartPos: 1464, - EndPos: 1466, + EndLine: 64, + StartPos: 1464, + EndPos: 1466, }, Value: "bar", }, @@ -3412,23 +3394,22 @@ func TestPhp5(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1474, - EndPos: 1512, + EndLine: 65, + StartPos: 1474, + EndPos: 1512, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1486, - EndPos: 1488, + EndLine: 65, + StartPos: 1486, + EndPos: 1488, }, Value: "foo", }, @@ -3436,9 +3417,9 @@ func TestPhp5(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1474, - EndPos: 1478, + EndLine: 65, + StartPos: 1474, + EndPos: 1478, }, Value: "final", }, @@ -3446,25 +3427,25 @@ func TestPhp5(t *testing.T) { Implements: &stmt.ClassImplements{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1490, - EndPos: 1508, + EndLine: 65, + StartPos: 1490, + EndPos: 1508, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1501, - EndPos: 1503, + EndLine: 65, + StartPos: 1501, + EndPos: 1503, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1501, - EndPos: 1503, + EndLine: 65, + StartPos: 1501, + EndPos: 1503, }, Value: "bar", }, @@ -3473,17 +3454,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1506, - EndPos: 1508, + EndLine: 65, + StartPos: 1506, + EndPos: 1508, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 65, - EndLine: 65, - StartPos: 1506, - EndPos: 1508, + EndLine: 65, + StartPos: 1506, + EndPos: 1508, }, Value: "baz", }, @@ -3491,40 +3472,39 @@ func TestPhp5(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.ConstList{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1517, - EndPos: 1539, + EndLine: 67, + StartPos: 1517, + EndPos: 1539, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1523, - EndPos: 1529, + EndLine: 67, + StartPos: 1523, + EndPos: 1529, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1523, - EndPos: 1525, + EndLine: 67, + StartPos: 1523, + EndPos: 1525, }, Value: "FOO", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1529, - EndPos: 1529, + EndLine: 67, + StartPos: 1529, + EndPos: 1529, }, Value: "1", }, @@ -3532,26 +3512,26 @@ func TestPhp5(t *testing.T) { &stmt.Constant{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1532, - EndPos: 1538, + EndLine: 67, + StartPos: 1532, + EndPos: 1538, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1532, - EndPos: 1534, + EndLine: 67, + StartPos: 1532, + EndPos: 1534, }, Value: "BAR", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1538, - EndPos: 1538, + EndLine: 67, + StartPos: 1538, + EndPos: 1538, }, Value: "2", }, @@ -3561,33 +3541,33 @@ func TestPhp5(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1543, - EndPos: 1565, + EndLine: 68, + StartPos: 1543, + EndPos: 1565, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1550, - EndPos: 1550, + EndLine: 68, + StartPos: 1550, + EndPos: 1550, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1553, - EndPos: 1565, + EndLine: 68, + StartPos: 1553, + EndPos: 1565, }, Stmts: []node.Node{ &stmt.Continue{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1555, - EndPos: 1563, + EndLine: 68, + StartPos: 1555, + EndPos: 1563, }, }, }, @@ -3596,40 +3576,40 @@ func TestPhp5(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1569, - EndPos: 1593, + EndLine: 69, + StartPos: 1569, + EndPos: 1593, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1576, - EndPos: 1576, + EndLine: 69, + StartPos: 1576, + EndPos: 1576, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1579, - EndPos: 1593, + EndLine: 69, + StartPos: 1579, + EndPos: 1593, }, Stmts: []node.Node{ &stmt.Continue{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1581, - EndPos: 1591, + EndLine: 69, + StartPos: 1581, + EndPos: 1591, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1590, - EndPos: 1590, + EndLine: 69, + StartPos: 1590, + EndPos: 1590, }, Value: "2", }, @@ -3640,40 +3620,40 @@ func TestPhp5(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1597, - EndPos: 1622, + EndLine: 70, + StartPos: 1597, + EndPos: 1622, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1604, - EndPos: 1604, + EndLine: 70, + StartPos: 1604, + EndPos: 1604, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1607, - EndPos: 1622, + EndLine: 70, + StartPos: 1607, + EndPos: 1622, }, Stmts: []node.Node{ &stmt.Continue{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1609, - EndPos: 1620, + EndLine: 70, + StartPos: 1609, + EndPos: 1620, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1618, - EndPos: 1618, + EndLine: 70, + StartPos: 1618, + EndPos: 1618, }, Value: "3", }, @@ -3684,34 +3664,34 @@ func TestPhp5(t *testing.T) { &stmt.Declare{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1626, - EndPos: 1642, + EndLine: 71, + StartPos: 1626, + EndPos: 1642, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1634, - EndPos: 1640, + EndLine: 71, + StartPos: 1634, + EndPos: 1640, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1634, - EndPos: 1638, + EndLine: 71, + StartPos: 1634, + EndPos: 1638, }, Value: "ticks", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1640, - EndPos: 1640, + EndLine: 71, + StartPos: 1640, + EndPos: 1640, }, Value: "1", }, @@ -3720,43 +3700,43 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.Nop{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1642, - EndPos: 1642, + EndLine: 71, + StartPos: 1642, + EndPos: 1642, }, }, }, &stmt.Declare{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1646, - EndPos: 1680, + EndLine: 72, + StartPos: 1646, + EndPos: 1680, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1654, - EndPos: 1660, + EndLine: 72, + StartPos: 1654, + EndPos: 1660, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1654, - EndPos: 1658, + EndLine: 72, + StartPos: 1654, + EndPos: 1658, }, Value: "ticks", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1660, - EndPos: 1660, + EndLine: 72, + StartPos: 1660, + EndPos: 1660, }, Value: "1", }, @@ -3764,26 +3744,26 @@ func TestPhp5(t *testing.T) { &stmt.Constant{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1663, - EndPos: 1676, + EndLine: 72, + StartPos: 1663, + EndPos: 1676, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1663, - EndPos: 1674, + EndLine: 72, + StartPos: 1663, + EndPos: 1674, }, Value: "strict_types", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1676, - EndPos: 1676, + EndLine: 72, + StartPos: 1676, + EndPos: 1676, }, Value: "1", }, @@ -3792,45 +3772,44 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1679, - EndPos: 1680, - }, - Stmts: []node.Node{ + EndLine: 72, + StartPos: 1679, + EndPos: 1680, }, + Stmts: []node.Node{}, }, }, &stmt.Declare{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1684, - EndPos: 1712, + EndLine: 73, + StartPos: 1684, + EndPos: 1712, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1692, - EndPos: 1698, + EndLine: 73, + StartPos: 1692, + EndPos: 1698, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1692, - EndPos: 1696, + EndLine: 73, + StartPos: 1692, + EndPos: 1696, }, Value: "ticks", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1698, - EndPos: 1698, + EndLine: 73, + StartPos: 1698, + EndPos: 1698, }, Value: "1", }, @@ -3839,37 +3818,35 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1700, - EndPos: 1712, - }, - Stmts: []node.Node{ + EndLine: 73, + StartPos: 1700, + EndPos: 1712, }, + Stmts: []node.Node{}, }, }, &stmt.Do{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1716, - EndPos: 1730, + EndLine: 74, + StartPos: 1716, + EndPos: 1730, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1719, - EndPos: 1720, - }, - Stmts: []node.Node{ + EndLine: 74, + StartPos: 1719, + EndPos: 1720, }, + Stmts: []node.Node{}, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1728, - EndPos: 1728, + EndLine: 74, + StartPos: 1728, + EndPos: 1728, }, Value: "1", }, @@ -3877,24 +3854,24 @@ func TestPhp5(t *testing.T) { &stmt.Echo{ Position: &position.Position{ StartLine: 75, - EndLine: 75, - StartPos: 1734, - EndPos: 1744, + EndLine: 75, + StartPos: 1734, + EndPos: 1744, }, Exprs: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 75, - EndLine: 75, - StartPos: 1739, - EndPos: 1740, + EndLine: 75, + StartPos: 1739, + EndPos: 1740, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 75, - EndLine: 75, - StartPos: 1739, - EndPos: 1740, + EndLine: 75, + StartPos: 1739, + EndPos: 1740, }, Value: "a", }, @@ -3902,9 +3879,9 @@ func TestPhp5(t *testing.T) { &scalar.Lnumber{ Position: &position.Position{ StartLine: 75, - EndLine: 75, - StartPos: 1743, - EndPos: 1743, + EndLine: 75, + StartPos: 1743, + EndPos: 1743, }, Value: "1", }, @@ -3913,24 +3890,24 @@ func TestPhp5(t *testing.T) { &stmt.Echo{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1748, - EndPos: 1756, + EndLine: 76, + StartPos: 1748, + EndPos: 1756, }, Exprs: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1753, - EndPos: 1754, + EndLine: 76, + StartPos: 1753, + EndPos: 1754, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1753, - EndPos: 1754, + EndLine: 76, + StartPos: 1753, + EndPos: 1754, }, Value: "a", }, @@ -3940,31 +3917,31 @@ func TestPhp5(t *testing.T) { &stmt.For{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1760, - EndPos: 1794, + EndLine: 77, + StartPos: 1760, + EndPos: 1794, }, Init: []node.Node{ &assign.Assign{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1764, - EndPos: 1769, + EndLine: 77, + StartPos: 1764, + EndPos: 1769, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1764, - EndPos: 1765, + EndLine: 77, + StartPos: 1764, + EndPos: 1765, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1764, - EndPos: 1765, + EndLine: 77, + StartPos: 1764, + EndPos: 1765, }, Value: "i", }, @@ -3972,9 +3949,9 @@ func TestPhp5(t *testing.T) { Expression: &scalar.Lnumber{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1769, - EndPos: 1769, + EndLine: 77, + StartPos: 1769, + EndPos: 1769, }, Value: "0", }, @@ -3984,23 +3961,23 @@ func TestPhp5(t *testing.T) { &binary.Smaller{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1772, - EndPos: 1778, + EndLine: 77, + StartPos: 1772, + EndPos: 1778, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1772, - EndPos: 1773, + EndLine: 77, + StartPos: 1772, + EndPos: 1773, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1772, - EndPos: 1773, + EndLine: 77, + StartPos: 1772, + EndPos: 1773, }, Value: "i", }, @@ -4008,9 +3985,9 @@ func TestPhp5(t *testing.T) { Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1777, - EndPos: 1778, + EndLine: 77, + StartPos: 1777, + EndPos: 1778, }, Value: "10", }, @@ -4020,23 +3997,23 @@ func TestPhp5(t *testing.T) { &expr.PostInc{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1781, - EndPos: 1784, + EndLine: 77, + StartPos: 1781, + EndPos: 1784, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1781, - EndPos: 1782, + EndLine: 77, + StartPos: 1781, + EndPos: 1782, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1781, - EndPos: 1782, + EndLine: 77, + StartPos: 1781, + EndPos: 1782, }, Value: "i", }, @@ -4045,23 +4022,23 @@ func TestPhp5(t *testing.T) { &expr.PostInc{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1787, - EndPos: 1790, + EndLine: 77, + StartPos: 1787, + EndPos: 1790, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1787, - EndPos: 1788, + EndLine: 77, + StartPos: 1787, + EndPos: 1788, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1787, - EndPos: 1788, + EndLine: 77, + StartPos: 1787, + EndPos: 1788, }, Value: "i", }, @@ -4071,42 +4048,41 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1793, - EndPos: 1794, - }, - Stmts: []node.Node{ + EndLine: 77, + StartPos: 1793, + EndPos: 1794, }, + Stmts: []node.Node{}, }, }, &stmt.AltFor{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1798, - EndPos: 1827, + EndLine: 78, + StartPos: 1798, + EndPos: 1827, }, Cond: []node.Node{ &binary.Smaller{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1804, - EndPos: 1810, + EndLine: 78, + StartPos: 1804, + EndPos: 1810, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1804, - EndPos: 1805, + EndLine: 78, + StartPos: 1804, + EndPos: 1805, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1804, - EndPos: 1805, + EndLine: 78, + StartPos: 1804, + EndPos: 1805, }, Value: "i", }, @@ -4114,9 +4090,9 @@ func TestPhp5(t *testing.T) { Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1809, - EndPos: 1810, + EndLine: 78, + StartPos: 1809, + EndPos: 1810, }, Value: "10", }, @@ -4126,23 +4102,23 @@ func TestPhp5(t *testing.T) { &expr.PostInc{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1813, - EndPos: 1816, + EndLine: 78, + StartPos: 1813, + EndPos: 1816, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1813, - EndPos: 1814, + EndLine: 78, + StartPos: 1813, + EndPos: 1814, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1813, - EndPos: 1814, + EndLine: 78, + StartPos: 1813, + EndPos: 1814, }, Value: "i", }, @@ -4152,34 +4128,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1831, - EndPos: 1851, + EndLine: 79, + StartPos: 1831, + EndPos: 1851, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1840, - EndPos: 1841, + EndLine: 79, + StartPos: 1840, + EndPos: 1841, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1840, - EndPos: 1841, + EndLine: 79, + StartPos: 1840, + EndPos: 1841, }, Value: "a", }, @@ -4187,16 +4162,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1846, - EndPos: 1847, + EndLine: 79, + StartPos: 1846, + EndPos: 1847, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1846, - EndPos: 1847, + EndLine: 79, + StartPos: 1846, + EndPos: 1847, }, Value: "v", }, @@ -4204,44 +4179,42 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1850, - EndPos: 1851, - }, - Stmts: []node.Node{ + EndLine: 79, + StartPos: 1850, + EndPos: 1851, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 80, - EndLine: 80, - StartPos: 1855, - EndPos: 1875, + EndLine: 80, + StartPos: 1855, + EndPos: 1875, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 80, - EndLine: 80, - StartPos: 1864, - EndPos: 1865, - }, - Items: []node.Node{ + EndLine: 80, + StartPos: 1864, + EndPos: 1865, }, + Items: []node.Node{}, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 80, - EndLine: 80, - StartPos: 1870, - EndPos: 1871, + EndLine: 80, + StartPos: 1870, + EndPos: 1871, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 80, - EndLine: 80, - StartPos: 1870, - EndPos: 1871, + EndLine: 80, + StartPos: 1870, + EndPos: 1871, }, Value: "v", }, @@ -4249,34 +4222,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 80, - EndLine: 80, - StartPos: 1874, - EndPos: 1875, - }, - Stmts: []node.Node{ + EndLine: 80, + StartPos: 1874, + EndPos: 1875, }, + Stmts: []node.Node{}, }, }, &stmt.AltForeach{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1879, - EndPos: 1910, + EndLine: 81, + StartPos: 1879, + EndPos: 1910, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1888, - EndPos: 1889, + EndLine: 81, + StartPos: 1888, + EndPos: 1889, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1888, - EndPos: 1889, + EndLine: 81, + StartPos: 1888, + EndPos: 1889, }, Value: "a", }, @@ -4284,16 +4256,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1894, - EndPos: 1895, + EndLine: 81, + StartPos: 1894, + EndPos: 1895, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1894, - EndPos: 1895, + EndLine: 81, + StartPos: 1894, + EndPos: 1895, }, Value: "v", }, @@ -4301,34 +4273,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1914, - EndPos: 1940, + EndLine: 82, + StartPos: 1914, + EndPos: 1940, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1923, - EndPos: 1924, + EndLine: 82, + StartPos: 1923, + EndPos: 1924, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1923, - EndPos: 1924, + EndLine: 82, + StartPos: 1923, + EndPos: 1924, }, Value: "a", }, @@ -4336,16 +4307,16 @@ func TestPhp5(t *testing.T) { Key: &expr.Variable{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1929, - EndPos: 1930, + EndLine: 82, + StartPos: 1929, + EndPos: 1930, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1929, - EndPos: 1930, + EndLine: 82, + StartPos: 1929, + EndPos: 1930, }, Value: "k", }, @@ -4353,16 +4324,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1935, - EndPos: 1936, + EndLine: 82, + StartPos: 1935, + EndPos: 1936, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1935, - EndPos: 1936, + EndLine: 82, + StartPos: 1935, + EndPos: 1936, }, Value: "v", }, @@ -4370,44 +4341,42 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1939, - EndPos: 1940, - }, - Stmts: []node.Node{ + EndLine: 82, + StartPos: 1939, + EndPos: 1940, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1944, - EndPos: 1970, + EndLine: 83, + StartPos: 1944, + EndPos: 1970, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1953, - EndPos: 1954, - }, - Items: []node.Node{ + EndLine: 83, + StartPos: 1953, + EndPos: 1954, }, + Items: []node.Node{}, }, Key: &expr.Variable{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1959, - EndPos: 1960, + EndLine: 83, + StartPos: 1959, + EndPos: 1960, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1959, - EndPos: 1960, + EndLine: 83, + StartPos: 1959, + EndPos: 1960, }, Value: "k", }, @@ -4415,16 +4384,16 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1965, - EndPos: 1966, + EndLine: 83, + StartPos: 1965, + EndPos: 1966, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1965, - EndPos: 1966, + EndLine: 83, + StartPos: 1965, + EndPos: 1966, }, Value: "v", }, @@ -4432,34 +4401,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1969, - EndPos: 1970, - }, - Stmts: []node.Node{ + EndLine: 83, + StartPos: 1969, + EndPos: 1970, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1974, - EndPos: 2001, + EndLine: 84, + StartPos: 1974, + EndPos: 2001, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1983, - EndPos: 1984, + EndLine: 84, + StartPos: 1983, + EndPos: 1984, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1983, - EndPos: 1984, + EndLine: 84, + StartPos: 1983, + EndPos: 1984, }, Value: "a", }, @@ -4467,16 +4435,16 @@ func TestPhp5(t *testing.T) { Key: &expr.Variable{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1989, - EndPos: 1990, + EndLine: 84, + StartPos: 1989, + EndPos: 1990, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1989, - EndPos: 1990, + EndLine: 84, + StartPos: 1989, + EndPos: 1990, }, Value: "k", }, @@ -4484,23 +4452,23 @@ func TestPhp5(t *testing.T) { Variable: &expr.Reference{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1995, - EndPos: 1997, + EndLine: 84, + StartPos: 1995, + EndPos: 1997, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1996, - EndPos: 1997, + EndLine: 84, + StartPos: 1996, + EndPos: 1997, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1996, - EndPos: 1997, + EndLine: 84, + StartPos: 1996, + EndPos: 1997, }, Value: "v", }, @@ -4509,34 +4477,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 2000, - EndPos: 2001, - }, - Stmts: []node.Node{ + EndLine: 84, + StartPos: 2000, + EndPos: 2001, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2005, - EndPos: 2037, + EndLine: 85, + StartPos: 2005, + EndPos: 2037, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2014, - EndPos: 2015, + EndLine: 85, + StartPos: 2014, + EndPos: 2015, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2014, - EndPos: 2015, + EndLine: 85, + StartPos: 2014, + EndPos: 2015, }, Value: "a", }, @@ -4544,16 +4511,16 @@ func TestPhp5(t *testing.T) { Key: &expr.Variable{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2020, - EndPos: 2021, + EndLine: 85, + StartPos: 2020, + EndPos: 2021, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2020, - EndPos: 2021, + EndLine: 85, + StartPos: 2020, + EndPos: 2021, }, Value: "k", }, @@ -4561,31 +4528,31 @@ func TestPhp5(t *testing.T) { Variable: &expr.List{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2026, - EndPos: 2033, + EndLine: 85, + StartPos: 2026, + EndPos: 2033, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2031, - EndPos: 2032, + EndLine: 85, + StartPos: 2031, + EndPos: 2032, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2031, - EndPos: 2032, + EndLine: 85, + StartPos: 2031, + EndPos: 2032, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2031, - EndPos: 2032, + EndLine: 85, + StartPos: 2031, + EndPos: 2032, }, Value: "v", }, @@ -4596,50 +4563,48 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2036, - EndPos: 2037, - }, - Stmts: []node.Node{ + EndLine: 85, + StartPos: 2036, + EndPos: 2037, }, + Stmts: []node.Node{}, }, }, &stmt.Function{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 2041, - EndPos: 2057, + EndLine: 86, + StartPos: 2041, + EndPos: 2057, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 2050, - EndPos: 2052, + EndLine: 86, + StartPos: 2050, + EndPos: 2052, }, Value: "foo", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Function{ Position: &position.Position{ StartLine: 88, - EndLine: 93, - StartPos: 2062, - EndPos: 2154, + EndLine: 93, + StartPos: 2062, + EndPos: 2154, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 88, - EndLine: 88, - StartPos: 2071, - EndPos: 2073, + EndLine: 88, + StartPos: 2071, + EndPos: 2073, }, Value: "foo", }, @@ -4647,72 +4612,70 @@ func TestPhp5(t *testing.T) { &stmt.HaltCompiler{ Position: &position.Position{ StartLine: 89, - EndLine: 89, - StartPos: 2082, - EndPos: 2099, + EndLine: 89, + StartPos: 2082, + EndPos: 2099, }, }, &stmt.Function{ Position: &position.Position{ StartLine: 90, - EndLine: 90, - StartPos: 2104, - EndPos: 2120, + EndLine: 90, + StartPos: 2104, + EndPos: 2120, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 90, - EndLine: 90, - StartPos: 2113, - EndPos: 2115, + EndLine: 90, + StartPos: 2113, + EndPos: 2115, }, Value: "bar", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2125, - EndPos: 2136, + EndLine: 91, + StartPos: 2125, + EndPos: 2136, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2131, - EndPos: 2133, + EndLine: 91, + StartPos: 2131, + EndPos: 2133, }, Value: "Baz", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Return{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2141, - EndPos: 2150, + EndLine: 92, + StartPos: 2141, + EndPos: 2150, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2148, - EndPos: 2149, + EndLine: 92, + StartPos: 2148, + EndPos: 2149, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2148, - EndPos: 2149, + EndLine: 92, + StartPos: 2148, + EndPos: 2149, }, Value: "a", }, @@ -4723,18 +4686,18 @@ func TestPhp5(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2161, - EndPos: 2205, + EndLine: 95, + StartPos: 2161, + EndPos: 2205, }, + ReturnsRef: false, PhpDocComment: "", - ReturnsRef: false, FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2170, - EndPos: 2172, + EndLine: 95, + StartPos: 2170, + EndPos: 2172, }, Value: "foo", }, @@ -4742,34 +4705,34 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2174, - EndPos: 2181, + EndLine: 95, + StartPos: 2174, + EndPos: 2181, }, - ByRef: false, Variadic: false, + ByRef: false, VariableType: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2174, - EndPos: 2178, + EndLine: 95, + StartPos: 2174, + EndPos: 2178, }, Value: "array", }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2180, - EndPos: 2181, + EndLine: 95, + StartPos: 2180, + EndPos: 2181, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2180, - EndPos: 2181, + EndLine: 95, + StartPos: 2180, + EndPos: 2181, }, Value: "a", }, @@ -4778,34 +4741,34 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2184, - EndPos: 2194, + EndLine: 95, + StartPos: 2184, + EndPos: 2194, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2184, - EndPos: 2191, + EndLine: 95, + StartPos: 2184, + EndPos: 2191, }, Value: "callable", }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2193, - EndPos: 2194, + EndLine: 95, + StartPos: 2193, + EndPos: 2194, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2193, - EndPos: 2194, + EndLine: 95, + StartPos: 2193, + EndPos: 2194, }, Value: "b", }, @@ -4816,9 +4779,9 @@ func TestPhp5(t *testing.T) { &stmt.Return{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2198, - EndPos: 2204, + EndLine: 95, + StartPos: 2198, + EndPos: 2204, }, }, }, @@ -4826,18 +4789,18 @@ func TestPhp5(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2209, - EndPos: 2235, + EndLine: 96, + StartPos: 2209, + EndPos: 2235, }, - ReturnsRef: true, PhpDocComment: "", + ReturnsRef: true, FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2219, - EndPos: 2221, + EndLine: 96, + StartPos: 2219, + EndPos: 2221, }, Value: "foo", }, @@ -4845,16 +4808,16 @@ func TestPhp5(t *testing.T) { &stmt.Return{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2226, - EndPos: 2234, + EndLine: 96, + StartPos: 2226, + EndPos: 2234, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2233, - EndPos: 2233, + EndLine: 96, + StartPos: 2233, + EndPos: 2233, }, Value: "1", }, @@ -4864,45 +4827,44 @@ func TestPhp5(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2239, - EndPos: 2256, + EndLine: 97, + StartPos: 2239, + EndPos: 2256, }, - ReturnsRef: true, + ReturnsRef: true, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2249, - EndPos: 2251, + EndLine: 97, + StartPos: 2249, + EndPos: 2251, }, Value: "foo", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Global{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2260, - EndPos: 2288, + EndLine: 98, + StartPos: 2260, + EndPos: 2288, }, Vars: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2267, - EndPos: 2268, + EndLine: 98, + StartPos: 2267, + EndPos: 2268, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2267, - EndPos: 2268, + EndLine: 98, + StartPos: 2267, + EndPos: 2268, }, Value: "a", }, @@ -4910,16 +4872,16 @@ func TestPhp5(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2271, - EndPos: 2272, + EndLine: 98, + StartPos: 2271, + EndPos: 2272, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2271, - EndPos: 2272, + EndLine: 98, + StartPos: 2271, + EndPos: 2272, }, Value: "b", }, @@ -4927,23 +4889,23 @@ func TestPhp5(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2275, - EndPos: 2277, + EndLine: 98, + StartPos: 2275, + EndPos: 2277, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2276, - EndPos: 2277, + EndLine: 98, + StartPos: 2276, + EndPos: 2277, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2276, - EndPos: 2277, + EndLine: 98, + StartPos: 2276, + EndPos: 2277, }, Value: "c", }, @@ -4952,31 +4914,31 @@ func TestPhp5(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2280, - EndPos: 2287, + EndLine: 98, + StartPos: 2280, + EndPos: 2287, }, VarName: &expr.FunctionCall{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2282, - EndPos: 2286, + EndLine: 98, + StartPos: 2282, + EndPos: 2286, }, Function: &name.Name{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2282, - EndPos: 2284, + EndLine: 98, + StartPos: 2282, + EndPos: 2284, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2282, - EndPos: 2284, + EndLine: 98, + StartPos: 2282, + EndPos: 2284, }, Value: "foo", }, @@ -4985,9 +4947,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2285, - EndPos: 2286, + EndLine: 98, + StartPos: 2285, + EndPos: 2286, }, }, }, @@ -4997,16 +4959,16 @@ func TestPhp5(t *testing.T) { &stmt.Label{ Position: &position.Position{ StartLine: 99, - EndLine: 99, - StartPos: 2292, - EndPos: 2293, + EndLine: 99, + StartPos: 2292, + EndPos: 2293, }, LabelName: &node.Identifier{ Position: &position.Position{ StartLine: 99, - EndLine: 99, - StartPos: 2292, - EndPos: 2292, + EndLine: 99, + StartPos: 2292, + EndPos: 2292, }, Value: "a", }, @@ -5014,16 +4976,16 @@ func TestPhp5(t *testing.T) { &stmt.Goto{ Position: &position.Position{ StartLine: 100, - EndLine: 100, - StartPos: 2298, - EndPos: 2304, + EndLine: 100, + StartPos: 2298, + EndPos: 2304, }, Label: &node.Identifier{ Position: &position.Position{ StartLine: 100, - EndLine: 100, - StartPos: 2303, - EndPos: 2303, + EndLine: 100, + StartPos: 2303, + EndPos: 2303, }, Value: "a", }, @@ -5031,31 +4993,31 @@ func TestPhp5(t *testing.T) { &stmt.HaltCompiler{ Position: &position.Position{ StartLine: 101, - EndLine: 101, - StartPos: 2308, - EndPos: 2325, + EndLine: 101, + StartPos: 2308, + EndPos: 2325, }, }, &stmt.If{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2329, - EndPos: 2338, + EndLine: 102, + StartPos: 2329, + EndPos: 2338, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2333, - EndPos: 2334, + EndLine: 102, + StartPos: 2333, + EndPos: 2334, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2333, - EndPos: 2334, + EndLine: 102, + StartPos: 2333, + EndPos: 2334, }, Value: "a", }, @@ -5063,34 +5025,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2337, - EndPos: 2338, - }, - Stmts: []node.Node{ + EndLine: 102, + StartPos: 2337, + EndPos: 2338, }, + Stmts: []node.Node{}, }, }, &stmt.If{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2342, - EndPos: 2366, + EndLine: 103, + StartPos: 2342, + EndPos: 2366, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2346, - EndPos: 2347, + EndLine: 103, + StartPos: 2346, + EndPos: 2347, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2346, - EndPos: 2347, + EndLine: 103, + StartPos: 2346, + EndPos: 2347, }, Value: "a", }, @@ -5098,34 +5059,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2350, - EndPos: 2351, - }, - Stmts: []node.Node{ + EndLine: 103, + StartPos: 2350, + EndPos: 2351, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.ElseIf{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2353, - EndPos: 2366, + EndLine: 103, + StartPos: 2353, + EndPos: 2366, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2361, - EndPos: 2362, + EndLine: 103, + StartPos: 2361, + EndPos: 2362, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2361, - EndPos: 2362, + EndLine: 103, + StartPos: 2361, + EndPos: 2362, }, Value: "b", }, @@ -5133,12 +5093,11 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2365, - EndPos: 2366, - }, - Stmts: []node.Node{ + EndLine: 103, + StartPos: 2365, + EndPos: 2366, }, + Stmts: []node.Node{}, }, }, }, @@ -5146,23 +5105,23 @@ func TestPhp5(t *testing.T) { &stmt.If{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2370, - EndPos: 2387, + EndLine: 104, + StartPos: 2370, + EndPos: 2387, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2374, - EndPos: 2375, + EndLine: 104, + StartPos: 2374, + EndPos: 2375, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2374, - EndPos: 2375, + EndLine: 104, + StartPos: 2374, + EndPos: 2375, }, Value: "a", }, @@ -5170,52 +5129,50 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2378, - EndPos: 2379, - }, - Stmts: []node.Node{ + EndLine: 104, + StartPos: 2378, + EndPos: 2379, }, + Stmts: []node.Node{}, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2381, - EndPos: 2387, + EndLine: 104, + StartPos: 2381, + EndPos: 2387, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2386, - EndPos: 2387, - }, - Stmts: []node.Node{ + EndLine: 104, + StartPos: 2386, + EndPos: 2387, }, + Stmts: []node.Node{}, }, }, }, &stmt.If{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2391, - EndPos: 2438, + EndLine: 105, + StartPos: 2391, + EndPos: 2438, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2395, - EndPos: 2396, + EndLine: 105, + StartPos: 2395, + EndPos: 2396, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2395, - EndPos: 2396, + EndLine: 105, + StartPos: 2395, + EndPos: 2396, }, Value: "a", }, @@ -5223,34 +5180,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2399, - EndPos: 2400, - }, - Stmts: []node.Node{ + EndLine: 105, + StartPos: 2399, + EndPos: 2400, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.ElseIf{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2402, - EndPos: 2415, + EndLine: 105, + StartPos: 2402, + EndPos: 2415, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2410, - EndPos: 2411, + EndLine: 105, + StartPos: 2410, + EndPos: 2411, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2410, - EndPos: 2411, + EndLine: 105, + StartPos: 2410, + EndPos: 2411, }, Value: "b", }, @@ -5258,34 +5214,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2414, - EndPos: 2415, - }, - Stmts: []node.Node{ + EndLine: 105, + StartPos: 2414, + EndPos: 2415, }, + Stmts: []node.Node{}, }, }, &stmt.ElseIf{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2417, - EndPos: 2430, + EndLine: 105, + StartPos: 2417, + EndPos: 2430, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2425, - EndPos: 2426, + EndLine: 105, + StartPos: 2425, + EndPos: 2426, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2425, - EndPos: 2426, + EndLine: 105, + StartPos: 2425, + EndPos: 2426, }, Value: "c", }, @@ -5293,54 +5248,52 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2429, - EndPos: 2430, - }, - Stmts: []node.Node{ + EndLine: 105, + StartPos: 2429, + EndPos: 2430, }, + Stmts: []node.Node{}, }, }, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2432, - EndPos: 2438, + EndLine: 105, + StartPos: 2432, + EndPos: 2438, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2437, - EndPos: 2438, - }, - Stmts: []node.Node{ + EndLine: 105, + StartPos: 2437, + EndPos: 2438, }, + Stmts: []node.Node{}, }, }, }, &stmt.If{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2442, - EndPos: 2490, + EndLine: 106, + StartPos: 2442, + EndPos: 2490, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2446, - EndPos: 2447, + EndLine: 106, + StartPos: 2446, + EndPos: 2447, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2446, - EndPos: 2447, + EndLine: 106, + StartPos: 2446, + EndPos: 2447, }, Value: "a", }, @@ -5348,34 +5301,33 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2450, - EndPos: 2451, - }, - Stmts: []node.Node{ + EndLine: 106, + StartPos: 2450, + EndPos: 2451, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.ElseIf{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2453, - EndPos: 2466, + EndLine: 106, + StartPos: 2453, + EndPos: 2466, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2461, - EndPos: 2462, + EndLine: 106, + StartPos: 2461, + EndPos: 2462, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2461, - EndPos: 2462, + EndLine: 106, + StartPos: 2461, + EndPos: 2462, }, Value: "b", }, @@ -5383,42 +5335,41 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2465, - EndPos: 2466, - }, - Stmts: []node.Node{ + EndLine: 106, + StartPos: 2465, + EndPos: 2466, }, + Stmts: []node.Node{}, }, }, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2468, - EndPos: 2490, + EndLine: 106, + StartPos: 2468, + EndPos: 2490, }, Stmt: &stmt.If{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2473, - EndPos: 2490, + EndLine: 106, + StartPos: 2473, + EndPos: 2490, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2477, - EndPos: 2478, + EndLine: 106, + StartPos: 2477, + EndPos: 2478, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2477, - EndPos: 2478, + EndLine: 106, + StartPos: 2477, + EndPos: 2478, }, Value: "c", }, @@ -5426,29 +5377,27 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2481, - EndPos: 2482, - }, - Stmts: []node.Node{ + EndLine: 106, + StartPos: 2481, + EndPos: 2482, }, + Stmts: []node.Node{}, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2484, - EndPos: 2490, + EndLine: 106, + StartPos: 2484, + EndPos: 2490, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2489, - EndPos: 2490, - }, - Stmts: []node.Node{ + EndLine: 106, + StartPos: 2489, + EndPos: 2490, }, + Stmts: []node.Node{}, }, }, }, @@ -5457,79 +5406,78 @@ func TestPhp5(t *testing.T) { &stmt.Nop{ Position: &position.Position{ StartLine: 107, - EndLine: 107, - StartPos: 2494, - EndPos: 2495, + EndLine: 107, + StartPos: 2494, + EndPos: 2495, }, }, &stmt.InlineHtml{ Position: &position.Position{ StartLine: 107, - EndLine: 107, - StartPos: 2497, - EndPos: 2508, + EndLine: 107, + StartPos: 2497, + EndPos: 2508, }, Value: "
", }, &stmt.Interface{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2514, - EndPos: 2529, + EndLine: 108, + StartPos: 2514, + EndPos: 2529, }, PhpDocComment: "", InterfaceName: &node.Identifier{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2524, - EndPos: 2526, + EndLine: 108, + StartPos: 2524, + EndPos: 2526, }, Value: "Foo", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Interface{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2533, - EndPos: 2560, + EndLine: 109, + StartPos: 2533, + EndPos: 2560, }, PhpDocComment: "", InterfaceName: &node.Identifier{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2543, - EndPos: 2545, + EndLine: 109, + StartPos: 2543, + EndPos: 2545, }, Value: "Foo", }, Extends: &stmt.InterfaceExtends{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2547, - EndPos: 2557, + EndLine: 109, + StartPos: 2547, + EndPos: 2557, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2555, - EndPos: 2557, + EndLine: 109, + StartPos: 2555, + EndPos: 2557, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2555, - EndPos: 2557, + EndLine: 109, + StartPos: 2555, + EndPos: 2557, }, Value: "Bar", }, @@ -5537,48 +5485,47 @@ func TestPhp5(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Interface{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2564, - EndPos: 2596, + EndLine: 110, + StartPos: 2564, + EndPos: 2596, }, PhpDocComment: "", InterfaceName: &node.Identifier{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2574, - EndPos: 2576, + EndLine: 110, + StartPos: 2574, + EndPos: 2576, }, Value: "Foo", }, Extends: &stmt.InterfaceExtends{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2578, - EndPos: 2593, + EndLine: 110, + StartPos: 2578, + EndPos: 2593, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2586, - EndPos: 2588, + EndLine: 110, + StartPos: 2586, + EndPos: 2588, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2586, - EndPos: 2588, + EndLine: 110, + StartPos: 2586, + EndPos: 2588, }, Value: "Bar", }, @@ -5587,17 +5534,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2591, - EndPos: 2593, + EndLine: 110, + StartPos: 2591, + EndPos: 2593, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2591, - EndPos: 2593, + EndLine: 110, + StartPos: 2591, + EndPos: 2593, }, Value: "Baz", }, @@ -5605,30 +5552,29 @@ func TestPhp5(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Namespace{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2600, - EndPos: 2613, + EndLine: 111, + StartPos: 2600, + EndPos: 2613, }, NamespaceName: &name.Name{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2610, - EndPos: 2612, + EndLine: 111, + StartPos: 2610, + EndPos: 2612, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2610, - EndPos: 2612, + EndLine: 111, + StartPos: 2610, + EndPos: 2612, }, Value: "Foo", }, @@ -5638,65 +5584,63 @@ func TestPhp5(t *testing.T) { &stmt.Namespace{ Position: &position.Position{ StartLine: 112, - EndLine: 112, - StartPos: 2617, - EndPos: 2636, + EndLine: 112, + StartPos: 2617, + EndPos: 2636, }, NamespaceName: &name.Name{ Position: &position.Position{ StartLine: 112, - EndLine: 112, - StartPos: 2627, - EndPos: 2633, + EndLine: 112, + StartPos: 2627, + EndPos: 2633, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 112, - EndLine: 112, - StartPos: 2627, - EndPos: 2629, + EndLine: 112, + StartPos: 2627, + EndPos: 2629, }, Value: "Foo", }, &name.NamePart{ Position: &position.Position{ StartLine: 112, - EndLine: 112, - StartPos: 2631, - EndPos: 2633, + EndLine: 112, + StartPos: 2631, + EndPos: 2633, }, Value: "Bar", }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Namespace{ Position: &position.Position{ StartLine: 113, - EndLine: 113, - StartPos: 2640, - EndPos: 2651, - }, - Stmts: []node.Node{ + EndLine: 113, + StartPos: 2640, + EndPos: 2651, }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2655, - EndPos: 2673, + EndLine: 114, + StartPos: 2655, + EndPos: 2673, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2661, - EndPos: 2663, + EndLine: 114, + StartPos: 2661, + EndPos: 2663, }, Value: "foo", }, @@ -5704,17 +5648,17 @@ func TestPhp5(t *testing.T) { &stmt.PropertyList{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2666, - EndPos: 2672, + EndLine: 114, + StartPos: 2666, + EndPos: 2672, }, Modifiers: []node.Node{ &node.Identifier{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2666, - EndPos: 2668, + EndLine: 114, + StartPos: 2666, + EndPos: 2668, }, Value: "var", }, @@ -5723,24 +5667,24 @@ func TestPhp5(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2670, - EndPos: 2671, + EndLine: 114, + StartPos: 2670, + EndPos: 2671, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2670, - EndPos: 2671, + EndLine: 114, + StartPos: 2670, + EndPos: 2671, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2670, - EndPos: 2671, + EndLine: 114, + StartPos: 2670, + EndPos: 2671, }, Value: "a", }, @@ -5753,17 +5697,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2677, - EndPos: 2713, + EndLine: 115, + StartPos: 2677, + EndPos: 2713, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2683, - EndPos: 2685, + EndLine: 115, + StartPos: 2683, + EndPos: 2685, }, Value: "foo", }, @@ -5771,26 +5715,26 @@ func TestPhp5(t *testing.T) { &stmt.PropertyList{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2688, - EndPos: 2712, + EndLine: 115, + StartPos: 2688, + EndPos: 2712, }, Modifiers: []node.Node{ &node.Identifier{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2688, - EndPos: 2693, + EndLine: 115, + StartPos: 2688, + EndPos: 2693, }, Value: "public", }, &node.Identifier{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2695, - EndPos: 2700, + EndLine: 115, + StartPos: 2695, + EndPos: 2700, }, Value: "static", }, @@ -5799,24 +5743,24 @@ func TestPhp5(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2702, - EndPos: 2703, + EndLine: 115, + StartPos: 2702, + EndPos: 2703, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2702, - EndPos: 2703, + EndLine: 115, + StartPos: 2702, + EndPos: 2703, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2702, - EndPos: 2703, + EndLine: 115, + StartPos: 2702, + EndPos: 2703, }, Value: "a", }, @@ -5825,24 +5769,24 @@ func TestPhp5(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2706, - EndPos: 2711, + EndLine: 115, + StartPos: 2706, + EndPos: 2711, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2706, - EndPos: 2707, + EndLine: 115, + StartPos: 2706, + EndPos: 2707, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2706, - EndPos: 2707, + EndLine: 115, + StartPos: 2706, + EndPos: 2707, }, Value: "b", }, @@ -5850,9 +5794,9 @@ func TestPhp5(t *testing.T) { Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2711, - EndPos: 2711, + EndLine: 115, + StartPos: 2711, + EndPos: 2711, }, Value: "1", }, @@ -5864,17 +5808,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2717, - EndPos: 2753, + EndLine: 116, + StartPos: 2717, + EndPos: 2753, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2723, - EndPos: 2725, + EndLine: 116, + StartPos: 2723, + EndPos: 2725, }, Value: "foo", }, @@ -5882,26 +5826,26 @@ func TestPhp5(t *testing.T) { &stmt.PropertyList{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2728, - EndPos: 2752, + EndLine: 116, + StartPos: 2728, + EndPos: 2752, }, Modifiers: []node.Node{ &node.Identifier{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2728, - EndPos: 2733, + EndLine: 116, + StartPos: 2728, + EndPos: 2733, }, Value: "public", }, &node.Identifier{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2735, - EndPos: 2740, + EndLine: 116, + StartPos: 2735, + EndPos: 2740, }, Value: "static", }, @@ -5910,24 +5854,24 @@ func TestPhp5(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2742, - EndPos: 2747, + EndLine: 116, + StartPos: 2742, + EndPos: 2747, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2742, - EndPos: 2743, + EndLine: 116, + StartPos: 2742, + EndPos: 2743, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2742, - EndPos: 2743, + EndLine: 116, + StartPos: 2742, + EndPos: 2743, }, Value: "a", }, @@ -5935,9 +5879,9 @@ func TestPhp5(t *testing.T) { Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2747, - EndPos: 2747, + EndLine: 116, + StartPos: 2747, + EndPos: 2747, }, Value: "1", }, @@ -5945,24 +5889,24 @@ func TestPhp5(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2750, - EndPos: 2751, + EndLine: 116, + StartPos: 2750, + EndPos: 2751, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2750, - EndPos: 2751, + EndLine: 116, + StartPos: 2750, + EndPos: 2751, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2750, - EndPos: 2751, + EndLine: 116, + StartPos: 2750, + EndPos: 2751, }, Value: "b", }, @@ -5975,31 +5919,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2757, - EndPos: 2774, + EndLine: 117, + StartPos: 2757, + EndPos: 2774, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2764, - EndPos: 2765, + EndLine: 117, + StartPos: 2764, + EndPos: 2765, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2764, - EndPos: 2765, + EndLine: 117, + StartPos: 2764, + EndPos: 2765, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2764, - EndPos: 2765, + EndLine: 117, + StartPos: 2764, + EndPos: 2765, }, Value: "a", }, @@ -6008,23 +5952,23 @@ func TestPhp5(t *testing.T) { &stmt.StaticVar{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2768, - EndPos: 2773, + EndLine: 117, + StartPos: 2768, + EndPos: 2773, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2768, - EndPos: 2769, + EndLine: 117, + StartPos: 2768, + EndPos: 2769, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2768, - EndPos: 2769, + EndLine: 117, + StartPos: 2768, + EndPos: 2769, }, Value: "b", }, @@ -6032,9 +5976,9 @@ func TestPhp5(t *testing.T) { Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2773, - EndPos: 2773, + EndLine: 117, + StartPos: 2773, + EndPos: 2773, }, Value: "1", }, @@ -6044,31 +5988,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2778, - EndPos: 2795, + EndLine: 118, + StartPos: 2778, + EndPos: 2795, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2785, - EndPos: 2790, + EndLine: 118, + StartPos: 2785, + EndPos: 2790, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2785, - EndPos: 2786, + EndLine: 118, + StartPos: 2785, + EndPos: 2786, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2785, - EndPos: 2786, + EndLine: 118, + StartPos: 2785, + EndPos: 2786, }, Value: "a", }, @@ -6076,9 +6020,9 @@ func TestPhp5(t *testing.T) { Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2790, - EndPos: 2790, + EndLine: 118, + StartPos: 2790, + EndPos: 2790, }, Value: "1", }, @@ -6086,23 +6030,23 @@ func TestPhp5(t *testing.T) { &stmt.StaticVar{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2793, - EndPos: 2794, + EndLine: 118, + StartPos: 2793, + EndPos: 2794, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2793, - EndPos: 2794, + EndLine: 118, + StartPos: 2793, + EndPos: 2794, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2793, - EndPos: 2794, + EndLine: 118, + StartPos: 2793, + EndPos: 2794, }, Value: "b", }, @@ -6113,74 +6057,71 @@ func TestPhp5(t *testing.T) { &stmt.AltSwitch{ Position: &position.Position{ StartLine: 120, - EndLine: 124, - StartPos: 2800, - EndPos: 2858, + EndLine: 124, + StartPos: 2800, + EndPos: 2858, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2808, - EndPos: 2808, + EndLine: 120, + StartPos: 2808, + EndPos: 2808, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 121, - EndLine: -1, - StartPos: 2816, - EndPos: -1, + EndLine: -1, + StartPos: 2816, + EndPos: -1, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 121, - EndLine: -1, - StartPos: 2816, - EndPos: -1, + EndLine: -1, + StartPos: 2816, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2821, - EndPos: 2821, + EndLine: 121, + StartPos: 2821, + EndPos: 2821, }, Value: "1", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Default{ Position: &position.Position{ StartLine: 122, - EndLine: -1, - StartPos: 2827, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: 2827, + EndPos: -1, }, + Stmts: []node.Node{}, }, &stmt.Case{ Position: &position.Position{ StartLine: 123, - EndLine: -1, - StartPos: 2839, - EndPos: -1, + EndLine: -1, + StartPos: 2839, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 123, - EndLine: 123, - StartPos: 2844, - EndPos: 2844, + EndLine: 123, + StartPos: 2844, + EndPos: 2844, }, Value: "2", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, @@ -6188,64 +6129,62 @@ func TestPhp5(t *testing.T) { &stmt.AltSwitch{ Position: &position.Position{ StartLine: 126, - EndLine: 129, - StartPos: 2863, - EndPos: 2910, + EndLine: 129, + StartPos: 2863, + EndPos: 2910, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 126, - EndLine: 126, - StartPos: 2871, - EndPos: 2871, + EndLine: 126, + StartPos: 2871, + EndPos: 2871, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 127, - EndLine: -1, - StartPos: 2880, - EndPos: -1, + EndLine: -1, + StartPos: 2880, + EndPos: -1, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 127, - EndLine: -1, - StartPos: 2880, - EndPos: -1, + EndLine: -1, + StartPos: 2880, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 127, - EndLine: 127, - StartPos: 2885, - EndPos: 2885, + EndLine: 127, + StartPos: 2885, + EndPos: 2885, }, Value: "1", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Case{ Position: &position.Position{ StartLine: 128, - EndLine: -1, - StartPos: 2891, - EndPos: -1, + EndLine: -1, + StartPos: 2891, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 128, - EndLine: 128, - StartPos: 2896, - EndPos: 2896, + EndLine: 128, + StartPos: 2896, + EndPos: 2896, }, Value: "2", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, @@ -6253,40 +6192,40 @@ func TestPhp5(t *testing.T) { &stmt.Switch{ Position: &position.Position{ StartLine: 131, - EndLine: 134, - StartPos: 2917, - EndPos: 2968, + EndLine: 134, + StartPos: 2917, + EndPos: 2968, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 131, - EndLine: 131, - StartPos: 2925, - EndPos: 2925, + EndLine: 131, + StartPos: 2925, + EndPos: 2925, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 131, - EndLine: 134, - StartPos: 2928, - EndPos: 2968, + EndLine: 134, + StartPos: 2928, + EndPos: 2968, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 132, - EndLine: 132, - StartPos: 2933, - EndPos: 2946, + EndLine: 132, + StartPos: 2933, + EndPos: 2946, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 132, - EndLine: 132, - StartPos: 2938, - EndPos: 2938, + EndLine: 132, + StartPos: 2938, + EndPos: 2938, }, Value: "1", }, @@ -6294,9 +6233,9 @@ func TestPhp5(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 132, - EndLine: 132, - StartPos: 2941, - EndPos: 2946, + EndLine: 132, + StartPos: 2941, + EndPos: 2946, }, }, }, @@ -6304,16 +6243,16 @@ func TestPhp5(t *testing.T) { &stmt.Case{ Position: &position.Position{ StartLine: 133, - EndLine: 133, - StartPos: 2951, - EndPos: 2964, + EndLine: 133, + StartPos: 2951, + EndPos: 2964, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 133, - EndLine: 133, - StartPos: 2956, - EndPos: 2956, + EndLine: 133, + StartPos: 2956, + EndPos: 2956, }, Value: "2", }, @@ -6321,9 +6260,9 @@ func TestPhp5(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 133, - EndLine: 133, - StartPos: 2959, - EndPos: 2964, + EndLine: 133, + StartPos: 2959, + EndPos: 2964, }, }, }, @@ -6334,40 +6273,40 @@ func TestPhp5(t *testing.T) { &stmt.Switch{ Position: &position.Position{ StartLine: 136, - EndLine: 139, - StartPos: 2975, - EndPos: 3027, + EndLine: 139, + StartPos: 2975, + EndPos: 3027, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 136, - EndLine: 136, - StartPos: 2983, - EndPos: 2983, + EndLine: 136, + StartPos: 2983, + EndPos: 2983, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 136, - EndLine: 139, - StartPos: 2986, - EndPos: 3027, + EndLine: 139, + StartPos: 2986, + EndPos: 3027, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 137, - EndLine: 137, - StartPos: 2992, - EndPos: 3005, + EndLine: 137, + StartPos: 2992, + EndPos: 3005, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 137, - EndLine: 137, - StartPos: 2997, - EndPos: 2997, + EndLine: 137, + StartPos: 2997, + EndPos: 2997, }, Value: "1", }, @@ -6375,9 +6314,9 @@ func TestPhp5(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 137, - EndLine: 137, - StartPos: 3000, - EndPos: 3005, + EndLine: 137, + StartPos: 3000, + EndPos: 3005, }, }, }, @@ -6385,16 +6324,16 @@ func TestPhp5(t *testing.T) { &stmt.Case{ Position: &position.Position{ StartLine: 138, - EndLine: 138, - StartPos: 3010, - EndPos: 3023, + EndLine: 138, + StartPos: 3010, + EndPos: 3023, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 138, - EndLine: 138, - StartPos: 3015, - EndPos: 3015, + EndLine: 138, + StartPos: 3015, + EndPos: 3015, }, Value: "2", }, @@ -6402,9 +6341,9 @@ func TestPhp5(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 138, - EndLine: 138, - StartPos: 3018, - EndPos: 3023, + EndLine: 138, + StartPos: 3018, + EndPos: 3023, }, }, }, @@ -6415,23 +6354,23 @@ func TestPhp5(t *testing.T) { &stmt.Throw{ Position: &position.Position{ StartLine: 140, - EndLine: 140, - StartPos: 3031, - EndPos: 3039, + EndLine: 140, + StartPos: 3031, + EndPos: 3039, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 140, - EndLine: 140, - StartPos: 3037, - EndPos: 3038, + EndLine: 140, + StartPos: 3037, + EndPos: 3038, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 140, - EndLine: 140, - StartPos: 3037, - EndPos: 3038, + EndLine: 140, + StartPos: 3037, + EndPos: 3038, }, Value: "e", }, @@ -6440,37 +6379,36 @@ func TestPhp5(t *testing.T) { &stmt.Trait{ Position: &position.Position{ StartLine: 141, - EndLine: 141, - StartPos: 3043, - EndPos: 3054, + EndLine: 141, + StartPos: 3043, + EndPos: 3054, }, PhpDocComment: "", TraitName: &node.Identifier{ Position: &position.Position{ StartLine: 141, - EndLine: 141, - StartPos: 3049, - EndPos: 3051, + EndLine: 141, + StartPos: 3049, + EndPos: 3051, }, Value: "Foo", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 142, - EndLine: 142, - StartPos: 3058, - EndPos: 3079, + EndLine: 142, + StartPos: 3058, + EndPos: 3079, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 142, - EndLine: 142, - StartPos: 3064, - EndPos: 3066, + EndLine: 142, + StartPos: 3064, + EndPos: 3066, }, Value: "Foo", }, @@ -6478,25 +6416,25 @@ func TestPhp5(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 142, - EndLine: 142, - StartPos: 3070, - EndPos: 3077, + EndLine: 142, + StartPos: 3070, + EndPos: 3077, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 142, - EndLine: 142, - StartPos: 3074, - EndPos: 3076, + EndLine: 142, + StartPos: 3074, + EndPos: 3076, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 142, - EndLine: 142, - StartPos: 3074, - EndPos: 3076, + EndLine: 142, + StartPos: 3074, + EndPos: 3076, }, Value: "Bar", }, @@ -6509,17 +6447,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3083, - EndPos: 3111, + EndLine: 143, + StartPos: 3083, + EndPos: 3111, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3089, - EndPos: 3091, + EndLine: 143, + StartPos: 3089, + EndPos: 3091, }, Value: "Foo", }, @@ -6527,25 +6465,25 @@ func TestPhp5(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3095, - EndPos: 3109, + EndLine: 143, + StartPos: 3095, + EndPos: 3109, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3099, - EndPos: 3101, + EndLine: 143, + StartPos: 3099, + EndPos: 3101, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3099, - EndPos: 3101, + EndLine: 143, + StartPos: 3099, + EndPos: 3101, }, Value: "Bar", }, @@ -6554,17 +6492,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3104, - EndPos: 3106, + EndLine: 143, + StartPos: 3104, + EndPos: 3106, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3104, - EndPos: 3106, + EndLine: 143, + StartPos: 3104, + EndPos: 3106, }, Value: "Baz", }, @@ -6574,9 +6512,9 @@ func TestPhp5(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 143, - EndLine: 143, - StartPos: 3108, - EndPos: 3109, + EndLine: 143, + StartPos: 3108, + EndPos: 3109, }, }, }, @@ -6585,17 +6523,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3115, - EndPos: 3159, + EndLine: 144, + StartPos: 3115, + EndPos: 3159, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3121, - EndPos: 3123, + EndLine: 144, + StartPos: 3121, + EndPos: 3123, }, Value: "Foo", }, @@ -6603,25 +6541,25 @@ func TestPhp5(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3127, - EndPos: 3157, + EndLine: 144, + StartPos: 3127, + EndPos: 3157, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3131, - EndPos: 3133, + EndLine: 144, + StartPos: 3131, + EndPos: 3133, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3131, - EndPos: 3133, + EndLine: 144, + StartPos: 3131, + EndPos: 3133, }, Value: "Bar", }, @@ -6630,17 +6568,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3136, - EndPos: 3138, + EndLine: 144, + StartPos: 3136, + EndPos: 3138, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3136, - EndPos: 3138, + EndLine: 144, + StartPos: 3136, + EndPos: 3138, }, Value: "Baz", }, @@ -6650,31 +6588,31 @@ func TestPhp5(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3140, - EndPos: 3157, + EndLine: 144, + StartPos: 3140, + EndPos: 3157, }, Adaptations: []node.Node{ &stmt.TraitUseAlias{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3142, - EndPos: 3154, + EndLine: 144, + StartPos: 3142, + EndPos: 3154, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3142, - EndPos: 3144, + EndLine: 144, + StartPos: 3142, + EndPos: 3144, }, Method: &node.Identifier{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3142, - EndPos: 3144, + EndLine: 144, + StartPos: 3142, + EndPos: 3144, }, Value: "one", }, @@ -6682,9 +6620,9 @@ func TestPhp5(t *testing.T) { Modifier: &node.Identifier{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3149, - EndPos: 3154, + EndLine: 144, + StartPos: 3149, + EndPos: 3154, }, Value: "public", }, @@ -6697,17 +6635,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3163, - EndPos: 3211, + EndLine: 145, + StartPos: 3163, + EndPos: 3211, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3169, - EndPos: 3171, + EndLine: 145, + StartPos: 3169, + EndPos: 3171, }, Value: "Foo", }, @@ -6715,25 +6653,25 @@ func TestPhp5(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3175, - EndPos: 3209, + EndLine: 145, + StartPos: 3175, + EndPos: 3209, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3179, - EndPos: 3181, + EndLine: 145, + StartPos: 3179, + EndPos: 3181, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3179, - EndPos: 3181, + EndLine: 145, + StartPos: 3179, + EndPos: 3181, }, Value: "Bar", }, @@ -6742,17 +6680,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3184, - EndPos: 3186, + EndLine: 145, + StartPos: 3184, + EndPos: 3186, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3184, - EndPos: 3186, + EndLine: 145, + StartPos: 3184, + EndPos: 3186, }, Value: "Baz", }, @@ -6762,31 +6700,31 @@ func TestPhp5(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3188, - EndPos: 3209, + EndLine: 145, + StartPos: 3188, + EndPos: 3209, }, Adaptations: []node.Node{ &stmt.TraitUseAlias{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3190, - EndPos: 3206, + EndLine: 145, + StartPos: 3190, + EndPos: 3206, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3190, - EndPos: 3192, + EndLine: 145, + StartPos: 3190, + EndPos: 3192, }, Method: &node.Identifier{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3190, - EndPos: 3192, + EndLine: 145, + StartPos: 3190, + EndPos: 3192, }, Value: "one", }, @@ -6794,18 +6732,18 @@ func TestPhp5(t *testing.T) { Modifier: &node.Identifier{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3197, - EndPos: 3202, + EndLine: 145, + StartPos: 3197, + EndPos: 3202, }, Value: "public", }, Alias: &node.Identifier{ Position: &position.Position{ StartLine: 145, - EndLine: 145, - StartPos: 3204, - EndPos: 3206, + EndLine: 145, + StartPos: 3204, + EndPos: 3206, }, Value: "two", }, @@ -6818,17 +6756,17 @@ func TestPhp5(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3215, - EndPos: 3291, + EndLine: 146, + StartPos: 3215, + EndPos: 3291, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3221, - EndPos: 3223, + EndLine: 146, + StartPos: 3221, + EndPos: 3223, }, Value: "Foo", }, @@ -6836,25 +6774,25 @@ func TestPhp5(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3227, - EndPos: 3289, + EndLine: 146, + StartPos: 3227, + EndPos: 3289, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3231, - EndPos: 3233, + EndLine: 146, + StartPos: 3231, + EndPos: 3233, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3231, - EndPos: 3233, + EndLine: 146, + StartPos: 3231, + EndPos: 3233, }, Value: "Bar", }, @@ -6863,17 +6801,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3236, - EndPos: 3238, + EndLine: 146, + StartPos: 3236, + EndPos: 3238, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3236, - EndPos: 3238, + EndLine: 146, + StartPos: 3236, + EndPos: 3238, }, Value: "Baz", }, @@ -6883,39 +6821,39 @@ func TestPhp5(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3240, - EndPos: 3289, + EndLine: 146, + StartPos: 3240, + EndPos: 3289, }, Adaptations: []node.Node{ &stmt.TraitUsePrecedence{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3242, - EndPos: 3269, + EndLine: 146, + StartPos: 3242, + EndPos: 3269, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3242, - EndPos: 3249, + EndLine: 146, + StartPos: 3242, + EndPos: 3249, }, Trait: &name.Name{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3242, - EndPos: 3244, + EndLine: 146, + StartPos: 3242, + EndPos: 3244, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3242, - EndPos: 3244, + EndLine: 146, + StartPos: 3242, + EndPos: 3244, }, Value: "Bar", }, @@ -6924,9 +6862,9 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3247, - EndPos: 3249, + EndLine: 146, + StartPos: 3247, + EndPos: 3249, }, Value: "one", }, @@ -6935,17 +6873,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3261, - EndPos: 3263, + EndLine: 146, + StartPos: 3261, + EndPos: 3263, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3261, - EndPos: 3263, + EndLine: 146, + StartPos: 3261, + EndPos: 3263, }, Value: "Baz", }, @@ -6954,17 +6892,17 @@ func TestPhp5(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3266, - EndPos: 3269, + EndLine: 146, + StartPos: 3266, + EndPos: 3269, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3266, - EndPos: 3269, + EndLine: 146, + StartPos: 3266, + EndPos: 3269, }, Value: "Quux", }, @@ -6975,31 +6913,31 @@ func TestPhp5(t *testing.T) { &stmt.TraitUseAlias{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3272, - EndPos: 3286, + EndLine: 146, + StartPos: 3272, + EndPos: 3286, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3272, - EndPos: 3279, + EndLine: 146, + StartPos: 3272, + EndPos: 3279, }, Trait: &name.Name{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3272, - EndPos: 3274, + EndLine: 146, + StartPos: 3272, + EndPos: 3274, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3272, - EndPos: 3274, + EndLine: 146, + StartPos: 3272, + EndPos: 3274, }, Value: "Baz", }, @@ -7008,9 +6946,9 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3277, - EndPos: 3279, + EndLine: 146, + StartPos: 3277, + EndPos: 3279, }, Value: "one", }, @@ -7018,9 +6956,9 @@ func TestPhp5(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3284, - EndPos: 3286, + EndLine: 146, + StartPos: 3284, + EndPos: 3286, }, Value: "two", }, @@ -7033,47 +6971,44 @@ func TestPhp5(t *testing.T) { &stmt.Try{ Position: &position.Position{ StartLine: 148, - EndLine: -1, - StartPos: 3296, - EndPos: -1, - }, - Stmts: []node.Node{ - }, - Catches: []node.Node{ + EndLine: -1, + StartPos: 3296, + EndPos: -1, }, + Stmts: []node.Node{}, + Catches: []node.Node{}, }, &stmt.Try{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3305, - EndPos: 3334, - }, - Stmts: []node.Node{ + EndLine: 149, + StartPos: 3305, + EndPos: 3334, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3312, - EndPos: 3334, + EndLine: 149, + StartPos: 3312, + EndPos: 3334, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3319, - EndPos: 3327, + EndLine: 149, + StartPos: 3319, + EndPos: 3327, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3319, - EndPos: 3327, + EndLine: 149, + StartPos: 3319, + EndPos: 3327, }, Value: "Exception", }, @@ -7083,57 +7018,55 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3329, - EndPos: 3330, + EndLine: 149, + StartPos: 3329, + EndPos: 3330, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3329, - EndPos: 3330, + EndLine: 149, + StartPos: 3329, + EndPos: 3330, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Try{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3338, - EndPos: 3398, - }, - Stmts: []node.Node{ + EndLine: 150, + StartPos: 3338, + EndPos: 3398, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3345, - EndPos: 3367, + EndLine: 150, + StartPos: 3345, + EndPos: 3367, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3352, - EndPos: 3360, + EndLine: 150, + StartPos: 3352, + EndPos: 3360, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3352, - EndPos: 3360, + EndLine: 150, + StartPos: 3352, + EndPos: 3360, }, Value: "Exception", }, @@ -7143,45 +7076,44 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3362, - EndPos: 3363, + EndLine: 150, + StartPos: 3362, + EndPos: 3363, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3362, - EndPos: 3363, + EndLine: 150, + StartPos: 3362, + EndPos: 3363, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Catch{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3369, - EndPos: 3398, + EndLine: 150, + StartPos: 3369, + EndPos: 3398, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3376, - EndPos: 3391, + EndLine: 150, + StartPos: 3376, + EndPos: 3391, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3376, - EndPos: 3391, + EndLine: 150, + StartPos: 3376, + EndPos: 3391, }, Value: "RuntimeException", }, @@ -7191,57 +7123,55 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3393, - EndPos: 3394, + EndLine: 150, + StartPos: 3393, + EndPos: 3394, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3393, - EndPos: 3394, + EndLine: 150, + StartPos: 3393, + EndPos: 3394, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Try{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3402, - EndPos: 3505, - }, - Stmts: []node.Node{ + EndLine: 151, + StartPos: 3402, + EndPos: 3505, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3409, - EndPos: 3431, + EndLine: 151, + StartPos: 3409, + EndPos: 3431, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3416, - EndPos: 3424, + EndLine: 151, + StartPos: 3416, + EndPos: 3424, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3416, - EndPos: 3424, + EndLine: 151, + StartPos: 3416, + EndPos: 3424, }, Value: "Exception", }, @@ -7251,45 +7181,44 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3426, - EndPos: 3427, + EndLine: 151, + StartPos: 3426, + EndPos: 3427, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3426, - EndPos: 3427, + EndLine: 151, + StartPos: 3426, + EndPos: 3427, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Catch{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3433, - EndPos: 3463, + EndLine: 151, + StartPos: 3433, + EndPos: 3463, }, Types: []node.Node{ &name.FullyQualified{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3440, - EndPos: 3456, + EndLine: 151, + StartPos: 3440, + EndPos: 3456, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3441, - EndPos: 3456, + EndLine: 151, + StartPos: 3441, + EndPos: 3456, }, Value: "RuntimeException", }, @@ -7299,45 +7228,44 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3458, - EndPos: 3459, + EndLine: 151, + StartPos: 3458, + EndPos: 3459, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3458, - EndPos: 3459, + EndLine: 151, + StartPos: 3458, + EndPos: 3459, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Catch{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3465, - EndPos: 3505, + EndLine: 151, + StartPos: 3465, + EndPos: 3505, }, Types: []node.Node{ &name.Relative{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3472, - EndPos: 3498, + EndLine: 151, + StartPos: 3472, + EndPos: 3498, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3482, - EndPos: 3498, + EndLine: 151, + StartPos: 3482, + EndPos: 3498, }, Value: "AdditionException", }, @@ -7347,57 +7275,55 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3500, - EndPos: 3501, + EndLine: 151, + StartPos: 3500, + EndPos: 3501, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3500, - EndPos: 3501, + EndLine: 151, + StartPos: 3500, + EndPos: 3501, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Try{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3509, - EndPos: 3549, - }, - Stmts: []node.Node{ + EndLine: 152, + StartPos: 3509, + EndPos: 3549, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3516, - EndPos: 3538, + EndLine: 152, + StartPos: 3516, + EndPos: 3538, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3523, - EndPos: 3531, + EndLine: 152, + StartPos: 3523, + EndPos: 3531, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3523, - EndPos: 3531, + EndLine: 152, + StartPos: 3523, + EndPos: 3531, }, Value: "Exception", }, @@ -7407,56 +7333,54 @@ func TestPhp5(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3533, - EndPos: 3534, + EndLine: 152, + StartPos: 3533, + EndPos: 3534, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3533, - EndPos: 3534, + EndLine: 152, + StartPos: 3533, + EndPos: 3534, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, Finally: &stmt.Finally{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3540, - EndPos: 3549, - }, - Stmts: []node.Node{ + EndLine: 152, + StartPos: 3540, + EndPos: 3549, }, + Stmts: []node.Node{}, }, }, &stmt.Unset{ Position: &position.Position{ StartLine: 154, - EndLine: 154, - StartPos: 3554, - EndPos: 3567, + EndLine: 154, + StartPos: 3554, + EndPos: 3567, }, Vars: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 154, - EndLine: 154, - StartPos: 3560, - EndPos: 3561, + EndLine: 154, + StartPos: 3560, + EndPos: 3561, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 154, - EndLine: 154, - StartPos: 3560, - EndPos: 3561, + EndLine: 154, + StartPos: 3560, + EndPos: 3561, }, Value: "a", }, @@ -7464,16 +7388,16 @@ func TestPhp5(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 154, - EndLine: 154, - StartPos: 3564, - EndPos: 3565, + EndLine: 154, + StartPos: 3564, + EndPos: 3565, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 154, - EndLine: 154, - StartPos: 3564, - EndPos: 3565, + EndLine: 154, + StartPos: 3564, + EndPos: 3565, }, Value: "b", }, @@ -7483,32 +7407,32 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3572, - EndPos: 3579, + EndLine: 156, + StartPos: 3572, + EndPos: 3579, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3576, - EndPos: 3578, + EndLine: 156, + StartPos: 3576, + EndPos: 3578, }, Use: &name.Name{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3576, - EndPos: 3578, + EndLine: 156, + StartPos: 3576, + EndPos: 3578, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3576, - EndPos: 3578, + EndLine: 156, + StartPos: 3576, + EndPos: 3578, }, Value: "Foo", }, @@ -7520,32 +7444,32 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3583, - EndPos: 3591, + EndLine: 157, + StartPos: 3583, + EndPos: 3591, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3588, - EndPos: 3590, + EndLine: 157, + StartPos: 3588, + EndPos: 3590, }, Use: &name.Name{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3588, - EndPos: 3590, + EndLine: 157, + StartPos: 3588, + EndPos: 3590, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3588, - EndPos: 3590, + EndLine: 157, + StartPos: 3588, + EndPos: 3590, }, Value: "Foo", }, @@ -7557,32 +7481,32 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3595, - EndPos: 3610, + EndLine: 158, + StartPos: 3595, + EndPos: 3610, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3600, - EndPos: 3609, + EndLine: 158, + StartPos: 3600, + EndPos: 3609, }, Use: &name.Name{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3600, - EndPos: 3602, + EndLine: 158, + StartPos: 3600, + EndPos: 3602, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3600, - EndPos: 3602, + EndLine: 158, + StartPos: 3600, + EndPos: 3602, }, Value: "Foo", }, @@ -7591,9 +7515,9 @@ func TestPhp5(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3607, - EndPos: 3609, + EndLine: 158, + StartPos: 3607, + EndPos: 3609, }, Value: "Bar", }, @@ -7603,32 +7527,32 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 159, - EndLine: 159, - StartPos: 3614, - EndPos: 3626, + EndLine: 159, + StartPos: 3614, + EndPos: 3626, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 159, - EndLine: 159, - StartPos: 3618, - EndPos: 3620, + EndLine: 159, + StartPos: 3618, + EndPos: 3620, }, Use: &name.Name{ Position: &position.Position{ StartLine: 159, - EndLine: 159, - StartPos: 3618, - EndPos: 3620, + EndLine: 159, + StartPos: 3618, + EndPos: 3620, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 159, - EndLine: 159, - StartPos: 3618, - EndPos: 3620, + EndLine: 159, + StartPos: 3618, + EndPos: 3620, }, Value: "Foo", }, @@ -7638,24 +7562,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 159, - EndLine: 159, - StartPos: 3623, - EndPos: 3625, + EndLine: 159, + StartPos: 3623, + EndPos: 3625, }, Use: &name.Name{ Position: &position.Position{ StartLine: 159, - EndLine: 159, - StartPos: 3623, - EndPos: 3625, + EndLine: 159, + StartPos: 3623, + EndPos: 3625, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 159, - EndLine: 159, - StartPos: 3623, - EndPos: 3625, + EndLine: 159, + StartPos: 3623, + EndPos: 3625, }, Value: "Bar", }, @@ -7667,32 +7591,32 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3630, - EndPos: 3649, + EndLine: 160, + StartPos: 3630, + EndPos: 3649, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3634, - EndPos: 3636, + EndLine: 160, + StartPos: 3634, + EndPos: 3636, }, Use: &name.Name{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3634, - EndPos: 3636, + EndLine: 160, + StartPos: 3634, + EndPos: 3636, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3634, - EndPos: 3636, + EndLine: 160, + StartPos: 3634, + EndPos: 3636, }, Value: "Foo", }, @@ -7702,24 +7626,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3639, - EndPos: 3648, + EndLine: 160, + StartPos: 3639, + EndPos: 3648, }, Use: &name.Name{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3639, - EndPos: 3641, + EndLine: 160, + StartPos: 3639, + EndPos: 3641, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3639, - EndPos: 3641, + EndLine: 160, + StartPos: 3639, + EndPos: 3641, }, Value: "Bar", }, @@ -7728,9 +7652,9 @@ func TestPhp5(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3646, - EndPos: 3648, + EndLine: 160, + StartPos: 3646, + EndPos: 3648, }, Value: "Baz", }, @@ -7740,16 +7664,16 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3653, - EndPos: 3675, + EndLine: 161, + StartPos: 3653, + EndPos: 3675, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3657, - EndPos: 3664, + EndLine: 161, + StartPos: 3657, + EndPos: 3664, }, Value: "function", }, @@ -7757,24 +7681,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3666, - EndPos: 3668, + EndLine: 161, + StartPos: 3666, + EndPos: 3668, }, Use: &name.Name{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3666, - EndPos: 3668, + EndLine: 161, + StartPos: 3666, + EndPos: 3668, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3666, - EndPos: 3668, + EndLine: 161, + StartPos: 3666, + EndPos: 3668, }, Value: "Foo", }, @@ -7784,24 +7708,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3672, - EndPos: 3674, + EndLine: 161, + StartPos: 3672, + EndPos: 3674, }, Use: &name.Name{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3672, - EndPos: 3674, + EndLine: 161, + StartPos: 3672, + EndPos: 3674, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 161, - EndLine: 161, - StartPos: 3672, - EndPos: 3674, + EndLine: 161, + StartPos: 3672, + EndPos: 3674, }, Value: "Bar", }, @@ -7813,16 +7737,16 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3679, - EndPos: 3715, + EndLine: 162, + StartPos: 3679, + EndPos: 3715, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3683, - EndPos: 3690, + EndLine: 162, + StartPos: 3683, + EndPos: 3690, }, Value: "function", }, @@ -7830,24 +7754,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3692, - EndPos: 3701, + EndLine: 162, + StartPos: 3692, + EndPos: 3701, }, Use: &name.Name{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3692, - EndPos: 3694, + EndLine: 162, + StartPos: 3692, + EndPos: 3694, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3692, - EndPos: 3694, + EndLine: 162, + StartPos: 3692, + EndPos: 3694, }, Value: "Foo", }, @@ -7856,9 +7780,9 @@ func TestPhp5(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3699, - EndPos: 3701, + EndLine: 162, + StartPos: 3699, + EndPos: 3701, }, Value: "foo", }, @@ -7866,24 +7790,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3705, - EndPos: 3714, + EndLine: 162, + StartPos: 3705, + EndPos: 3714, }, Use: &name.Name{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3705, - EndPos: 3707, + EndLine: 162, + StartPos: 3705, + EndPos: 3707, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3705, - EndPos: 3707, + EndLine: 162, + StartPos: 3705, + EndPos: 3707, }, Value: "Bar", }, @@ -7892,9 +7816,9 @@ func TestPhp5(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3712, - EndPos: 3714, + EndLine: 162, + StartPos: 3712, + EndPos: 3714, }, Value: "bar", }, @@ -7904,16 +7828,16 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3719, - EndPos: 3738, + EndLine: 163, + StartPos: 3719, + EndPos: 3738, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3723, - EndPos: 3727, + EndLine: 163, + StartPos: 3723, + EndPos: 3727, }, Value: "const", }, @@ -7921,24 +7845,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3729, - EndPos: 3731, + EndLine: 163, + StartPos: 3729, + EndPos: 3731, }, Use: &name.Name{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3729, - EndPos: 3731, + EndLine: 163, + StartPos: 3729, + EndPos: 3731, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3729, - EndPos: 3731, + EndLine: 163, + StartPos: 3729, + EndPos: 3731, }, Value: "Foo", }, @@ -7948,24 +7872,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3735, - EndPos: 3737, + EndLine: 163, + StartPos: 3735, + EndPos: 3737, }, Use: &name.Name{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3735, - EndPos: 3737, + EndLine: 163, + StartPos: 3735, + EndPos: 3737, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3735, - EndPos: 3737, + EndLine: 163, + StartPos: 3735, + EndPos: 3737, }, Value: "Bar", }, @@ -7977,16 +7901,16 @@ func TestPhp5(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3742, - EndPos: 3775, + EndLine: 164, + StartPos: 3742, + EndPos: 3775, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3746, - EndPos: 3750, + EndLine: 164, + StartPos: 3746, + EndPos: 3750, }, Value: "const", }, @@ -7994,24 +7918,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3752, - EndPos: 3761, + EndLine: 164, + StartPos: 3752, + EndPos: 3761, }, Use: &name.Name{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3752, - EndPos: 3754, + EndLine: 164, + StartPos: 3752, + EndPos: 3754, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3752, - EndPos: 3754, + EndLine: 164, + StartPos: 3752, + EndPos: 3754, }, Value: "Foo", }, @@ -8020,9 +7944,9 @@ func TestPhp5(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3759, - EndPos: 3761, + EndLine: 164, + StartPos: 3759, + EndPos: 3761, }, Value: "foo", }, @@ -8030,24 +7954,24 @@ func TestPhp5(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3765, - EndPos: 3774, + EndLine: 164, + StartPos: 3765, + EndPos: 3774, }, Use: &name.Name{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3765, - EndPos: 3767, + EndLine: 164, + StartPos: 3765, + EndPos: 3767, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3765, - EndPos: 3767, + EndLine: 164, + StartPos: 3765, + EndPos: 3767, }, Value: "Bar", }, @@ -8056,9 +7980,9 @@ func TestPhp5(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3772, - EndPos: 3774, + EndLine: 164, + StartPos: 3772, + EndPos: 3774, }, Value: "bar", }, @@ -8068,30 +7992,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3780, - EndPos: 3785, + EndLine: 166, + StartPos: 3780, + EndPos: 3785, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3780, - EndPos: 3784, + EndLine: 166, + StartPos: 3780, + EndPos: 3784, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3780, - EndPos: 3781, + EndLine: 166, + StartPos: 3780, + EndPos: 3781, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3780, - EndPos: 3781, + EndLine: 166, + StartPos: 3780, + EndPos: 3781, }, Value: "a", }, @@ -8099,9 +8023,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3783, - EndPos: 3783, + EndLine: 166, + StartPos: 3783, + EndPos: 3783, }, Value: "1", }, @@ -8110,37 +8034,37 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3789, - EndPos: 3797, + EndLine: 167, + StartPos: 3789, + EndPos: 3797, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3789, - EndPos: 3796, + EndLine: 167, + StartPos: 3789, + EndPos: 3796, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3789, - EndPos: 3793, + EndLine: 167, + StartPos: 3789, + EndPos: 3793, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3789, - EndPos: 3790, + EndLine: 167, + StartPos: 3789, + EndPos: 3790, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3789, - EndPos: 3790, + EndLine: 167, + StartPos: 3789, + EndPos: 3790, }, Value: "a", }, @@ -8148,9 +8072,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3792, - EndPos: 3792, + EndLine: 167, + StartPos: 3792, + EndPos: 3792, }, Value: "1", }, @@ -8158,9 +8082,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3795, - EndPos: 3795, + EndLine: 167, + StartPos: 3795, + EndPos: 3795, }, Value: "2", }, @@ -8169,49 +8093,48 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3801, - EndPos: 3808, + EndLine: 168, + StartPos: 3801, + EndPos: 3808, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3801, - EndPos: 3807, - }, - Items: []node.Node{ + EndLine: 168, + StartPos: 3801, + EndPos: 3807, }, + Items: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3812, - EndPos: 3820, + EndLine: 169, + StartPos: 3812, + EndPos: 3820, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3812, - EndPos: 3819, + EndLine: 169, + StartPos: 3812, + EndPos: 3819, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3818, - EndPos: 3818, + EndLine: 169, + StartPos: 3818, + EndPos: 3818, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3818, - EndPos: 3818, + EndLine: 169, + StartPos: 3818, + EndPos: 3818, }, Value: "1", }, @@ -8222,40 +8145,40 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3824, - EndPos: 3841, + EndLine: 170, + StartPos: 3824, + EndPos: 3841, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3824, - EndPos: 3840, + EndLine: 170, + StartPos: 3824, + EndPos: 3840, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3830, - EndPos: 3833, + EndLine: 170, + StartPos: 3830, + EndPos: 3833, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3830, - EndPos: 3830, + EndLine: 170, + StartPos: 3830, + EndPos: 3830, }, Value: "1", }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3833, - EndPos: 3833, + EndLine: 170, + StartPos: 3833, + EndPos: 3833, }, Value: "1", }, @@ -8263,30 +8186,30 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3836, - EndPos: 3838, + EndLine: 170, + StartPos: 3836, + EndPos: 3838, }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3836, - EndPos: 3838, + EndLine: 170, + StartPos: 3836, + EndPos: 3838, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3837, - EndPos: 3838, + EndLine: 170, + StartPos: 3837, + EndPos: 3838, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3837, - EndPos: 3838, + EndLine: 170, + StartPos: 3837, + EndPos: 3838, }, Value: "b", }, @@ -8299,54 +8222,54 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 171, - EndLine: 171, - StartPos: 3845, - EndPos: 3859, + EndLine: 171, + StartPos: 3845, + EndPos: 3859, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 171, - EndLine: 171, - StartPos: 3845, - EndPos: 3858, + EndLine: 171, + StartPos: 3845, + EndPos: 3858, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 171, - EndLine: 171, - StartPos: 3851, - EndPos: 3857, + EndLine: 171, + StartPos: 3851, + EndPos: 3857, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 171, - EndLine: 171, - StartPos: 3851, - EndPos: 3851, + EndLine: 171, + StartPos: 3851, + EndPos: 3851, }, Value: "3", }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 171, - EndLine: 171, - StartPos: 3855, - EndPos: 3857, + EndLine: 171, + StartPos: 3855, + EndPos: 3857, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 171, - EndLine: 171, - StartPos: 3856, - EndPos: 3857, + EndLine: 171, + StartPos: 3856, + EndPos: 3857, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 171, - EndLine: 171, - StartPos: 3856, - EndPos: 3857, + EndLine: 171, + StartPos: 3856, + EndPos: 3857, }, Value: "b", }, @@ -8359,45 +8282,45 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3863, - EndPos: 3891, + EndLine: 172, + StartPos: 3863, + EndPos: 3891, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3863, - EndPos: 3890, + EndLine: 172, + StartPos: 3863, + EndPos: 3890, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3869, - EndPos: 3871, + EndLine: 172, + StartPos: 3869, + EndPos: 3871, }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3869, - EndPos: 3871, + EndLine: 172, + StartPos: 3869, + EndPos: 3871, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3870, - EndPos: 3871, + EndLine: 172, + StartPos: 3870, + EndPos: 3871, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3870, - EndPos: 3871, + EndLine: 172, + StartPos: 3870, + EndPos: 3871, }, Value: "b", }, @@ -8407,25 +8330,25 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3874, - EndPos: 3877, + EndLine: 172, + StartPos: 3874, + EndPos: 3877, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3874, - EndPos: 3874, + EndLine: 172, + StartPos: 3874, + EndPos: 3874, }, Value: "1", }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3877, - EndPos: 3877, + EndLine: 172, + StartPos: 3877, + EndPos: 3877, }, Value: "1", }, @@ -8433,16 +8356,16 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3880, - EndPos: 3880, + EndLine: 172, + StartPos: 3880, + EndPos: 3880, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3880, - EndPos: 3880, + EndLine: 172, + StartPos: 3880, + EndPos: 3880, }, Value: "1", }, @@ -8450,39 +8373,39 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3883, - EndPos: 3889, + EndLine: 172, + StartPos: 3883, + EndPos: 3889, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3883, - EndPos: 3883, + EndLine: 172, + StartPos: 3883, + EndPos: 3883, }, Value: "3", }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3887, - EndPos: 3889, + EndLine: 172, + StartPos: 3887, + EndPos: 3889, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3888, - EndPos: 3889, + EndLine: 172, + StartPos: 3888, + EndPos: 3889, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3888, - EndPos: 3889, + EndLine: 172, + StartPos: 3888, + EndPos: 3889, }, Value: "b", }, @@ -8495,30 +8418,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3895, - EndPos: 3898, + EndLine: 173, + StartPos: 3895, + EndPos: 3898, }, Expr: &expr.BitwiseNot{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3895, - EndPos: 3897, + EndLine: 173, + StartPos: 3895, + EndPos: 3897, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3896, - EndPos: 3897, + EndLine: 173, + StartPos: 3896, + EndPos: 3897, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3896, - EndPos: 3897, + EndLine: 173, + StartPos: 3896, + EndPos: 3897, }, Value: "a", }, @@ -8528,30 +8451,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3902, - EndPos: 3905, + EndLine: 174, + StartPos: 3902, + EndPos: 3905, }, Expr: &expr.BooleanNot{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3902, - EndPos: 3904, + EndLine: 174, + StartPos: 3902, + EndPos: 3904, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3903, - EndPos: 3904, + EndLine: 174, + StartPos: 3903, + EndPos: 3904, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3903, - EndPos: 3904, + EndLine: 174, + StartPos: 3903, + EndPos: 3904, }, Value: "a", }, @@ -8561,31 +8484,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3910, - EndPos: 3918, + EndLine: 176, + StartPos: 3910, + EndPos: 3918, }, Expr: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3910, - EndPos: 3917, + EndLine: 176, + StartPos: 3910, + EndPos: 3917, }, Class: &name.Name{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3910, - EndPos: 3912, + EndLine: 176, + StartPos: 3910, + EndPos: 3912, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3910, - EndPos: 3912, + EndLine: 176, + StartPos: 3910, + EndPos: 3912, }, Value: "Foo", }, @@ -8594,9 +8517,9 @@ func TestPhp5(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3915, - EndPos: 3917, + EndLine: 176, + StartPos: 3915, + EndPos: 3917, }, Value: "Bar", }, @@ -8605,30 +8528,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 177, - EndLine: 177, - StartPos: 3922, - EndPos: 3931, + EndLine: 177, + StartPos: 3922, + EndPos: 3931, }, Expr: &expr.Clone{ Position: &position.Position{ StartLine: 177, - EndLine: 177, - StartPos: 3922, - EndPos: 3929, + EndLine: 177, + StartPos: 3922, + EndPos: 3929, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 177, - EndLine: 177, - StartPos: 3928, - EndPos: 3929, + EndLine: 177, + StartPos: 3928, + EndPos: 3929, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 177, - EndLine: 177, - StartPos: 3928, - EndPos: 3929, + EndLine: 177, + StartPos: 3928, + EndPos: 3929, }, Value: "a", }, @@ -8638,30 +8561,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 3935, - EndPos: 3943, + EndLine: 178, + StartPos: 3935, + EndPos: 3943, }, Expr: &expr.Clone{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 3935, - EndPos: 3942, + EndLine: 178, + StartPos: 3935, + EndPos: 3942, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 3941, - EndPos: 3942, + EndLine: 178, + StartPos: 3941, + EndPos: 3942, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 3941, - EndPos: 3942, + EndLine: 178, + StartPos: 3941, + EndPos: 3942, }, Value: "a", }, @@ -8671,64 +8594,63 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 3947, - EndPos: 3959, + EndLine: 179, + StartPos: 3947, + EndPos: 3959, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 3947, - EndPos: 3958, + EndLine: 179, + StartPos: 3947, + EndPos: 3958, }, - ReturnsRef: false, - Static: false, + ReturnsRef: false, + Static: false, PhpDocComment: "", - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3963, - EndPos: 3996, + EndLine: 180, + StartPos: 3963, + EndPos: 3996, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3963, - EndPos: 3995, + EndLine: 180, + StartPos: 3963, + EndPos: 3995, }, + ReturnsRef: false, + Static: false, PhpDocComment: "", - ReturnsRef: false, - Static: false, Params: []node.Node{ &node.Parameter{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3972, - EndPos: 3973, + EndLine: 180, + StartPos: 3972, + EndPos: 3973, }, - ByRef: false, + ByRef: false, Variadic: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3972, - EndPos: 3973, + EndLine: 180, + StartPos: 3972, + EndPos: 3973, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3972, - EndPos: 3973, + EndLine: 180, + StartPos: 3972, + EndPos: 3973, }, Value: "a", }, @@ -8737,25 +8659,25 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3976, - EndPos: 3977, + EndLine: 180, + StartPos: 3976, + EndPos: 3977, }, - ByRef: false, + ByRef: false, Variadic: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3976, - EndPos: 3977, + EndLine: 180, + StartPos: 3976, + EndPos: 3977, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3976, - EndPos: 3977, + EndLine: 180, + StartPos: 3976, + EndPos: 3977, }, Value: "b", }, @@ -8765,24 +8687,24 @@ func TestPhp5(t *testing.T) { ClosureUse: &expr.ClosureUse{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3980, - EndPos: 3992, + EndLine: 180, + StartPos: 3980, + EndPos: 3992, }, Uses: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3985, - EndPos: 3986, + EndLine: 180, + StartPos: 3985, + EndPos: 3986, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3985, - EndPos: 3986, + EndLine: 180, + StartPos: 3985, + EndPos: 3986, }, Value: "c", }, @@ -8790,23 +8712,23 @@ func TestPhp5(t *testing.T) { &expr.Reference{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3989, - EndPos: 3991, + EndLine: 180, + StartPos: 3989, + EndPos: 3991, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3990, - EndPos: 3991, + EndLine: 180, + StartPos: 3990, + EndPos: 3991, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 3990, - EndPos: 3991, + EndLine: 180, + StartPos: 3990, + EndPos: 3991, }, Value: "d", }, @@ -8814,50 +8736,49 @@ func TestPhp5(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4000, - EndPos: 4033, + EndLine: 181, + StartPos: 4000, + EndPos: 4033, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4000, - EndPos: 4032, + EndLine: 181, + StartPos: 4000, + EndPos: 4032, }, - ReturnsRef: false, - Static: false, + ReturnsRef: false, + Static: false, PhpDocComment: "", Params: []node.Node{ &node.Parameter{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4009, - EndPos: 4010, + EndLine: 181, + StartPos: 4009, + EndPos: 4010, }, - ByRef: false, + ByRef: false, Variadic: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4009, - EndPos: 4010, + EndLine: 181, + StartPos: 4009, + EndPos: 4010, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4009, - EndPos: 4010, + EndLine: 181, + StartPos: 4009, + EndPos: 4010, }, Value: "a", }, @@ -8866,25 +8787,25 @@ func TestPhp5(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4013, - EndPos: 4014, + EndLine: 181, + StartPos: 4013, + EndPos: 4014, }, + ByRef: false, Variadic: false, - ByRef: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4013, - EndPos: 4014, + EndLine: 181, + StartPos: 4013, + EndPos: 4014, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4013, - EndPos: 4014, + EndLine: 181, + StartPos: 4013, + EndPos: 4014, }, Value: "b", }, @@ -8894,31 +8815,31 @@ func TestPhp5(t *testing.T) { ClosureUse: &expr.ClosureUse{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4017, - EndPos: 4029, + EndLine: 181, + StartPos: 4017, + EndPos: 4029, }, Uses: []node.Node{ &expr.Reference{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4022, - EndPos: 4024, + EndLine: 181, + StartPos: 4022, + EndPos: 4024, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4023, - EndPos: 4024, + EndLine: 181, + StartPos: 4023, + EndPos: 4024, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4023, - EndPos: 4024, + EndLine: 181, + StartPos: 4023, + EndPos: 4024, }, Value: "c", }, @@ -8927,75 +8848,73 @@ func TestPhp5(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4027, - EndPos: 4028, + EndLine: 181, + StartPos: 4027, + EndPos: 4028, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4027, - EndPos: 4028, + EndLine: 181, + StartPos: 4027, + EndPos: 4028, }, Value: "d", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4037, - EndPos: 4050, + EndLine: 182, + StartPos: 4037, + EndPos: 4050, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4037, - EndPos: 4049, + EndLine: 182, + StartPos: 4037, + EndPos: 4049, }, - ReturnsRef: false, - Static: false, + ReturnsRef: false, + Static: false, PhpDocComment: "", - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4054, - EndPos: 4057, + EndLine: 183, + StartPos: 4054, + EndPos: 4057, }, Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4054, - EndPos: 4056, + EndLine: 183, + StartPos: 4054, + EndPos: 4056, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4054, - EndPos: 4056, + EndLine: 183, + StartPos: 4054, + EndPos: 4056, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4054, - EndPos: 4056, + EndLine: 183, + StartPos: 4054, + EndPos: 4056, }, Value: "foo", }, @@ -9006,31 +8925,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4061, - EndPos: 4074, + EndLine: 184, + StartPos: 4061, + EndPos: 4074, }, Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4061, - EndPos: 4073, + EndLine: 184, + StartPos: 4061, + EndPos: 4073, }, Constant: &name.Relative{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4061, - EndPos: 4073, + EndLine: 184, + StartPos: 4061, + EndPos: 4073, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4071, - EndPos: 4073, + EndLine: 184, + StartPos: 4071, + EndPos: 4073, }, Value: "foo", }, @@ -9041,31 +8960,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 185, - EndLine: 185, - StartPos: 4078, - EndPos: 4082, + EndLine: 185, + StartPos: 4078, + EndPos: 4082, }, Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 185, - EndLine: 185, - StartPos: 4078, - EndPos: 4081, + EndLine: 185, + StartPos: 4078, + EndPos: 4081, }, Constant: &name.FullyQualified{ Position: &position.Position{ StartLine: 185, - EndLine: 185, - StartPos: 4078, - EndPos: 4081, + EndLine: 185, + StartPos: 4078, + EndPos: 4081, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 185, - EndLine: 185, - StartPos: 4079, - EndPos: 4081, + EndLine: 185, + StartPos: 4079, + EndPos: 4081, }, Value: "foo", }, @@ -9076,30 +8995,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4087, - EndPos: 4096, + EndLine: 187, + StartPos: 4087, + EndPos: 4096, }, Expr: &expr.Empty{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4087, - EndPos: 4095, + EndLine: 187, + StartPos: 4087, + EndPos: 4095, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4093, - EndPos: 4094, + EndLine: 187, + StartPos: 4093, + EndPos: 4094, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4093, - EndPos: 4094, + EndLine: 187, + StartPos: 4093, + EndPos: 4094, }, Value: "a", }, @@ -9109,38 +9028,38 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4100, - EndPos: 4110, + EndLine: 188, + StartPos: 4100, + EndPos: 4110, }, Expr: &expr.Empty{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4100, - EndPos: 4109, + EndLine: 188, + StartPos: 4100, + EndPos: 4109, }, Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4106, - EndPos: 4108, + EndLine: 188, + StartPos: 4106, + EndPos: 4108, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4106, - EndPos: 4108, + EndLine: 188, + StartPos: 4106, + EndPos: 4108, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4106, - EndPos: 4108, + EndLine: 188, + StartPos: 4106, + EndPos: 4108, }, Value: "Foo", }, @@ -9152,30 +9071,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4114, - EndPos: 4117, + EndLine: 189, + StartPos: 4114, + EndPos: 4117, }, Expr: &expr.ErrorSuppress{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4114, - EndPos: 4116, + EndLine: 189, + StartPos: 4114, + EndPos: 4116, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4115, - EndPos: 4116, + EndLine: 189, + StartPos: 4115, + EndPos: 4116, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4115, - EndPos: 4116, + EndLine: 189, + StartPos: 4115, + EndPos: 4116, }, Value: "a", }, @@ -9185,30 +9104,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 190, - EndLine: 190, - StartPos: 4121, - EndPos: 4129, + EndLine: 190, + StartPos: 4121, + EndPos: 4129, }, Expr: &expr.Eval{ Position: &position.Position{ StartLine: 190, - EndLine: 190, - StartPos: 4121, - EndPos: 4128, + EndLine: 190, + StartPos: 4121, + EndPos: 4128, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 190, - EndLine: 190, - StartPos: 4126, - EndPos: 4127, + EndLine: 190, + StartPos: 4126, + EndPos: 4127, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 190, - EndLine: 190, - StartPos: 4126, - EndPos: 4127, + EndLine: 190, + StartPos: 4126, + EndPos: 4127, }, Value: "a", }, @@ -9218,46 +9137,46 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4133, - EndPos: 4137, + EndLine: 191, + StartPos: 4133, + EndPos: 4137, }, Expr: &expr.Exit{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4133, - EndPos: 4136, + EndLine: 191, + StartPos: 4133, + EndPos: 4136, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4141, - EndPos: 4149, + EndLine: 192, + StartPos: 4141, + EndPos: 4149, }, Expr: &expr.Exit{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4141, - EndPos: 4147, + EndLine: 192, + StartPos: 4141, + EndPos: 4148, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4146, - EndPos: 4147, + EndLine: 192, + StartPos: 4146, + EndPos: 4147, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4146, - EndPos: 4147, + EndLine: 192, + StartPos: 4146, + EndPos: 4147, }, Value: "a", }, @@ -9267,46 +9186,46 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 193, - EndLine: 193, - StartPos: 4153, - EndPos: 4158, + EndLine: 193, + StartPos: 4153, + EndPos: 4158, }, Expr: &expr.Die{ Position: &position.Position{ StartLine: 193, - EndLine: 193, - StartPos: 4153, - EndPos: 4157, + EndLine: 193, + StartPos: 4153, + EndPos: 4157, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4162, - EndPos: 4169, + EndLine: 194, + StartPos: 4162, + EndPos: 4169, }, Expr: &expr.Die{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4162, - EndPos: 4167, + EndLine: 194, + StartPos: 4162, + EndPos: 4168, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4166, - EndPos: 4167, + EndLine: 194, + StartPos: 4166, + EndPos: 4167, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4166, - EndPos: 4167, + EndLine: 194, + StartPos: 4166, + EndPos: 4167, }, Value: "a", }, @@ -9316,31 +9235,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4173, - EndPos: 4178, + EndLine: 195, + StartPos: 4173, + EndPos: 4178, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4173, - EndPos: 4177, + EndLine: 195, + StartPos: 4173, + EndPos: 4177, }, Function: &name.Name{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4173, - EndPos: 4175, + EndLine: 195, + StartPos: 4173, + EndPos: 4175, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4173, - EndPos: 4175, + EndLine: 195, + StartPos: 4173, + EndPos: 4175, }, Value: "foo", }, @@ -9349,9 +9268,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4176, - EndPos: 4177, + EndLine: 195, + StartPos: 4176, + EndPos: 4177, }, }, }, @@ -9359,31 +9278,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4182, - EndPos: 4200, + EndLine: 196, + StartPos: 4182, + EndPos: 4200, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4182, - EndPos: 4199, + EndLine: 196, + StartPos: 4182, + EndPos: 4199, }, Function: &name.Relative{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4182, - EndPos: 4194, + EndLine: 196, + StartPos: 4182, + EndPos: 4194, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4192, - EndPos: 4194, + EndLine: 196, + StartPos: 4192, + EndPos: 4194, }, Value: "foo", }, @@ -9392,33 +9311,33 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4195, - EndPos: 4199, + EndLine: 196, + StartPos: 4195, + EndPos: 4199, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4197, - EndPos: 4198, + EndLine: 196, + StartPos: 4197, + EndPos: 4198, }, - Variadic: false, + Variadic: false, IsReference: true, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4197, - EndPos: 4198, + EndLine: 196, + StartPos: 4197, + EndPos: 4198, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 196, - EndLine: 196, - StartPos: 4197, - EndPos: 4198, + EndLine: 196, + StartPos: 4197, + EndPos: 4198, }, Value: "a", }, @@ -9431,31 +9350,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4204, - EndPos: 4212, + EndLine: 197, + StartPos: 4204, + EndPos: 4212, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4204, - EndPos: 4211, + EndLine: 197, + StartPos: 4204, + EndPos: 4211, }, Function: &name.FullyQualified{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4204, - EndPos: 4207, + EndLine: 197, + StartPos: 4204, + EndPos: 4207, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4205, - EndPos: 4207, + EndLine: 197, + StartPos: 4205, + EndPos: 4207, }, Value: "foo", }, @@ -9464,29 +9383,28 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4208, - EndPos: 4211, + EndLine: 197, + StartPos: 4208, + EndPos: 4211, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4209, - EndPos: 4210, + EndLine: 197, + StartPos: 4209, + EndPos: 4210, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4209, - EndPos: 4210, - }, - Items: []node.Node{ + EndLine: 197, + StartPos: 4209, + EndPos: 4210, }, + Items: []node.Node{}, }, }, }, @@ -9496,30 +9414,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4216, - EndPos: 4230, + EndLine: 198, + StartPos: 4216, + EndPos: 4230, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4216, - EndPos: 4229, + EndLine: 198, + StartPos: 4216, + EndPos: 4229, }, Function: &expr.Variable{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4216, - EndPos: 4219, + EndLine: 198, + StartPos: 4216, + EndPos: 4219, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4216, - EndPos: 4219, + EndLine: 198, + StartPos: 4216, + EndPos: 4219, }, Value: "foo", }, @@ -9527,40 +9445,40 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4220, - EndPos: 4229, + EndLine: 198, + StartPos: 4220, + EndPos: 4229, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4221, - EndPos: 4228, + EndLine: 198, + StartPos: 4221, + EndPos: 4228, }, + Variadic: false, IsReference: false, - Variadic: false, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4221, - EndPos: 4228, + EndLine: 198, + StartPos: 4221, + EndPos: 4228, }, Value: &expr.Variable{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4227, - EndPos: 4228, + EndLine: 198, + StartPos: 4227, + EndPos: 4228, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4227, - EndPos: 4228, + EndLine: 198, + StartPos: 4227, + EndPos: 4228, }, Value: "a", }, @@ -9574,30 +9492,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 200, - EndLine: 200, - StartPos: 4235, - EndPos: 4239, + EndLine: 200, + StartPos: 4235, + EndPos: 4239, }, Expr: &expr.PostDec{ Position: &position.Position{ StartLine: 200, - EndLine: 200, - StartPos: 4235, - EndPos: 4238, + EndLine: 200, + StartPos: 4235, + EndPos: 4238, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 200, - EndLine: 200, - StartPos: 4235, - EndPos: 4236, + EndLine: 200, + StartPos: 4235, + EndPos: 4236, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 200, - EndLine: 200, - StartPos: 4235, - EndPos: 4236, + EndLine: 200, + StartPos: 4235, + EndPos: 4236, }, Value: "a", }, @@ -9607,30 +9525,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4243, - EndPos: 4247, + EndLine: 201, + StartPos: 4243, + EndPos: 4247, }, Expr: &expr.PostInc{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4243, - EndPos: 4246, + EndLine: 201, + StartPos: 4243, + EndPos: 4246, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4243, - EndPos: 4244, + EndLine: 201, + StartPos: 4243, + EndPos: 4244, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4243, - EndPos: 4244, + EndLine: 201, + StartPos: 4243, + EndPos: 4244, }, Value: "a", }, @@ -9640,30 +9558,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 202, - EndLine: 202, - StartPos: 4251, - EndPos: 4255, + EndLine: 202, + StartPos: 4251, + EndPos: 4255, }, Expr: &expr.PreDec{ Position: &position.Position{ StartLine: 202, - EndLine: 202, - StartPos: 4251, - EndPos: 4254, + EndLine: 202, + StartPos: 4251, + EndPos: 4254, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 202, - EndLine: 202, - StartPos: 4253, - EndPos: 4254, + EndLine: 202, + StartPos: 4253, + EndPos: 4254, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 202, - EndLine: 202, - StartPos: 4253, - EndPos: 4254, + EndLine: 202, + StartPos: 4253, + EndPos: 4254, }, Value: "a", }, @@ -9673,30 +9591,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4259, - EndPos: 4263, + EndLine: 203, + StartPos: 4259, + EndPos: 4263, }, Expr: &expr.PreInc{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4259, - EndPos: 4262, + EndLine: 203, + StartPos: 4259, + EndPos: 4262, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4261, - EndPos: 4262, + EndLine: 203, + StartPos: 4261, + EndPos: 4262, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4261, - EndPos: 4262, + EndLine: 203, + StartPos: 4261, + EndPos: 4262, }, Value: "a", }, @@ -9706,30 +9624,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4268, - EndPos: 4278, + EndLine: 205, + StartPos: 4268, + EndPos: 4278, }, Expr: &expr.Include{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4268, - EndPos: 4277, + EndLine: 205, + StartPos: 4268, + EndPos: 4277, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4276, - EndPos: 4277, + EndLine: 205, + StartPos: 4276, + EndPos: 4277, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4276, - EndPos: 4277, + EndLine: 205, + StartPos: 4276, + EndPos: 4277, }, Value: "a", }, @@ -9739,30 +9657,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4282, - EndPos: 4297, + EndLine: 206, + StartPos: 4282, + EndPos: 4297, }, Expr: &expr.IncludeOnce{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4282, - EndPos: 4296, + EndLine: 206, + StartPos: 4282, + EndPos: 4296, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4295, - EndPos: 4296, + EndLine: 206, + StartPos: 4295, + EndPos: 4296, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4295, - EndPos: 4296, + EndLine: 206, + StartPos: 4295, + EndPos: 4296, }, Value: "a", }, @@ -9772,30 +9690,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4301, - EndPos: 4311, + EndLine: 207, + StartPos: 4301, + EndPos: 4311, }, Expr: &expr.Require{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4301, - EndPos: 4310, + EndLine: 207, + StartPos: 4301, + EndPos: 4310, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4309, - EndPos: 4310, + EndLine: 207, + StartPos: 4309, + EndPos: 4310, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4309, - EndPos: 4310, + EndLine: 207, + StartPos: 4309, + EndPos: 4310, }, Value: "a", }, @@ -9805,30 +9723,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 208, - EndLine: 208, - StartPos: 4315, - EndPos: 4330, + EndLine: 208, + StartPos: 4315, + EndPos: 4330, }, Expr: &expr.RequireOnce{ Position: &position.Position{ StartLine: 208, - EndLine: 208, - StartPos: 4315, - EndPos: 4329, + EndLine: 208, + StartPos: 4315, + EndPos: 4329, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 208, - EndLine: 208, - StartPos: 4328, - EndPos: 4329, + EndLine: 208, + StartPos: 4328, + EndPos: 4329, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 208, - EndLine: 208, - StartPos: 4328, - EndPos: 4329, + EndLine: 208, + StartPos: 4328, + EndPos: 4329, }, Value: "a", }, @@ -9838,30 +9756,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4335, - EndPos: 4352, + EndLine: 210, + StartPos: 4335, + EndPos: 4352, }, Expr: &expr.InstanceOf{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4335, - EndPos: 4351, + EndLine: 210, + StartPos: 4335, + EndPos: 4351, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4335, - EndPos: 4336, + EndLine: 210, + StartPos: 4335, + EndPos: 4336, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4335, - EndPos: 4336, + EndLine: 210, + StartPos: 4335, + EndPos: 4336, }, Value: "a", }, @@ -9869,17 +9787,17 @@ func TestPhp5(t *testing.T) { Class: &name.Name{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4349, - EndPos: 4351, + EndLine: 210, + StartPos: 4349, + EndPos: 4351, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4349, - EndPos: 4351, + EndLine: 210, + StartPos: 4349, + EndPos: 4351, }, Value: "Foo", }, @@ -9890,30 +9808,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4356, - EndPos: 4383, + EndLine: 211, + StartPos: 4356, + EndPos: 4383, }, Expr: &expr.InstanceOf{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4356, - EndPos: 4382, + EndLine: 211, + StartPos: 4356, + EndPos: 4382, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4356, - EndPos: 4357, + EndLine: 211, + StartPos: 4356, + EndPos: 4357, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4356, - EndPos: 4357, + EndLine: 211, + StartPos: 4356, + EndPos: 4357, }, Value: "a", }, @@ -9921,17 +9839,17 @@ func TestPhp5(t *testing.T) { Class: &name.Relative{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4370, - EndPos: 4382, + EndLine: 211, + StartPos: 4370, + EndPos: 4382, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4380, - EndPos: 4382, + EndLine: 211, + StartPos: 4380, + EndPos: 4382, }, Value: "Foo", }, @@ -9942,30 +9860,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4387, - EndPos: 4405, + EndLine: 212, + StartPos: 4387, + EndPos: 4405, }, Expr: &expr.InstanceOf{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4387, - EndPos: 4404, + EndLine: 212, + StartPos: 4387, + EndPos: 4404, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4387, - EndPos: 4388, + EndLine: 212, + StartPos: 4387, + EndPos: 4388, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4387, - EndPos: 4388, + EndLine: 212, + StartPos: 4387, + EndPos: 4388, }, Value: "a", }, @@ -9973,17 +9891,17 @@ func TestPhp5(t *testing.T) { Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4401, - EndPos: 4404, + EndLine: 212, + StartPos: 4401, + EndPos: 4404, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4402, - EndPos: 4404, + EndLine: 212, + StartPos: 4402, + EndPos: 4404, }, Value: "Foo", }, @@ -9994,31 +9912,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4410, - EndPos: 4423, + EndLine: 214, + StartPos: 4410, + EndPos: 4423, }, Expr: &expr.Isset{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4410, - EndPos: 4422, + EndLine: 214, + StartPos: 4410, + EndPos: 4422, }, Variables: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4416, - EndPos: 4417, + EndLine: 214, + StartPos: 4416, + EndPos: 4417, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4416, - EndPos: 4417, + EndLine: 214, + StartPos: 4416, + EndPos: 4417, }, Value: "a", }, @@ -10026,16 +9944,16 @@ func TestPhp5(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4420, - EndPos: 4421, + EndLine: 214, + StartPos: 4420, + EndPos: 4421, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4420, - EndPos: 4421, + EndLine: 214, + StartPos: 4420, + EndPos: 4421, }, Value: "b", }, @@ -10046,39 +9964,39 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4427, - EndPos: 4437, + EndLine: 215, + StartPos: 4427, + EndPos: 4437, }, Expr: &expr.Isset{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4427, - EndPos: 4436, + EndLine: 215, + StartPos: 4427, + EndPos: 4436, }, Variables: []node.Node{ &expr.ConstFetch{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4433, - EndPos: 4435, + EndLine: 215, + StartPos: 4433, + EndPos: 4435, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4433, - EndPos: 4435, + EndLine: 215, + StartPos: 4433, + EndPos: 4435, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4433, - EndPos: 4435, + EndLine: 215, + StartPos: 4433, + EndPos: 4435, }, Value: "Foo", }, @@ -10091,40 +10009,39 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4441, - EndPos: 4452, + EndLine: 216, + StartPos: 4441, + EndPos: 4452, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4441, - EndPos: 4451, + EndLine: 216, + StartPos: 4441, + EndPos: 4451, }, Variable: &expr.List{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4441, - EndPos: 4446, - }, - Items: []node.Node{ + EndLine: 216, + StartPos: 4441, + EndPos: 4446, }, + Items: []node.Node{}, }, Expression: &expr.Variable{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4450, - EndPos: 4451, + EndLine: 216, + StartPos: 4450, + EndPos: 4451, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4450, - EndPos: 4451, + EndLine: 216, + StartPos: 4450, + EndPos: 4451, }, Value: "b", }, @@ -10134,45 +10051,45 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4456, - EndPos: 4473, + EndLine: 217, + StartPos: 4456, + EndPos: 4473, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4456, - EndPos: 4472, + EndLine: 217, + StartPos: 4456, + EndPos: 4472, }, Variable: &expr.List{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4456, - EndPos: 4467, + EndLine: 217, + StartPos: 4456, + EndPos: 4467, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4461, - EndPos: 4462, + EndLine: 217, + StartPos: 4461, + EndPos: 4462, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4461, - EndPos: 4462, + EndLine: 217, + StartPos: 4461, + EndPos: 4462, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4461, - EndPos: 4462, + EndLine: 217, + StartPos: 4461, + EndPos: 4462, }, Value: "a", }, @@ -10181,23 +10098,23 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4465, - EndPos: 4466, + EndLine: 217, + StartPos: 4465, + EndPos: 4466, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4465, - EndPos: 4466, + EndLine: 217, + StartPos: 4465, + EndPos: 4466, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4465, - EndPos: 4466, + EndLine: 217, + StartPos: 4465, + EndPos: 4466, }, Value: "b", }, @@ -10208,16 +10125,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4471, - EndPos: 4472, + EndLine: 217, + StartPos: 4471, + EndPos: 4472, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4471, - EndPos: 4472, + EndLine: 217, + StartPos: 4471, + EndPos: 4472, }, Value: "b", }, @@ -10227,52 +10144,52 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4477, - EndPos: 4492, + EndLine: 218, + StartPos: 4477, + EndPos: 4492, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4477, - EndPos: 4491, + EndLine: 218, + StartPos: 4477, + EndPos: 4491, }, Variable: &expr.List{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4477, - EndPos: 4486, + EndLine: 218, + StartPos: 4477, + EndPos: 4486, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4482, - EndPos: 4485, + EndLine: 218, + StartPos: 4482, + EndPos: 4485, }, Val: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4482, - EndPos: 4485, + EndLine: 218, + StartPos: 4482, + EndPos: 4485, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4482, - EndPos: 4483, + EndLine: 218, + StartPos: 4482, + EndPos: 4483, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4482, - EndPos: 4483, + EndLine: 218, + StartPos: 4482, + EndPos: 4483, }, Value: "a", }, @@ -10284,16 +10201,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4490, - EndPos: 4491, + EndLine: 218, + StartPos: 4490, + EndPos: 4491, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 218, - EndLine: 218, - StartPos: 4490, - EndPos: 4491, + EndLine: 218, + StartPos: 4490, + EndPos: 4491, }, Value: "b", }, @@ -10303,60 +10220,60 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4496, - EndPos: 4515, + EndLine: 219, + StartPos: 4496, + EndPos: 4515, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4496, - EndPos: 4514, + EndLine: 219, + StartPos: 4496, + EndPos: 4514, }, Variable: &expr.List{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4496, - EndPos: 4509, + EndLine: 219, + StartPos: 4496, + EndPos: 4509, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4501, - EndPos: 4508, + EndLine: 219, + StartPos: 4501, + EndPos: 4508, }, Val: &expr.List{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4501, - EndPos: 4508, + EndLine: 219, + StartPos: 4501, + EndPos: 4508, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4506, - EndPos: 4507, + EndLine: 219, + StartPos: 4506, + EndPos: 4507, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4506, - EndPos: 4507, + EndLine: 219, + StartPos: 4506, + EndPos: 4507, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4506, - EndPos: 4507, + EndLine: 219, + StartPos: 4506, + EndPos: 4507, }, Value: "a", }, @@ -10370,16 +10287,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4513, - EndPos: 4514, + EndLine: 219, + StartPos: 4513, + EndPos: 4514, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4513, - EndPos: 4514, + EndLine: 219, + StartPos: 4513, + EndPos: 4514, }, Value: "b", }, @@ -10389,30 +10306,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4520, - EndPos: 4529, + EndLine: 221, + StartPos: 4520, + EndPos: 4529, }, Expr: &expr.MethodCall{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4520, - EndPos: 4528, + EndLine: 221, + StartPos: 4520, + EndPos: 4528, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4520, - EndPos: 4521, + EndLine: 221, + StartPos: 4520, + EndPos: 4521, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4520, - EndPos: 4521, + EndLine: 221, + StartPos: 4520, + EndPos: 4521, }, Value: "a", }, @@ -10420,18 +10337,18 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4524, - EndPos: 4526, + EndLine: 221, + StartPos: 4524, + EndPos: 4526, }, Value: "foo", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4527, - EndPos: 4528, + EndLine: 221, + StartPos: 4527, + EndPos: 4528, }, }, }, @@ -10439,31 +10356,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 222, - EndLine: 222, - StartPos: 4533, - EndPos: 4540, + EndLine: 222, + StartPos: 4533, + EndPos: 4540, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 222, - EndLine: 222, - StartPos: 4533, - EndPos: 4539, + EndLine: 222, + StartPos: 4533, + EndPos: 4539, }, Class: &name.Name{ Position: &position.Position{ StartLine: 222, - EndLine: 222, - StartPos: 4537, - EndPos: 4539, + EndLine: 222, + StartPos: 4537, + EndPos: 4539, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 222, - EndLine: 222, - StartPos: 4537, - EndPos: 4539, + EndLine: 222, + StartPos: 4537, + EndPos: 4539, }, Value: "Foo", }, @@ -10474,31 +10391,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4544, - EndPos: 4563, + EndLine: 223, + StartPos: 4544, + EndPos: 4563, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4544, - EndPos: 4562, + EndLine: 223, + StartPos: 4544, + EndPos: 4562, }, Class: &name.Relative{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4548, - EndPos: 4560, + EndLine: 223, + StartPos: 4548, + EndPos: 4560, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4558, - EndPos: 4560, + EndLine: 223, + StartPos: 4558, + EndPos: 4560, }, Value: "Foo", }, @@ -10507,9 +10424,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4561, - EndPos: 4562, + EndLine: 223, + StartPos: 4561, + EndPos: 4562, }, }, }, @@ -10517,31 +10434,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4567, - EndPos: 4577, + EndLine: 224, + StartPos: 4567, + EndPos: 4577, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4567, - EndPos: 4576, + EndLine: 224, + StartPos: 4567, + EndPos: 4576, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4571, - EndPos: 4574, + EndLine: 224, + StartPos: 4571, + EndPos: 4574, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4572, - EndPos: 4574, + EndLine: 224, + StartPos: 4572, + EndPos: 4574, }, Value: "Foo", }, @@ -10550,9 +10467,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4575, - EndPos: 4576, + EndLine: 224, + StartPos: 4575, + EndPos: 4576, }, }, }, @@ -10560,30 +10477,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4581, - EndPos: 4590, + EndLine: 225, + StartPos: 4581, + EndPos: 4590, }, Expr: &expr.Print{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4581, - EndPos: 4588, + EndLine: 225, + StartPos: 4581, + EndPos: 4588, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4587, - EndPos: 4588, + EndLine: 225, + StartPos: 4587, + EndPos: 4588, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4587, - EndPos: 4588, + EndLine: 225, + StartPos: 4587, + EndPos: 4588, }, Value: "a", }, @@ -10593,30 +10510,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4594, - EndPos: 4601, + EndLine: 226, + StartPos: 4594, + EndPos: 4601, }, Expr: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4594, - EndPos: 4600, + EndLine: 226, + StartPos: 4594, + EndPos: 4600, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4594, - EndPos: 4595, + EndLine: 226, + StartPos: 4594, + EndPos: 4595, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4594, - EndPos: 4595, + EndLine: 226, + StartPos: 4594, + EndPos: 4595, }, Value: "a", }, @@ -10624,9 +10541,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4598, - EndPos: 4600, + EndLine: 226, + StartPos: 4598, + EndPos: 4600, }, Value: "foo", }, @@ -10635,37 +10552,37 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 227, - EndLine: 227, - StartPos: 4605, - EndPos: 4615, + EndLine: 227, + StartPos: 4605, + EndPos: 4615, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 227, - EndLine: 227, - StartPos: 4605, - EndPos: 4613, + EndLine: 227, + StartPos: 4605, + EndPos: 4613, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 227, - EndLine: 227, - StartPos: 4605, - EndPos: 4611, + EndLine: 227, + StartPos: 4605, + EndPos: 4611, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 227, - EndLine: 227, - StartPos: 4605, - EndPos: 4606, + EndLine: 227, + StartPos: 4605, + EndPos: 4606, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 227, - EndLine: 227, - StartPos: 4605, - EndPos: 4606, + EndLine: 227, + StartPos: 4605, + EndPos: 4606, }, Value: "a", }, @@ -10673,9 +10590,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 227, - EndLine: 227, - StartPos: 4609, - EndPos: 4611, + EndLine: 227, + StartPos: 4609, + EndPos: 4611, }, Value: "foo", }, @@ -10683,9 +10600,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 227, - EndLine: 227, - StartPos: 4613, - EndPos: 4613, + EndLine: 227, + StartPos: 4613, + EndPos: 4613, }, Value: "1", }, @@ -10694,58 +10611,58 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4647, + EndLine: 228, + StartPos: 4619, + EndPos: 4647, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4645, + EndLine: 228, + StartPos: 4619, + EndPos: 4645, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4643, + EndLine: 228, + StartPos: 4619, + EndPos: 4643, }, Variable: &expr.MethodCall{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4637, + EndLine: 228, + StartPos: 4619, + EndPos: 4637, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4630, + EndLine: 228, + StartPos: 4619, + EndPos: 4630, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4625, + EndLine: 228, + StartPos: 4619, + EndPos: 4625, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4620, + EndLine: 228, + StartPos: 4619, + EndPos: 4620, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4619, - EndPos: 4620, + EndLine: 228, + StartPos: 4619, + EndPos: 4620, }, Value: "a", }, @@ -10753,9 +10670,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4623, - EndPos: 4625, + EndLine: 228, + StartPos: 4623, + EndPos: 4625, }, Value: "foo", }, @@ -10763,9 +10680,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4628, - EndPos: 4630, + EndLine: 228, + StartPos: 4628, + EndPos: 4630, }, Value: "bar", }, @@ -10773,27 +10690,27 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4633, - EndPos: 4635, + EndLine: 228, + StartPos: 4633, + EndPos: 4635, }, Value: "baz", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4636, - EndPos: 4637, + EndLine: 228, + StartPos: 4636, + EndPos: 4637, }, }, }, Property: &node.Identifier{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4640, - EndPos: 4643, + EndLine: 228, + StartPos: 4640, + EndPos: 4643, }, Value: "quux", }, @@ -10801,9 +10718,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4645, - EndPos: 4645, + EndLine: 228, + StartPos: 4645, + EndPos: 4645, }, Value: "0", }, @@ -10812,44 +10729,44 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4651, - EndPos: 4666, + EndLine: 229, + StartPos: 4651, + EndPos: 4666, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4651, - EndPos: 4664, + EndLine: 229, + StartPos: 4651, + EndPos: 4664, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4651, - EndPos: 4661, + EndLine: 229, + StartPos: 4651, + EndPos: 4661, }, Variable: &expr.MethodCall{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4651, - EndPos: 4659, + EndLine: 229, + StartPos: 4651, + EndPos: 4659, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4651, - EndPos: 4652, + EndLine: 229, + StartPos: 4651, + EndPos: 4652, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4651, - EndPos: 4652, + EndLine: 229, + StartPos: 4651, + EndPos: 4652, }, Value: "a", }, @@ -10857,27 +10774,27 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4655, - EndPos: 4657, + EndLine: 229, + StartPos: 4655, + EndPos: 4657, }, Value: "foo", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4658, - EndPos: 4659, + EndLine: 229, + StartPos: 4658, + EndPos: 4659, }, }, }, Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4661, - EndPos: 4661, + EndLine: 229, + StartPos: 4661, + EndPos: 4661, }, Value: "1", }, @@ -10885,9 +10802,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4664, - EndPos: 4664, + EndLine: 229, + StartPos: 4664, + EndPos: 4664, }, Value: "1", }, @@ -10896,40 +10813,40 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4670, - EndPos: 4678, + EndLine: 230, + StartPos: 4670, + EndPos: 4678, }, Expr: &expr.ShellExec{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4670, - EndPos: 4677, + EndLine: 230, + StartPos: 4670, + EndPos: 4677, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4671, - EndPos: 4674, + EndLine: 230, + StartPos: 4671, + EndPos: 4674, }, Value: "cmd ", }, &expr.Variable{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4675, - EndPos: 4676, + EndLine: 230, + StartPos: 4675, + EndPos: 4676, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4675, - EndPos: 4676, + EndLine: 230, + StartPos: 4675, + EndPos: 4676, }, Value: "a", }, @@ -10940,16 +10857,16 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 231, - EndLine: 231, - StartPos: 4682, - EndPos: 4687, + EndLine: 231, + StartPos: 4682, + EndPos: 4687, }, Expr: &expr.ShellExec{ Position: &position.Position{ StartLine: 231, - EndLine: 231, - StartPos: 4682, - EndPos: 4686, + EndLine: 231, + StartPos: 4682, + EndPos: 4686, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ @@ -10961,67 +10878,65 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4691, - EndPos: 4693, + EndLine: 232, + StartPos: 4691, + EndPos: 4693, }, Expr: &expr.ShellExec{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4691, - EndPos: 4692, - }, - Parts: []node.Node{ + EndLine: 232, + StartPos: 4691, + EndPos: 4692, }, + Parts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 233, - EndLine: 233, - StartPos: 4697, - EndPos: 4699, + EndLine: 233, + StartPos: 4697, + EndPos: 4699, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 233, - EndLine: 233, - StartPos: 4697, - EndPos: 4698, - }, - Items: []node.Node{ + EndLine: 233, + StartPos: 4697, + EndPos: 4698, }, + Items: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4703, - EndPos: 4706, + EndLine: 234, + StartPos: 4703, + EndPos: 4706, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4703, - EndPos: 4705, + EndLine: 234, + StartPos: 4703, + EndPos: 4705, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4704, - EndPos: 4704, + EndLine: 234, + StartPos: 4704, + EndPos: 4704, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4704, - EndPos: 4704, + EndLine: 234, + StartPos: 4704, + EndPos: 4704, }, Value: "1", }, @@ -11032,40 +10947,40 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4710, - EndPos: 4722, + EndLine: 235, + StartPos: 4710, + EndPos: 4722, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4710, - EndPos: 4721, + EndLine: 235, + StartPos: 4710, + EndPos: 4721, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4711, - EndPos: 4714, + EndLine: 235, + StartPos: 4711, + EndPos: 4714, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4711, - EndPos: 4711, + EndLine: 235, + StartPos: 4711, + EndPos: 4711, }, Value: "1", }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4714, - EndPos: 4714, + EndLine: 235, + StartPos: 4714, + EndPos: 4714, }, Value: "1", }, @@ -11073,30 +10988,30 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4717, - EndPos: 4719, + EndLine: 235, + StartPos: 4717, + EndPos: 4719, }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4717, - EndPos: 4719, + EndLine: 235, + StartPos: 4717, + EndPos: 4719, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4718, - EndPos: 4719, + EndLine: 235, + StartPos: 4718, + EndPos: 4719, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4718, - EndPos: 4719, + EndLine: 235, + StartPos: 4718, + EndPos: 4719, }, Value: "b", }, @@ -11109,31 +11024,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4727, - EndPos: 4737, + EndLine: 237, + StartPos: 4727, + EndPos: 4737, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4727, - EndPos: 4736, + EndLine: 237, + StartPos: 4727, + EndPos: 4736, }, Class: &name.Name{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4727, - EndPos: 4729, + EndLine: 237, + StartPos: 4727, + EndPos: 4729, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4727, - EndPos: 4729, + EndLine: 237, + StartPos: 4727, + EndPos: 4729, }, Value: "Foo", }, @@ -11142,18 +11057,18 @@ func TestPhp5(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4732, - EndPos: 4734, + EndLine: 237, + StartPos: 4732, + EndPos: 4734, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4735, - EndPos: 4736, + EndLine: 237, + StartPos: 4735, + EndPos: 4736, }, }, }, @@ -11161,31 +11076,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4741, - EndPos: 4761, + EndLine: 238, + StartPos: 4741, + EndPos: 4761, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4741, - EndPos: 4760, + EndLine: 238, + StartPos: 4741, + EndPos: 4760, }, Class: &name.Relative{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4741, - EndPos: 4753, + EndLine: 238, + StartPos: 4741, + EndPos: 4753, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4751, - EndPos: 4753, + EndLine: 238, + StartPos: 4751, + EndPos: 4753, }, Value: "Foo", }, @@ -11194,18 +11109,18 @@ func TestPhp5(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4756, - EndPos: 4758, + EndLine: 238, + StartPos: 4756, + EndPos: 4758, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4759, - EndPos: 4760, + EndLine: 238, + StartPos: 4759, + EndPos: 4760, }, }, }, @@ -11213,31 +11128,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4765, - EndPos: 4776, + EndLine: 239, + StartPos: 4765, + EndPos: 4776, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4765, - EndPos: 4775, + EndLine: 239, + StartPos: 4765, + EndPos: 4775, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4765, - EndPos: 4768, + EndLine: 239, + StartPos: 4765, + EndPos: 4768, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4766, - EndPos: 4768, + EndLine: 239, + StartPos: 4766, + EndPos: 4768, }, Value: "Foo", }, @@ -11246,18 +11161,18 @@ func TestPhp5(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4771, - EndPos: 4773, + EndLine: 239, + StartPos: 4771, + EndPos: 4773, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4774, - EndPos: 4775, + EndLine: 239, + StartPos: 4774, + EndPos: 4775, }, }, }, @@ -11265,31 +11180,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4780, - EndPos: 4791, + EndLine: 240, + StartPos: 4780, + EndPos: 4791, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4780, - EndPos: 4790, + EndLine: 240, + StartPos: 4780, + EndPos: 4790, }, Class: &name.Name{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4780, - EndPos: 4782, + EndLine: 240, + StartPos: 4780, + EndPos: 4782, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4780, - EndPos: 4782, + EndLine: 240, + StartPos: 4780, + EndPos: 4782, }, Value: "Foo", }, @@ -11298,16 +11213,16 @@ func TestPhp5(t *testing.T) { Call: &expr.Variable{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4785, - EndPos: 4788, + EndLine: 240, + StartPos: 4785, + EndPos: 4788, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4785, - EndPos: 4788, + EndLine: 240, + StartPos: 4785, + EndPos: 4788, }, Value: "bar", }, @@ -11315,9 +11230,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4789, - EndPos: 4790, + EndLine: 240, + StartPos: 4789, + EndPos: 4790, }, }, }, @@ -11325,30 +11240,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 241, - EndLine: 241, - StartPos: 4795, - EndPos: 4807, + EndLine: 241, + StartPos: 4795, + EndPos: 4807, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 241, - EndLine: 241, - StartPos: 4795, - EndPos: 4806, + EndLine: 241, + StartPos: 4795, + EndPos: 4806, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 241, - EndLine: 241, - StartPos: 4795, - EndPos: 4798, + EndLine: 241, + StartPos: 4795, + EndPos: 4798, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 241, - EndLine: 241, - StartPos: 4795, - EndPos: 4798, + EndLine: 241, + StartPos: 4795, + EndPos: 4798, }, Value: "foo", }, @@ -11356,16 +11271,16 @@ func TestPhp5(t *testing.T) { Call: &expr.Variable{ Position: &position.Position{ StartLine: 241, - EndLine: 241, - StartPos: 4801, - EndPos: 4804, + EndLine: 241, + StartPos: 4801, + EndPos: 4804, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 241, - EndLine: 241, - StartPos: 4801, - EndPos: 4804, + EndLine: 241, + StartPos: 4801, + EndPos: 4804, }, Value: "bar", }, @@ -11373,9 +11288,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 241, - EndLine: 241, - StartPos: 4805, - EndPos: 4806, + EndLine: 241, + StartPos: 4805, + EndPos: 4806, }, }, }, @@ -11383,31 +11298,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4811, - EndPos: 4820, + EndLine: 242, + StartPos: 4811, + EndPos: 4820, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4811, - EndPos: 4819, + EndLine: 242, + StartPos: 4811, + EndPos: 4819, }, Class: &name.Name{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4811, - EndPos: 4813, + EndLine: 242, + StartPos: 4811, + EndPos: 4813, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4811, - EndPos: 4813, + EndLine: 242, + StartPos: 4811, + EndPos: 4813, }, Value: "Foo", }, @@ -11416,16 +11331,16 @@ func TestPhp5(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4816, - EndPos: 4819, + EndLine: 242, + StartPos: 4816, + EndPos: 4819, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4816, - EndPos: 4819, + EndLine: 242, + StartPos: 4816, + EndPos: 4819, }, Value: "bar", }, @@ -11435,31 +11350,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4824, - EndPos: 4843, + EndLine: 243, + StartPos: 4824, + EndPos: 4843, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4824, - EndPos: 4842, + EndLine: 243, + StartPos: 4824, + EndPos: 4842, }, Class: &name.Relative{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4824, - EndPos: 4836, + EndLine: 243, + StartPos: 4824, + EndPos: 4836, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4834, - EndPos: 4836, + EndLine: 243, + StartPos: 4834, + EndPos: 4836, }, Value: "Foo", }, @@ -11468,16 +11383,16 @@ func TestPhp5(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4839, - EndPos: 4842, + EndLine: 243, + StartPos: 4839, + EndPos: 4842, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4839, - EndPos: 4842, + EndLine: 243, + StartPos: 4839, + EndPos: 4842, }, Value: "bar", }, @@ -11487,31 +11402,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4847, - EndPos: 4857, + EndLine: 244, + StartPos: 4847, + EndPos: 4857, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4847, - EndPos: 4856, + EndLine: 244, + StartPos: 4847, + EndPos: 4856, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4847, - EndPos: 4850, + EndLine: 244, + StartPos: 4847, + EndPos: 4850, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4848, - EndPos: 4850, + EndLine: 244, + StartPos: 4848, + EndPos: 4850, }, Value: "Foo", }, @@ -11520,16 +11435,16 @@ func TestPhp5(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4853, - EndPos: 4856, + EndLine: 244, + StartPos: 4853, + EndPos: 4856, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4853, - EndPos: 4856, + EndLine: 244, + StartPos: 4853, + EndPos: 4856, }, Value: "bar", }, @@ -11539,30 +11454,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4861, - EndPos: 4873, + EndLine: 245, + StartPos: 4861, + EndPos: 4873, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4861, - EndPos: 4872, + EndLine: 245, + StartPos: 4861, + EndPos: 4872, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4861, - EndPos: 4862, + EndLine: 245, + StartPos: 4861, + EndPos: 4862, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4861, - EndPos: 4862, + EndLine: 245, + StartPos: 4861, + EndPos: 4862, }, Value: "a", }, @@ -11570,16 +11485,16 @@ func TestPhp5(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4866, - EndPos: 4867, + EndLine: 245, + StartPos: 4866, + EndPos: 4867, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4866, - EndPos: 4867, + EndLine: 245, + StartPos: 4866, + EndPos: 4867, }, Value: "b", }, @@ -11587,16 +11502,16 @@ func TestPhp5(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4871, - EndPos: 4872, + EndLine: 245, + StartPos: 4871, + EndPos: 4872, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4871, - EndPos: 4872, + EndLine: 245, + StartPos: 4871, + EndPos: 4872, }, Value: "c", }, @@ -11606,30 +11521,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4877, - EndPos: 4886, + EndLine: 246, + StartPos: 4877, + EndPos: 4886, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4877, - EndPos: 4885, + EndLine: 246, + StartPos: 4877, + EndPos: 4885, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4877, - EndPos: 4878, + EndLine: 246, + StartPos: 4877, + EndPos: 4878, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4877, - EndPos: 4878, + EndLine: 246, + StartPos: 4877, + EndPos: 4878, }, Value: "a", }, @@ -11637,16 +11552,16 @@ func TestPhp5(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4884, - EndPos: 4885, + EndLine: 246, + StartPos: 4884, + EndPos: 4885, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4884, - EndPos: 4885, + EndLine: 246, + StartPos: 4884, + EndPos: 4885, }, Value: "c", }, @@ -11656,30 +11571,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4890, - EndPos: 4912, + EndLine: 247, + StartPos: 4890, + EndPos: 4912, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4890, - EndPos: 4911, + EndLine: 247, + StartPos: 4890, + EndPos: 4911, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4890, - EndPos: 4891, + EndLine: 247, + StartPos: 4890, + EndPos: 4891, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4890, - EndPos: 4891, + EndLine: 247, + StartPos: 4890, + EndPos: 4891, }, Value: "a", }, @@ -11687,23 +11602,23 @@ func TestPhp5(t *testing.T) { IfTrue: &expr.Ternary{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4895, - EndPos: 4906, + EndLine: 247, + StartPos: 4895, + EndPos: 4906, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4895, - EndPos: 4896, + EndLine: 247, + StartPos: 4895, + EndPos: 4896, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4895, - EndPos: 4896, + EndLine: 247, + StartPos: 4895, + EndPos: 4896, }, Value: "b", }, @@ -11711,16 +11626,16 @@ func TestPhp5(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4900, - EndPos: 4901, + EndLine: 247, + StartPos: 4900, + EndPos: 4901, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4900, - EndPos: 4901, + EndLine: 247, + StartPos: 4900, + EndPos: 4901, }, Value: "c", }, @@ -11728,16 +11643,16 @@ func TestPhp5(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4905, - EndPos: 4906, + EndLine: 247, + StartPos: 4905, + EndPos: 4906, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4905, - EndPos: 4906, + EndLine: 247, + StartPos: 4905, + EndPos: 4906, }, Value: "d", }, @@ -11746,16 +11661,16 @@ func TestPhp5(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4910, - EndPos: 4911, + EndLine: 247, + StartPos: 4910, + EndPos: 4911, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4910, - EndPos: 4911, + EndLine: 247, + StartPos: 4910, + EndPos: 4911, }, Value: "e", }, @@ -11765,37 +11680,37 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4916, - EndPos: 4938, + EndLine: 248, + StartPos: 4916, + EndPos: 4938, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4916, - EndPos: 4937, + EndLine: 248, + StartPos: 4916, + EndPos: 4937, }, Condition: &expr.Ternary{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4916, - EndPos: 4927, + EndLine: 248, + StartPos: 4916, + EndPos: 4927, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4916, - EndPos: 4917, + EndLine: 248, + StartPos: 4916, + EndPos: 4917, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4916, - EndPos: 4917, + EndLine: 248, + StartPos: 4916, + EndPos: 4917, }, Value: "a", }, @@ -11803,16 +11718,16 @@ func TestPhp5(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4921, - EndPos: 4922, + EndLine: 248, + StartPos: 4921, + EndPos: 4922, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4921, - EndPos: 4922, + EndLine: 248, + StartPos: 4921, + EndPos: 4922, }, Value: "b", }, @@ -11820,16 +11735,16 @@ func TestPhp5(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4926, - EndPos: 4927, + EndLine: 248, + StartPos: 4926, + EndPos: 4927, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4926, - EndPos: 4927, + EndLine: 248, + StartPos: 4926, + EndPos: 4927, }, Value: "c", }, @@ -11838,16 +11753,16 @@ func TestPhp5(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4931, - EndPos: 4932, + EndLine: 248, + StartPos: 4931, + EndPos: 4932, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4931, - EndPos: 4932, + EndLine: 248, + StartPos: 4931, + EndPos: 4932, }, Value: "d", }, @@ -11855,16 +11770,16 @@ func TestPhp5(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4936, - EndPos: 4937, + EndLine: 248, + StartPos: 4936, + EndPos: 4937, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4936, - EndPos: 4937, + EndLine: 248, + StartPos: 4936, + EndPos: 4937, }, Value: "e", }, @@ -11874,30 +11789,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4942, - EndPos: 4945, + EndLine: 249, + StartPos: 4942, + EndPos: 4945, }, Expr: &expr.UnaryMinus{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4942, - EndPos: 4944, + EndLine: 249, + StartPos: 4942, + EndPos: 4944, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4943, - EndPos: 4944, + EndLine: 249, + StartPos: 4943, + EndPos: 4944, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4943, - EndPos: 4944, + EndLine: 249, + StartPos: 4943, + EndPos: 4944, }, Value: "a", }, @@ -11907,30 +11822,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4949, - EndPos: 4952, + EndLine: 250, + StartPos: 4949, + EndPos: 4952, }, Expr: &expr.UnaryPlus{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4949, - EndPos: 4951, + EndLine: 250, + StartPos: 4949, + EndPos: 4951, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4950, - EndPos: 4951, + EndLine: 250, + StartPos: 4950, + EndPos: 4951, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4950, - EndPos: 4951, + EndLine: 250, + StartPos: 4950, + EndPos: 4951, }, Value: "a", }, @@ -11940,30 +11855,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4956, - EndPos: 4959, + EndLine: 251, + StartPos: 4956, + EndPos: 4959, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4956, - EndPos: 4958, + EndLine: 251, + StartPos: 4956, + EndPos: 4958, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4957, - EndPos: 4958, + EndLine: 251, + StartPos: 4957, + EndPos: 4958, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4957, - EndPos: 4958, + EndLine: 251, + StartPos: 4957, + EndPos: 4958, }, Value: "a", }, @@ -11973,37 +11888,37 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4963, - EndPos: 4967, + EndLine: 252, + StartPos: 4963, + EndPos: 4967, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4963, - EndPos: 4966, + EndLine: 252, + StartPos: 4963, + EndPos: 4966, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4964, - EndPos: 4966, + EndLine: 252, + StartPos: 4964, + EndPos: 4966, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4965, - EndPos: 4966, + EndLine: 252, + StartPos: 4965, + EndPos: 4966, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4965, - EndPos: 4966, + EndLine: 252, + StartPos: 4965, + EndPos: 4966, }, Value: "a", }, @@ -12014,46 +11929,46 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4971, - EndPos: 4976, + EndLine: 253, + StartPos: 4971, + EndPos: 4976, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4971, - EndPos: 4975, + EndLine: 253, + StartPos: 4971, + EndPos: 4975, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4980, - EndPos: 4988, + EndLine: 254, + StartPos: 4980, + EndPos: 4988, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4980, - EndPos: 4987, + EndLine: 254, + StartPos: 4980, + EndPos: 4987, }, Value: &expr.Variable{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4986, - EndPos: 4987, + EndLine: 254, + StartPos: 4986, + EndPos: 4987, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4986, - EndPos: 4987, + EndLine: 254, + StartPos: 4986, + EndPos: 4987, }, Value: "a", }, @@ -12063,30 +11978,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 4992, - EndPos: 5006, + EndLine: 255, + StartPos: 4992, + EndPos: 5006, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 4992, - EndPos: 5005, + EndLine: 255, + StartPos: 4992, + EndPos: 5005, }, Key: &expr.Variable{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 4998, - EndPos: 4999, + EndLine: 255, + StartPos: 4998, + EndPos: 4999, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 4998, - EndPos: 4999, + EndLine: 255, + StartPos: 4998, + EndPos: 4999, }, Value: "a", }, @@ -12094,16 +12009,16 @@ func TestPhp5(t *testing.T) { Value: &expr.Variable{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5004, - EndPos: 5005, + EndLine: 255, + StartPos: 5004, + EndPos: 5005, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5004, - EndPos: 5005, + EndLine: 255, + StartPos: 5004, + EndPos: 5005, }, Value: "b", }, @@ -12113,38 +12028,38 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5010, - EndPos: 5026, + EndLine: 256, + StartPos: 5010, + EndPos: 5026, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5010, - EndPos: 5025, + EndLine: 256, + StartPos: 5010, + EndPos: 5025, }, Value: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5016, - EndPos: 5025, + EndLine: 256, + StartPos: 5016, + EndPos: 5025, }, Class: &name.Name{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5016, - EndPos: 5018, + EndLine: 256, + StartPos: 5016, + EndPos: 5018, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5016, - EndPos: 5018, + EndLine: 256, + StartPos: 5016, + EndPos: 5018, }, Value: "Foo", }, @@ -12153,9 +12068,9 @@ func TestPhp5(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5021, - EndPos: 5025, + EndLine: 256, + StartPos: 5021, + EndPos: 5025, }, Value: "class", }, @@ -12165,30 +12080,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5030, - EndPos: 5052, + EndLine: 257, + StartPos: 5030, + EndPos: 5052, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5030, - EndPos: 5051, + EndLine: 257, + StartPos: 5030, + EndPos: 5051, }, Key: &expr.Variable{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5036, - EndPos: 5037, + EndLine: 257, + StartPos: 5036, + EndPos: 5037, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5036, - EndPos: 5037, + EndLine: 257, + StartPos: 5036, + EndPos: 5037, }, Value: "a", }, @@ -12196,24 +12111,24 @@ func TestPhp5(t *testing.T) { Value: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5042, - EndPos: 5051, + EndLine: 257, + StartPos: 5042, + EndPos: 5051, }, Class: &name.Name{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5042, - EndPos: 5044, + EndLine: 257, + StartPos: 5042, + EndPos: 5044, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5042, - EndPos: 5044, + EndLine: 257, + StartPos: 5042, + EndPos: 5044, }, Value: "Foo", }, @@ -12222,9 +12137,9 @@ func TestPhp5(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5047, - EndPos: 5051, + EndLine: 257, + StartPos: 5047, + EndPos: 5051, }, Value: "class", }, @@ -12234,30 +12149,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 259, - EndLine: 259, - StartPos: 5059, - EndPos: 5068, + EndLine: 259, + StartPos: 5059, + EndPos: 5068, }, Expr: &cast.Array{ Position: &position.Position{ StartLine: 259, - EndLine: 259, - StartPos: 5059, - EndPos: 5067, + EndLine: 259, + StartPos: 5059, + EndPos: 5067, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 259, - EndLine: 259, - StartPos: 5066, - EndPos: 5067, + EndLine: 259, + StartPos: 5066, + EndPos: 5067, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 259, - EndLine: 259, - StartPos: 5066, - EndPos: 5067, + EndLine: 259, + StartPos: 5066, + EndPos: 5067, }, Value: "a", }, @@ -12267,30 +12182,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5072, - EndPos: 5083, + EndLine: 260, + StartPos: 5072, + EndPos: 5083, }, Expr: &cast.Bool{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5072, - EndPos: 5082, + EndLine: 260, + StartPos: 5072, + EndPos: 5082, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5081, - EndPos: 5082, + EndLine: 260, + StartPos: 5081, + EndPos: 5082, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5081, - EndPos: 5082, + EndLine: 260, + StartPos: 5081, + EndPos: 5082, }, Value: "a", }, @@ -12300,30 +12215,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5087, - EndPos: 5095, + EndLine: 261, + StartPos: 5087, + EndPos: 5095, }, Expr: &cast.Bool{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5087, - EndPos: 5094, + EndLine: 261, + StartPos: 5087, + EndPos: 5094, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5093, - EndPos: 5094, + EndLine: 261, + StartPos: 5093, + EndPos: 5094, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5093, - EndPos: 5094, + EndLine: 261, + StartPos: 5093, + EndPos: 5094, }, Value: "a", }, @@ -12333,30 +12248,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5099, - EndPos: 5109, + EndLine: 262, + StartPos: 5099, + EndPos: 5109, }, Expr: &cast.Double{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5099, - EndPos: 5108, + EndLine: 262, + StartPos: 5099, + EndPos: 5108, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5107, - EndPos: 5108, + EndLine: 262, + StartPos: 5107, + EndPos: 5108, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5107, - EndPos: 5108, + EndLine: 262, + StartPos: 5107, + EndPos: 5108, }, Value: "a", }, @@ -12366,30 +12281,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 263, - EndLine: 263, - StartPos: 5113, - EndPos: 5122, + EndLine: 263, + StartPos: 5113, + EndPos: 5122, }, Expr: &cast.Double{ Position: &position.Position{ StartLine: 263, - EndLine: 263, - StartPos: 5113, - EndPos: 5121, + EndLine: 263, + StartPos: 5113, + EndPos: 5121, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 263, - EndLine: 263, - StartPos: 5120, - EndPos: 5121, + EndLine: 263, + StartPos: 5120, + EndPos: 5121, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 263, - EndLine: 263, - StartPos: 5120, - EndPos: 5121, + EndLine: 263, + StartPos: 5120, + EndPos: 5121, }, Value: "a", }, @@ -12399,30 +12314,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5126, - EndPos: 5137, + EndLine: 264, + StartPos: 5126, + EndPos: 5137, }, Expr: &cast.Int{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5126, - EndPos: 5136, + EndLine: 264, + StartPos: 5126, + EndPos: 5136, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5135, - EndPos: 5136, + EndLine: 264, + StartPos: 5135, + EndPos: 5136, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5135, - EndPos: 5136, + EndLine: 264, + StartPos: 5135, + EndPos: 5136, }, Value: "a", }, @@ -12432,30 +12347,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5141, - EndPos: 5148, + EndLine: 265, + StartPos: 5141, + EndPos: 5148, }, Expr: &cast.Int{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5141, - EndPos: 5147, + EndLine: 265, + StartPos: 5141, + EndPos: 5147, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5146, - EndPos: 5147, + EndLine: 265, + StartPos: 5146, + EndPos: 5147, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5146, - EndPos: 5147, + EndLine: 265, + StartPos: 5146, + EndPos: 5147, }, Value: "a", }, @@ -12465,30 +12380,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5152, - EndPos: 5162, + EndLine: 266, + StartPos: 5152, + EndPos: 5162, }, Expr: &cast.Object{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5152, - EndPos: 5161, + EndLine: 266, + StartPos: 5152, + EndPos: 5161, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5160, - EndPos: 5161, + EndLine: 266, + StartPos: 5160, + EndPos: 5161, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5160, - EndPos: 5161, + EndLine: 266, + StartPos: 5160, + EndPos: 5161, }, Value: "a", }, @@ -12498,30 +12413,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5166, - EndPos: 5176, + EndLine: 267, + StartPos: 5166, + EndPos: 5176, }, Expr: &cast.String{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5166, - EndPos: 5175, + EndLine: 267, + StartPos: 5166, + EndPos: 5175, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5174, - EndPos: 5175, + EndLine: 267, + StartPos: 5174, + EndPos: 5175, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5174, - EndPos: 5175, + EndLine: 267, + StartPos: 5174, + EndPos: 5175, }, Value: "a", }, @@ -12531,30 +12446,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5180, - EndPos: 5189, + EndLine: 268, + StartPos: 5180, + EndPos: 5189, }, Expr: &cast.Unset{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5180, - EndPos: 5188, + EndLine: 268, + StartPos: 5180, + EndPos: 5188, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5187, - EndPos: 5188, + EndLine: 268, + StartPos: 5187, + EndPos: 5188, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5187, - EndPos: 5188, + EndLine: 268, + StartPos: 5187, + EndPos: 5188, }, Value: "a", }, @@ -12564,30 +12479,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5194, - EndPos: 5201, + EndLine: 270, + StartPos: 5194, + EndPos: 5201, }, Expr: &binary.BitwiseAnd{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5194, - EndPos: 5200, + EndLine: 270, + StartPos: 5194, + EndPos: 5200, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5194, - EndPos: 5195, + EndLine: 270, + StartPos: 5194, + EndPos: 5195, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5194, - EndPos: 5195, + EndLine: 270, + StartPos: 5194, + EndPos: 5195, }, Value: "a", }, @@ -12595,16 +12510,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5199, - EndPos: 5200, + EndLine: 270, + StartPos: 5199, + EndPos: 5200, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5199, - EndPos: 5200, + EndLine: 270, + StartPos: 5199, + EndPos: 5200, }, Value: "b", }, @@ -12614,30 +12529,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5205, - EndPos: 5212, + EndLine: 271, + StartPos: 5205, + EndPos: 5212, }, Expr: &binary.BitwiseOr{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5205, - EndPos: 5211, + EndLine: 271, + StartPos: 5205, + EndPos: 5211, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5205, - EndPos: 5206, + EndLine: 271, + StartPos: 5205, + EndPos: 5206, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5205, - EndPos: 5206, + EndLine: 271, + StartPos: 5205, + EndPos: 5206, }, Value: "a", }, @@ -12645,16 +12560,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5210, - EndPos: 5211, + EndLine: 271, + StartPos: 5210, + EndPos: 5211, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5210, - EndPos: 5211, + EndLine: 271, + StartPos: 5210, + EndPos: 5211, }, Value: "b", }, @@ -12664,30 +12579,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5216, - EndPos: 5223, + EndLine: 272, + StartPos: 5216, + EndPos: 5223, }, Expr: &binary.BitwiseXor{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5216, - EndPos: 5222, + EndLine: 272, + StartPos: 5216, + EndPos: 5222, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5216, - EndPos: 5217, + EndLine: 272, + StartPos: 5216, + EndPos: 5217, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5216, - EndPos: 5217, + EndLine: 272, + StartPos: 5216, + EndPos: 5217, }, Value: "a", }, @@ -12695,16 +12610,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5221, - EndPos: 5222, + EndLine: 272, + StartPos: 5221, + EndPos: 5222, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5221, - EndPos: 5222, + EndLine: 272, + StartPos: 5221, + EndPos: 5222, }, Value: "b", }, @@ -12714,30 +12629,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5227, - EndPos: 5235, + EndLine: 273, + StartPos: 5227, + EndPos: 5235, }, Expr: &binary.BooleanAnd{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5227, - EndPos: 5234, + EndLine: 273, + StartPos: 5227, + EndPos: 5234, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5227, - EndPos: 5228, + EndLine: 273, + StartPos: 5227, + EndPos: 5228, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5227, - EndPos: 5228, + EndLine: 273, + StartPos: 5227, + EndPos: 5228, }, Value: "a", }, @@ -12745,16 +12660,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5233, - EndPos: 5234, + EndLine: 273, + StartPos: 5233, + EndPos: 5234, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5233, - EndPos: 5234, + EndLine: 273, + StartPos: 5233, + EndPos: 5234, }, Value: "b", }, @@ -12764,30 +12679,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 274, - EndLine: 274, - StartPos: 5239, - EndPos: 5247, + EndLine: 274, + StartPos: 5239, + EndPos: 5247, }, Expr: &binary.BooleanOr{ Position: &position.Position{ StartLine: 274, - EndLine: 274, - StartPos: 5239, - EndPos: 5246, + EndLine: 274, + StartPos: 5239, + EndPos: 5246, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 274, - EndLine: 274, - StartPos: 5239, - EndPos: 5240, + EndLine: 274, + StartPos: 5239, + EndPos: 5240, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 274, - EndLine: 274, - StartPos: 5239, - EndPos: 5240, + EndLine: 274, + StartPos: 5239, + EndPos: 5240, }, Value: "a", }, @@ -12795,16 +12710,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 274, - EndLine: 274, - StartPos: 5245, - EndPos: 5246, + EndLine: 274, + StartPos: 5245, + EndPos: 5246, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 274, - EndLine: 274, - StartPos: 5245, - EndPos: 5246, + EndLine: 274, + StartPos: 5245, + EndPos: 5246, }, Value: "b", }, @@ -12814,30 +12729,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5251, - EndPos: 5258, + EndLine: 275, + StartPos: 5251, + EndPos: 5258, }, Expr: &binary.Concat{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5251, - EndPos: 5257, + EndLine: 275, + StartPos: 5251, + EndPos: 5257, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5251, - EndPos: 5252, + EndLine: 275, + StartPos: 5251, + EndPos: 5252, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5251, - EndPos: 5252, + EndLine: 275, + StartPos: 5251, + EndPos: 5252, }, Value: "a", }, @@ -12845,16 +12760,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5256, - EndPos: 5257, + EndLine: 275, + StartPos: 5256, + EndPos: 5257, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5256, - EndPos: 5257, + EndLine: 275, + StartPos: 5256, + EndPos: 5257, }, Value: "b", }, @@ -12864,30 +12779,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5262, - EndPos: 5269, + EndLine: 276, + StartPos: 5262, + EndPos: 5269, }, Expr: &binary.Div{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5262, - EndPos: 5268, + EndLine: 276, + StartPos: 5262, + EndPos: 5268, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5262, - EndPos: 5263, + EndLine: 276, + StartPos: 5262, + EndPos: 5263, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5262, - EndPos: 5263, + EndLine: 276, + StartPos: 5262, + EndPos: 5263, }, Value: "a", }, @@ -12895,16 +12810,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5267, - EndPos: 5268, + EndLine: 276, + StartPos: 5267, + EndPos: 5268, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5267, - EndPos: 5268, + EndLine: 276, + StartPos: 5267, + EndPos: 5268, }, Value: "b", }, @@ -12914,30 +12829,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5273, - EndPos: 5281, + EndLine: 277, + StartPos: 5273, + EndPos: 5281, }, Expr: &binary.Equal{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5273, - EndPos: 5280, + EndLine: 277, + StartPos: 5273, + EndPos: 5280, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5273, - EndPos: 5274, + EndLine: 277, + StartPos: 5273, + EndPos: 5274, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5273, - EndPos: 5274, + EndLine: 277, + StartPos: 5273, + EndPos: 5274, }, Value: "a", }, @@ -12945,16 +12860,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5279, - EndPos: 5280, + EndLine: 277, + StartPos: 5279, + EndPos: 5280, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5279, - EndPos: 5280, + EndLine: 277, + StartPos: 5279, + EndPos: 5280, }, Value: "b", }, @@ -12964,30 +12879,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5285, - EndPos: 5293, + EndLine: 278, + StartPos: 5285, + EndPos: 5293, }, Expr: &binary.GreaterOrEqual{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5285, - EndPos: 5292, + EndLine: 278, + StartPos: 5285, + EndPos: 5292, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5285, - EndPos: 5286, + EndLine: 278, + StartPos: 5285, + EndPos: 5286, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5285, - EndPos: 5286, + EndLine: 278, + StartPos: 5285, + EndPos: 5286, }, Value: "a", }, @@ -12995,16 +12910,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5291, - EndPos: 5292, + EndLine: 278, + StartPos: 5291, + EndPos: 5292, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5291, - EndPos: 5292, + EndLine: 278, + StartPos: 5291, + EndPos: 5292, }, Value: "b", }, @@ -13014,30 +12929,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5297, - EndPos: 5304, + EndLine: 279, + StartPos: 5297, + EndPos: 5304, }, Expr: &binary.Greater{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5297, - EndPos: 5303, + EndLine: 279, + StartPos: 5297, + EndPos: 5303, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5297, - EndPos: 5298, + EndLine: 279, + StartPos: 5297, + EndPos: 5298, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5297, - EndPos: 5298, + EndLine: 279, + StartPos: 5297, + EndPos: 5298, }, Value: "a", }, @@ -13045,16 +12960,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5302, - EndPos: 5303, + EndLine: 279, + StartPos: 5302, + EndPos: 5303, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5302, - EndPos: 5303, + EndLine: 279, + StartPos: 5302, + EndPos: 5303, }, Value: "b", }, @@ -13064,30 +12979,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5308, - EndPos: 5317, + EndLine: 280, + StartPos: 5308, + EndPos: 5317, }, Expr: &binary.Identical{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5308, - EndPos: 5316, + EndLine: 280, + StartPos: 5308, + EndPos: 5316, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5308, - EndPos: 5309, + EndLine: 280, + StartPos: 5308, + EndPos: 5309, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5308, - EndPos: 5309, + EndLine: 280, + StartPos: 5308, + EndPos: 5309, }, Value: "a", }, @@ -13095,16 +13010,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5315, - EndPos: 5316, + EndLine: 280, + StartPos: 5315, + EndPos: 5316, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5315, - EndPos: 5316, + EndLine: 280, + StartPos: 5315, + EndPos: 5316, }, Value: "b", }, @@ -13114,30 +13029,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5321, - EndPos: 5330, + EndLine: 281, + StartPos: 5321, + EndPos: 5330, }, Expr: &binary.LogicalAnd{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5321, - EndPos: 5329, + EndLine: 281, + StartPos: 5321, + EndPos: 5329, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5321, - EndPos: 5322, + EndLine: 281, + StartPos: 5321, + EndPos: 5322, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5321, - EndPos: 5322, + EndLine: 281, + StartPos: 5321, + EndPos: 5322, }, Value: "a", }, @@ -13145,16 +13060,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5328, - EndPos: 5329, + EndLine: 281, + StartPos: 5328, + EndPos: 5329, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5328, - EndPos: 5329, + EndLine: 281, + StartPos: 5328, + EndPos: 5329, }, Value: "b", }, @@ -13164,30 +13079,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5334, - EndPos: 5342, + EndLine: 282, + StartPos: 5334, + EndPos: 5342, }, Expr: &binary.LogicalOr{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5334, - EndPos: 5341, + EndLine: 282, + StartPos: 5334, + EndPos: 5341, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5334, - EndPos: 5335, + EndLine: 282, + StartPos: 5334, + EndPos: 5335, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5334, - EndPos: 5335, + EndLine: 282, + StartPos: 5334, + EndPos: 5335, }, Value: "a", }, @@ -13195,16 +13110,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5340, - EndPos: 5341, + EndLine: 282, + StartPos: 5340, + EndPos: 5341, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5340, - EndPos: 5341, + EndLine: 282, + StartPos: 5340, + EndPos: 5341, }, Value: "b", }, @@ -13214,30 +13129,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5346, - EndPos: 5355, + EndLine: 283, + StartPos: 5346, + EndPos: 5355, }, Expr: &binary.LogicalXor{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5346, - EndPos: 5354, + EndLine: 283, + StartPos: 5346, + EndPos: 5354, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5346, - EndPos: 5347, + EndLine: 283, + StartPos: 5346, + EndPos: 5347, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5346, - EndPos: 5347, + EndLine: 283, + StartPos: 5346, + EndPos: 5347, }, Value: "a", }, @@ -13245,16 +13160,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5353, - EndPos: 5354, + EndLine: 283, + StartPos: 5353, + EndPos: 5354, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5353, - EndPos: 5354, + EndLine: 283, + StartPos: 5353, + EndPos: 5354, }, Value: "b", }, @@ -13264,30 +13179,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5359, - EndPos: 5366, + EndLine: 284, + StartPos: 5359, + EndPos: 5366, }, Expr: &binary.Minus{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5359, - EndPos: 5365, + EndLine: 284, + StartPos: 5359, + EndPos: 5365, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5359, - EndPos: 5360, + EndLine: 284, + StartPos: 5359, + EndPos: 5360, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5359, - EndPos: 5360, + EndLine: 284, + StartPos: 5359, + EndPos: 5360, }, Value: "a", }, @@ -13295,16 +13210,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5364, - EndPos: 5365, + EndLine: 284, + StartPos: 5364, + EndPos: 5365, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5364, - EndPos: 5365, + EndLine: 284, + StartPos: 5364, + EndPos: 5365, }, Value: "b", }, @@ -13314,30 +13229,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5370, - EndPos: 5377, + EndLine: 285, + StartPos: 5370, + EndPos: 5377, }, Expr: &binary.Mod{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5370, - EndPos: 5376, + EndLine: 285, + StartPos: 5370, + EndPos: 5376, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5370, - EndPos: 5371, + EndLine: 285, + StartPos: 5370, + EndPos: 5371, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5370, - EndPos: 5371, + EndLine: 285, + StartPos: 5370, + EndPos: 5371, }, Value: "a", }, @@ -13345,16 +13260,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5375, - EndPos: 5376, + EndLine: 285, + StartPos: 5375, + EndPos: 5376, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5375, - EndPos: 5376, + EndLine: 285, + StartPos: 5375, + EndPos: 5376, }, Value: "b", }, @@ -13364,30 +13279,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5381, - EndPos: 5388, + EndLine: 286, + StartPos: 5381, + EndPos: 5388, }, Expr: &binary.Mul{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5381, - EndPos: 5387, + EndLine: 286, + StartPos: 5381, + EndPos: 5387, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5381, - EndPos: 5382, + EndLine: 286, + StartPos: 5381, + EndPos: 5382, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5381, - EndPos: 5382, + EndLine: 286, + StartPos: 5381, + EndPos: 5382, }, Value: "a", }, @@ -13395,16 +13310,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5386, - EndPos: 5387, + EndLine: 286, + StartPos: 5386, + EndPos: 5387, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5386, - EndPos: 5387, + EndLine: 286, + StartPos: 5386, + EndPos: 5387, }, Value: "b", }, @@ -13414,30 +13329,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5400, + EndLine: 287, + StartPos: 5392, + EndPos: 5400, }, Expr: &binary.NotEqual{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5399, + EndLine: 287, + StartPos: 5392, + EndPos: 5399, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5393, + EndLine: 287, + StartPos: 5392, + EndPos: 5393, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5393, + EndLine: 287, + StartPos: 5392, + EndPos: 5393, }, Value: "a", }, @@ -13445,16 +13360,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5398, - EndPos: 5399, + EndLine: 287, + StartPos: 5398, + EndPos: 5399, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5398, - EndPos: 5399, + EndLine: 287, + StartPos: 5398, + EndPos: 5399, }, Value: "b", }, @@ -13464,30 +13379,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5404, - EndPos: 5413, + EndLine: 288, + StartPos: 5404, + EndPos: 5413, }, Expr: &binary.NotIdentical{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5404, - EndPos: 5412, + EndLine: 288, + StartPos: 5404, + EndPos: 5412, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5404, - EndPos: 5405, + EndLine: 288, + StartPos: 5404, + EndPos: 5405, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5404, - EndPos: 5405, + EndLine: 288, + StartPos: 5404, + EndPos: 5405, }, Value: "a", }, @@ -13495,16 +13410,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5411, - EndPos: 5412, + EndLine: 288, + StartPos: 5411, + EndPos: 5412, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5411, - EndPos: 5412, + EndLine: 288, + StartPos: 5411, + EndPos: 5412, }, Value: "b", }, @@ -13514,30 +13429,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5424, + EndLine: 289, + StartPos: 5417, + EndPos: 5424, }, Expr: &binary.Plus{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5423, + EndLine: 289, + StartPos: 5417, + EndPos: 5423, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5418, + EndLine: 289, + StartPos: 5417, + EndPos: 5418, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5418, + EndLine: 289, + StartPos: 5417, + EndPos: 5418, }, Value: "a", }, @@ -13545,16 +13460,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5422, - EndPos: 5423, + EndLine: 289, + StartPos: 5422, + EndPos: 5423, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5422, - EndPos: 5423, + EndLine: 289, + StartPos: 5422, + EndPos: 5423, }, Value: "b", }, @@ -13564,30 +13479,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5428, - EndPos: 5436, + EndLine: 290, + StartPos: 5428, + EndPos: 5436, }, Expr: &binary.Pow{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5428, - EndPos: 5435, + EndLine: 290, + StartPos: 5428, + EndPos: 5435, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5428, - EndPos: 5429, + EndLine: 290, + StartPos: 5428, + EndPos: 5429, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5428, - EndPos: 5429, + EndLine: 290, + StartPos: 5428, + EndPos: 5429, }, Value: "a", }, @@ -13595,16 +13510,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5434, - EndPos: 5435, + EndLine: 290, + StartPos: 5434, + EndPos: 5435, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5434, - EndPos: 5435, + EndLine: 290, + StartPos: 5434, + EndPos: 5435, }, Value: "b", }, @@ -13614,30 +13529,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5440, - EndPos: 5448, + EndLine: 291, + StartPos: 5440, + EndPos: 5448, }, Expr: &binary.ShiftLeft{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5440, - EndPos: 5447, + EndLine: 291, + StartPos: 5440, + EndPos: 5447, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5440, - EndPos: 5441, + EndLine: 291, + StartPos: 5440, + EndPos: 5441, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5440, - EndPos: 5441, + EndLine: 291, + StartPos: 5440, + EndPos: 5441, }, Value: "a", }, @@ -13645,16 +13560,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5446, - EndPos: 5447, + EndLine: 291, + StartPos: 5446, + EndPos: 5447, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5446, - EndPos: 5447, + EndLine: 291, + StartPos: 5446, + EndPos: 5447, }, Value: "b", }, @@ -13664,30 +13579,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5460, + EndLine: 292, + StartPos: 5452, + EndPos: 5460, }, Expr: &binary.ShiftRight{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5459, + EndLine: 292, + StartPos: 5452, + EndPos: 5459, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5453, + EndLine: 292, + StartPos: 5452, + EndPos: 5453, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5453, + EndLine: 292, + StartPos: 5452, + EndPos: 5453, }, Value: "a", }, @@ -13695,16 +13610,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5458, - EndPos: 5459, + EndLine: 292, + StartPos: 5458, + EndPos: 5459, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5458, - EndPos: 5459, + EndLine: 292, + StartPos: 5458, + EndPos: 5459, }, Value: "b", }, @@ -13714,30 +13629,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5464, - EndPos: 5472, + EndLine: 293, + StartPos: 5464, + EndPos: 5472, }, Expr: &binary.SmallerOrEqual{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5464, - EndPos: 5471, + EndLine: 293, + StartPos: 5464, + EndPos: 5471, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5464, - EndPos: 5465, + EndLine: 293, + StartPos: 5464, + EndPos: 5465, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5464, - EndPos: 5465, + EndLine: 293, + StartPos: 5464, + EndPos: 5465, }, Value: "a", }, @@ -13745,16 +13660,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5470, - EndPos: 5471, + EndLine: 293, + StartPos: 5470, + EndPos: 5471, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5470, - EndPos: 5471, + EndLine: 293, + StartPos: 5470, + EndPos: 5471, }, Value: "b", }, @@ -13764,30 +13679,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5476, - EndPos: 5483, + EndLine: 294, + StartPos: 5476, + EndPos: 5483, }, Expr: &binary.Smaller{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5476, - EndPos: 5482, + EndLine: 294, + StartPos: 5476, + EndPos: 5482, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5476, - EndPos: 5477, + EndLine: 294, + StartPos: 5476, + EndPos: 5477, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5476, - EndPos: 5477, + EndLine: 294, + StartPos: 5476, + EndPos: 5477, }, Value: "a", }, @@ -13795,16 +13710,16 @@ func TestPhp5(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5481, - EndPos: 5482, + EndLine: 294, + StartPos: 5481, + EndPos: 5482, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5481, - EndPos: 5482, + EndLine: 294, + StartPos: 5481, + EndPos: 5482, }, Value: "b", }, @@ -13814,30 +13729,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5488, - EndPos: 5496, + EndLine: 296, + StartPos: 5488, + EndPos: 5496, }, Expr: &assign.Reference{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5488, - EndPos: 5495, + EndLine: 296, + StartPos: 5488, + EndPos: 5495, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5488, - EndPos: 5489, + EndLine: 296, + StartPos: 5488, + EndPos: 5489, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5488, - EndPos: 5489, + EndLine: 296, + StartPos: 5488, + EndPos: 5489, }, Value: "a", }, @@ -13845,16 +13760,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5494, - EndPos: 5495, + EndLine: 296, + StartPos: 5494, + EndPos: 5495, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5494, - EndPos: 5495, + EndLine: 296, + StartPos: 5494, + EndPos: 5495, }, Value: "b", }, @@ -13864,30 +13779,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5500, - EndPos: 5513, + EndLine: 297, + StartPos: 5500, + EndPos: 5513, }, Expr: &assign.Reference{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5500, - EndPos: 5512, + EndLine: 297, + StartPos: 5500, + EndPos: 5512, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5500, - EndPos: 5501, + EndLine: 297, + StartPos: 5500, + EndPos: 5501, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5500, - EndPos: 5501, + EndLine: 297, + StartPos: 5500, + EndPos: 5501, }, Value: "a", }, @@ -13895,24 +13810,24 @@ func TestPhp5(t *testing.T) { Expression: &expr.New{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5506, - EndPos: 5512, + EndLine: 297, + StartPos: 5506, + EndPos: 5512, }, Class: &name.Name{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5510, - EndPos: 5512, + EndLine: 297, + StartPos: 5510, + EndPos: 5512, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5510, - EndPos: 5512, + EndLine: 297, + StartPos: 5510, + EndPos: 5512, }, Value: "Foo", }, @@ -13924,30 +13839,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5517, - EndPos: 5534, + EndLine: 298, + StartPos: 5517, + EndPos: 5534, }, Expr: &assign.Reference{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5517, - EndPos: 5533, + EndLine: 298, + StartPos: 5517, + EndPos: 5533, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5517, - EndPos: 5518, + EndLine: 298, + StartPos: 5517, + EndPos: 5518, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5517, - EndPos: 5518, + EndLine: 298, + StartPos: 5517, + EndPos: 5518, }, Value: "a", }, @@ -13955,24 +13870,24 @@ func TestPhp5(t *testing.T) { Expression: &expr.New{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5523, - EndPos: 5533, + EndLine: 298, + StartPos: 5523, + EndPos: 5533, }, Class: &name.Name{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5527, - EndPos: 5529, + EndLine: 298, + StartPos: 5527, + EndPos: 5529, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5527, - EndPos: 5529, + EndLine: 298, + StartPos: 5527, + EndPos: 5529, }, Value: "Foo", }, @@ -13981,33 +13896,33 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5530, - EndPos: 5533, + EndLine: 298, + StartPos: 5530, + EndPos: 5533, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5531, - EndPos: 5532, + EndLine: 298, + StartPos: 5531, + EndPos: 5532, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5531, - EndPos: 5532, + EndLine: 298, + StartPos: 5531, + EndPos: 5532, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5531, - EndPos: 5532, + EndLine: 298, + StartPos: 5531, + EndPos: 5532, }, Value: "b", }, @@ -14021,30 +13936,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5538, - EndPos: 5545, + EndLine: 299, + StartPos: 5538, + EndPos: 5545, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5538, - EndPos: 5544, + EndLine: 299, + StartPos: 5538, + EndPos: 5544, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5538, - EndPos: 5539, + EndLine: 299, + StartPos: 5538, + EndPos: 5539, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5538, - EndPos: 5539, + EndLine: 299, + StartPos: 5538, + EndPos: 5539, }, Value: "a", }, @@ -14052,16 +13967,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5543, - EndPos: 5544, + EndLine: 299, + StartPos: 5543, + EndPos: 5544, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5543, - EndPos: 5544, + EndLine: 299, + StartPos: 5543, + EndPos: 5544, }, Value: "b", }, @@ -14071,30 +13986,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5549, - EndPos: 5557, + EndLine: 300, + StartPos: 5549, + EndPos: 5557, }, Expr: &assign.BitwiseAnd{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5549, - EndPos: 5556, + EndLine: 300, + StartPos: 5549, + EndPos: 5556, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5549, - EndPos: 5550, + EndLine: 300, + StartPos: 5549, + EndPos: 5550, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5549, - EndPos: 5550, + EndLine: 300, + StartPos: 5549, + EndPos: 5550, }, Value: "a", }, @@ -14102,16 +14017,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5555, - EndPos: 5556, + EndLine: 300, + StartPos: 5555, + EndPos: 5556, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5555, - EndPos: 5556, + EndLine: 300, + StartPos: 5555, + EndPos: 5556, }, Value: "b", }, @@ -14121,30 +14036,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5561, - EndPos: 5569, + EndLine: 301, + StartPos: 5561, + EndPos: 5569, }, Expr: &assign.BitwiseOr{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5561, - EndPos: 5568, + EndLine: 301, + StartPos: 5561, + EndPos: 5568, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5561, - EndPos: 5562, + EndLine: 301, + StartPos: 5561, + EndPos: 5562, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5561, - EndPos: 5562, + EndLine: 301, + StartPos: 5561, + EndPos: 5562, }, Value: "a", }, @@ -14152,16 +14067,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5567, - EndPos: 5568, + EndLine: 301, + StartPos: 5567, + EndPos: 5568, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5567, - EndPos: 5568, + EndLine: 301, + StartPos: 5567, + EndPos: 5568, }, Value: "b", }, @@ -14171,30 +14086,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 302, - EndLine: 302, - StartPos: 5573, - EndPos: 5581, + EndLine: 302, + StartPos: 5573, + EndPos: 5581, }, Expr: &assign.BitwiseXor{ Position: &position.Position{ StartLine: 302, - EndLine: 302, - StartPos: 5573, - EndPos: 5580, + EndLine: 302, + StartPos: 5573, + EndPos: 5580, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 302, - EndLine: 302, - StartPos: 5573, - EndPos: 5574, + EndLine: 302, + StartPos: 5573, + EndPos: 5574, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 302, - EndLine: 302, - StartPos: 5573, - EndPos: 5574, + EndLine: 302, + StartPos: 5573, + EndPos: 5574, }, Value: "a", }, @@ -14202,16 +14117,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 302, - EndLine: 302, - StartPos: 5579, - EndPos: 5580, + EndLine: 302, + StartPos: 5579, + EndPos: 5580, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 302, - EndLine: 302, - StartPos: 5579, - EndPos: 5580, + EndLine: 302, + StartPos: 5579, + EndPos: 5580, }, Value: "b", }, @@ -14221,30 +14136,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5585, - EndPos: 5593, + EndLine: 303, + StartPos: 5585, + EndPos: 5593, }, Expr: &assign.Concat{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5585, - EndPos: 5592, + EndLine: 303, + StartPos: 5585, + EndPos: 5592, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5585, - EndPos: 5586, + EndLine: 303, + StartPos: 5585, + EndPos: 5586, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5585, - EndPos: 5586, + EndLine: 303, + StartPos: 5585, + EndPos: 5586, }, Value: "a", }, @@ -14252,16 +14167,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5591, - EndPos: 5592, + EndLine: 303, + StartPos: 5591, + EndPos: 5592, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5591, - EndPos: 5592, + EndLine: 303, + StartPos: 5591, + EndPos: 5592, }, Value: "b", }, @@ -14271,30 +14186,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5597, - EndPos: 5605, + EndLine: 304, + StartPos: 5597, + EndPos: 5605, }, Expr: &assign.Div{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5597, - EndPos: 5604, + EndLine: 304, + StartPos: 5597, + EndPos: 5604, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5597, - EndPos: 5598, + EndLine: 304, + StartPos: 5597, + EndPos: 5598, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5597, - EndPos: 5598, + EndLine: 304, + StartPos: 5597, + EndPos: 5598, }, Value: "a", }, @@ -14302,16 +14217,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5603, - EndPos: 5604, + EndLine: 304, + StartPos: 5603, + EndPos: 5604, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5603, - EndPos: 5604, + EndLine: 304, + StartPos: 5603, + EndPos: 5604, }, Value: "b", }, @@ -14321,30 +14236,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5609, - EndPos: 5617, + EndLine: 305, + StartPos: 5609, + EndPos: 5617, }, Expr: &assign.Minus{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5609, - EndPos: 5616, + EndLine: 305, + StartPos: 5609, + EndPos: 5616, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5609, - EndPos: 5610, + EndLine: 305, + StartPos: 5609, + EndPos: 5610, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5609, - EndPos: 5610, + EndLine: 305, + StartPos: 5609, + EndPos: 5610, }, Value: "a", }, @@ -14352,16 +14267,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5615, - EndPos: 5616, + EndLine: 305, + StartPos: 5615, + EndPos: 5616, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5615, - EndPos: 5616, + EndLine: 305, + StartPos: 5615, + EndPos: 5616, }, Value: "b", }, @@ -14371,30 +14286,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5621, - EndPos: 5629, + EndLine: 306, + StartPos: 5621, + EndPos: 5629, }, Expr: &assign.Mod{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5621, - EndPos: 5628, + EndLine: 306, + StartPos: 5621, + EndPos: 5628, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5621, - EndPos: 5622, + EndLine: 306, + StartPos: 5621, + EndPos: 5622, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5621, - EndPos: 5622, + EndLine: 306, + StartPos: 5621, + EndPos: 5622, }, Value: "a", }, @@ -14402,16 +14317,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5627, - EndPos: 5628, + EndLine: 306, + StartPos: 5627, + EndPos: 5628, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5627, - EndPos: 5628, + EndLine: 306, + StartPos: 5627, + EndPos: 5628, }, Value: "b", }, @@ -14421,30 +14336,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5633, - EndPos: 5641, + EndLine: 307, + StartPos: 5633, + EndPos: 5641, }, Expr: &assign.Mul{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5633, - EndPos: 5640, + EndLine: 307, + StartPos: 5633, + EndPos: 5640, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5633, - EndPos: 5634, + EndLine: 307, + StartPos: 5633, + EndPos: 5634, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5633, - EndPos: 5634, + EndLine: 307, + StartPos: 5633, + EndPos: 5634, }, Value: "a", }, @@ -14452,16 +14367,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5639, - EndPos: 5640, + EndLine: 307, + StartPos: 5639, + EndPos: 5640, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5639, - EndPos: 5640, + EndLine: 307, + StartPos: 5639, + EndPos: 5640, }, Value: "b", }, @@ -14471,30 +14386,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5645, - EndPos: 5653, + EndLine: 308, + StartPos: 5645, + EndPos: 5653, }, Expr: &assign.Plus{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5645, - EndPos: 5652, + EndLine: 308, + StartPos: 5645, + EndPos: 5652, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5645, - EndPos: 5646, + EndLine: 308, + StartPos: 5645, + EndPos: 5646, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5645, - EndPos: 5646, + EndLine: 308, + StartPos: 5645, + EndPos: 5646, }, Value: "a", }, @@ -14502,16 +14417,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5651, - EndPos: 5652, + EndLine: 308, + StartPos: 5651, + EndPos: 5652, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5651, - EndPos: 5652, + EndLine: 308, + StartPos: 5651, + EndPos: 5652, }, Value: "b", }, @@ -14521,30 +14436,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5657, - EndPos: 5666, + EndLine: 309, + StartPos: 5657, + EndPos: 5666, }, Expr: &assign.Pow{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5657, - EndPos: 5665, + EndLine: 309, + StartPos: 5657, + EndPos: 5665, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5657, - EndPos: 5658, + EndLine: 309, + StartPos: 5657, + EndPos: 5658, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5657, - EndPos: 5658, + EndLine: 309, + StartPos: 5657, + EndPos: 5658, }, Value: "a", }, @@ -14552,16 +14467,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5664, - EndPos: 5665, + EndLine: 309, + StartPos: 5664, + EndPos: 5665, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5664, - EndPos: 5665, + EndLine: 309, + StartPos: 5664, + EndPos: 5665, }, Value: "b", }, @@ -14571,30 +14486,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5670, - EndPos: 5679, + EndLine: 310, + StartPos: 5670, + EndPos: 5679, }, Expr: &assign.ShiftLeft{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5670, - EndPos: 5678, + EndLine: 310, + StartPos: 5670, + EndPos: 5678, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5670, - EndPos: 5671, + EndLine: 310, + StartPos: 5670, + EndPos: 5671, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5670, - EndPos: 5671, + EndLine: 310, + StartPos: 5670, + EndPos: 5671, }, Value: "a", }, @@ -14602,16 +14517,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5677, - EndPos: 5678, + EndLine: 310, + StartPos: 5677, + EndPos: 5678, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5677, - EndPos: 5678, + EndLine: 310, + StartPos: 5677, + EndPos: 5678, }, Value: "b", }, @@ -14621,30 +14536,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5683, - EndPos: 5692, + EndLine: 311, + StartPos: 5683, + EndPos: 5692, }, Expr: &assign.ShiftRight{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5683, - EndPos: 5691, + EndLine: 311, + StartPos: 5683, + EndPos: 5691, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5683, - EndPos: 5684, + EndLine: 311, + StartPos: 5683, + EndPos: 5684, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5683, - EndPos: 5684, + EndLine: 311, + StartPos: 5683, + EndPos: 5684, }, Value: "a", }, @@ -14652,16 +14567,16 @@ func TestPhp5(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5690, - EndPos: 5691, + EndLine: 311, + StartPos: 5690, + EndPos: 5691, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5690, - EndPos: 5691, + EndLine: 311, + StartPos: 5690, + EndPos: 5691, }, Value: "b", }, @@ -14671,31 +14586,31 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5699, - EndPos: 5710, + EndLine: 314, + StartPos: 5699, + EndPos: 5710, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5699, - EndPos: 5708, + EndLine: 314, + StartPos: 5699, + EndPos: 5708, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5703, - EndPos: 5706, + EndLine: 314, + StartPos: 5703, + EndPos: 5706, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5704, - EndPos: 5706, + EndLine: 314, + StartPos: 5704, + EndPos: 5706, }, Value: "Foo", }, @@ -14704,9 +14619,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5707, - EndPos: 5708, + EndLine: 314, + StartPos: 5707, + EndPos: 5708, }, }, }, @@ -14714,45 +14629,45 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5735, - EndPos: 5738, + EndLine: 315, + StartPos: 5735, + EndPos: 5738, }, Expr: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5735, - EndPos: 5737, + EndLine: 315, + StartPos: 5735, + EndPos: 5737, }, Variable: &expr.MethodCall{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5731, - EndPos: 5732, + EndLine: 315, + StartPos: 5731, + EndPos: 5732, }, Variable: &expr.New{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5715, - EndPos: 5724, + EndLine: 315, + StartPos: 5715, + EndPos: 5724, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5719, - EndPos: 5722, + EndLine: 315, + StartPos: 5719, + EndPos: 5722, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5720, - EndPos: 5722, + EndLine: 315, + StartPos: 5720, + EndPos: 5722, }, Value: "Foo", }, @@ -14761,36 +14676,36 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5723, - EndPos: 5724, + EndLine: 315, + StartPos: 5723, + EndPos: 5724, }, }, }, Method: &node.Identifier{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5728, - EndPos: 5730, + EndLine: 315, + StartPos: 5728, + EndPos: 5730, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5731, - EndPos: 5732, + EndLine: 315, + StartPos: 5731, + EndPos: 5732, }, }, }, Property: &node.Identifier{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5735, - EndPos: 5737, + EndLine: 315, + StartPos: 5735, + EndPos: 5737, }, Value: "baz", }, @@ -14799,45 +14714,45 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5758, - EndPos: 5760, + EndLine: 316, + StartPos: 5758, + EndPos: 5760, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5758, - EndPos: 5758, + EndLine: 316, + StartPos: 5758, + EndPos: 5758, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5755, - EndPos: 5755, + EndLine: 316, + StartPos: 5755, + EndPos: 5755, }, Variable: &expr.New{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5743, - EndPos: 5752, + EndLine: 316, + StartPos: 5743, + EndPos: 5752, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5747, - EndPos: 5750, + EndLine: 316, + StartPos: 5747, + EndPos: 5750, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5748, - EndPos: 5750, + EndLine: 316, + StartPos: 5748, + EndPos: 5750, }, Value: "Foo", }, @@ -14846,18 +14761,18 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5751, - EndPos: 5752, + EndLine: 316, + StartPos: 5751, + EndPos: 5752, }, }, }, Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5755, - EndPos: 5755, + EndLine: 316, + StartPos: 5755, + EndPos: 5755, }, Value: "0", }, @@ -14865,9 +14780,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5758, - EndPos: 5758, + EndLine: 316, + StartPos: 5758, + EndPos: 5758, }, Value: "0", }, @@ -14876,45 +14791,45 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5784, - EndPos: 5786, + EndLine: 317, + StartPos: 5784, + EndPos: 5786, }, Expr: &expr.MethodCall{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5784, - EndPos: 5785, + EndLine: 317, + StartPos: 5784, + EndPos: 5785, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5777, - EndPos: 5777, + EndLine: 317, + StartPos: 5777, + EndPos: 5777, }, Variable: &expr.New{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5765, - EndPos: 5774, + EndLine: 317, + StartPos: 5765, + EndPos: 5774, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5769, - EndPos: 5772, + EndLine: 317, + StartPos: 5769, + EndPos: 5772, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5770, - EndPos: 5772, + EndLine: 317, + StartPos: 5770, + EndPos: 5772, }, Value: "Foo", }, @@ -14923,18 +14838,18 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5773, - EndPos: 5774, + EndLine: 317, + StartPos: 5773, + EndPos: 5774, }, }, }, Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5777, - EndPos: 5777, + EndLine: 317, + StartPos: 5777, + EndPos: 5777, }, Value: "0", }, @@ -14942,18 +14857,18 @@ func TestPhp5(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5781, - EndPos: 5783, + EndLine: 317, + StartPos: 5781, + EndPos: 5783, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 317, - EndLine: 317, - StartPos: 5784, - EndPos: 5785, + EndLine: 317, + StartPos: 5784, + EndPos: 5785, }, }, }, @@ -14961,60 +14876,60 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5791, - EndPos: 5807, + EndLine: 319, + StartPos: 5791, + EndPos: 5807, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5791, - EndPos: 5806, + EndLine: 319, + StartPos: 5791, + EndPos: 5806, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5791, - EndPos: 5803, + EndLine: 319, + StartPos: 5791, + EndPos: 5803, }, Variable: &expr.Array{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5791, - EndPos: 5800, + EndLine: 319, + StartPos: 5791, + EndPos: 5800, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5797, - EndPos: 5799, + EndLine: 319, + StartPos: 5797, + EndPos: 5799, }, Val: &expr.ShortArray{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5797, - EndPos: 5799, + EndLine: 319, + StartPos: 5797, + EndPos: 5799, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5798, - EndPos: 5798, + EndLine: 319, + StartPos: 5798, + EndPos: 5798, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5798, - EndPos: 5798, + EndLine: 319, + StartPos: 5798, + EndPos: 5798, }, Value: "0", }, @@ -15027,9 +14942,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5802, - EndPos: 5802, + EndLine: 319, + StartPos: 5802, + EndPos: 5802, }, Value: "0", }, @@ -15037,9 +14952,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5805, - EndPos: 5805, + EndLine: 319, + StartPos: 5805, + EndPos: 5805, }, Value: "0", }, @@ -15048,32 +14963,32 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 320, - EndLine: 320, - StartPos: 5811, - EndPos: 5819, + EndLine: 320, + StartPos: 5811, + EndPos: 5819, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 320, - EndLine: 320, - StartPos: 5811, - EndPos: 5818, + EndLine: 320, + StartPos: 5811, + EndPos: 5818, }, Variable: &scalar.String{ Position: &position.Position{ StartLine: 320, - EndLine: 320, - StartPos: 5811, - EndPos: 5815, + EndLine: 320, + StartPos: 5811, + EndPos: 5815, }, Value: "\"foo\"", }, Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 320, - EndLine: 320, - StartPos: 5817, - EndPos: 5817, + EndLine: 320, + StartPos: 5817, + EndPos: 5817, }, Value: "0", }, @@ -15082,38 +14997,38 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5823, - EndPos: 5829, + EndLine: 321, + StartPos: 5823, + EndPos: 5829, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5823, - EndPos: 5828, + EndLine: 321, + StartPos: 5823, + EndPos: 5828, }, Variable: &expr.ConstFetch{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5823, - EndPos: 5825, + EndLine: 321, + StartPos: 5823, + EndPos: 5825, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5823, - EndPos: 5825, + EndLine: 321, + StartPos: 5823, + EndPos: 5825, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5823, - EndPos: 5825, + EndLine: 321, + StartPos: 5823, + EndPos: 5825, }, Value: "foo", }, @@ -15123,9 +15038,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5827, - EndPos: 5827, + EndLine: 321, + StartPos: 5827, + EndPos: 5827, }, Value: "0", }, @@ -15134,32 +15049,32 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 322, - EndLine: 322, - StartPos: 5833, - EndPos: 5844, + EndLine: 322, + StartPos: 5833, + EndPos: 5844, }, Expr: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 322, - EndLine: 322, - StartPos: 5833, - EndPos: 5843, + EndLine: 322, + StartPos: 5833, + EndPos: 5843, }, Class: &node.Identifier{ Position: &position.Position{ StartLine: 322, - EndLine: 322, - StartPos: 5833, - EndPos: 5838, + EndLine: 322, + StartPos: 5833, + EndPos: 5838, }, Value: "static", }, ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 322, - EndLine: 322, - StartPos: 5841, - EndPos: 5843, + EndLine: 322, + StartPos: 5841, + EndPos: 5843, }, Value: "foo", }, @@ -15168,30 +15083,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 324, - EndLine: 324, - StartPos: 5849, - EndPos: 5857, + EndLine: 324, + StartPos: 5849, + EndPos: 5857, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 324, - EndLine: 324, - StartPos: 5849, - EndPos: 5856, + EndLine: 324, + StartPos: 5849, + EndPos: 5856, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 324, - EndLine: 324, - StartPos: 5853, - EndPos: 5856, + EndLine: 324, + StartPos: 5853, + EndPos: 5856, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 324, - EndLine: 324, - StartPos: 5853, - EndPos: 5856, + EndLine: 324, + StartPos: 5853, + EndPos: 5856, }, Value: "foo", }, @@ -15201,37 +15116,37 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5861, - EndPos: 5875, + EndLine: 325, + StartPos: 5861, + EndPos: 5875, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5861, - EndPos: 5874, + EndLine: 325, + StartPos: 5861, + EndPos: 5874, }, Class: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5865, - EndPos: 5874, + EndLine: 325, + StartPos: 5865, + EndPos: 5874, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5865, - EndPos: 5868, + EndLine: 325, + StartPos: 5865, + EndPos: 5868, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5865, - EndPos: 5868, + EndLine: 325, + StartPos: 5865, + EndPos: 5868, }, Value: "foo", }, @@ -15239,16 +15154,16 @@ func TestPhp5(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5871, - EndPos: 5874, + EndLine: 325, + StartPos: 5871, + EndPos: 5874, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5871, - EndPos: 5874, + EndLine: 325, + StartPos: 5871, + EndPos: 5874, }, Value: "bar", }, @@ -15259,44 +15174,44 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5879, - EndPos: 5891, + EndLine: 326, + StartPos: 5879, + EndPos: 5891, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5879, - EndPos: 5889, + EndLine: 326, + StartPos: 5879, + EndPos: 5889, }, Class: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5889, - EndPos: 5889, + EndLine: 326, + StartPos: 5889, + EndPos: 5889, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5887, - EndPos: 5889, + EndLine: 326, + StartPos: 5887, + EndPos: 5889, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5883, - EndPos: 5887, + EndLine: 326, + StartPos: 5883, + EndPos: 5887, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5883, - EndPos: 5884, + EndLine: 326, + StartPos: 5883, + EndPos: 5884, }, Value: "a", }, @@ -15304,9 +15219,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5887, - EndPos: 5887, + EndLine: 326, + StartPos: 5887, + EndPos: 5887, }, Value: "b", }, @@ -15314,9 +15229,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5889, - EndPos: 5889, + EndLine: 326, + StartPos: 5889, + EndPos: 5889, }, Value: "0", }, @@ -15326,65 +15241,65 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5895, - EndPos: 5926, + EndLine: 327, + StartPos: 5895, + EndPos: 5926, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5895, - EndPos: 5924, + EndLine: 327, + StartPos: 5895, + EndPos: 5924, }, Class: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5924, - EndPos: 5924, + EndLine: 327, + StartPos: 5924, + EndPos: 5924, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5922, - EndPos: 5924, + EndLine: 327, + StartPos: 5922, + EndPos: 5924, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5918, - EndPos: 5922, + EndLine: 327, + StartPos: 5918, + EndPos: 5922, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5905, - EndPos: 5919, + EndLine: 327, + StartPos: 5905, + EndPos: 5919, }, Variable: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5903, - EndPos: 5914, + EndLine: 327, + StartPos: 5903, + EndPos: 5914, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5899, - EndPos: 5903, + EndLine: 327, + StartPos: 5899, + EndPos: 5903, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5899, - EndPos: 5900, + EndLine: 327, + StartPos: 5899, + EndPos: 5900, }, Value: "a", }, @@ -15392,9 +15307,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5903, - EndPos: 5903, + EndLine: 327, + StartPos: 5903, + EndPos: 5903, }, Value: "b", }, @@ -15402,23 +15317,23 @@ func TestPhp5(t *testing.T) { Dim: &expr.Ternary{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5905, - EndPos: 5914, + EndLine: 327, + StartPos: 5905, + EndPos: 5914, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5905, - EndPos: 5906, + EndLine: 327, + StartPos: 5905, + EndPos: 5906, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5905, - EndPos: 5906, + EndLine: 327, + StartPos: 5905, + EndPos: 5906, }, Value: "b", }, @@ -15426,24 +15341,24 @@ func TestPhp5(t *testing.T) { IfFalse: &expr.ConstFetch{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5911, - EndPos: 5914, + EndLine: 327, + StartPos: 5911, + EndPos: 5914, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5911, - EndPos: 5914, + EndLine: 327, + StartPos: 5911, + EndPos: 5914, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5911, - EndPos: 5914, + EndLine: 327, + StartPos: 5911, + EndPos: 5914, }, Value: "null", }, @@ -15455,16 +15370,16 @@ func TestPhp5(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5918, - EndPos: 5919, + EndLine: 327, + StartPos: 5918, + EndPos: 5919, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5918, - EndPos: 5919, + EndLine: 327, + StartPos: 5918, + EndPos: 5919, }, Value: "c", }, @@ -15473,9 +15388,9 @@ func TestPhp5(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5922, - EndPos: 5922, + EndLine: 327, + StartPos: 5922, + EndPos: 5922, }, Value: "d", }, @@ -15483,9 +15398,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5924, - EndPos: 5924, + EndLine: 327, + StartPos: 5924, + EndPos: 5924, }, Value: "0", }, @@ -15495,31 +15410,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5927, - EndPos: 5945, + EndLine: 327, + StartPos: 5927, + EndPos: 5945, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5934, - EndPos: 5944, + EndLine: 327, + StartPos: 5934, + EndPos: 5944, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5934, - EndPos: 5935, + EndLine: 327, + StartPos: 5934, + EndPos: 5935, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5934, - EndPos: 5935, + EndLine: 327, + StartPos: 5934, + EndPos: 5935, }, Value: "a", }, @@ -15527,31 +15442,31 @@ func TestPhp5(t *testing.T) { Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5939, - EndPos: 5944, + EndLine: 327, + StartPos: 5939, + EndPos: 5944, }, Variable: &expr.ShortArray{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5939, - EndPos: 5941, + EndLine: 327, + StartPos: 5939, + EndPos: 5941, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5940, - EndPos: 5940, + EndLine: 327, + StartPos: 5940, + EndPos: 5940, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5940, - EndPos: 5940, + EndLine: 327, + StartPos: 5940, + EndPos: 5940, }, Value: "1", }, @@ -15561,9 +15476,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 327, - EndLine: 327, - StartPos: 5943, - EndPos: 5943, + EndLine: 327, + StartPos: 5943, + EndPos: 5943, }, Value: "0", }, @@ -15574,31 +15489,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5950, - EndPos: 5964, + EndLine: 329, + StartPos: 5950, + EndPos: 5964, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5957, - EndPos: 5963, + EndLine: 329, + StartPos: 5957, + EndPos: 5963, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5957, - EndPos: 5958, + EndLine: 329, + StartPos: 5957, + EndPos: 5958, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5957, - EndPos: 5958, + EndLine: 329, + StartPos: 5957, + EndPos: 5958, }, Value: "a", }, @@ -15606,16 +15521,16 @@ func TestPhp5(t *testing.T) { Expr: &expr.BooleanNot{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5962, - EndPos: 5963, + EndLine: 329, + StartPos: 5962, + EndPos: 5963, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5963, - EndPos: 5963, + EndLine: 329, + StartPos: 5963, + EndPos: 5963, }, Value: "1", }, @@ -15626,31 +15541,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5968, - EndPos: 5982, + EndLine: 330, + StartPos: 5968, + EndPos: 5982, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5975, - EndPos: 5981, + EndLine: 330, + StartPos: 5975, + EndPos: 5981, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5975, - EndPos: 5976, + EndLine: 330, + StartPos: 5975, + EndPos: 5976, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5975, - EndPos: 5976, + EndLine: 330, + StartPos: 5975, + EndPos: 5976, }, Value: "a", }, @@ -15658,16 +15573,16 @@ func TestPhp5(t *testing.T) { Expr: &expr.BitwiseNot{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5980, - EndPos: 5981, + EndLine: 330, + StartPos: 5980, + EndPos: 5981, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5981, - EndPos: 5981, + EndLine: 330, + StartPos: 5981, + EndPos: 5981, }, Value: "1", }, @@ -15678,31 +15593,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 5986, - EndPos: 6000, + EndLine: 331, + StartPos: 5986, + EndPos: 6000, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 5993, - EndPos: 5999, + EndLine: 331, + StartPos: 5993, + EndPos: 5999, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 5993, - EndPos: 5994, + EndLine: 331, + StartPos: 5993, + EndPos: 5994, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 5993, - EndPos: 5994, + EndLine: 331, + StartPos: 5993, + EndPos: 5994, }, Value: "a", }, @@ -15710,16 +15625,16 @@ func TestPhp5(t *testing.T) { Expr: &expr.UnaryPlus{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 5998, - EndPos: 5999, + EndLine: 331, + StartPos: 5998, + EndPos: 5999, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 5999, - EndPos: 5999, + EndLine: 331, + StartPos: 5999, + EndPos: 5999, }, Value: "1", }, @@ -15730,31 +15645,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 332, - EndLine: 332, - StartPos: 6004, - EndPos: 6018, + EndLine: 332, + StartPos: 6004, + EndPos: 6018, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 332, - EndLine: 332, - StartPos: 6011, - EndPos: 6017, + EndLine: 332, + StartPos: 6011, + EndPos: 6017, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 332, - EndLine: 332, - StartPos: 6011, - EndPos: 6012, + EndLine: 332, + StartPos: 6011, + EndPos: 6012, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 332, - EndLine: 332, - StartPos: 6011, - EndPos: 6012, + EndLine: 332, + StartPos: 6011, + EndPos: 6012, }, Value: "a", }, @@ -15762,16 +15677,16 @@ func TestPhp5(t *testing.T) { Expr: &expr.UnaryMinus{ Position: &position.Position{ StartLine: 332, - EndLine: 332, - StartPos: 6016, - EndPos: 6017, + EndLine: 332, + StartPos: 6016, + EndPos: 6017, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 332, - EndLine: 332, - StartPos: 6017, - EndPos: 6017, + EndLine: 332, + StartPos: 6017, + EndPos: 6017, }, Value: "1", }, @@ -15782,31 +15697,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6022, - EndPos: 6037, + EndLine: 333, + StartPos: 6022, + EndPos: 6037, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6029, - EndPos: 6035, + EndLine: 333, + StartPos: 6029, + EndPos: 6035, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6029, - EndPos: 6030, + EndLine: 333, + StartPos: 6029, + EndPos: 6030, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6029, - EndPos: 6030, + EndLine: 333, + StartPos: 6029, + EndPos: 6030, }, Value: "a", }, @@ -15814,9 +15729,9 @@ func TestPhp5(t *testing.T) { Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6035, - EndPos: 6035, + EndLine: 333, + StartPos: 6035, + EndPos: 6035, }, Value: "1", }, @@ -15826,31 +15741,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6041, - EndPos: 6059, + EndLine: 334, + StartPos: 6041, + EndPos: 6059, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6048, - EndPos: 6058, + EndLine: 334, + StartPos: 6048, + EndPos: 6058, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6048, - EndPos: 6049, + EndLine: 334, + StartPos: 6048, + EndPos: 6049, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6048, - EndPos: 6049, + EndLine: 334, + StartPos: 6048, + EndPos: 6049, }, Value: "a", }, @@ -15858,25 +15773,25 @@ func TestPhp5(t *testing.T) { Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6053, - EndPos: 6058, + EndLine: 334, + StartPos: 6053, + EndPos: 6058, }, Condition: &scalar.Lnumber{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6053, - EndPos: 6053, + EndLine: 334, + StartPos: 6053, + EndPos: 6053, }, Value: "1", }, IfFalse: &scalar.Lnumber{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6058, - EndPos: 6058, + EndLine: 334, + StartPos: 6058, + EndPos: 6058, }, Value: "2", }, @@ -15887,31 +15802,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6063, - EndPos: 6084, + EndLine: 335, + StartPos: 6063, + EndPos: 6084, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6070, - EndPos: 6083, + EndLine: 335, + StartPos: 6070, + EndPos: 6083, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6070, - EndPos: 6071, + EndLine: 335, + StartPos: 6070, + EndPos: 6071, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6070, - EndPos: 6071, + EndLine: 335, + StartPos: 6070, + EndPos: 6071, }, Value: "a", }, @@ -15919,34 +15834,34 @@ func TestPhp5(t *testing.T) { Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6075, - EndPos: 6083, + EndLine: 335, + StartPos: 6075, + EndPos: 6083, }, Condition: &scalar.Lnumber{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6075, - EndPos: 6075, + EndLine: 335, + StartPos: 6075, + EndPos: 6075, }, Value: "1", }, IfTrue: &scalar.Lnumber{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6079, - EndPos: 6079, + EndLine: 335, + StartPos: 6079, + EndPos: 6079, }, Value: "2", }, IfFalse: &scalar.Lnumber{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6083, - EndPos: 6083, + EndLine: 335, + StartPos: 6083, + EndPos: 6083, }, Value: "3", }, @@ -15957,31 +15872,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6088, - EndPos: 6105, + EndLine: 336, + StartPos: 6088, + EndPos: 6105, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6095, - EndPos: 6104, + EndLine: 336, + StartPos: 6095, + EndPos: 6104, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6095, - EndPos: 6096, + EndLine: 336, + StartPos: 6095, + EndPos: 6096, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6095, - EndPos: 6096, + EndLine: 336, + StartPos: 6095, + EndPos: 6096, }, Value: "a", }, @@ -15989,25 +15904,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.BitwiseAnd{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6100, - EndPos: 6104, + EndLine: 336, + StartPos: 6100, + EndPos: 6104, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6100, - EndPos: 6100, + EndLine: 336, + StartPos: 6100, + EndPos: 6100, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6104, - EndPos: 6104, + EndLine: 336, + StartPos: 6104, + EndPos: 6104, }, Value: "2", }, @@ -16018,31 +15933,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6109, - EndPos: 6126, + EndLine: 337, + StartPos: 6109, + EndPos: 6126, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6116, - EndPos: 6125, + EndLine: 337, + StartPos: 6116, + EndPos: 6125, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6116, - EndPos: 6117, + EndLine: 337, + StartPos: 6116, + EndPos: 6117, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6116, - EndPos: 6117, + EndLine: 337, + StartPos: 6116, + EndPos: 6117, }, Value: "a", }, @@ -16050,25 +15965,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.BitwiseOr{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6121, - EndPos: 6125, + EndLine: 337, + StartPos: 6121, + EndPos: 6125, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6121, - EndPos: 6121, + EndLine: 337, + StartPos: 6121, + EndPos: 6121, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6125, - EndPos: 6125, + EndLine: 337, + StartPos: 6125, + EndPos: 6125, }, Value: "2", }, @@ -16079,31 +15994,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6130, - EndPos: 6147, + EndLine: 338, + StartPos: 6130, + EndPos: 6147, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6137, - EndPos: 6146, + EndLine: 338, + StartPos: 6137, + EndPos: 6146, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6137, - EndPos: 6138, + EndLine: 338, + StartPos: 6137, + EndPos: 6138, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6137, - EndPos: 6138, + EndLine: 338, + StartPos: 6137, + EndPos: 6138, }, Value: "a", }, @@ -16111,25 +16026,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.BitwiseXor{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6142, - EndPos: 6146, + EndLine: 338, + StartPos: 6142, + EndPos: 6146, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6142, - EndPos: 6142, + EndLine: 338, + StartPos: 6142, + EndPos: 6142, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6146, - EndPos: 6146, + EndLine: 338, + StartPos: 6146, + EndPos: 6146, }, Value: "2", }, @@ -16140,31 +16055,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6151, - EndPos: 6169, + EndLine: 339, + StartPos: 6151, + EndPos: 6169, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6158, - EndPos: 6168, + EndLine: 339, + StartPos: 6158, + EndPos: 6168, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6158, - EndPos: 6159, + EndLine: 339, + StartPos: 6158, + EndPos: 6159, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6158, - EndPos: 6159, + EndLine: 339, + StartPos: 6158, + EndPos: 6159, }, Value: "a", }, @@ -16172,25 +16087,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.BooleanAnd{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6163, - EndPos: 6168, + EndLine: 339, + StartPos: 6163, + EndPos: 6168, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6163, - EndPos: 6163, + EndLine: 339, + StartPos: 6163, + EndPos: 6163, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6168, - EndPos: 6168, + EndLine: 339, + StartPos: 6168, + EndPos: 6168, }, Value: "2", }, @@ -16201,31 +16116,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 340, - EndLine: 340, - StartPos: 6173, - EndPos: 6191, + EndLine: 340, + StartPos: 6173, + EndPos: 6191, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 340, - EndLine: 340, - StartPos: 6180, - EndPos: 6190, + EndLine: 340, + StartPos: 6180, + EndPos: 6190, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 340, - EndLine: 340, - StartPos: 6180, - EndPos: 6181, + EndLine: 340, + StartPos: 6180, + EndPos: 6181, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 340, - EndLine: 340, - StartPos: 6180, - EndPos: 6181, + EndLine: 340, + StartPos: 6180, + EndPos: 6181, }, Value: "a", }, @@ -16233,25 +16148,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.BooleanOr{ Position: &position.Position{ StartLine: 340, - EndLine: 340, - StartPos: 6185, - EndPos: 6190, + EndLine: 340, + StartPos: 6185, + EndPos: 6190, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 340, - EndLine: 340, - StartPos: 6185, - EndPos: 6185, + EndLine: 340, + StartPos: 6185, + EndPos: 6185, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 340, - EndLine: 340, - StartPos: 6190, - EndPos: 6190, + EndLine: 340, + StartPos: 6190, + EndPos: 6190, }, Value: "2", }, @@ -16262,31 +16177,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6195, - EndPos: 6212, + EndLine: 341, + StartPos: 6195, + EndPos: 6212, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6202, - EndPos: 6211, + EndLine: 341, + StartPos: 6202, + EndPos: 6211, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6202, - EndPos: 6203, + EndLine: 341, + StartPos: 6202, + EndPos: 6203, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6202, - EndPos: 6203, + EndLine: 341, + StartPos: 6202, + EndPos: 6203, }, Value: "a", }, @@ -16294,25 +16209,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Concat{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6207, - EndPos: 6211, + EndLine: 341, + StartPos: 6207, + EndPos: 6211, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6207, - EndPos: 6207, + EndLine: 341, + StartPos: 6207, + EndPos: 6207, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6211, - EndPos: 6211, + EndLine: 341, + StartPos: 6211, + EndPos: 6211, }, Value: "2", }, @@ -16323,31 +16238,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6216, - EndPos: 6233, + EndLine: 342, + StartPos: 6216, + EndPos: 6233, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6223, - EndPos: 6232, + EndLine: 342, + StartPos: 6223, + EndPos: 6232, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6223, - EndPos: 6224, + EndLine: 342, + StartPos: 6223, + EndPos: 6224, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6223, - EndPos: 6224, + EndLine: 342, + StartPos: 6223, + EndPos: 6224, }, Value: "a", }, @@ -16355,25 +16270,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Div{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6228, - EndPos: 6232, + EndLine: 342, + StartPos: 6228, + EndPos: 6232, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6228, - EndPos: 6228, + EndLine: 342, + StartPos: 6228, + EndPos: 6228, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6232, - EndPos: 6232, + EndLine: 342, + StartPos: 6232, + EndPos: 6232, }, Value: "2", }, @@ -16384,31 +16299,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 343, - EndLine: 343, - StartPos: 6237, - EndPos: 6255, + EndLine: 343, + StartPos: 6237, + EndPos: 6255, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 343, - EndLine: 343, - StartPos: 6244, - EndPos: 6254, + EndLine: 343, + StartPos: 6244, + EndPos: 6254, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 343, - EndLine: 343, - StartPos: 6244, - EndPos: 6245, + EndLine: 343, + StartPos: 6244, + EndPos: 6245, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 343, - EndLine: 343, - StartPos: 6244, - EndPos: 6245, + EndLine: 343, + StartPos: 6244, + EndPos: 6245, }, Value: "a", }, @@ -16416,25 +16331,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Equal{ Position: &position.Position{ StartLine: 343, - EndLine: 343, - StartPos: 6249, - EndPos: 6254, + EndLine: 343, + StartPos: 6249, + EndPos: 6254, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 343, - EndLine: 343, - StartPos: 6249, - EndPos: 6249, + EndLine: 343, + StartPos: 6249, + EndPos: 6249, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 343, - EndLine: 343, - StartPos: 6254, - EndPos: 6254, + EndLine: 343, + StartPos: 6254, + EndPos: 6254, }, Value: "2", }, @@ -16445,31 +16360,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6259, - EndPos: 6277, + EndLine: 344, + StartPos: 6259, + EndPos: 6277, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6266, - EndPos: 6276, + EndLine: 344, + StartPos: 6266, + EndPos: 6276, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6266, - EndPos: 6267, + EndLine: 344, + StartPos: 6266, + EndPos: 6267, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6266, - EndPos: 6267, + EndLine: 344, + StartPos: 6266, + EndPos: 6267, }, Value: "a", }, @@ -16477,25 +16392,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.GreaterOrEqual{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6271, - EndPos: 6276, + EndLine: 344, + StartPos: 6271, + EndPos: 6276, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6271, - EndPos: 6271, + EndLine: 344, + StartPos: 6271, + EndPos: 6271, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6276, - EndPos: 6276, + EndLine: 344, + StartPos: 6276, + EndPos: 6276, }, Value: "2", }, @@ -16506,31 +16421,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6281, - EndPos: 6298, + EndLine: 345, + StartPos: 6281, + EndPos: 6298, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6288, - EndPos: 6297, + EndLine: 345, + StartPos: 6288, + EndPos: 6297, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6288, - EndPos: 6289, + EndLine: 345, + StartPos: 6288, + EndPos: 6289, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6288, - EndPos: 6289, + EndLine: 345, + StartPos: 6288, + EndPos: 6289, }, Value: "a", }, @@ -16538,25 +16453,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Greater{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6293, - EndPos: 6297, + EndLine: 345, + StartPos: 6293, + EndPos: 6297, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6293, - EndPos: 6293, + EndLine: 345, + StartPos: 6293, + EndPos: 6293, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6297, - EndPos: 6297, + EndLine: 345, + StartPos: 6297, + EndPos: 6297, }, Value: "2", }, @@ -16567,31 +16482,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 346, - EndLine: 346, - StartPos: 6302, - EndPos: 6321, + EndLine: 346, + StartPos: 6302, + EndPos: 6321, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 346, - EndLine: 346, - StartPos: 6309, - EndPos: 6320, + EndLine: 346, + StartPos: 6309, + EndPos: 6320, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 346, - EndLine: 346, - StartPos: 6309, - EndPos: 6310, + EndLine: 346, + StartPos: 6309, + EndPos: 6310, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 346, - EndLine: 346, - StartPos: 6309, - EndPos: 6310, + EndLine: 346, + StartPos: 6309, + EndPos: 6310, }, Value: "a", }, @@ -16599,25 +16514,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Identical{ Position: &position.Position{ StartLine: 346, - EndLine: 346, - StartPos: 6314, - EndPos: 6320, + EndLine: 346, + StartPos: 6314, + EndPos: 6320, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 346, - EndLine: 346, - StartPos: 6314, - EndPos: 6314, + EndLine: 346, + StartPos: 6314, + EndPos: 6314, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 346, - EndLine: 346, - StartPos: 6320, - EndPos: 6320, + EndLine: 346, + StartPos: 6320, + EndPos: 6320, }, Value: "2", }, @@ -16628,31 +16543,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6325, - EndPos: 6344, + EndLine: 347, + StartPos: 6325, + EndPos: 6344, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6332, - EndPos: 6343, + EndLine: 347, + StartPos: 6332, + EndPos: 6343, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6332, - EndPos: 6333, + EndLine: 347, + StartPos: 6332, + EndPos: 6333, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6332, - EndPos: 6333, + EndLine: 347, + StartPos: 6332, + EndPos: 6333, }, Value: "a", }, @@ -16660,25 +16575,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.LogicalAnd{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6337, - EndPos: 6343, + EndLine: 347, + StartPos: 6337, + EndPos: 6343, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6337, - EndPos: 6337, + EndLine: 347, + StartPos: 6337, + EndPos: 6337, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6343, - EndPos: 6343, + EndLine: 347, + StartPos: 6343, + EndPos: 6343, }, Value: "2", }, @@ -16689,31 +16604,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 348, - EndLine: 348, - StartPos: 6348, - EndPos: 6366, + EndLine: 348, + StartPos: 6348, + EndPos: 6366, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 348, - EndLine: 348, - StartPos: 6355, - EndPos: 6365, + EndLine: 348, + StartPos: 6355, + EndPos: 6365, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 348, - EndLine: 348, - StartPos: 6355, - EndPos: 6356, + EndLine: 348, + StartPos: 6355, + EndPos: 6356, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 348, - EndLine: 348, - StartPos: 6355, - EndPos: 6356, + EndLine: 348, + StartPos: 6355, + EndPos: 6356, }, Value: "a", }, @@ -16721,25 +16636,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.LogicalOr{ Position: &position.Position{ StartLine: 348, - EndLine: 348, - StartPos: 6360, - EndPos: 6365, + EndLine: 348, + StartPos: 6360, + EndPos: 6365, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 348, - EndLine: 348, - StartPos: 6360, - EndPos: 6360, + EndLine: 348, + StartPos: 6360, + EndPos: 6360, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 348, - EndLine: 348, - StartPos: 6365, - EndPos: 6365, + EndLine: 348, + StartPos: 6365, + EndPos: 6365, }, Value: "2", }, @@ -16750,31 +16665,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 349, - EndLine: 349, - StartPos: 6370, - EndPos: 6389, + EndLine: 349, + StartPos: 6370, + EndPos: 6389, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 349, - EndLine: 349, - StartPos: 6377, - EndPos: 6388, + EndLine: 349, + StartPos: 6377, + EndPos: 6388, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 349, - EndLine: 349, - StartPos: 6377, - EndPos: 6378, + EndLine: 349, + StartPos: 6377, + EndPos: 6378, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 349, - EndLine: 349, - StartPos: 6377, - EndPos: 6378, + EndLine: 349, + StartPos: 6377, + EndPos: 6378, }, Value: "a", }, @@ -16782,25 +16697,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.LogicalXor{ Position: &position.Position{ StartLine: 349, - EndLine: 349, - StartPos: 6382, - EndPos: 6388, + EndLine: 349, + StartPos: 6382, + EndPos: 6388, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 349, - EndLine: 349, - StartPos: 6382, - EndPos: 6382, + EndLine: 349, + StartPos: 6382, + EndPos: 6382, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 349, - EndLine: 349, - StartPos: 6388, - EndPos: 6388, + EndLine: 349, + StartPos: 6388, + EndPos: 6388, }, Value: "2", }, @@ -16811,31 +16726,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 350, - EndLine: 350, - StartPos: 6393, - EndPos: 6410, + EndLine: 350, + StartPos: 6393, + EndPos: 6410, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 350, - EndLine: 350, - StartPos: 6400, - EndPos: 6409, + EndLine: 350, + StartPos: 6400, + EndPos: 6409, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 350, - EndLine: 350, - StartPos: 6400, - EndPos: 6401, + EndLine: 350, + StartPos: 6400, + EndPos: 6401, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 350, - EndLine: 350, - StartPos: 6400, - EndPos: 6401, + EndLine: 350, + StartPos: 6400, + EndPos: 6401, }, Value: "a", }, @@ -16843,25 +16758,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Minus{ Position: &position.Position{ StartLine: 350, - EndLine: 350, - StartPos: 6405, - EndPos: 6409, + EndLine: 350, + StartPos: 6405, + EndPos: 6409, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 350, - EndLine: 350, - StartPos: 6405, - EndPos: 6405, + EndLine: 350, + StartPos: 6405, + EndPos: 6405, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 350, - EndLine: 350, - StartPos: 6409, - EndPos: 6409, + EndLine: 350, + StartPos: 6409, + EndPos: 6409, }, Value: "2", }, @@ -16872,31 +16787,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 351, - EndLine: 351, - StartPos: 6414, - EndPos: 6431, + EndLine: 351, + StartPos: 6414, + EndPos: 6431, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 351, - EndLine: 351, - StartPos: 6421, - EndPos: 6430, + EndLine: 351, + StartPos: 6421, + EndPos: 6430, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 351, - EndLine: 351, - StartPos: 6421, - EndPos: 6422, + EndLine: 351, + StartPos: 6421, + EndPos: 6422, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 351, - EndLine: 351, - StartPos: 6421, - EndPos: 6422, + EndLine: 351, + StartPos: 6421, + EndPos: 6422, }, Value: "a", }, @@ -16904,25 +16819,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Mod{ Position: &position.Position{ StartLine: 351, - EndLine: 351, - StartPos: 6426, - EndPos: 6430, + EndLine: 351, + StartPos: 6426, + EndPos: 6430, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 351, - EndLine: 351, - StartPos: 6426, - EndPos: 6426, + EndLine: 351, + StartPos: 6426, + EndPos: 6426, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 351, - EndLine: 351, - StartPos: 6430, - EndPos: 6430, + EndLine: 351, + StartPos: 6430, + EndPos: 6430, }, Value: "2", }, @@ -16933,31 +16848,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 352, - EndLine: 352, - StartPos: 6435, - EndPos: 6452, + EndLine: 352, + StartPos: 6435, + EndPos: 6452, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 352, - EndLine: 352, - StartPos: 6442, - EndPos: 6451, + EndLine: 352, + StartPos: 6442, + EndPos: 6451, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 352, - EndLine: 352, - StartPos: 6442, - EndPos: 6443, + EndLine: 352, + StartPos: 6442, + EndPos: 6443, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 352, - EndLine: 352, - StartPos: 6442, - EndPos: 6443, + EndLine: 352, + StartPos: 6442, + EndPos: 6443, }, Value: "a", }, @@ -16965,25 +16880,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Mul{ Position: &position.Position{ StartLine: 352, - EndLine: 352, - StartPos: 6447, - EndPos: 6451, + EndLine: 352, + StartPos: 6447, + EndPos: 6451, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 352, - EndLine: 352, - StartPos: 6447, - EndPos: 6447, + EndLine: 352, + StartPos: 6447, + EndPos: 6447, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 352, - EndLine: 352, - StartPos: 6451, - EndPos: 6451, + EndLine: 352, + StartPos: 6451, + EndPos: 6451, }, Value: "2", }, @@ -16994,31 +16909,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 353, - EndLine: 353, - StartPos: 6456, - EndPos: 6474, + EndLine: 353, + StartPos: 6456, + EndPos: 6474, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 353, - EndLine: 353, - StartPos: 6463, - EndPos: 6473, + EndLine: 353, + StartPos: 6463, + EndPos: 6473, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 353, - EndLine: 353, - StartPos: 6463, - EndPos: 6464, + EndLine: 353, + StartPos: 6463, + EndPos: 6464, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 353, - EndLine: 353, - StartPos: 6463, - EndPos: 6464, + EndLine: 353, + StartPos: 6463, + EndPos: 6464, }, Value: "a", }, @@ -17026,25 +16941,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.NotEqual{ Position: &position.Position{ StartLine: 353, - EndLine: 353, - StartPos: 6468, - EndPos: 6473, + EndLine: 353, + StartPos: 6468, + EndPos: 6473, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 353, - EndLine: 353, - StartPos: 6468, - EndPos: 6468, + EndLine: 353, + StartPos: 6468, + EndPos: 6468, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 353, - EndLine: 353, - StartPos: 6473, - EndPos: 6473, + EndLine: 353, + StartPos: 6473, + EndPos: 6473, }, Value: "2", }, @@ -17055,31 +16970,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 354, - EndLine: 354, - StartPos: 6478, - EndPos: 6497, + EndLine: 354, + StartPos: 6478, + EndPos: 6497, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 354, - EndLine: 354, - StartPos: 6485, - EndPos: 6496, + EndLine: 354, + StartPos: 6485, + EndPos: 6496, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 354, - EndLine: 354, - StartPos: 6485, - EndPos: 6486, + EndLine: 354, + StartPos: 6485, + EndPos: 6486, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 354, - EndLine: 354, - StartPos: 6485, - EndPos: 6486, + EndLine: 354, + StartPos: 6485, + EndPos: 6486, }, Value: "a", }, @@ -17087,25 +17002,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.NotIdentical{ Position: &position.Position{ StartLine: 354, - EndLine: 354, - StartPos: 6490, - EndPos: 6496, + EndLine: 354, + StartPos: 6490, + EndPos: 6496, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 354, - EndLine: 354, - StartPos: 6490, - EndPos: 6490, + EndLine: 354, + StartPos: 6490, + EndPos: 6490, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 354, - EndLine: 354, - StartPos: 6496, - EndPos: 6496, + EndLine: 354, + StartPos: 6496, + EndPos: 6496, }, Value: "2", }, @@ -17116,31 +17031,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 355, - EndLine: 355, - StartPos: 6501, - EndPos: 6518, + EndLine: 355, + StartPos: 6501, + EndPos: 6518, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 355, - EndLine: 355, - StartPos: 6508, - EndPos: 6517, + EndLine: 355, + StartPos: 6508, + EndPos: 6517, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 355, - EndLine: 355, - StartPos: 6508, - EndPos: 6509, + EndLine: 355, + StartPos: 6508, + EndPos: 6509, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 355, - EndLine: 355, - StartPos: 6508, - EndPos: 6509, + EndLine: 355, + StartPos: 6508, + EndPos: 6509, }, Value: "a", }, @@ -17148,25 +17063,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Plus{ Position: &position.Position{ StartLine: 355, - EndLine: 355, - StartPos: 6513, - EndPos: 6517, + EndLine: 355, + StartPos: 6513, + EndPos: 6517, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 355, - EndLine: 355, - StartPos: 6513, - EndPos: 6513, + EndLine: 355, + StartPos: 6513, + EndPos: 6513, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 355, - EndLine: 355, - StartPos: 6517, - EndPos: 6517, + EndLine: 355, + StartPos: 6517, + EndPos: 6517, }, Value: "2", }, @@ -17177,31 +17092,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 356, - EndLine: 356, - StartPos: 6522, - EndPos: 6540, + EndLine: 356, + StartPos: 6522, + EndPos: 6540, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 356, - EndLine: 356, - StartPos: 6529, - EndPos: 6539, + EndLine: 356, + StartPos: 6529, + EndPos: 6539, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 356, - EndLine: 356, - StartPos: 6529, - EndPos: 6530, + EndLine: 356, + StartPos: 6529, + EndPos: 6530, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 356, - EndLine: 356, - StartPos: 6529, - EndPos: 6530, + EndLine: 356, + StartPos: 6529, + EndPos: 6530, }, Value: "a", }, @@ -17209,25 +17124,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Pow{ Position: &position.Position{ StartLine: 356, - EndLine: 356, - StartPos: 6534, - EndPos: 6539, + EndLine: 356, + StartPos: 6534, + EndPos: 6539, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 356, - EndLine: 356, - StartPos: 6534, - EndPos: 6534, + EndLine: 356, + StartPos: 6534, + EndPos: 6534, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 356, - EndLine: 356, - StartPos: 6539, - EndPos: 6539, + EndLine: 356, + StartPos: 6539, + EndPos: 6539, }, Value: "2", }, @@ -17238,31 +17153,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 357, - EndLine: 357, - StartPos: 6544, - EndPos: 6562, + EndLine: 357, + StartPos: 6544, + EndPos: 6562, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 357, - EndLine: 357, - StartPos: 6551, - EndPos: 6561, + EndLine: 357, + StartPos: 6551, + EndPos: 6561, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 357, - EndLine: 357, - StartPos: 6551, - EndPos: 6552, + EndLine: 357, + StartPos: 6551, + EndPos: 6552, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 357, - EndLine: 357, - StartPos: 6551, - EndPos: 6552, + EndLine: 357, + StartPos: 6551, + EndPos: 6552, }, Value: "a", }, @@ -17270,25 +17185,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.ShiftLeft{ Position: &position.Position{ StartLine: 357, - EndLine: 357, - StartPos: 6556, - EndPos: 6561, + EndLine: 357, + StartPos: 6556, + EndPos: 6561, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 357, - EndLine: 357, - StartPos: 6556, - EndPos: 6556, + EndLine: 357, + StartPos: 6556, + EndPos: 6556, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 357, - EndLine: 357, - StartPos: 6561, - EndPos: 6561, + EndLine: 357, + StartPos: 6561, + EndPos: 6561, }, Value: "2", }, @@ -17299,31 +17214,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 358, - EndLine: 358, - StartPos: 6566, - EndPos: 6584, + EndLine: 358, + StartPos: 6566, + EndPos: 6584, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 358, - EndLine: 358, - StartPos: 6573, - EndPos: 6583, + EndLine: 358, + StartPos: 6573, + EndPos: 6583, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 358, - EndLine: 358, - StartPos: 6573, - EndPos: 6574, + EndLine: 358, + StartPos: 6573, + EndPos: 6574, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 358, - EndLine: 358, - StartPos: 6573, - EndPos: 6574, + EndLine: 358, + StartPos: 6573, + EndPos: 6574, }, Value: "a", }, @@ -17331,25 +17246,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.ShiftRight{ Position: &position.Position{ StartLine: 358, - EndLine: 358, - StartPos: 6578, - EndPos: 6583, + EndLine: 358, + StartPos: 6578, + EndPos: 6583, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 358, - EndLine: 358, - StartPos: 6578, - EndPos: 6578, + EndLine: 358, + StartPos: 6578, + EndPos: 6578, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 358, - EndLine: 358, - StartPos: 6583, - EndPos: 6583, + EndLine: 358, + StartPos: 6583, + EndPos: 6583, }, Value: "2", }, @@ -17360,31 +17275,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 359, - EndLine: 359, - StartPos: 6588, - EndPos: 6606, + EndLine: 359, + StartPos: 6588, + EndPos: 6606, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 359, - EndLine: 359, - StartPos: 6595, - EndPos: 6605, + EndLine: 359, + StartPos: 6595, + EndPos: 6605, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 359, - EndLine: 359, - StartPos: 6595, - EndPos: 6596, + EndLine: 359, + StartPos: 6595, + EndPos: 6596, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 359, - EndLine: 359, - StartPos: 6595, - EndPos: 6596, + EndLine: 359, + StartPos: 6595, + EndPos: 6596, }, Value: "a", }, @@ -17392,25 +17307,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.SmallerOrEqual{ Position: &position.Position{ StartLine: 359, - EndLine: 359, - StartPos: 6600, - EndPos: 6605, + EndLine: 359, + StartPos: 6600, + EndPos: 6605, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 359, - EndLine: 359, - StartPos: 6600, - EndPos: 6600, + EndLine: 359, + StartPos: 6600, + EndPos: 6600, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 359, - EndLine: 359, - StartPos: 6605, - EndPos: 6605, + EndLine: 359, + StartPos: 6605, + EndPos: 6605, }, Value: "2", }, @@ -17421,31 +17336,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 360, - EndLine: 360, - StartPos: 6610, - EndPos: 6627, + EndLine: 360, + StartPos: 6610, + EndPos: 6627, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 360, - EndLine: 360, - StartPos: 6617, - EndPos: 6626, + EndLine: 360, + StartPos: 6617, + EndPos: 6626, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 360, - EndLine: 360, - StartPos: 6617, - EndPos: 6618, + EndLine: 360, + StartPos: 6617, + EndPos: 6618, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 360, - EndLine: 360, - StartPos: 6617, - EndPos: 6618, + EndLine: 360, + StartPos: 6617, + EndPos: 6618, }, Value: "a", }, @@ -17453,25 +17368,25 @@ func TestPhp5(t *testing.T) { Expr: &binary.Smaller{ Position: &position.Position{ StartLine: 360, - EndLine: 360, - StartPos: 6622, - EndPos: 6626, + EndLine: 360, + StartPos: 6622, + EndPos: 6626, }, Left: &scalar.Lnumber{ Position: &position.Position{ StartLine: 360, - EndLine: 360, - StartPos: 6622, - EndPos: 6622, + EndLine: 360, + StartPos: 6622, + EndPos: 6622, }, Value: "1", }, Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 360, - EndLine: 360, - StartPos: 6626, - EndPos: 6626, + EndLine: 360, + StartPos: 6626, + EndPos: 6626, }, Value: "2", }, @@ -17482,31 +17397,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6631, - EndPos: 6651, + EndLine: 361, + StartPos: 6631, + EndPos: 6651, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6638, - EndPos: 6650, + EndLine: 361, + StartPos: 6638, + EndPos: 6650, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6638, - EndPos: 6639, + EndLine: 361, + StartPos: 6638, + EndPos: 6639, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6638, - EndPos: 6639, + EndLine: 361, + StartPos: 6638, + EndPos: 6639, }, Value: "a", }, @@ -17514,24 +17429,24 @@ func TestPhp5(t *testing.T) { Expr: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6643, - EndPos: 6650, + EndLine: 361, + StartPos: 6643, + EndPos: 6650, }, Class: &name.Name{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6643, - EndPos: 6645, + EndLine: 361, + StartPos: 6643, + EndPos: 6645, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6643, - EndPos: 6645, + EndLine: 361, + StartPos: 6643, + EndPos: 6645, }, Value: "Foo", }, @@ -17540,9 +17455,9 @@ func TestPhp5(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 361, - EndLine: 361, - StartPos: 6648, - EndPos: 6650, + EndLine: 361, + StartPos: 6648, + EndPos: 6650, }, Value: "bar", }, @@ -17553,31 +17468,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6655, - EndPos: 6677, + EndLine: 362, + StartPos: 6655, + EndPos: 6677, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6662, - EndPos: 6676, + EndLine: 362, + StartPos: 6662, + EndPos: 6676, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6662, - EndPos: 6663, + EndLine: 362, + StartPos: 6662, + EndPos: 6663, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6662, - EndPos: 6663, + EndLine: 362, + StartPos: 6662, + EndPos: 6663, }, Value: "a", }, @@ -17585,24 +17500,24 @@ func TestPhp5(t *testing.T) { Expr: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6667, - EndPos: 6676, + EndLine: 362, + StartPos: 6667, + EndPos: 6676, }, Class: &name.Name{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6667, - EndPos: 6669, + EndLine: 362, + StartPos: 6667, + EndPos: 6669, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6667, - EndPos: 6669, + EndLine: 362, + StartPos: 6667, + EndPos: 6669, }, Value: "Foo", }, @@ -17611,9 +17526,9 @@ func TestPhp5(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 362, - EndLine: 362, - StartPos: 6672, - EndPos: 6676, + EndLine: 362, + StartPos: 6672, + EndPos: 6676, }, Value: "class", }, @@ -17624,31 +17539,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 363, - EndLine: 363, - StartPos: 6681, - EndPos: 6702, + EndLine: 363, + StartPos: 6681, + EndPos: 6702, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 363, - EndLine: 363, - StartPos: 6688, - EndPos: 6701, + EndLine: 363, + StartPos: 6688, + EndPos: 6701, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 363, - EndLine: 363, - StartPos: 6688, - EndPos: 6689, + EndLine: 363, + StartPos: 6688, + EndPos: 6689, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 363, - EndLine: 363, - StartPos: 6688, - EndPos: 6689, + EndLine: 363, + StartPos: 6688, + EndPos: 6689, }, Value: "a", }, @@ -17656,9 +17571,9 @@ func TestPhp5(t *testing.T) { Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 363, - EndLine: 363, - StartPos: 6693, - EndPos: 6701, + EndLine: 363, + StartPos: 6693, + EndPos: 6701, }, Value: "__CLASS__", }, @@ -17668,31 +17583,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 364, - EndLine: 364, - StartPos: 6706, - EndPos: 6721, + EndLine: 364, + StartPos: 6706, + EndPos: 6721, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 364, - EndLine: 364, - StartPos: 6713, - EndPos: 6720, + EndLine: 364, + StartPos: 6713, + EndPos: 6720, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 364, - EndLine: 364, - StartPos: 6713, - EndPos: 6714, + EndLine: 364, + StartPos: 6713, + EndPos: 6714, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 364, - EndLine: 364, - StartPos: 6713, - EndPos: 6714, + EndLine: 364, + StartPos: 6713, + EndPos: 6714, }, Value: "a", }, @@ -17700,24 +17615,24 @@ func TestPhp5(t *testing.T) { Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 364, - EndLine: 364, - StartPos: 6718, - EndPos: 6720, + EndLine: 364, + StartPos: 6718, + EndPos: 6720, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 364, - EndLine: 364, - StartPos: 6718, - EndPos: 6720, + EndLine: 364, + StartPos: 6718, + EndPos: 6720, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 364, - EndLine: 364, - StartPos: 6718, - EndPos: 6720, + EndLine: 364, + StartPos: 6718, + EndPos: 6720, }, Value: "Foo", }, @@ -17730,31 +17645,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 365, - EndLine: 365, - StartPos: 6725, - EndPos: 6750, + EndLine: 365, + StartPos: 6725, + EndPos: 6750, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 365, - EndLine: 365, - StartPos: 6732, - EndPos: 6749, + EndLine: 365, + StartPos: 6732, + EndPos: 6749, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 365, - EndLine: 365, - StartPos: 6732, - EndPos: 6733, + EndLine: 365, + StartPos: 6732, + EndPos: 6733, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 365, - EndLine: 365, - StartPos: 6732, - EndPos: 6733, + EndLine: 365, + StartPos: 6732, + EndPos: 6733, }, Value: "a", }, @@ -17762,24 +17677,24 @@ func TestPhp5(t *testing.T) { Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 365, - EndLine: 365, - StartPos: 6737, - EndPos: 6749, + EndLine: 365, + StartPos: 6737, + EndPos: 6749, }, Constant: &name.Relative{ Position: &position.Position{ StartLine: 365, - EndLine: 365, - StartPos: 6737, - EndPos: 6749, + EndLine: 365, + StartPos: 6737, + EndPos: 6749, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 365, - EndLine: 365, - StartPos: 6747, - EndPos: 6749, + EndLine: 365, + StartPos: 6747, + EndPos: 6749, }, Value: "Foo", }, @@ -17792,31 +17707,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 366, - EndLine: 366, - StartPos: 6754, - EndPos: 6770, + EndLine: 366, + StartPos: 6754, + EndPos: 6770, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 366, - EndLine: 366, - StartPos: 6761, - EndPos: 6769, + EndLine: 366, + StartPos: 6761, + EndPos: 6769, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 366, - EndLine: 366, - StartPos: 6761, - EndPos: 6762, + EndLine: 366, + StartPos: 6761, + EndPos: 6762, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 366, - EndLine: 366, - StartPos: 6761, - EndPos: 6762, + EndLine: 366, + StartPos: 6761, + EndPos: 6762, }, Value: "a", }, @@ -17824,24 +17739,24 @@ func TestPhp5(t *testing.T) { Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 366, - EndLine: 366, - StartPos: 6766, - EndPos: 6769, + EndLine: 366, + StartPos: 6766, + EndPos: 6769, }, Constant: &name.FullyQualified{ Position: &position.Position{ StartLine: 366, - EndLine: 366, - StartPos: 6766, - EndPos: 6769, + EndLine: 366, + StartPos: 6766, + EndPos: 6769, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 366, - EndLine: 366, - StartPos: 6767, - EndPos: 6769, + EndLine: 366, + StartPos: 6767, + EndPos: 6769, }, Value: "Foo", }, @@ -17854,31 +17769,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 367, - EndLine: 367, - StartPos: 6774, - EndPos: 6793, + EndLine: 367, + StartPos: 6774, + EndPos: 6793, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 367, - EndLine: 367, - StartPos: 6781, - EndPos: 6792, + EndLine: 367, + StartPos: 6781, + EndPos: 6792, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 367, - EndLine: 367, - StartPos: 6781, - EndPos: 6782, + EndLine: 367, + StartPos: 6781, + EndPos: 6782, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 367, - EndLine: 367, - StartPos: 6781, - EndPos: 6782, + EndLine: 367, + StartPos: 6781, + EndPos: 6782, }, Value: "a", }, @@ -17886,9 +17801,9 @@ func TestPhp5(t *testing.T) { Expr: &expr.Array{ Position: &position.Position{ StartLine: 367, - EndLine: 367, - StartPos: 6786, - EndPos: 6792, + EndLine: 367, + StartPos: 6786, + EndPos: 6792, }, }, }, @@ -17897,31 +17812,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6797, - EndPos: 6825, + EndLine: 368, + StartPos: 6797, + EndPos: 6825, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6804, - EndPos: 6824, + EndLine: 368, + StartPos: 6804, + EndPos: 6824, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6804, - EndPos: 6805, + EndLine: 368, + StartPos: 6804, + EndPos: 6805, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6804, - EndPos: 6805, + EndLine: 368, + StartPos: 6804, + EndPos: 6805, }, Value: "a", }, @@ -17929,33 +17844,33 @@ func TestPhp5(t *testing.T) { Expr: &expr.Array{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6809, - EndPos: 6824, + EndLine: 368, + StartPos: 6809, + EndPos: 6824, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6815, - EndPos: 6820, + EndLine: 368, + StartPos: 6815, + EndPos: 6820, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6815, - EndPos: 6815, + EndLine: 368, + StartPos: 6815, + EndPos: 6815, }, Value: "1", }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6820, - EndPos: 6820, + EndLine: 368, + StartPos: 6820, + EndPos: 6820, }, Value: "1", }, @@ -17963,16 +17878,16 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6823, - EndPos: 6823, + EndLine: 368, + StartPos: 6823, + EndPos: 6823, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 368, - EndLine: 368, - StartPos: 6823, - EndPos: 6823, + EndLine: 368, + StartPos: 6823, + EndPos: 6823, }, Value: "2", }, @@ -17985,31 +17900,31 @@ func TestPhp5(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6829, - EndPos: 6855, + EndLine: 369, + StartPos: 6829, + EndPos: 6855, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6836, - EndPos: 6854, + EndLine: 369, + StartPos: 6836, + EndPos: 6854, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6836, - EndPos: 6837, + EndLine: 369, + StartPos: 6836, + EndPos: 6837, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6836, - EndPos: 6837, + EndLine: 369, + StartPos: 6836, + EndPos: 6837, }, Value: "a", }, @@ -18017,31 +17932,31 @@ func TestPhp5(t *testing.T) { Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6841, - EndPos: 6854, + EndLine: 369, + StartPos: 6841, + EndPos: 6854, }, Variable: &expr.ShortArray{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6841, - EndPos: 6851, + EndLine: 369, + StartPos: 6841, + EndPos: 6851, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6842, - EndPos: 6842, + EndLine: 369, + StartPos: 6842, + EndPos: 6842, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6842, - EndPos: 6842, + EndLine: 369, + StartPos: 6842, + EndPos: 6842, }, Value: "1", }, @@ -18049,25 +17964,25 @@ func TestPhp5(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6845, - EndPos: 6850, + EndLine: 369, + StartPos: 6845, + EndPos: 6850, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6845, - EndPos: 6845, + EndLine: 369, + StartPos: 6845, + EndPos: 6845, }, Value: "2", }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6850, - EndPos: 6850, + EndLine: 369, + StartPos: 6850, + EndPos: 6850, }, Value: "2", }, @@ -18077,9 +17992,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 369, - EndLine: 369, - StartPos: 6853, - EndPos: 6853, + EndLine: 369, + StartPos: 6853, + EndPos: 6853, }, Value: "0", }, @@ -18090,23 +18005,23 @@ func TestPhp5(t *testing.T) { &stmt.If{ Position: &position.Position{ StartLine: 371, - EndLine: 371, - StartPos: 6860, - EndPos: 6874, + EndLine: 371, + StartPos: 6860, + EndPos: 6874, }, Cond: &expr.Yield{ Position: &position.Position{ StartLine: 371, - EndLine: 371, - StartPos: 6864, - EndPos: 6870, + EndLine: 371, + StartPos: 6864, + EndPos: 6870, }, Value: &scalar.Lnumber{ Position: &position.Position{ StartLine: 371, - EndLine: 371, - StartPos: 6870, - EndPos: 6870, + EndLine: 371, + StartPos: 6870, + EndPos: 6870, }, Value: "1", }, @@ -18114,42 +18029,41 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 371, - EndLine: 371, - StartPos: 6873, - EndPos: 6874, - }, - Stmts: []node.Node{ + EndLine: 371, + StartPos: 6873, + EndPos: 6874, }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 372, - EndLine: 372, - StartPos: 6878, - EndPos: 6888, + EndLine: 372, + StartPos: 6878, + EndPos: 6888, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 372, - EndLine: 372, - StartPos: 6878, - EndPos: 6887, + EndLine: 372, + StartPos: 6878, + EndPos: 6887, }, Class: &name.Name{ Position: &position.Position{ StartLine: 372, - EndLine: 372, - StartPos: 6878, - EndPos: 6880, + EndLine: 372, + StartPos: 6878, + EndPos: 6880, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 372, - EndLine: 372, - StartPos: 6878, - EndPos: 6880, + EndLine: 372, + StartPos: 6878, + EndPos: 6880, }, Value: "Foo", }, @@ -18158,23 +18072,23 @@ func TestPhp5(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 372, - EndLine: 372, - StartPos: 6883, - EndPos: 6887, + EndLine: 372, + StartPos: 6883, + EndPos: 6887, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 372, - EndLine: 372, - StartPos: 6884, - EndPos: 6887, + EndLine: 372, + StartPos: 6884, + EndPos: 6887, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 372, - EndLine: 372, - StartPos: 6884, - EndPos: 6887, + EndLine: 372, + StartPos: 6884, + EndPos: 6887, }, Value: "bar", }, @@ -18185,30 +18099,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 374, - EndLine: 374, - StartPos: 6893, - EndPos: 6899, + EndLine: 374, + StartPos: 6893, + EndPos: 6899, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 374, - EndLine: 374, - StartPos: 6893, - EndPos: 6898, + EndLine: 374, + StartPos: 6893, + EndPos: 6898, }, Function: &expr.Variable{ Position: &position.Position{ StartLine: 374, - EndLine: 374, - StartPos: 6893, - EndPos: 6896, + EndLine: 374, + StartPos: 6893, + EndPos: 6896, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 374, - EndLine: 374, - StartPos: 6893, - EndPos: 6896, + EndLine: 374, + StartPos: 6893, + EndPos: 6896, }, Value: "foo", }, @@ -18216,9 +18130,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 374, - EndLine: 374, - StartPos: 6897, - EndPos: 6898, + EndLine: 374, + StartPos: 6897, + EndPos: 6898, }, }, }, @@ -18226,44 +18140,44 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6903, - EndPos: 6915, + EndLine: 375, + StartPos: 6903, + EndPos: 6915, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6903, - EndPos: 6914, + EndLine: 375, + StartPos: 6903, + EndPos: 6914, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6903, - EndPos: 6911, + EndLine: 375, + StartPos: 6903, + EndPos: 6911, }, Variable: &expr.FunctionCall{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6903, - EndPos: 6908, + EndLine: 375, + StartPos: 6903, + EndPos: 6908, }, Function: &expr.Variable{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6903, - EndPos: 6906, + EndLine: 375, + StartPos: 6903, + EndPos: 6906, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6903, - EndPos: 6906, + EndLine: 375, + StartPos: 6903, + EndPos: 6906, }, Value: "foo", }, @@ -18271,18 +18185,18 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6907, - EndPos: 6908, + EndLine: 375, + StartPos: 6907, + EndPos: 6908, }, }, }, Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6910, - EndPos: 6910, + EndLine: 375, + StartPos: 6910, + EndPos: 6910, }, Value: "0", }, @@ -18290,9 +18204,9 @@ func TestPhp5(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 375, - EndLine: 375, - StartPos: 6913, - EndPos: 6913, + EndLine: 375, + StartPos: 6913, + EndPos: 6913, }, Value: "0", }, @@ -18301,30 +18215,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 376, - EndLine: 376, - StartPos: 6919, - EndPos: 6925, + EndLine: 376, + StartPos: 6919, + EndPos: 6925, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 376, - EndLine: 376, - StartPos: 6919, - EndPos: 6924, + EndLine: 376, + StartPos: 6919, + EndPos: 6924, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 376, - EndLine: 376, - StartPos: 6919, - EndPos: 6920, + EndLine: 376, + StartPos: 6919, + EndPos: 6920, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 376, - EndLine: 376, - StartPos: 6919, - EndPos: 6920, + EndLine: 376, + StartPos: 6919, + EndPos: 6920, }, Value: "a", }, @@ -18332,16 +18246,16 @@ func TestPhp5(t *testing.T) { Dim: &expr.Variable{ Position: &position.Position{ StartLine: 376, - EndLine: 376, - StartPos: 6922, - EndPos: 6923, + EndLine: 376, + StartPos: 6922, + EndPos: 6923, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 376, - EndLine: 376, - StartPos: 6922, - EndPos: 6923, + EndLine: 376, + StartPos: 6922, + EndPos: 6923, }, Value: "b", }, @@ -18351,30 +18265,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 377, - EndLine: 377, - StartPos: 6929, - EndPos: 6934, + EndLine: 377, + StartPos: 6929, + EndPos: 6934, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 377, - EndLine: 377, - StartPos: 6929, - EndPos: 6933, + EndLine: 377, + StartPos: 6929, + EndPos: 6933, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 377, - EndLine: 377, - StartPos: 6931, - EndPos: 6932, + EndLine: 377, + StartPos: 6931, + EndPos: 6932, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 377, - EndLine: 377, - StartPos: 6931, - EndPos: 6932, + EndLine: 377, + StartPos: 6931, + EndPos: 6932, }, Value: "a", }, @@ -18384,30 +18298,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 378, - EndLine: 378, - StartPos: 6938, - EndPos: 6952, + EndLine: 378, + StartPos: 6938, + EndPos: 6952, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 378, - EndLine: 378, - StartPos: 6938, - EndPos: 6951, + EndLine: 378, + StartPos: 6938, + EndPos: 6951, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 378, - EndLine: 378, - StartPos: 6938, - EndPos: 6941, + EndLine: 378, + StartPos: 6938, + EndPos: 6941, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 378, - EndLine: 378, - StartPos: 6938, - EndPos: 6941, + EndLine: 378, + StartPos: 6938, + EndPos: 6941, }, Value: "foo", }, @@ -18415,16 +18329,16 @@ func TestPhp5(t *testing.T) { Call: &expr.Variable{ Position: &position.Position{ StartLine: 378, - EndLine: 378, - StartPos: 6944, - EndPos: 6949, + EndLine: 378, + StartPos: 6944, + EndPos: 6949, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 378, - EndLine: 378, - StartPos: 6945, - EndPos: 6948, + EndLine: 378, + StartPos: 6945, + EndPos: 6948, }, Value: "bar", }, @@ -18432,9 +18346,9 @@ func TestPhp5(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 378, - EndLine: 378, - StartPos: 6950, - EndPos: 6951, + EndLine: 378, + StartPos: 6950, + EndPos: 6951, }, }, }, @@ -18442,30 +18356,30 @@ func TestPhp5(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 379, - EndLine: 379, - StartPos: 6956, - EndPos: 6965, + EndLine: 379, + StartPos: 6956, + EndPos: 6965, }, Expr: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 379, - EndLine: 379, - StartPos: 6956, - EndPos: 6964, + EndLine: 379, + StartPos: 6956, + EndPos: 6964, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 379, - EndLine: 379, - StartPos: 6956, - EndPos: 6959, + EndLine: 379, + StartPos: 6956, + EndPos: 6959, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 379, - EndLine: 379, - StartPos: 6956, - EndPos: 6959, + EndLine: 379, + StartPos: 6956, + EndPos: 6959, }, Value: "foo", }, @@ -18473,9 +18387,9 @@ func TestPhp5(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 379, - EndLine: 379, - StartPos: 6962, - EndPos: 6964, + EndLine: 379, + StartPos: 6962, + EndPos: 6964, }, Value: "bar", }, @@ -18483,7 +18397,6 @@ func TestPhp5(t *testing.T) { }, }, } - php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php") php5parser.Parse() @@ -18504,27 +18417,27 @@ func TestPhp5Strings(t *testing.T) { '; ` - expected :=&node.Root{ + expected := &node.Root{ Position: &position.Position{ StartLine: 2, - EndLine: 10, - StartPos: 6, - EndPos: 70, + EndLine: 10, + StartPos: 6, + EndPos: 70, }, Stmts: []node.Node{ &stmt.Expression{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 12, + EndLine: 2, + StartPos: 6, + EndPos: 12, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 11, + EndLine: 2, + StartPos: 6, + EndPos: 11, }, Value: "\"test\"", }, @@ -18532,16 +18445,16 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 16, - EndPos: 24, + EndLine: 3, + StartPos: 16, + EndPos: 24, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 16, - EndPos: 23, + EndLine: 3, + StartPos: 16, + EndPos: 23, }, Value: "\"\\$test\"", }, @@ -18549,16 +18462,16 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 28, - EndPos: 41, + EndLine: 6, + StartPos: 28, + EndPos: 41, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 28, - EndPos: 40, + EndLine: 6, + StartPos: 28, + EndPos: 40, }, Value: "\"\n\t\t\ttest\n\t\t\"", }, @@ -18566,16 +18479,16 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 45, - EndPos: 52, + EndLine: 7, + StartPos: 45, + EndPos: 52, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 45, - EndPos: 51, + EndLine: 7, + StartPos: 45, + EndPos: 51, }, Value: "'$test'", }, @@ -18583,23 +18496,22 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 8, - EndLine: 10, - StartPos: 56, - EndPos: 70, + EndLine: 10, + StartPos: 56, + EndPos: 70, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 8, - EndLine: 10, - StartPos: 56, - EndPos: 69, + EndLine: 10, + StartPos: 56, + EndPos: 69, }, Value: "'\n\t\t\t$test\n\t\t'", }, }, }, } - php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php") php5parser.Parse() @@ -18628,24 +18540,24 @@ CAD; expected := &node.Root{ Position: &position.Position{ StartLine: 2, - EndLine: 15, - StartPos: 9, - EndPos: 120, + EndLine: 15, + StartPos: 9, + EndPos: 120, }, Stmts: []node.Node{ &stmt.Expression{ Position: &position.Position{ StartLine: 2, - EndLine: 3, - StartPos: 9, - EndPos: 16, + EndLine: 3, + StartPos: 9, + EndPos: 16, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 2, - EndLine: 3, - StartPos: 9, - EndPos: 15, + EndLine: 3, + StartPos: 9, + EndPos: 15, }, Label: "CAD", }, @@ -18653,25 +18565,25 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 23, - EndPos: 37, + EndLine: 6, + StartPos: 23, + EndPos: 37, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 23, - EndPos: 36, + EndLine: 6, + StartPos: 23, + EndPos: 36, }, Label: "CAD", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 27, - EndPos: 33, + EndLine: 5, + StartPos: 27, + EndPos: 33, }, Value: "\thello\n", }, @@ -18681,25 +18593,25 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 7, - EndLine: 9, - StartPos: 44, - EndPos: 60, + EndLine: 9, + StartPos: 44, + EndPos: 60, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 7, - EndLine: 9, - StartPos: 44, - EndPos: 59, + EndLine: 9, + StartPos: 44, + EndPos: 59, }, Label: "\"CAD\"", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 8, - EndLine: 8, - StartPos: 50, - EndPos: 56, + EndLine: 8, + StartPos: 50, + EndPos: 56, }, Value: "\thello\n", }, @@ -18709,41 +18621,41 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 10, - EndLine: 12, - StartPos: 67, - EndPos: 90, + EndLine: 12, + StartPos: 67, + EndPos: 90, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 10, - EndLine: 12, - StartPos: 67, - EndPos: 89, + EndLine: 12, + StartPos: 67, + EndPos: 89, }, Label: "\"CAD\"", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 73, - EndPos: 79, + EndLine: 11, + StartPos: 73, + EndPos: 79, }, Value: "\thello ", }, &expr.Variable{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 80, - EndPos: 85, + EndLine: 11, + StartPos: 80, + EndPos: 85, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 80, - EndPos: 85, + EndLine: 11, + StartPos: 80, + EndPos: 85, }, Value: "world", }, @@ -18751,9 +18663,9 @@ CAD; &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 86, - EndPos: 86, + EndLine: 11, + StartPos: 86, + EndPos: 86, }, Value: "\n", }, @@ -18763,25 +18675,25 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 13, - EndLine: 15, - StartPos: 97, - EndPos: 120, + EndLine: 15, + StartPos: 97, + EndPos: 120, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 13, - EndLine: 15, - StartPos: 97, - EndPos: 119, + EndLine: 15, + StartPos: 97, + EndPos: 119, }, Label: "'CAD'", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 103, - EndPos: 116, + EndLine: 14, + StartPos: 103, + EndPos: 116, }, Value: "\thello $world\n", }, @@ -18790,7 +18702,6 @@ CAD; }, }, } - php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php") php5parser.Parse() diff --git a/php7/php7.go b/php7/php7.go index 26893c8..dab044a 100644 --- a/php7/php7.go +++ b/php7/php7.go @@ -2608,7 +2608,7 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(namePart, yyDollar[1].token, comment.StringToken) + namePart.AddComments(yyDollar[1].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2623,8 +2623,8 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(namePart, yyDollar[3].token, comment.StringToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + namePart.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2649,8 +2649,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2664,7 +2664,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2727,10 +2727,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.HaltCompilerToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2746,8 +2746,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2763,9 +2763,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2779,9 +2779,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2795,8 +2795,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2810,8 +2810,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2825,8 +2825,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2840,8 +2840,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2855,8 +2855,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2870,7 +2870,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2884,7 +2884,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ConstToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2900,12 +2900,12 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenCurlyBracesToken) if yyDollar[5].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CommaToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2921,13 +2921,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenCurlyBracesToken) if yyDollar[6].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CommaToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2943,12 +2943,12 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenCurlyBracesToken) if yyDollar[5].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CommaToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2964,13 +2964,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenCurlyBracesToken) if yyDollar[6].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CommaToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2993,7 +2993,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3012,7 +3012,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3031,7 +3031,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3086,8 +3086,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[3].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3106,7 +3106,7 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsSeparatorToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3117,7 +3117,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3206,10 +3206,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.HaltCompilerToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3223,8 +3223,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3261,9 +3261,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.WhileToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.WhileToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3277,11 +3277,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DoToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.WhileToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.WhileToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3306,11 +3306,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ForToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.ForInitSemicolonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.ForCondSemicolonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ForToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ForInitSemicolonToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.ForCondSemicolonToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3333,9 +3333,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SwitchToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SwitchToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3349,8 +3349,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.BreakToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BreakToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3364,8 +3364,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ContinueToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ContinueToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3379,8 +3379,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3394,8 +3394,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.GlobalToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.GlobalToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3409,8 +3409,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3424,8 +3424,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EchoToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EchoToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3439,7 +3439,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.InlineHTMLToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.InlineHTMLToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3453,7 +3453,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3467,13 +3467,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UnsetToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UnsetToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) if yyDollar[4].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CommaToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3496,10 +3496,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[7].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ForeachToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.AsToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3524,11 +3524,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ForeachToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.AsToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.DoubleArrowToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3542,9 +3542,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DeclareToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DeclareToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3558,7 +3558,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3575,9 +3575,9 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TryToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TryToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3591,8 +3591,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ThrowToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ThrowToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3608,9 +3608,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.GotoToken) - yylex.(*Parser).comments.AddFromToken(label, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.GotoToken) + label.AddComments(yyDollar[2].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3626,8 +3626,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(label, yyDollar[1].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ColonToken) + label.AddComments(yyDollar[1].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3654,12 +3654,12 @@ yydefault: catch.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[2].token, yyDollar[9].token)) // save comments - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[2].token, comment.CatchToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[3].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[5].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[6].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[7].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(catch, yyDollar[9].token, comment.CloseCurlyBracesToken) + catch.AddComments(yyDollar[2].token.Comments, comment.CatchToken) + catch.AddComments(yyDollar[3].token.Comments, comment.OpenParenthesisToken) + variable.AddComments(yyDollar[5].token.Comments, comment.StringToken) + catch.AddComments(yyDollar[6].token.Comments, comment.CloseParenthesisToken) + catch.AddComments(yyDollar[7].token.Comments, comment.OpenCurlyBracesToken) + catch.AddComments(yyDollar[9].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3678,7 +3678,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.VerticalBarToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3700,9 +3700,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FinallyToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinallyToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3721,7 +3721,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3745,15 +3745,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[11].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, yyDollar[3].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[9].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[11].token, comment.CloseCurlyBracesToken) + name.AddComments(yyDollar[3].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[9].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[11].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3793,10 +3793,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewOptionalListTokensPosition(yyDollar[1].list, yyDollar[2].token, yyDollar[9].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ClassToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[3].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[9].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ClassToken) + name.AddComments(yyDollar[3].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[9].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3812,10 +3812,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ClassToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3845,7 +3845,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AbstractToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3859,7 +3859,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FinalToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3875,10 +3875,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TraitToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TraitToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3894,10 +3894,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.InterfaceToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.InterfaceToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3919,7 +3919,7 @@ yydefault: yyVAL.ClassExtends.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.ClassExtends, yyDollar[1].token, comment.ExtendsToken) + yyVAL.ClassExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3941,7 +3941,7 @@ yydefault: yyVAL.InterfaceExtends.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.InterfaceExtends, yyDollar[1].token, comment.ExtendsToken) + yyVAL.InterfaceExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3963,7 +3963,7 @@ yydefault: yyVAL.ClassImplements.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.ClassImplements, yyDollar[1].token, comment.ImplementsToken) + yyVAL.ClassImplements.AddComments(yyDollar[1].token.Comments, comment.ImplementsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3985,7 +3985,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3999,9 +3999,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ListToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4015,8 +4015,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4043,9 +4043,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EndforToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EndforToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4072,9 +4072,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EndforeachToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EndforeachToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4096,9 +4096,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EnddeclareToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EnddeclareToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4114,8 +4114,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[3].token, comment.CloseCurlyBracesToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4131,9 +4131,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[2].token, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[4].token, comment.CloseCurlyBracesToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + caseList.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4149,9 +4149,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[3].token, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + caseList.AddComments(yyDollar[3].token.Comments, comment.EndswitchToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4168,10 +4168,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[2].token, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, yyDollar[4].token, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.SemiColonToken) + caseList.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + caseList.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + caseList.AddComments(yyDollar[4].token.Comments, comment.EndswitchToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4194,8 +4194,8 @@ yydefault: _case.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) // save comments - yylex.(*Parser).comments.AddFromToken(_case, yyDollar[2].token, comment.CaseToken) - yylex.(*Parser).comments.AddFromToken(_case, yyDollar[4].token, comment.CaseSeparatorToken) + _case.AddComments(yyDollar[2].token.Comments, comment.CaseToken) + _case.AddComments(yyDollar[4].token.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4210,8 +4210,8 @@ yydefault: _default.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[4].list)) // save comments - yylex.(*Parser).comments.AddFromToken(_default, yyDollar[2].token, comment.DefaultToken) - yylex.(*Parser).comments.AddFromToken(_default, yyDollar[3].token, comment.CaseSeparatorToken) + _default.AddComments(yyDollar[2].token.Comments, comment.DefaultToken) + _default.AddComments(yyDollar[3].token.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4250,9 +4250,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EndwhileToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EndwhileToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4266,9 +4266,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IfToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IfToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4284,9 +4284,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[6].node)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[2].token, comment.ElseifToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[3].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[5].token, comment.CloseParenthesisToken) + _elseIf.AddComments(yyDollar[2].token.Comments, comment.ElseifToken) + _elseIf.AddComments(yyDollar[3].token.Comments, comment.OpenParenthesisToken) + _elseIf.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4310,7 +4310,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ElseToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ElseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4326,10 +4326,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[6].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IfToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IfToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4346,10 +4346,10 @@ yydefault: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[7].list)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[2].token, comment.ElseifToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[3].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[5].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, yyDollar[6].token, comment.ColonToken) + _elseIf.AddComments(yyDollar[2].token.Comments, comment.ElseifToken) + _elseIf.AddComments(yyDollar[3].token.Comments, comment.OpenParenthesisToken) + _elseIf.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) + _elseIf.AddComments(yyDollar[6].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4363,8 +4363,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EndifToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EndifToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4382,10 +4382,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(_else, yyDollar[2].token, comment.ElseToken) - yylex.(*Parser).comments.AddFromToken(_else, yyDollar[3].token, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.EndifToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.SemiColonToken) + _else.AddComments(yyDollar[2].token.Comments, comment.ElseToken) + _else.AddComments(yyDollar[3].token.Comments, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.EndifToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4420,7 +4420,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4447,12 +4447,12 @@ yydefault: // save comments if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EllipsisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[4].token, comment.VariableToken) + variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4479,13 +4479,13 @@ yydefault: // save comments if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.EllipsisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[4].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.EqualToken) + variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4523,7 +4523,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.QuestionMarkToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.QuestionMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4537,7 +4537,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ArrayToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4551,7 +4551,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.CallableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4578,7 +4578,7 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4592,8 +4592,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4607,11 +4607,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CommaToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4630,7 +4630,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4655,7 +4655,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EllipsisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4666,7 +4666,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4693,7 +4693,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4719,7 +4719,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4737,8 +4737,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4768,7 +4768,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4782,8 +4782,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewOptionalListTokensPosition(yyDollar[1].list, yyDollar[2].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ConstToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4807,7 +4807,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UseToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4827,13 +4827,13 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, yyDollar[4].token, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseParenthesisToken) + name.AddComments(yyDollar[4].token.Comments, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4852,7 +4852,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4865,7 +4865,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4878,8 +4878,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4892,8 +4892,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4920,7 +4920,7 @@ yydefault: yyVAL.node = yyDollar[1].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4931,7 +4931,7 @@ yydefault: yyVAL.node = yyDollar[1].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4945,7 +4945,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, yyDollar[3].list)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.InsteadofToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4961,8 +4961,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[3].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4978,8 +4978,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[3].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4995,8 +4995,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, yyDollar[4].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + alias.AddComments(yyDollar[4].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5010,7 +5010,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5026,7 +5026,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[1].token, comment.IdentifierToken) + name.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5050,8 +5050,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, yyDollar[3].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5065,7 +5065,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.SemiColonToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5079,8 +5079,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5103,7 +5103,7 @@ yydefault: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(modifier, yyDollar[1].token, comment.VarToken) + modifier.AddComments(yyDollar[1].token.Comments, comment.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5149,7 +5149,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PublicToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5163,7 +5163,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ProtectedToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5177,7 +5177,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PrivateToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5191,7 +5191,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5205,7 +5205,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AbstractToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5219,7 +5219,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FinalToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5230,7 +5230,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5256,7 +5256,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5274,8 +5274,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5286,7 +5286,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5310,8 +5310,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[1].token, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) + name.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5327,8 +5327,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(name, yyDollar[1].token, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) + name.AddComments(yyDollar[1].token.Comments, comment.StringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5339,7 +5339,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5382,7 +5382,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5408,9 +5408,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ClassToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[8].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5427,7 +5427,7 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NewToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5441,7 +5441,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NewToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5457,10 +5457,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) // save comments - yylex.(*Parser).comments.AddFromToken(list, yyDollar[1].token, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[4].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.EqualToken) + list.AddComments(yyDollar[1].token.Comments, comment.ListToken) + list.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + list.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5476,9 +5476,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(shortList, yyDollar[1].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(shortList, yyDollar[3].token, comment.CloseSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.EqualToken) + shortList.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) + shortList.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5492,7 +5492,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5506,8 +5506,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.EqualToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5521,7 +5521,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.CloneToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5535,7 +5535,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PlusEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5549,7 +5549,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.MinusEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5563,7 +5563,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.MulEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5577,7 +5577,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PowEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5591,7 +5591,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DivEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5605,7 +5605,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ConcatEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5619,7 +5619,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ModEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5633,7 +5633,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AndEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5647,7 +5647,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5661,7 +5661,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.XorEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5675,7 +5675,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5689,7 +5689,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5703,7 +5703,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IncToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5717,7 +5717,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IncToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5731,7 +5731,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DecToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5745,7 +5745,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DecToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5759,7 +5759,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.BooleanOrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5773,7 +5773,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.BooleanAndToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5787,7 +5787,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalOrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5801,7 +5801,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalAndToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5815,7 +5815,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LogicalXorToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5829,7 +5829,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.VerticalBarToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5843,7 +5843,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5857,7 +5857,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CaretToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5871,7 +5871,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DotToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5885,7 +5885,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PlusToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5899,7 +5899,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.MinusToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5913,7 +5913,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AsteriskToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5927,7 +5927,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PowToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5941,7 +5941,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlashToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5955,7 +5955,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PercentToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5969,7 +5969,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SlToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5983,7 +5983,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SrToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5997,7 +5997,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PlusToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6011,7 +6011,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.MinusToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6025,7 +6025,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ExclamationMarkToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6039,7 +6039,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TildeToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6053,7 +6053,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsIdenticalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6067,7 +6067,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsNotIdenticalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6081,7 +6081,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6095,7 +6095,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsNotEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6109,7 +6109,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.LessToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6123,7 +6123,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsSmallerOrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6137,7 +6137,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.GreaterToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6151,7 +6151,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.IsGreaterOrEqualToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6165,7 +6165,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.SpaceshipToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SpaceshipToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6179,7 +6179,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.InstanceofToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6190,8 +6190,8 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6213,8 +6213,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6228,8 +6228,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.ColonToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6243,7 +6243,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.CoalesceToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CoalesceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6265,7 +6265,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IntCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6279,7 +6279,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DoubleCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6293,7 +6293,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StringCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6307,7 +6307,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ArrayCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6321,7 +6321,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ObjectCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6335,7 +6335,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.BoolCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6349,7 +6349,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.UnsetCastToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6377,7 +6377,7 @@ yydefault: } // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ExitToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExitToken) if yyDollar[2].node != nil { yylex.(*Parser).comments.AddFromChildNode(yyVAL.node, yyDollar[2].node) @@ -6395,7 +6395,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AtToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6417,8 +6417,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.BackquoteToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.BackquoteToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BackquoteToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6432,7 +6432,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.PrintToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6446,7 +6446,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6460,7 +6460,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6474,8 +6474,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.DoubleArrowToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6489,7 +6489,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.YieldFromToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldFromToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6503,14 +6503,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[11].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) if yyDollar[2].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[9].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[11].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[9].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[11].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6524,15 +6524,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[12].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.FunctionToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) if yyDollar[3].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[7].token, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[10].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[12].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[10].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[12].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6575,9 +6575,9 @@ yydefault: yyVAL.ClosureUse.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.ClosureUse, yyDollar[1].token, comment.UseToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.ClosureUse, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.ClosureUse, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.ClosureUse.AddComments(yyDollar[1].token.Comments, comment.UseToken) + yyVAL.ClosureUse.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.ClosureUse.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6588,7 +6588,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6612,7 +6612,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6630,8 +6630,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.AmpersandToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[2].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) + variable.AddComments(yyDollar[2].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6656,7 +6656,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6670,7 +6670,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6695,7 +6695,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StaticToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6741,8 +6741,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6796,9 +6796,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ArrayToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6812,8 +6812,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6827,7 +6827,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ConstantEncapsedStringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6841,7 +6841,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.LnumberToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6855,7 +6855,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DnumberToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6869,7 +6869,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.LineToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6883,7 +6883,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FileToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6897,7 +6897,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DirToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6911,7 +6911,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.TraitCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6925,7 +6925,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.MethodCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6939,7 +6939,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.FuncCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6953,7 +6953,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NsCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6967,7 +6967,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ClassCToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6983,7 +6983,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StartHeredocToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6997,7 +6997,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StartHeredocToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7011,7 +7011,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DoubleQuoteToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7025,7 +7025,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StartHeredocToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7068,8 +7068,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, yyDollar[3].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7085,8 +7085,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, yyDollar[3].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7145,8 +7145,8 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7173,8 +7173,8 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7204,8 +7204,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7219,8 +7219,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7234,8 +7234,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7249,7 +7249,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ObjectOperatorToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7287,7 +7287,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ObjectOperatorToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7303,7 +7303,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7317,9 +7317,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7333,7 +7333,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7347,7 +7347,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7361,7 +7361,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7383,8 +7383,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7398,8 +7398,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7413,7 +7413,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ObjectOperatorToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7427,7 +7427,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7441,7 +7441,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.PaamayimNekudotayimToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7455,7 +7455,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IdentifierToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7466,8 +7466,8 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7489,7 +7489,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7500,8 +7500,8 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7548,7 +7548,9 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + if yyDollar[3].node != nil { + yyDollar[3].node.AddComments(yyDollar[2].token.Comments, comment.CommaToken) + } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7570,7 +7572,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DoubleArrowToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7597,8 +7599,8 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[4].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[3].token, comment.AmpersandToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) + reference.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7614,7 +7616,7 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(reference, yyDollar[1].token, comment.AmpersandToken) + reference.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7631,10 +7633,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[3].token, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[4].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[6].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) + list.AddComments(yyDollar[3].token.Comments, comment.ListToken) + list.AddComments(yyDollar[4].token.Comments, comment.OpenParenthesisToken) + list.AddComments(yyDollar[6].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7651,9 +7653,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(list, yyDollar[1].token, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, yyDollar[4].token, comment.CloseParenthesisToken) + list.AddComments(yyDollar[1].token.Comments, comment.ListToken) + list.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + list.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7676,7 +7678,7 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, yyDollar[2].token, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments(yyDollar[2].token.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7699,7 +7701,7 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, yyDollar[1].token, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments(yyDollar[1].token.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7715,7 +7717,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7733,9 +7735,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseSquareBracket) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7755,9 +7757,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[1].token, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.ObjectOperatorToken) - yylex.(*Parser).comments.AddFromToken(fetch, yyDollar[3].token, comment.StringToken) + variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) + fetch.AddComments(yyDollar[3].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7771,8 +7773,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7788,9 +7790,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(name, yyDollar[2].token, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) + name.AddComments(yyDollar[2].token.Comments, comment.StringVarnameToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7808,11 +7810,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(variable, yyDollar[2].token, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[3].token, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseSquareBracket) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.CloseCurlyBracesToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) + variable.AddComments(yyDollar[2].token.Comments, comment.StringVarnameToken) + yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenSquareBracket) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseSquareBracket) + yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7834,7 +7836,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.StringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7853,7 +7855,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.NumStringToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7881,11 +7883,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.MinusToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) if isInt { - yylex.(*Parser).comments.AddFromToken(lnumber, yyDollar[2].token, comment.NumStringToken) + lnumber.AddComments(yyDollar[2].token.Comments, comment.NumStringToken) } else { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.NumStringToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NumStringToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -7902,7 +7904,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.VariableToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7916,12 +7918,12 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IssetToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IssetToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) if yyDollar[4].token != nil { - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CommaToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[5].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7935,9 +7937,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EmptyToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EmptyToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7951,7 +7953,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IncludeToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7965,7 +7967,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.IncludeOnceToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7979,9 +7981,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.EvalToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.CloseParenthesisToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EvalToken) + yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7995,7 +7997,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.RequireToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -8009,7 +8011,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.RequireOnceToken) + yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -8028,7 +8030,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode(yyDollar[1].list), yyDollar[2].token, comment.CommaToken) + lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/php7/php7.y b/php7/php7.y index eee2747..cfd20c1 100644 --- a/php7/php7.y +++ b/php7/php7.y @@ -363,7 +363,7 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(namePart, $1, comment.StringToken) + namePart.AddComments($1.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -376,8 +376,8 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken(namePart, $3, comment.StringToken) + lastNode($1).AddComments($2.Comments, comment.NsSeparatorToken) + namePart.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -401,8 +401,8 @@ name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($2.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -414,7 +414,7 @@ name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -466,10 +466,10 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.HaltCompilerToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -483,8 +483,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -498,9 +498,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($5.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -512,9 +512,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NamespaceToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.NamespaceToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -526,8 +526,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UseToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -539,8 +539,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UseToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -552,8 +552,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UseToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -565,8 +565,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.UseToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -578,8 +578,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ConstToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -594,7 +594,7 @@ use_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FunctionToken) + $$.AddComments($1.Comments, comment.FunctionToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -606,7 +606,7 @@ use_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ConstToken) + $$.AddComments($1.Comments, comment.ConstToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -623,12 +623,12 @@ group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.OpenCurlyBracesToken) + $$.AddComments($2.Comments, comment.NsSeparatorToken) + $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) if $5 != nil { - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CommaToken) + $$.AddComments($5.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseCurlyBracesToken) + $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -642,13 +642,13 @@ group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenCurlyBracesToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) + $$.AddComments($3.Comments, comment.NsSeparatorToken) + $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) if $6 != nil { - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CommaToken) + $$.AddComments($6.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseCurlyBracesToken) + $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -665,12 +665,12 @@ mixed_group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.OpenCurlyBracesToken) + $$.AddComments($2.Comments, comment.NsSeparatorToken) + $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) if $5 != nil { - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CommaToken) + $$.AddComments($5.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseCurlyBracesToken) + $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -684,13 +684,13 @@ mixed_group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.NsSeparatorToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenCurlyBracesToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) + $$.AddComments($3.Comments, comment.NsSeparatorToken) + $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) if $6 != nil { - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CommaToken) + $$.AddComments($6.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseCurlyBracesToken) + $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -713,7 +713,7 @@ inline_use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -731,7 +731,7 @@ unprefixed_use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -749,7 +749,7 @@ use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -800,8 +800,8 @@ unprefixed_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $3, comment.StringToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -819,7 +819,7 @@ use_declaration: $$ = $2; // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsSeparatorToken) + $$.AddComments($1.Comments, comment.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -831,7 +831,7 @@ const_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -906,10 +906,10 @@ inner_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.HaltCompilerToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.HaltCompilerToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -923,8 +923,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -955,9 +955,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.WhileToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.WhileToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -969,11 +969,11 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DoToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.WhileToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.DoToken) + $$.AddComments($3.Comments, comment.WhileToken) + $$.AddComments($4.Comments, comment.OpenParenthesisToken) + $$.AddComments($6.Comments, comment.CloseParenthesisToken) + $$.AddComments($7.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -996,11 +996,11 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $9)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ForToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.ForInitSemicolonToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.ForCondSemicolonToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ForToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.ForInitSemicolonToken) + $$.AddComments($6.Comments, comment.ForCondSemicolonToken) + $$.AddComments($8.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1021,9 +1021,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SwitchToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.SwitchToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1035,8 +1035,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.BreakToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.BreakToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1048,8 +1048,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ContinueToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ContinueToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1061,8 +1061,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ReturnToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ReturnToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1074,8 +1074,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.GlobalToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.GlobalToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1087,8 +1087,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.StaticToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1100,8 +1100,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EchoToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.EchoToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1113,7 +1113,7 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.InlineHTMLToken) + $$.AddComments($1.Comments, comment.InlineHTMLToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1125,7 +1125,7 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1137,13 +1137,13 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UnsetToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) + $$.AddComments($1.Comments, comment.UnsetToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) if $4 != nil { - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CommaToken) + $$.AddComments($4.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.SemiColonToken) + $$.AddComments($5.Comments, comment.CloseParenthesisToken) + $$.AddComments($6.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1164,10 +1164,10 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $7)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.AsToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ForeachToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.AsToken) + $$.AddComments($6.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1190,11 +1190,11 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $9)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ForeachToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.AsToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ForeachToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.AsToken) + $$.AddComments($6.Comments, comment.DoubleArrowToken) + $$.AddComments($8.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1206,9 +1206,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DeclareToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.DeclareToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1220,7 +1220,7 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1235,9 +1235,9 @@ statement: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TryToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.TryToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1249,8 +1249,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ThrowToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ThrowToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1264,9 +1264,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.GotoToken) - yylex.(*Parser).comments.AddFromToken(label, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.GotoToken) + label.AddComments($2.Comments, comment.StringToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1280,8 +1280,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken(label, $1, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ColonToken) + label.AddComments($1.Comments, comment.StringToken) + $$.AddComments($2.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1306,12 +1306,12 @@ catch_list: catch.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($2, $9)) // save comments - yylex.(*Parser).comments.AddFromToken(catch, $2, comment.CatchToken) - yylex.(*Parser).comments.AddFromToken(catch, $3, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(variable, $5, comment.StringToken) - yylex.(*Parser).comments.AddFromToken(catch, $6, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(catch, $7, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(catch, $9, comment.CloseCurlyBracesToken) + catch.AddComments($2.Comments, comment.CatchToken) + catch.AddComments($3.Comments, comment.OpenParenthesisToken) + variable.AddComments($5.Comments, comment.StringToken) + catch.AddComments($6.Comments, comment.CloseParenthesisToken) + catch.AddComments($7.Comments, comment.OpenCurlyBracesToken) + catch.AddComments($9.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1328,7 +1328,7 @@ catch_name_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.VerticalBarToken) + lastNode($1).AddComments($2.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1349,9 +1349,9 @@ finally_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FinallyToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.FinallyToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1369,7 +1369,7 @@ unset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1396,15 +1396,15 @@ function_declaration_statement: // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FunctionToken) + $$.AddComments($1.Comments, comment.FunctionToken) if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, $3, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $9, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $11, comment.CloseCurlyBracesToken) + name.AddComments($3.Comments, comment.StringToken) + $$.AddComments($5.Comments, comment.OpenParenthesisToken) + $$.AddComments($7.Comments, comment.CloseParenthesisToken) + $$.AddComments($9.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($11.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1443,10 +1443,10 @@ class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewOptionalListTokensPosition($1, $2, $9)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ClassToken) - yylex.(*Parser).comments.AddFromToken(name, $3, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $9, comment.CloseCurlyBracesToken) + $$.AddComments($2.Comments, comment.ClassToken) + name.AddComments($3.Comments, comment.StringToken) + $$.AddComments($7.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($9.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1460,10 +1460,10 @@ class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ClassToken) - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.ClassToken) + name.AddComments($2.Comments, comment.StringToken) + $$.AddComments($6.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($8.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1493,7 +1493,7 @@ class_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AbstractToken) + $$.AddComments($1.Comments, comment.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1505,7 +1505,7 @@ class_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FinalToken) + $$.AddComments($1.Comments, comment.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1522,10 +1522,10 @@ trait_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TraitToken) - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.TraitToken) + name.AddComments($2.Comments, comment.StringToken) + $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1542,10 +1542,10 @@ interface_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.InterfaceToken) - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.InterfaceToken) + name.AddComments($2.Comments, comment.StringToken) + $$.AddComments($5.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1566,7 +1566,7 @@ extends_from: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExtendsToken) + $$.AddComments($1.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1587,7 +1587,7 @@ interface_extends_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExtendsToken) + $$.AddComments($1.Comments, comment.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1608,7 +1608,7 @@ implements_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ImplementsToken) + $$.AddComments($1.Comments, comment.ImplementsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1629,7 +1629,7 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AmpersandToken) + $$.AddComments($1.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1641,9 +1641,9 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ListToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ListToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1655,8 +1655,8 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseSquareBracket) + $$.AddComments($1.Comments, comment.OpenSquareBracket) + $$.AddComments($3.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1682,9 +1682,9 @@ for_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EndforToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EndforToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1710,9 +1710,9 @@ foreach_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EndforeachToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EndforeachToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1733,9 +1733,9 @@ declare_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EnddeclareToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EnddeclareToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1752,8 +1752,8 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, $3, comment.CloseCurlyBracesToken) + caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1767,9 +1767,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(caseList, $2, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $4, comment.CloseCurlyBracesToken) + caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) + caseList.AddComments($2.Comments, comment.SemiColonToken) + caseList.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1783,9 +1783,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $3, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + caseList.AddComments($1.Comments, comment.ColonToken) + caseList.AddComments($3.Comments, comment.EndswitchToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1800,10 +1800,10 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(caseList, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $2, comment.SemiColonToken) - yylex.(*Parser).comments.AddFromToken(caseList, $4, comment.EndswitchToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.SemiColonToken) + caseList.AddComments($1.Comments, comment.ColonToken) + caseList.AddComments($2.Comments, comment.SemiColonToken) + caseList.AddComments($4.Comments, comment.EndswitchToken) + $$.AddComments($5.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1825,8 +1825,8 @@ case_list: _case.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(_case, $2, comment.CaseToken) - yylex.(*Parser).comments.AddFromToken(_case, $4, comment.CaseSeparatorToken) + _case.AddComments($2.Comments, comment.CaseToken) + _case.AddComments($4.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1839,8 +1839,8 @@ case_list: _default.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(_default, $2, comment.DefaultToken) - yylex.(*Parser).comments.AddFromToken(_default, $3, comment.CaseSeparatorToken) + _default.AddComments($2.Comments, comment.DefaultToken) + _default.AddComments($3.Comments, comment.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1877,9 +1877,9 @@ while_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EndwhileToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.ColonToken) + $$.AddComments($3.Comments, comment.EndwhileToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1894,9 +1894,9 @@ if_stmt_without_else: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IfToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.IfToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1910,9 +1910,9 @@ if_stmt_without_else: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, $2, comment.ElseifToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, $3, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, $5, comment.CloseParenthesisToken) + _elseIf.AddComments($2.Comments, comment.ElseifToken) + _elseIf.AddComments($3.Comments, comment.OpenParenthesisToken) + _elseIf.AddComments($5.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1935,7 +1935,7 @@ if_stmt: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ElseToken) + $$.AddComments($2.Comments, comment.ElseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1952,10 +1952,10 @@ alt_if_stmt_without_else: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IfToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.ColonToken) + $$.AddComments($1.Comments, comment.IfToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) + $$.AddComments($5.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1970,10 +1970,10 @@ alt_if_stmt_without_else: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $7)) // save comments - yylex.(*Parser).comments.AddFromToken(_elseIf, $2, comment.ElseifToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, $3, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, $5, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken(_elseIf, $6, comment.ColonToken) + _elseIf.AddComments($2.Comments, comment.ElseifToken) + _elseIf.AddComments($3.Comments, comment.OpenParenthesisToken) + _elseIf.AddComments($5.Comments, comment.CloseParenthesisToken) + _elseIf.AddComments($6.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1988,8 +1988,8 @@ alt_if_stmt: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EndifToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.EndifToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2005,10 +2005,10 @@ alt_if_stmt: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken(_else, $2, comment.ElseToken) - yylex.(*Parser).comments.AddFromToken(_else, $3, comment.ColonToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.EndifToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.SemiColonToken) + _else.AddComments($2.Comments, comment.ElseToken) + _else.AddComments($3.Comments, comment.ColonToken) + $$.AddComments($5.Comments, comment.EndifToken) + $$.AddComments($6.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2041,7 +2041,7 @@ non_empty_parameter_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2069,12 +2069,12 @@ parameter: // save comments if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EllipsisToken) + $$.AddComments($3.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, $4, comment.VariableToken) + variable.AddComments($4.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2099,13 +2099,13 @@ parameter: // save comments if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.EllipsisToken) + $$.AddComments($3.Comments, comment.EllipsisToken) } - yylex.(*Parser).comments.AddFromToken(variable, $4, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.EqualToken) + variable.AddComments($4.Comments, comment.VariableToken) + $$.AddComments($5.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2141,7 +2141,7 @@ type_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.QuestionMarkToken) + $$.AddComments($1.Comments, comment.QuestionMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2156,7 +2156,7 @@ type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ArrayToken) + $$.AddComments($1.Comments, comment.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2168,7 +2168,7 @@ type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.CallableToken) + $$.AddComments($1.Comments, comment.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2192,7 +2192,7 @@ return_type: $$ = $2; // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ColonToken) + $$.AddComments($1.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2207,8 +2207,8 @@ argument_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($2.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2220,11 +2220,11 @@ argument_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CommaToken) + $$.AddComments($3.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2242,7 +2242,7 @@ non_empty_argument_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2266,7 +2266,7 @@ argument: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EllipsisToken) + $$.AddComments($1.Comments, comment.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2278,7 +2278,7 @@ global_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2305,7 +2305,7 @@ static_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2330,7 +2330,7 @@ static_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) + variable.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2346,8 +2346,8 @@ static_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) + variable.AddComments($1.Comments, comment.VariableToken) + $$.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2377,7 +2377,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $3, comment.SemiColonToken) + $$.AddComments($3.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2389,8 +2389,8 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewOptionalListTokensPosition($1, $2, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ConstToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.ConstToken) + $$.AddComments($4.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2412,7 +2412,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) + $$.AddComments($1.Comments, comment.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2430,13 +2430,13 @@ class_statement: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.FunctionToken) + $$.AddComments($2.Comments, comment.FunctionToken) if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AmpersandToken) + $$.AddComments($3.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken(name, $4, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseParenthesisToken) + name.AddComments($4.Comments, comment.IdentifierToken) + $$.AddComments($6.Comments, comment.OpenParenthesisToken) + $$.AddComments($8.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2454,7 +2454,7 @@ name_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2468,7 +2468,7 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2480,8 +2480,8 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($2.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2492,8 +2492,8 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2520,7 +2520,7 @@ trait_adaptation: $$ = $1; // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2529,7 +2529,7 @@ trait_adaptation: $$ = $1; // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SemiColonToken) + $$.AddComments($2.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2544,7 +2544,7 @@ trait_precedence: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.InsteadofToken) + $$.AddComments($2.Comments, comment.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2561,8 +2561,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $3, comment.StringToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2576,8 +2576,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $3, comment.StringToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2591,8 +2591,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) - yylex.(*Parser).comments.AddFromToken(alias, $4, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.AsToken) + alias.AddComments($4.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2604,7 +2604,7 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsToken) + $$.AddComments($2.Comments, comment.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2621,7 +2621,7 @@ trait_method_reference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $1, comment.IdentifierToken) + name.AddComments($1.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2644,8 +2644,8 @@ absolute_trait_method_reference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, $3, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + target.AddComments($3.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2660,7 +2660,7 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.SemiColonToken) + $$.AddComments($1.Comments, comment.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2672,8 +2672,8 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2695,7 +2695,7 @@ variable_modifiers: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(modifier, $1, comment.VarToken) + modifier.AddComments($1.Comments, comment.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2740,7 +2740,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PublicToken) + $$.AddComments($1.Comments, comment.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2752,7 +2752,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ProtectedToken) + $$.AddComments($1.Comments, comment.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2764,7 +2764,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PrivateToken) + $$.AddComments($1.Comments, comment.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2776,7 +2776,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) + $$.AddComments($1.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2788,7 +2788,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AbstractToken) + $$.AddComments($1.Comments, comment.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2800,7 +2800,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FinalToken) + $$.AddComments($1.Comments, comment.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2812,7 +2812,7 @@ property_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2837,7 +2837,7 @@ property: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) + variable.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2853,8 +2853,8 @@ property: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) + variable.AddComments($1.Comments, comment.VariableToken) + $$.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2866,7 +2866,7 @@ class_const_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2889,8 +2889,8 @@ class_const_decl: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $1, comment.IdentifierToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) + name.AddComments($1.Comments, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2907,8 +2907,8 @@ const_decl: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(name, $1, comment.StringToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) + name.AddComments($1.Comments, comment.StringToken) + $$.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2920,7 +2920,7 @@ echo_expr_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2962,7 +2962,7 @@ non_empty_for_exprs: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2987,9 +2987,9 @@ anonymous_class: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ClassToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.ClassToken) + $$.AddComments($6.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($8.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3007,7 +3007,7 @@ new_expr: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NewToken) + $$.AddComments($1.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3019,7 +3019,7 @@ new_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NewToken) + $$.AddComments($1.Comments, comment.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3036,10 +3036,10 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken(list, $1, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, $4, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.EqualToken) + list.AddComments($1.Comments, comment.ListToken) + list.AddComments($2.Comments, comment.OpenParenthesisToken) + list.AddComments($4.Comments, comment.CloseParenthesisToken) + $$.AddComments($5.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3053,9 +3053,9 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken(shortList, $1, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken(shortList, $3, comment.CloseSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.EqualToken) + shortList.AddComments($1.Comments, comment.OpenSquareBracket) + shortList.AddComments($3.Comments, comment.CloseSquareBracket) + $$.AddComments($4.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3067,7 +3067,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) + $$.AddComments($2.Comments, comment.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3079,8 +3079,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.EqualToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.EqualToken) + $$.AddComments($3.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3092,7 +3092,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.CloneToken) + $$.AddComments($1.Comments, comment.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3104,7 +3104,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PlusEqualToken) + $$.AddComments($2.Comments, comment.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3116,7 +3116,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.MinusEqualToken) + $$.AddComments($2.Comments, comment.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3128,7 +3128,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.MulEqualToken) + $$.AddComments($2.Comments, comment.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3140,7 +3140,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PowEqualToken) + $$.AddComments($2.Comments, comment.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3152,7 +3152,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DivEqualToken) + $$.AddComments($2.Comments, comment.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3164,7 +3164,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ConcatEqualToken) + $$.AddComments($2.Comments, comment.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3176,7 +3176,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ModEqualToken) + $$.AddComments($2.Comments, comment.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3188,7 +3188,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AndEqualToken) + $$.AddComments($2.Comments, comment.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3200,7 +3200,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OrEqualToken) + $$.AddComments($2.Comments, comment.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3212,7 +3212,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.XorEqualToken) + $$.AddComments($2.Comments, comment.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3224,7 +3224,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlEqualToken) + $$.AddComments($2.Comments, comment.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3236,7 +3236,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SrEqualToken) + $$.AddComments($2.Comments, comment.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3248,7 +3248,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IncToken) + $$.AddComments($2.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3260,7 +3260,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IncToken) + $$.AddComments($1.Comments, comment.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3272,7 +3272,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DecToken) + $$.AddComments($2.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3284,7 +3284,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DecToken) + $$.AddComments($1.Comments, comment.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3296,7 +3296,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.BooleanOrToken) + $$.AddComments($2.Comments, comment.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3308,7 +3308,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.BooleanAndToken) + $$.AddComments($2.Comments, comment.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3320,7 +3320,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalOrToken) + $$.AddComments($2.Comments, comment.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3332,7 +3332,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalAndToken) + $$.AddComments($2.Comments, comment.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3344,7 +3344,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LogicalXorToken) + $$.AddComments($2.Comments, comment.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3356,7 +3356,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.VerticalBarToken) + $$.AddComments($2.Comments, comment.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3368,7 +3368,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3380,7 +3380,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CaretToken) + $$.AddComments($2.Comments, comment.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3392,7 +3392,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DotToken) + $$.AddComments($2.Comments, comment.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3404,7 +3404,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PlusToken) + $$.AddComments($2.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3416,7 +3416,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.MinusToken) + $$.AddComments($2.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3428,7 +3428,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AsteriskToken) + $$.AddComments($2.Comments, comment.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3440,7 +3440,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PowToken) + $$.AddComments($2.Comments, comment.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3452,7 +3452,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlashToken) + $$.AddComments($2.Comments, comment.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3464,7 +3464,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PercentToken) + $$.AddComments($2.Comments, comment.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3476,7 +3476,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SlToken) + $$.AddComments($2.Comments, comment.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3488,7 +3488,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SrToken) + $$.AddComments($2.Comments, comment.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3500,7 +3500,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PlusToken) + $$.AddComments($1.Comments, comment.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3512,7 +3512,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.MinusToken) + $$.AddComments($1.Comments, comment.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3524,7 +3524,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExclamationMarkToken) + $$.AddComments($1.Comments, comment.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3536,7 +3536,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TildeToken) + $$.AddComments($1.Comments, comment.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3548,7 +3548,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsIdenticalToken) + $$.AddComments($2.Comments, comment.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3560,7 +3560,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsNotIdenticalToken) + $$.AddComments($2.Comments, comment.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3572,7 +3572,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsEqualToken) + $$.AddComments($2.Comments, comment.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3584,7 +3584,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsNotEqualToken) + $$.AddComments($2.Comments, comment.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3596,7 +3596,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.LessToken) + $$.AddComments($2.Comments, comment.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3608,7 +3608,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsSmallerOrEqualToken) + $$.AddComments($2.Comments, comment.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3620,7 +3620,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.GreaterToken) + $$.AddComments($2.Comments, comment.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3632,7 +3632,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.IsGreaterOrEqualToken) + $$.AddComments($2.Comments, comment.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3644,7 +3644,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.SpaceshipToken) + $$.AddComments($2.Comments, comment.SpaceshipToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3656,7 +3656,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.InstanceofToken) + $$.AddComments($2.Comments, comment.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3665,8 +3665,8 @@ expr_without_variable: $$ = $2; // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3684,8 +3684,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.ColonToken) + $$.AddComments($2.Comments, comment.QuestionMarkToken) + $$.AddComments($4.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3697,8 +3697,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.QuestionMarkToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.ColonToken) + $$.AddComments($2.Comments, comment.QuestionMarkToken) + $$.AddComments($3.Comments, comment.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3710,7 +3710,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.CoalesceToken) + $$.AddComments($2.Comments, comment.CoalesceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3728,7 +3728,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IntCastToken) + $$.AddComments($1.Comments, comment.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3740,7 +3740,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DoubleCastToken) + $$.AddComments($1.Comments, comment.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3752,7 +3752,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StringCastToken) + $$.AddComments($1.Comments, comment.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3764,7 +3764,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ArrayCastToken) + $$.AddComments($1.Comments, comment.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3776,7 +3776,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ObjectCastToken) + $$.AddComments($1.Comments, comment.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3788,7 +3788,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.BoolCastToken) + $$.AddComments($1.Comments, comment.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3800,7 +3800,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UnsetCastToken) + $$.AddComments($1.Comments, comment.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3826,7 +3826,7 @@ expr_without_variable: } // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ExitToken) + $$.AddComments($1.Comments, comment.ExitToken) if $2 != nil { yylex.(*Parser).comments.AddFromChildNode($$, $2) @@ -3842,7 +3842,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AtToken) + $$.AddComments($1.Comments, comment.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3860,8 +3860,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.BackquoteToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.BackquoteToken) + $$.AddComments($1.Comments, comment.BackquoteToken) + $$.AddComments($3.Comments, comment.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3873,7 +3873,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.PrintToken) + $$.AddComments($1.Comments, comment.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3885,7 +3885,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) + $$.AddComments($1.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3897,7 +3897,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) + $$.AddComments($1.Comments, comment.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3909,8 +3909,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.DoubleArrowToken) + $$.AddComments($1.Comments, comment.YieldToken) + $$.AddComments($3.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3922,7 +3922,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.YieldFromToken) + $$.AddComments($1.Comments, comment.YieldFromToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3934,14 +3934,14 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $11)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FunctionToken) + $$.AddComments($1.Comments, comment.FunctionToken) if $2 != nil { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken($$, $4, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $9, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $11, comment.CloseCurlyBracesToken) + $$.AddComments($4.Comments, comment.OpenParenthesisToken) + $$.AddComments($6.Comments, comment.CloseParenthesisToken) + $$.AddComments($9.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($11.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3953,15 +3953,15 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $12)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.FunctionToken) + $$.AddComments($1.Comments, comment.StaticToken) + $$.AddComments($2.Comments, comment.FunctionToken) if $3 != nil { - yylex.(*Parser).comments.AddFromToken($$, $3, comment.AmpersandToken) + $$.AddComments($3.Comments, comment.AmpersandToken) } - yylex.(*Parser).comments.AddFromToken($$, $5, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $7, comment.CloseParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $10, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $12, comment.CloseCurlyBracesToken) + $$.AddComments($5.Comments, comment.OpenParenthesisToken) + $$.AddComments($7.Comments, comment.CloseParenthesisToken) + $$.AddComments($10.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($12.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4003,9 +4003,9 @@ lexical_vars: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.UseToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.UseToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4017,7 +4017,7 @@ lexical_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4040,7 +4040,7 @@ lexical_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4056,8 +4056,8 @@ lexical_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.AmpersandToken) - yylex.(*Parser).comments.AddFromToken(variable, $2, comment.VariableToken) + $$.AddComments($1.Comments, comment.AmpersandToken) + variable.AddComments($2.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4081,7 +4081,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4093,7 +4093,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4117,7 +4117,7 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StaticToken) + $$.AddComments($1.Comments, comment.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4159,8 +4159,8 @@ exit_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4211,9 +4211,9 @@ dereferencable_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ArrayToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.ArrayToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4225,8 +4225,8 @@ dereferencable_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseSquareBracket) + $$.AddComments($1.Comments, comment.OpenSquareBracket) + $$.AddComments($3.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4238,7 +4238,7 @@ dereferencable_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ConstantEncapsedStringToken) + $$.AddComments($1.Comments, comment.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4253,7 +4253,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.LnumberToken) + $$.AddComments($1.Comments, comment.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4265,7 +4265,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DnumberToken) + $$.AddComments($1.Comments, comment.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4277,7 +4277,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.LineToken) + $$.AddComments($1.Comments, comment.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4289,7 +4289,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FileToken) + $$.AddComments($1.Comments, comment.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4301,7 +4301,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DirToken) + $$.AddComments($1.Comments, comment.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4313,7 +4313,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.TraitCToken) + $$.AddComments($1.Comments, comment.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4325,7 +4325,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.MethodCToken) + $$.AddComments($1.Comments, comment.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4337,7 +4337,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.FuncCToken) + $$.AddComments($1.Comments, comment.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4349,7 +4349,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NsCToken) + $$.AddComments($1.Comments, comment.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4361,7 +4361,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.ClassCToken) + $$.AddComments($1.Comments, comment.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4375,7 +4375,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StartHeredocToken) + $$.AddComments($1.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4387,7 +4387,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StartHeredocToken) + $$.AddComments($1.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4399,7 +4399,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DoubleQuoteToken) + $$.AddComments($1.Comments, comment.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4411,7 +4411,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StartHeredocToken) + $$.AddComments($1.Comments, comment.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4449,8 +4449,8 @@ constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, $3, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + target.AddComments($3.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4464,8 +4464,8 @@ constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) - yylex.(*Parser).comments.AddFromToken(target, $3, comment.IdentifierToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + target.AddComments($3.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4522,8 +4522,8 @@ dereferencable: $$ = $2; // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4547,8 +4547,8 @@ callable_expr: $$ = $2; // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.OpenParenthesisToken) + $$.AddComments($3.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4575,8 +4575,8 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4588,8 +4588,8 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4601,8 +4601,8 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4614,7 +4614,7 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ObjectOperatorToken) + $$.AddComments($2.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4647,7 +4647,7 @@ variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ObjectOperatorToken) + $$.AddComments($2.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4664,7 +4664,7 @@ simple_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4676,9 +4676,9 @@ simple_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4690,7 +4690,7 @@ simple_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarToken) + $$.AddComments($1.Comments, comment.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4705,7 +4705,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4717,7 +4717,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4738,8 +4738,8 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4751,8 +4751,8 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseCurlyBracesToken) + $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4764,7 +4764,7 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ObjectOperatorToken) + $$.AddComments($2.Comments, comment.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4776,7 +4776,7 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4788,7 +4788,7 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.PaamayimNekudotayimToken) + $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4803,7 +4803,7 @@ member_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IdentifierToken) + $$.AddComments($1.Comments, comment.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4812,8 +4812,8 @@ member_name: $$ = $2; // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4834,7 +4834,7 @@ property_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StringToken) + $$.AddComments($1.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4843,8 +4843,8 @@ property_name: $$ = $2; // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.OpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4890,7 +4890,7 @@ non_empty_array_pair_list: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + if $3 != nil {$3.AddComments($2.Comments, comment.CommaToken)} yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4911,7 +4911,7 @@ array_pair: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DoubleArrowToken) + $$.AddComments($2.Comments, comment.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4934,8 +4934,8 @@ array_pair: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(reference, $3, comment.AmpersandToken) + $$.AddComments($2.Comments, comment.DoubleArrowToken) + reference.AddComments($3.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4949,7 +4949,7 @@ array_pair: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken(reference, $1, comment.AmpersandToken) + reference.AddComments($1.Comments, comment.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4964,10 +4964,10 @@ array_pair: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $2, comment.DoubleArrowToken) - yylex.(*Parser).comments.AddFromToken(list, $3, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, $4, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, $6, comment.CloseParenthesisToken) + $$.AddComments($2.Comments, comment.DoubleArrowToken) + list.AddComments($3.Comments, comment.ListToken) + list.AddComments($4.Comments, comment.OpenParenthesisToken) + list.AddComments($6.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4982,9 +4982,9 @@ array_pair: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(list, $1, comment.ListToken) - yylex.(*Parser).comments.AddFromToken(list, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken(list, $4, comment.CloseParenthesisToken) + list.AddComments($1.Comments, comment.ListToken) + list.AddComments($2.Comments, comment.OpenParenthesisToken) + list.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5006,7 +5006,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($2)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, $2, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments($2.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5025,7 +5025,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken(encapsed, $1, comment.EncapsedAndWhitespaceToken) + encapsed.AddComments($1.Comments, comment.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5042,7 +5042,7 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5058,9 +5058,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseSquareBracket) + variable.AddComments($1.Comments, comment.VariableToken) + $$.AddComments($2.Comments, comment.OpenSquareBracket) + $$.AddComments($4.Comments, comment.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5078,9 +5078,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken(variable, $1, comment.VariableToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.ObjectOperatorToken) - yylex.(*Parser).comments.AddFromToken(fetch, $3, comment.StringToken) + variable.AddComments($1.Comments, comment.VariableToken) + $$.AddComments($2.Comments, comment.ObjectOperatorToken) + fetch.AddComments($3.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5092,8 +5092,8 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5107,9 +5107,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(name, $2, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) + name.AddComments($2.Comments, comment.StringVarnameToken) + $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5125,11 +5125,11 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.DollarOpenCurlyBracesToken) - yylex.(*Parser).comments.AddFromToken(variable, $2, comment.StringVarnameToken) - yylex.(*Parser).comments.AddFromToken($$, $3, comment.OpenSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseSquareBracket) - yylex.(*Parser).comments.AddFromToken($$, $6, comment.CloseCurlyBracesToken) + $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) + variable.AddComments($2.Comments, comment.StringVarnameToken) + $$.AddComments($3.Comments, comment.OpenSquareBracket) + $$.AddComments($5.Comments, comment.CloseSquareBracket) + $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5150,7 +5150,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.StringToken) + $$.AddComments($1.Comments, comment.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5167,7 +5167,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.NumStringToken) + $$.AddComments($1.Comments, comment.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5193,11 +5193,11 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.MinusToken) + $$.AddComments($1.Comments, comment.MinusToken) if isInt { - yylex.(*Parser).comments.AddFromToken(lnumber, $2, comment.NumStringToken) + lnumber.AddComments($2.Comments, comment.NumStringToken) } else { - yylex.(*Parser).comments.AddFromToken($$, $2, comment.NumStringToken) + $$.AddComments($2.Comments, comment.NumStringToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -5212,7 +5212,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.VariableToken) + $$.AddComments($1.Comments, comment.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5227,12 +5227,12 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IssetToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) + $$.AddComments($1.Comments, comment.IssetToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) if $4 != nil { - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CommaToken) + $$.AddComments($4.Comments, comment.CommaToken) } - yylex.(*Parser).comments.AddFromToken($$, $5, comment.CloseParenthesisToken) + $$.AddComments($5.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5244,9 +5244,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EmptyToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.EmptyToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5258,7 +5258,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IncludeToken) + $$.AddComments($1.Comments, comment.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5270,7 +5270,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.IncludeOnceToken) + $$.AddComments($1.Comments, comment.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5282,9 +5282,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.EvalToken) - yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken) - yylex.(*Parser).comments.AddFromToken($$, $4, comment.CloseParenthesisToken) + $$.AddComments($1.Comments, comment.EvalToken) + $$.AddComments($2.Comments, comment.OpenParenthesisToken) + $$.AddComments($4.Comments, comment.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5296,7 +5296,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.RequireToken) + $$.AddComments($1.Comments, comment.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5308,7 +5308,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - yylex.(*Parser).comments.AddFromToken($$, $1, comment.RequireOnceToken) + $$.AddComments($1.Comments, comment.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5326,7 +5326,7 @@ isset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).comments.AddFromToken(lastNode($1), $2, comment.CommaToken) + lastNode($1).AddComments($2.Comments, comment.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/php7/php7_test.go b/php7/php7_test.go index ec20ae1..85c977c 100644 --- a/php7/php7_test.go +++ b/php7/php7_test.go @@ -6,16 +6,17 @@ import ( "testing" "github.com/kylelemons/godebug/pretty" + "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/expr" "github.com/z7zmey/php-parser/node/expr/assign" "github.com/z7zmey/php-parser/node/expr/binary" "github.com/z7zmey/php-parser/node/expr/cast" "github.com/z7zmey/php-parser/node/name" "github.com/z7zmey/php-parser/node/scalar" - "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/php7" + "github.com/z7zmey/php-parser/position" ) func assertEqual(t *testing.T, expected interface{}, actual interface{}) { @@ -384,39 +385,39 @@ func TestPhp7(t *testing.T) { expected := &node.Root{ Position: &position.Position{ StartLine: 2, - EndLine: 347, - StartPos: 6, - EndPos: 6318, + EndLine: 347, + StartPos: 6, + EndPos: 6318, }, Stmts: []node.Node{ &stmt.Expression{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 20, + EndLine: 2, + StartPos: 6, + EndPos: 20, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 19, + EndLine: 2, + StartPos: 6, + EndPos: 19, }, Function: &name.Name{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 8, + EndLine: 2, + StartPos: 6, + EndPos: 8, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 8, + EndLine: 2, + StartPos: 6, + EndPos: 8, }, Value: "foo", }, @@ -425,33 +426,33 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 9, - EndPos: 19, + EndLine: 2, + StartPos: 9, + EndPos: 19, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 10, - EndPos: 11, + EndLine: 2, + StartPos: 10, + EndPos: 11, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 10, - EndPos: 11, + EndLine: 2, + StartPos: 10, + EndPos: 11, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 10, - EndPos: 11, + EndLine: 2, + StartPos: 10, + EndPos: 11, }, Value: "a", }, @@ -460,25 +461,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 14, - EndPos: 18, + EndLine: 2, + StartPos: 14, + EndPos: 18, }, + Variadic: true, IsReference: false, - Variadic: true, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 17, - EndPos: 18, + EndLine: 2, + StartPos: 17, + EndPos: 18, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 17, - EndPos: 18, + EndLine: 2, + StartPos: 17, + EndPos: 18, }, Value: "b", }, @@ -491,30 +492,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 39, + EndLine: 3, + StartPos: 24, + EndPos: 39, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 38, + EndLine: 3, + StartPos: 24, + EndPos: 38, }, Function: &expr.Variable{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 27, + EndLine: 3, + StartPos: 24, + EndPos: 27, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 24, - EndPos: 27, + EndLine: 3, + StartPos: 24, + EndPos: 27, }, Value: "foo", }, @@ -522,33 +523,33 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 28, - EndPos: 38, + EndLine: 3, + StartPos: 28, + EndPos: 38, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 29, - EndPos: 30, + EndLine: 3, + StartPos: 29, + EndPos: 30, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 29, - EndPos: 30, + EndLine: 3, + StartPos: 29, + EndPos: 30, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 29, - EndPos: 30, + EndLine: 3, + StartPos: 29, + EndPos: 30, }, Value: "a", }, @@ -557,25 +558,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 33, - EndPos: 37, + EndLine: 3, + StartPos: 33, + EndPos: 37, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 36, - EndPos: 37, + EndLine: 3, + StartPos: 36, + EndPos: 37, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 36, - EndPos: 37, + EndLine: 3, + StartPos: 36, + EndPos: 37, }, Value: "b", }, @@ -588,30 +589,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 63, + EndLine: 4, + StartPos: 43, + EndPos: 63, }, Expr: &expr.MethodCall{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 62, + EndLine: 4, + StartPos: 43, + EndPos: 62, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 46, + EndLine: 4, + StartPos: 43, + EndPos: 46, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 43, - EndPos: 46, + EndLine: 4, + StartPos: 43, + EndPos: 46, }, Value: "foo", }, @@ -619,42 +620,42 @@ func TestPhp7(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 49, - EndPos: 51, + EndLine: 4, + StartPos: 49, + EndPos: 51, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 52, - EndPos: 62, + EndLine: 4, + StartPos: 52, + EndPos: 62, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 53, - EndPos: 54, + EndLine: 4, + StartPos: 53, + EndPos: 54, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 53, - EndPos: 54, + EndLine: 4, + StartPos: 53, + EndPos: 54, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 53, - EndPos: 54, + EndLine: 4, + StartPos: 53, + EndPos: 54, }, Value: "a", }, @@ -663,25 +664,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 57, - EndPos: 61, + EndLine: 4, + StartPos: 57, + EndPos: 61, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 60, - EndPos: 61, + EndLine: 4, + StartPos: 60, + EndPos: 61, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 4, - EndLine: 4, - StartPos: 60, - EndPos: 61, + EndLine: 4, + StartPos: 60, + EndPos: 61, }, Value: "b", }, @@ -694,31 +695,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 86, + EndLine: 5, + StartPos: 67, + EndPos: 86, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 85, + EndLine: 5, + StartPos: 67, + EndPos: 85, }, Class: &name.Name{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 69, + EndLine: 5, + StartPos: 67, + EndPos: 69, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 67, - EndPos: 69, + EndLine: 5, + StartPos: 67, + EndPos: 69, }, Value: "foo", }, @@ -727,42 +728,42 @@ func TestPhp7(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 72, - EndPos: 74, + EndLine: 5, + StartPos: 72, + EndPos: 74, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 75, - EndPos: 85, + EndLine: 5, + StartPos: 75, + EndPos: 85, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 76, - EndPos: 77, + EndLine: 5, + StartPos: 76, + EndPos: 77, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 76, - EndPos: 77, + EndLine: 5, + StartPos: 76, + EndPos: 77, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 76, - EndPos: 77, + EndLine: 5, + StartPos: 76, + EndPos: 77, }, Value: "a", }, @@ -771,25 +772,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 80, - EndPos: 84, + EndLine: 5, + StartPos: 80, + EndPos: 84, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 83, - EndPos: 84, + EndLine: 5, + StartPos: 83, + EndPos: 84, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 83, - EndPos: 84, + EndLine: 5, + StartPos: 83, + EndPos: 84, }, Value: "b", }, @@ -802,30 +803,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 110, + EndLine: 6, + StartPos: 90, + EndPos: 110, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 109, + EndLine: 6, + StartPos: 90, + EndPos: 109, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 93, + EndLine: 6, + StartPos: 90, + EndPos: 93, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 90, - EndPos: 93, + EndLine: 6, + StartPos: 90, + EndPos: 93, }, Value: "foo", }, @@ -833,42 +834,42 @@ func TestPhp7(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 96, - EndPos: 98, + EndLine: 6, + StartPos: 96, + EndPos: 98, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 99, - EndPos: 109, + EndLine: 6, + StartPos: 99, + EndPos: 109, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 100, - EndPos: 101, + EndLine: 6, + StartPos: 100, + EndPos: 101, }, + Variadic: false, IsReference: false, - Variadic: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 100, - EndPos: 101, + EndLine: 6, + StartPos: 100, + EndPos: 101, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 100, - EndPos: 101, + EndLine: 6, + StartPos: 100, + EndPos: 101, }, Value: "a", }, @@ -877,25 +878,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 104, - EndPos: 108, + EndLine: 6, + StartPos: 104, + EndPos: 108, }, - Variadic: true, IsReference: false, + Variadic: true, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 107, - EndPos: 108, + EndLine: 6, + StartPos: 107, + EndPos: 108, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 6, - EndLine: 6, - StartPos: 107, - EndPos: 108, + EndLine: 6, + StartPos: 107, + EndPos: 108, }, Value: "b", }, @@ -908,31 +909,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 114, - EndPos: 132, + EndLine: 7, + StartPos: 114, + EndPos: 132, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 114, - EndPos: 131, + EndLine: 7, + StartPos: 114, + EndPos: 131, }, Class: &name.Name{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 118, - EndPos: 120, + EndLine: 7, + StartPos: 118, + EndPos: 120, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 118, - EndPos: 120, + EndLine: 7, + StartPos: 118, + EndPos: 120, }, Value: "foo", }, @@ -941,33 +942,33 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 121, - EndPos: 131, + EndLine: 7, + StartPos: 121, + EndPos: 131, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 122, - EndPos: 123, + EndLine: 7, + StartPos: 122, + EndPos: 123, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 122, - EndPos: 123, + EndLine: 7, + StartPos: 122, + EndPos: 123, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 122, - EndPos: 123, + EndLine: 7, + StartPos: 122, + EndPos: 123, }, Value: "a", }, @@ -976,25 +977,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 126, - EndPos: 130, + EndLine: 7, + StartPos: 126, + EndPos: 130, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 129, - EndPos: 130, + EndLine: 7, + StartPos: 129, + EndPos: 130, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 129, - EndPos: 130, + EndLine: 7, + StartPos: 129, + EndPos: 130, }, Value: "b", }, @@ -1007,55 +1008,67 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 161, - EndPos: 185, + EndLine: 9, + StartPos: 161, + EndPos: 185, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 161, - EndPos: 184, + EndLine: 9, + StartPos: 161, + EndPos: 184, + }, + Comments: []*comment.Comment{ + { + Position: &position.Position{ + StartLine: 8, + EndLine: 8, + StartPos: 136, + EndPos: 157, + }, + Value: "/** anonymous class */", + TokenName: 'O', + }, }, Class: &stmt.Class{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 165, - EndPos: 184, + EndLine: 9, + StartPos: 165, + EndPos: 184, }, PhpDocComment: "/** anonymous class */", ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 171, - EndPos: 181, + EndLine: 9, + StartPos: 171, + EndPos: 181, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 172, - EndPos: 173, + EndLine: 9, + StartPos: 172, + EndPos: 173, }, - Variadic: false, + Variadic: false, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 172, - EndPos: 173, + EndLine: 9, + StartPos: 172, + EndPos: 173, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 172, - EndPos: 173, + EndLine: 9, + StartPos: 172, + EndPos: 173, }, Value: "a", }, @@ -1064,25 +1077,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 176, - EndPos: 180, + EndLine: 9, + StartPos: 176, + EndPos: 180, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 179, - EndPos: 180, + EndLine: 9, + StartPos: 179, + EndPos: 180, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 9, - EndLine: 9, - StartPos: 179, - EndPos: 180, + EndLine: 9, + StartPos: 179, + EndPos: 180, }, Value: "b", }, @@ -1090,65 +1103,63 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 189, - EndPos: 201, + EndLine: 10, + StartPos: 189, + EndPos: 201, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 189, - EndPos: 200, + EndLine: 10, + StartPos: 189, + EndPos: 200, }, Class: &stmt.Class{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 193, - EndPos: 200, + EndLine: 10, + StartPos: 193, + EndPos: 200, }, PhpDocComment: "", - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 205, - EndPos: 213, + EndLine: 11, + StartPos: 205, + EndPos: 213, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 205, - EndPos: 212, + EndLine: 11, + StartPos: 205, + EndPos: 212, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 209, - EndPos: 212, + EndLine: 11, + StartPos: 209, + EndPos: 212, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 209, - EndPos: 212, + EndLine: 11, + StartPos: 209, + EndPos: 212, }, Value: "foo", }, @@ -1158,37 +1169,37 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 217, - EndPos: 228, + EndLine: 12, + StartPos: 217, + EndPos: 228, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 217, - EndPos: 227, + EndLine: 12, + StartPos: 217, + EndPos: 227, }, Class: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 221, - EndPos: 227, + EndLine: 12, + StartPos: 221, + EndPos: 227, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 221, - EndPos: 224, + EndLine: 12, + StartPos: 221, + EndPos: 224, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 221, - EndPos: 224, + EndLine: 12, + StartPos: 221, + EndPos: 224, }, Value: "foo", }, @@ -1196,9 +1207,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 12, - EndLine: 12, - StartPos: 226, - EndPos: 226, + EndLine: 12, + StartPos: 226, + EndPos: 226, }, Value: "1", }, @@ -1208,37 +1219,37 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 13, - EndLine: 13, - StartPos: 232, - EndPos: 246, + EndLine: 13, + StartPos: 232, + EndPos: 246, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 13, - EndLine: 13, - StartPos: 232, - EndPos: 245, + EndLine: 13, + StartPos: 232, + EndPos: 245, }, Class: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 13, - EndLine: 13, - StartPos: 236, - EndPos: 245, + EndLine: 13, + StartPos: 236, + EndPos: 245, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 13, - EndLine: 13, - StartPos: 236, - EndPos: 239, + EndLine: 13, + StartPos: 236, + EndPos: 239, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 13, - EndLine: 13, - StartPos: 236, - EndPos: 239, + EndLine: 13, + StartPos: 236, + EndPos: 239, }, Value: "foo", }, @@ -1246,16 +1257,16 @@ func TestPhp7(t *testing.T) { Dim: &expr.Variable{ Position: &position.Position{ StartLine: 13, - EndLine: 13, - StartPos: 241, - EndPos: 244, + EndLine: 13, + StartPos: 241, + EndPos: 244, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 13, - EndLine: 13, - StartPos: 241, - EndPos: 244, + EndLine: 13, + StartPos: 241, + EndPos: 244, }, Value: "bar", }, @@ -1266,37 +1277,37 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 250, - EndPos: 263, + EndLine: 14, + StartPos: 250, + EndPos: 263, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 250, - EndPos: 262, + EndLine: 14, + StartPos: 250, + EndPos: 262, }, Class: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 254, - EndPos: 262, + EndLine: 14, + StartPos: 254, + EndPos: 262, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 254, - EndPos: 257, + EndLine: 14, + StartPos: 254, + EndPos: 257, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 254, - EndPos: 257, + EndLine: 14, + StartPos: 254, + EndPos: 257, }, Value: "foo", }, @@ -1304,9 +1315,9 @@ func TestPhp7(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 260, - EndPos: 262, + EndLine: 14, + StartPos: 260, + EndPos: 262, }, Value: "bar", }, @@ -1316,37 +1327,37 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 267, - EndPos: 281, + EndLine: 15, + StartPos: 267, + EndPos: 281, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 267, - EndPos: 280, + EndLine: 15, + StartPos: 267, + EndPos: 280, }, Class: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 271, - EndPos: 280, + EndLine: 15, + StartPos: 271, + EndPos: 280, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 271, - EndPos: 274, + EndLine: 15, + StartPos: 271, + EndPos: 274, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 271, - EndPos: 274, + EndLine: 15, + StartPos: 271, + EndPos: 274, }, Value: "foo", }, @@ -1354,16 +1365,16 @@ func TestPhp7(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 277, - EndPos: 280, + EndLine: 15, + StartPos: 277, + EndPos: 280, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 15, - EndLine: 15, - StartPos: 277, - EndPos: 280, + EndLine: 15, + StartPos: 277, + EndPos: 280, }, Value: "bar", }, @@ -1374,46 +1385,46 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 285, - EndPos: 301, + EndLine: 16, + StartPos: 285, + EndPos: 301, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 285, - EndPos: 300, + EndLine: 16, + StartPos: 285, + EndPos: 300, }, Class: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 289, - EndPos: 300, + EndLine: 16, + StartPos: 289, + EndPos: 300, }, Class: &node.Identifier{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 289, - EndPos: 294, + EndLine: 16, + StartPos: 289, + EndPos: 294, }, Value: "static", }, Property: &expr.Variable{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 297, - EndPos: 300, + EndLine: 16, + StartPos: 297, + EndPos: 300, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 16, - EndLine: 16, - StartPos: 297, - EndPos: 300, + EndLine: 16, + StartPos: 297, + EndPos: 300, }, Value: "bar", }, @@ -1424,18 +1435,18 @@ func TestPhp7(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 306, - EndPos: 350, + EndLine: 18, + StartPos: 306, + EndPos: 350, }, + ReturnsRef: false, PhpDocComment: "", - ReturnsRef: false, FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 315, - EndPos: 317, + EndLine: 18, + StartPos: 315, + EndPos: 317, }, Value: "foo", }, @@ -1443,33 +1454,33 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 319, - EndPos: 332, + EndLine: 18, + StartPos: 319, + EndPos: 332, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &node.Nullable{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 319, - EndPos: 322, + EndLine: 18, + StartPos: 319, + EndPos: 322, }, Expr: &name.Name{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 320, - EndPos: 322, + EndLine: 18, + StartPos: 320, + EndPos: 322, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 320, - EndPos: 322, + EndLine: 18, + StartPos: 320, + EndPos: 322, }, Value: "bar", }, @@ -1479,16 +1490,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 324, - EndPos: 327, + EndLine: 18, + StartPos: 324, + EndPos: 327, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 324, - EndPos: 327, + EndLine: 18, + StartPos: 324, + EndPos: 327, }, Value: "bar", }, @@ -1496,24 +1507,24 @@ func TestPhp7(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 329, - EndPos: 332, + EndLine: 18, + StartPos: 329, + EndPos: 332, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 329, - EndPos: 332, + EndLine: 18, + StartPos: 329, + EndPos: 332, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 329, - EndPos: 332, + EndLine: 18, + StartPos: 329, + EndPos: 332, }, Value: "null", }, @@ -1524,26 +1535,26 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 335, - EndPos: 346, + EndLine: 18, + StartPos: 335, + EndPos: 346, }, - ByRef: true, + ByRef: true, Variadic: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 335, - EndPos: 337, + EndLine: 18, + StartPos: 335, + EndPos: 337, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 335, - EndPos: 337, + EndLine: 18, + StartPos: 335, + EndPos: 337, }, Value: "baz", }, @@ -1552,39 +1563,38 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 343, - EndPos: 346, + EndLine: 18, + StartPos: 343, + EndPos: 346, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 343, - EndPos: 346, + EndLine: 18, + StartPos: 343, + EndPos: 346, }, Value: "baz", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 354, - EndPos: 417, + EndLine: 19, + StartPos: 354, + EndPos: 417, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 360, - EndPos: 362, + EndLine: 19, + StartPos: 360, + EndPos: 362, }, Value: "foo", }, @@ -1592,18 +1602,18 @@ func TestPhp7(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 365, - EndPos: 416, + EndLine: 19, + StartPos: 365, + EndPos: 416, }, + ReturnsRef: false, PhpDocComment: "", - ReturnsRef: false, MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 381, - EndPos: 383, + EndLine: 19, + StartPos: 381, + EndPos: 383, }, Value: "foo", }, @@ -1611,9 +1621,9 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 365, - EndPos: 370, + EndLine: 19, + StartPos: 365, + EndPos: 370, }, Value: "public", }, @@ -1622,33 +1632,33 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 385, - EndPos: 398, + EndLine: 19, + StartPos: 385, + EndPos: 398, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &node.Nullable{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 385, - EndPos: 388, + EndLine: 19, + StartPos: 385, + EndPos: 388, }, Expr: &name.Name{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 386, - EndPos: 388, + EndLine: 19, + StartPos: 386, + EndPos: 388, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 386, - EndPos: 388, + EndLine: 19, + StartPos: 386, + EndPos: 388, }, Value: "bar", }, @@ -1658,16 +1668,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 390, - EndPos: 393, + EndLine: 19, + StartPos: 390, + EndPos: 393, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 390, - EndPos: 393, + EndLine: 19, + StartPos: 390, + EndPos: 393, }, Value: "bar", }, @@ -1675,24 +1685,24 @@ func TestPhp7(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 395, - EndPos: 398, + EndLine: 19, + StartPos: 395, + EndPos: 398, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 395, - EndPos: 398, + EndLine: 19, + StartPos: 395, + EndPos: 398, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 395, - EndPos: 398, + EndLine: 19, + StartPos: 395, + EndPos: 398, }, Value: "null", }, @@ -1703,26 +1713,26 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 401, - EndPos: 412, + EndLine: 19, + StartPos: 401, + EndPos: 412, }, - ByRef: true, + ByRef: true, Variadic: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 401, - EndPos: 403, + EndLine: 19, + StartPos: 401, + EndPos: 403, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 401, - EndPos: 403, + EndLine: 19, + StartPos: 401, + EndPos: 403, }, Value: "baz", }, @@ -1731,16 +1741,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 409, - EndPos: 412, + EndLine: 19, + StartPos: 409, + EndPos: 412, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 409, - EndPos: 412, + EndLine: 19, + StartPos: 409, + EndPos: 412, }, Value: "baz", }, @@ -1750,12 +1760,11 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 415, - EndPos: 416, - }, - Stmts: []node.Node{ + EndLine: 19, + StartPos: 415, + EndPos: 416, }, + Stmts: []node.Node{}, }, }, }, @@ -1763,51 +1772,51 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 421, - EndPos: 462, + EndLine: 20, + StartPos: 421, + EndPos: 462, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 421, - EndPos: 461, + EndLine: 20, + StartPos: 421, + EndPos: 461, }, + Static: false, PhpDocComment: "", - ReturnsRef: false, - Static: false, + ReturnsRef: false, Params: []node.Node{ &node.Parameter{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 430, - EndPos: 443, + EndLine: 20, + StartPos: 430, + EndPos: 443, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &node.Nullable{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 430, - EndPos: 433, + EndLine: 20, + StartPos: 430, + EndPos: 433, }, Expr: &name.Name{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 431, - EndPos: 433, + EndLine: 20, + StartPos: 431, + EndPos: 433, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 431, - EndPos: 433, + EndLine: 20, + StartPos: 431, + EndPos: 433, }, Value: "bar", }, @@ -1817,16 +1826,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 435, - EndPos: 438, + EndLine: 20, + StartPos: 435, + EndPos: 438, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 435, - EndPos: 438, + EndLine: 20, + StartPos: 435, + EndPos: 438, }, Value: "bar", }, @@ -1834,24 +1843,24 @@ func TestPhp7(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 440, - EndPos: 443, + EndLine: 20, + StartPos: 440, + EndPos: 443, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 440, - EndPos: 443, + EndLine: 20, + StartPos: 440, + EndPos: 443, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 440, - EndPos: 443, + EndLine: 20, + StartPos: 440, + EndPos: 443, }, Value: "null", }, @@ -1862,26 +1871,26 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 446, - EndPos: 457, + EndLine: 20, + StartPos: 446, + EndPos: 457, }, - ByRef: true, + ByRef: true, Variadic: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 446, - EndPos: 448, + EndLine: 20, + StartPos: 446, + EndPos: 448, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 446, - EndPos: 448, + EndLine: 20, + StartPos: 446, + EndPos: 448, }, Value: "baz", }, @@ -1890,74 +1899,73 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 454, - EndPos: 457, + EndLine: 20, + StartPos: 454, + EndPos: 457, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 20, - EndLine: 20, - StartPos: 454, - EndPos: 457, + EndLine: 20, + StartPos: 454, + EndPos: 457, }, Value: "baz", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 466, - EndPos: 514, + EndLine: 21, + StartPos: 466, + EndPos: 514, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 466, - EndPos: 513, + EndLine: 21, + StartPos: 466, + EndPos: 513, }, + Static: true, PhpDocComment: "", - ReturnsRef: false, - Static: true, + ReturnsRef: false, Params: []node.Node{ &node.Parameter{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 482, - EndPos: 495, + EndLine: 21, + StartPos: 482, + EndPos: 495, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &node.Nullable{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 482, - EndPos: 485, + EndLine: 21, + StartPos: 482, + EndPos: 485, }, Expr: &name.Name{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 483, - EndPos: 485, + EndLine: 21, + StartPos: 483, + EndPos: 485, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 483, - EndPos: 485, + EndLine: 21, + StartPos: 483, + EndPos: 485, }, Value: "bar", }, @@ -1967,16 +1975,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 487, - EndPos: 490, + EndLine: 21, + StartPos: 487, + EndPos: 490, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 487, - EndPos: 490, + EndLine: 21, + StartPos: 487, + EndPos: 490, }, Value: "bar", }, @@ -1984,24 +1992,24 @@ func TestPhp7(t *testing.T) { DefaultValue: &expr.ConstFetch{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 492, - EndPos: 495, + EndLine: 21, + StartPos: 492, + EndPos: 495, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 492, - EndPos: 495, + EndLine: 21, + StartPos: 492, + EndPos: 495, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 492, - EndPos: 495, + EndLine: 21, + StartPos: 492, + EndPos: 495, }, Value: "null", }, @@ -2012,26 +2020,26 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 498, - EndPos: 509, + EndLine: 21, + StartPos: 498, + EndPos: 509, }, - ByRef: true, + ByRef: true, Variadic: true, VariableType: &name.Name{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 498, - EndPos: 500, + EndLine: 21, + StartPos: 498, + EndPos: 500, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 498, - EndPos: 500, + EndLine: 21, + StartPos: 498, + EndPos: 500, }, Value: "baz", }, @@ -2040,39 +2048,38 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 506, - EndPos: 509, + EndLine: 21, + StartPos: 506, + EndPos: 509, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 21, - EndLine: 21, - StartPos: 506, - EndPos: 509, + EndLine: 21, + StartPos: 506, + EndPos: 509, }, Value: "baz", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 23, - EndLine: 23, - StartPos: 519, - EndPos: 538, + EndLine: 23, + StartPos: 519, + EndPos: 538, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 23, - EndLine: 23, - StartPos: 519, - EndPos: 537, + EndLine: 23, + StartPos: 519, + EndPos: 537, }, Value: "1234567890123456789", }, @@ -2080,16 +2087,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 24, - EndLine: 24, - StartPos: 542, - EndPos: 562, + EndLine: 24, + StartPos: 542, + EndPos: 562, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 24, - EndLine: 24, - StartPos: 542, - EndPos: 561, + EndLine: 24, + StartPos: 542, + EndPos: 561, }, Value: "12345678901234567890", }, @@ -2097,16 +2104,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 25, - EndLine: 25, - StartPos: 566, - EndPos: 568, + EndLine: 25, + StartPos: 566, + EndPos: 568, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 25, - EndLine: 25, - StartPos: 566, - EndPos: 567, + EndLine: 25, + StartPos: 566, + EndPos: 567, }, Value: "0.", }, @@ -2114,16 +2121,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 26, - EndLine: 26, - StartPos: 572, - EndPos: 638, + EndLine: 26, + StartPos: 572, + EndPos: 638, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 26, - EndLine: 26, - StartPos: 572, - EndPos: 637, + EndLine: 26, + StartPos: 572, + EndPos: 637, }, Value: "0b0111111111111111111111111111111111111111111111111111111111111111", }, @@ -2131,16 +2138,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 27, - EndLine: 27, - StartPos: 642, - EndPos: 708, + EndLine: 27, + StartPos: 642, + EndPos: 708, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 27, - EndLine: 27, - StartPos: 642, - EndPos: 707, + EndLine: 27, + StartPos: 642, + EndPos: 707, }, Value: "0b1111111111111111111111111111111111111111111111111111111111111111", }, @@ -2148,16 +2155,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 28, - EndLine: 28, - StartPos: 712, - EndPos: 732, + EndLine: 28, + StartPos: 712, + EndPos: 732, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 28, - EndLine: 28, - StartPos: 712, - EndPos: 731, + EndLine: 28, + StartPos: 712, + EndPos: 731, }, Value: "0x007111111111111111", }, @@ -2165,16 +2172,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 29, - EndLine: 29, - StartPos: 736, - EndPos: 754, + EndLine: 29, + StartPos: 736, + EndPos: 754, }, Expr: &scalar.Dnumber{ Position: &position.Position{ StartLine: 29, - EndLine: 29, - StartPos: 736, - EndPos: 753, + EndLine: 29, + StartPos: 736, + EndPos: 753, }, Value: "0x8111111111111111", }, @@ -2182,16 +2189,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 30, - EndLine: 30, - StartPos: 758, - EndPos: 767, + EndLine: 30, + StartPos: 758, + EndPos: 767, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 30, - EndLine: 30, - StartPos: 758, - EndPos: 766, + EndLine: 30, + StartPos: 758, + EndPos: 766, }, Value: "__CLASS__", }, @@ -2199,16 +2206,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 771, - EndPos: 778, + EndLine: 31, + StartPos: 771, + EndPos: 778, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 31, - EndLine: 31, - StartPos: 771, - EndPos: 777, + EndLine: 31, + StartPos: 771, + EndPos: 777, }, Value: "__DIR__", }, @@ -2216,16 +2223,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 782, - EndPos: 790, + EndLine: 32, + StartPos: 782, + EndPos: 790, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 32, - EndLine: 32, - StartPos: 782, - EndPos: 789, + EndLine: 32, + StartPos: 782, + EndPos: 789, }, Value: "__FILE__", }, @@ -2233,16 +2240,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 794, - EndPos: 806, + EndLine: 33, + StartPos: 794, + EndPos: 806, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 33, - EndLine: 33, - StartPos: 794, - EndPos: 805, + EndLine: 33, + StartPos: 794, + EndPos: 805, }, Value: "__FUNCTION__", }, @@ -2250,16 +2257,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 810, - EndPos: 818, + EndLine: 34, + StartPos: 810, + EndPos: 818, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 34, - EndLine: 34, - StartPos: 810, - EndPos: 817, + EndLine: 34, + StartPos: 810, + EndPos: 817, }, Value: "__LINE__", }, @@ -2267,16 +2274,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 822, - EndPos: 835, + EndLine: 35, + StartPos: 822, + EndPos: 835, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 35, - EndLine: 35, - StartPos: 822, - EndPos: 834, + EndLine: 35, + StartPos: 822, + EndPos: 834, }, Value: "__NAMESPACE__", }, @@ -2284,16 +2291,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 839, - EndPos: 849, + EndLine: 36, + StartPos: 839, + EndPos: 849, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 36, - EndLine: 36, - StartPos: 839, - EndPos: 848, + EndLine: 36, + StartPos: 839, + EndPos: 848, }, Value: "__METHOD__", }, @@ -2301,16 +2308,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 37, - EndLine: 37, - StartPos: 853, - EndPos: 862, + EndLine: 37, + StartPos: 853, + EndPos: 862, }, Expr: &scalar.MagicConstant{ Position: &position.Position{ StartLine: 37, - EndLine: 37, - StartPos: 853, - EndPos: 861, + EndLine: 37, + StartPos: 853, + EndPos: 861, }, Value: "__TRAIT__", }, @@ -2318,40 +2325,40 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 867, - EndPos: 878, + EndLine: 39, + StartPos: 867, + EndPos: 878, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 867, - EndPos: 877, + EndLine: 39, + StartPos: 867, + EndPos: 877, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 868, - EndPos: 872, + EndLine: 39, + StartPos: 868, + EndPos: 872, }, Value: "test ", }, &expr.Variable{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 873, - EndPos: 876, + EndLine: 39, + StartPos: 873, + EndPos: 876, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 39, - EndLine: 39, - StartPos: 873, - EndPos: 876, + EndLine: 39, + StartPos: 873, + EndPos: 876, }, Value: "var", }, @@ -2362,47 +2369,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 40, - EndLine: 40, - StartPos: 882, - EndPos: 896, + EndLine: 40, + StartPos: 882, + EndPos: 896, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 40, - EndLine: 40, - StartPos: 882, - EndPos: 895, + EndLine: 40, + StartPos: 882, + EndPos: 895, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 40, - EndLine: 40, - StartPos: 883, - EndPos: 887, + EndLine: 40, + StartPos: 883, + EndPos: 887, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 40, - EndLine: 40, - StartPos: 888, - EndPos: 894, + EndLine: 40, + StartPos: 888, + EndPos: 894, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 40, - EndLine: 40, - StartPos: 888, - EndPos: 891, + EndLine: 40, + StartPos: 888, + EndPos: 891, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 40, - EndLine: 40, - StartPos: 888, - EndPos: 891, + EndLine: 40, + StartPos: 888, + EndPos: 891, }, Value: "var", }, @@ -2410,9 +2417,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 40, - EndLine: 40, - StartPos: 893, - EndPos: 893, + EndLine: 40, + StartPos: 893, + EndPos: 893, }, Value: "1", }, @@ -2423,47 +2430,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 900, - EndPos: 915, + EndLine: 41, + StartPos: 900, + EndPos: 915, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 900, - EndPos: 914, + EndLine: 41, + StartPos: 900, + EndPos: 914, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 901, - EndPos: 905, + EndLine: 41, + StartPos: 901, + EndPos: 905, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 906, - EndPos: 913, + EndLine: 41, + StartPos: 906, + EndPos: 913, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 906, - EndPos: 909, + EndLine: 41, + StartPos: 906, + EndPos: 909, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 906, - EndPos: 909, + EndLine: 41, + StartPos: 906, + EndPos: 909, }, Value: "var", }, @@ -2471,16 +2478,16 @@ func TestPhp7(t *testing.T) { Dim: &expr.UnaryMinus{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 911, - EndPos: 912, + EndLine: 41, + StartPos: 911, + EndPos: 912, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 41, - EndLine: 41, - StartPos: 911, - EndPos: 912, + EndLine: 41, + StartPos: 911, + EndPos: 912, }, Value: "1", }, @@ -2492,47 +2499,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 42, - EndLine: 42, - StartPos: 919, - EndPos: 972, + EndLine: 42, + StartPos: 919, + EndPos: 972, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 42, - EndLine: 42, - StartPos: 919, - EndPos: 971, + EndLine: 42, + StartPos: 919, + EndPos: 971, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 42, - EndLine: 42, - StartPos: 920, - EndPos: 924, + EndLine: 42, + StartPos: 920, + EndPos: 924, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 42, - EndLine: 42, - StartPos: 925, - EndPos: 970, + EndLine: 42, + StartPos: 925, + EndPos: 970, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 42, - EndLine: 42, - StartPos: 925, - EndPos: 928, + EndLine: 42, + StartPos: 925, + EndPos: 928, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 42, - EndLine: 42, - StartPos: 925, - EndPos: 928, + EndLine: 42, + StartPos: 925, + EndPos: 928, }, Value: "var", }, @@ -2540,9 +2547,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.String{ Position: &position.Position{ StartLine: 42, - EndLine: 42, - StartPos: 930, - EndPos: 969, + EndLine: 42, + StartPos: 930, + EndPos: 969, }, Value: "1234567890123456789012345678901234567890", }, @@ -2553,47 +2560,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 976, - EndPos: 1030, + EndLine: 43, + StartPos: 976, + EndPos: 1030, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 976, - EndPos: 1029, + EndLine: 43, + StartPos: 976, + EndPos: 1029, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 977, - EndPos: 981, + EndLine: 43, + StartPos: 977, + EndPos: 981, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 982, - EndPos: 1028, + EndLine: 43, + StartPos: 982, + EndPos: 1028, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 982, - EndPos: 985, + EndLine: 43, + StartPos: 982, + EndPos: 985, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 982, - EndPos: 985, + EndLine: 43, + StartPos: 982, + EndPos: 985, }, Value: "var", }, @@ -2601,9 +2608,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.String{ Position: &position.Position{ StartLine: 43, - EndLine: 43, - StartPos: 987, - EndPos: 1027, + EndLine: 43, + StartPos: 987, + EndPos: 1027, }, Value: "-1234567890123456789012345678901234567890", }, @@ -2614,47 +2621,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 1034, - EndPos: 1050, + EndLine: 44, + StartPos: 1034, + EndPos: 1050, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 1034, - EndPos: 1049, + EndLine: 44, + StartPos: 1034, + EndPos: 1049, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 1035, - EndPos: 1039, + EndLine: 44, + StartPos: 1035, + EndPos: 1039, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 1040, - EndPos: 1048, + EndLine: 44, + StartPos: 1040, + EndPos: 1048, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 1040, - EndPos: 1043, + EndLine: 44, + StartPos: 1040, + EndPos: 1043, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 1040, - EndPos: 1043, + EndLine: 44, + StartPos: 1040, + EndPos: 1043, }, Value: "var", }, @@ -2662,9 +2669,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.String{ Position: &position.Position{ StartLine: 44, - EndLine: 44, - StartPos: 1045, - EndPos: 1047, + EndLine: 44, + StartPos: 1045, + EndPos: 1047, }, Value: "bar", }, @@ -2675,47 +2682,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1054, - EndPos: 1071, + EndLine: 45, + StartPos: 1054, + EndPos: 1071, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1054, - EndPos: 1070, + EndLine: 45, + StartPos: 1054, + EndPos: 1070, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1055, - EndPos: 1059, + EndLine: 45, + StartPos: 1055, + EndPos: 1059, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1060, - EndPos: 1069, + EndLine: 45, + StartPos: 1060, + EndPos: 1069, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1060, - EndPos: 1063, + EndLine: 45, + StartPos: 1060, + EndPos: 1063, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1060, - EndPos: 1063, + EndLine: 45, + StartPos: 1060, + EndPos: 1063, }, Value: "var", }, @@ -2723,16 +2730,16 @@ func TestPhp7(t *testing.T) { Dim: &expr.Variable{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1065, - EndPos: 1068, + EndLine: 45, + StartPos: 1065, + EndPos: 1068, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 45, - EndLine: 45, - StartPos: 1065, - EndPos: 1068, + EndLine: 45, + StartPos: 1065, + EndPos: 1068, }, Value: "bar", }, @@ -2744,31 +2751,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 1075, - EndPos: 1086, + EndLine: 46, + StartPos: 1075, + EndPos: 1086, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 1075, - EndPos: 1085, + EndLine: 46, + StartPos: 1075, + EndPos: 1085, }, Parts: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 1076, - EndPos: 1079, + EndLine: 46, + StartPos: 1076, + EndPos: 1079, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 1076, - EndPos: 1079, + EndLine: 46, + StartPos: 1076, + EndPos: 1079, }, Value: "foo", }, @@ -2776,25 +2783,25 @@ func TestPhp7(t *testing.T) { &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 1080, - EndPos: 1080, + EndLine: 46, + StartPos: 1080, + EndPos: 1080, }, Value: " ", }, &expr.Variable{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 1081, - EndPos: 1084, + EndLine: 46, + StartPos: 1081, + EndPos: 1084, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 46, - EndLine: 46, - StartPos: 1081, - EndPos: 1084, + EndLine: 46, + StartPos: 1081, + EndPos: 1084, }, Value: "bar", }, @@ -2805,47 +2812,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1090, - EndPos: 1108, + EndLine: 47, + StartPos: 1090, + EndPos: 1108, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1090, - EndPos: 1107, + EndLine: 47, + StartPos: 1090, + EndPos: 1107, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1091, - EndPos: 1095, + EndLine: 47, + StartPos: 1091, + EndPos: 1095, }, Value: "test ", }, &expr.PropertyFetch{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1096, - EndPos: 1104, + EndLine: 47, + StartPos: 1096, + EndPos: 1104, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1096, - EndPos: 1099, + EndLine: 47, + StartPos: 1096, + EndPos: 1099, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1096, - EndPos: 1099, + EndLine: 47, + StartPos: 1096, + EndPos: 1099, }, Value: "foo", }, @@ -2853,9 +2860,9 @@ func TestPhp7(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1102, - EndPos: 1104, + EndLine: 47, + StartPos: 1102, + EndPos: 1104, }, Value: "bar", }, @@ -2863,9 +2870,9 @@ func TestPhp7(t *testing.T) { &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 47, - EndLine: 47, - StartPos: 1105, - EndPos: 1106, + EndLine: 47, + StartPos: 1105, + EndPos: 1106, }, Value: "()", }, @@ -2875,40 +2882,40 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 48, - EndLine: 48, - StartPos: 1112, - EndPos: 1125, + EndLine: 48, + StartPos: 1112, + EndPos: 1125, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 48, - EndLine: 48, - StartPos: 1112, - EndPos: 1124, + EndLine: 48, + StartPos: 1112, + EndPos: 1124, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 48, - EndLine: 48, - StartPos: 1113, - EndPos: 1117, + EndLine: 48, + StartPos: 1113, + EndPos: 1117, }, Value: "test ", }, &expr.Variable{ Position: &position.Position{ StartLine: 48, - EndLine: 48, - StartPos: 1118, - EndPos: 1123, + EndLine: 48, + StartPos: 1118, + EndPos: 1123, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 48, - EndLine: 48, - StartPos: 1120, - EndPos: 1122, + EndLine: 48, + StartPos: 1120, + EndPos: 1122, }, Value: "foo", }, @@ -2919,47 +2926,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1129, - EndPos: 1145, + EndLine: 49, + StartPos: 1129, + EndPos: 1145, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1129, - EndPos: 1144, + EndLine: 49, + StartPos: 1129, + EndPos: 1144, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1130, - EndPos: 1134, + EndLine: 49, + StartPos: 1130, + EndPos: 1134, }, Value: "test ", }, &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1135, - EndPos: 1143, + EndLine: 49, + StartPos: 1135, + EndPos: 1143, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1137, - EndPos: 1139, + EndLine: 49, + StartPos: 1137, + EndPos: 1139, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1137, - EndPos: 1139, + EndLine: 49, + StartPos: 1137, + EndPos: 1139, }, Value: "foo", }, @@ -2967,9 +2974,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 49, - EndLine: 49, - StartPos: 1141, - EndPos: 1141, + EndLine: 49, + StartPos: 1141, + EndPos: 1141, }, Value: "0", }, @@ -2980,47 +2987,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1149, - EndPos: 1163, + EndLine: 50, + StartPos: 1149, + EndPos: 1163, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1149, - EndPos: 1162, + EndLine: 50, + StartPos: 1149, + EndPos: 1162, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1150, - EndPos: 1154, + EndLine: 50, + StartPos: 1150, + EndPos: 1154, }, Value: "test ", }, &expr.Variable{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1155, - EndPos: 1161, + EndLine: 50, + StartPos: 1155, + EndPos: 1161, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1157, - EndPos: 1160, + EndLine: 50, + StartPos: 1157, + EndPos: 1160, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 50, - EndLine: 50, - StartPos: 1157, - EndPos: 1160, + EndLine: 50, + StartPos: 1157, + EndPos: 1160, }, Value: "foo", }, @@ -3032,47 +3039,47 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1167, - EndPos: 1187, + EndLine: 51, + StartPos: 1167, + EndPos: 1187, }, Expr: &scalar.Encapsed{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1167, - EndPos: 1186, + EndLine: 51, + StartPos: 1167, + EndPos: 1186, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1168, - EndPos: 1172, + EndLine: 51, + StartPos: 1168, + EndPos: 1172, }, Value: "test ", }, &expr.MethodCall{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1174, - EndPos: 1184, + EndLine: 51, + StartPos: 1174, + EndPos: 1184, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1174, - EndPos: 1177, + EndLine: 51, + StartPos: 1174, + EndPos: 1177, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1174, - EndPos: 1177, + EndLine: 51, + StartPos: 1174, + EndPos: 1177, }, Value: "foo", }, @@ -3080,18 +3087,18 @@ func TestPhp7(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1180, - EndPos: 1182, + EndLine: 51, + StartPos: 1180, + EndPos: 1182, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 51, - EndLine: 51, - StartPos: 1183, - EndPos: 1184, + EndLine: 51, + StartPos: 1183, + EndPos: 1184, }, }, }, @@ -3101,23 +3108,23 @@ func TestPhp7(t *testing.T) { &stmt.AltIf{ Position: &position.Position{ StartLine: 53, - EndLine: 54, - StartPos: 1192, - EndPos: 1209, + EndLine: 54, + StartPos: 1192, + EndPos: 1209, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 53, - EndLine: 53, - StartPos: 1196, - EndPos: 1197, + EndLine: 53, + StartPos: 1196, + EndPos: 1197, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 53, - EndLine: 53, - StartPos: 1196, - EndPos: 1197, + EndLine: 53, + StartPos: 1196, + EndPos: 1197, }, Value: "a", }, @@ -3125,34 +3132,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.AltIf{ Position: &position.Position{ StartLine: 55, - EndLine: 57, - StartPos: 1213, - EndPos: 1245, + EndLine: 57, + StartPos: 1213, + EndPos: 1245, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 55, - EndLine: 55, - StartPos: 1217, - EndPos: 1218, + EndLine: 55, + StartPos: 1217, + EndPos: 1218, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 55, - EndLine: 55, - StartPos: 1217, - EndPos: 1218, + EndLine: 55, + StartPos: 1217, + EndPos: 1218, }, Value: "a", }, @@ -3160,34 +3166,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.AltElseIf{ Position: &position.Position{ StartLine: 56, - EndLine: -1, - StartPos: 1225, - EndPos: -1, + EndLine: -1, + StartPos: 1225, + EndPos: -1, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 56, - EndLine: 56, - StartPos: 1233, - EndPos: 1234, + EndLine: 56, + StartPos: 1233, + EndPos: 1234, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 56, - EndLine: 56, - StartPos: 1233, - EndPos: 1234, + EndLine: 56, + StartPos: 1233, + EndPos: 1234, }, Value: "b", }, @@ -3195,12 +3200,11 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, @@ -3208,23 +3212,23 @@ func TestPhp7(t *testing.T) { &stmt.AltIf{ Position: &position.Position{ StartLine: 58, - EndLine: 60, - StartPos: 1249, - EndPos: 1274, + EndLine: 60, + StartPos: 1249, + EndPos: 1274, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1253, - EndPos: 1254, + EndLine: 58, + StartPos: 1253, + EndPos: 1254, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 58, - EndLine: 58, - StartPos: 1253, - EndPos: 1254, + EndLine: 58, + StartPos: 1253, + EndPos: 1254, }, Value: "a", }, @@ -3232,52 +3236,50 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, Else: &stmt.AltElse{ Position: &position.Position{ StartLine: 59, - EndLine: -1, - StartPos: 1261, - EndPos: -1, + EndLine: -1, + StartPos: 1261, + EndPos: -1, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, &stmt.AltIf{ Position: &position.Position{ StartLine: 61, - EndLine: 65, - StartPos: 1278, - EndPos: 1333, + EndLine: 65, + StartPos: 1278, + EndPos: 1333, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1282, - EndPos: 1283, + EndLine: 61, + StartPos: 1282, + EndPos: 1283, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1282, - EndPos: 1283, + EndLine: 61, + StartPos: 1282, + EndPos: 1283, }, Value: "a", }, @@ -3285,34 +3287,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.AltElseIf{ Position: &position.Position{ StartLine: 62, - EndLine: -1, - StartPos: 1290, - EndPos: -1, + EndLine: -1, + StartPos: 1290, + EndPos: -1, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1298, - EndPos: 1299, + EndLine: 62, + StartPos: 1298, + EndPos: 1299, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 62, - EndLine: 62, - StartPos: 1298, - EndPos: 1299, + EndLine: 62, + StartPos: 1298, + EndPos: 1299, }, Value: "b", }, @@ -3320,34 +3321,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.AltElseIf{ Position: &position.Position{ StartLine: 63, - EndLine: -1, - StartPos: 1305, - EndPos: -1, + EndLine: -1, + StartPos: 1305, + EndPos: -1, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1313, - EndPos: 1314, + EndLine: 63, + StartPos: 1313, + EndPos: 1314, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 63, - EndLine: 63, - StartPos: 1313, - EndPos: 1314, + EndLine: 63, + StartPos: 1313, + EndPos: 1314, }, Value: "c", }, @@ -3355,64 +3355,62 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, Else: &stmt.AltElse{ Position: &position.Position{ StartLine: 64, - EndLine: -1, - StartPos: 1320, - EndPos: -1, + EndLine: -1, + StartPos: 1320, + EndPos: -1, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, }, &stmt.While{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1338, - EndPos: 1357, + EndLine: 67, + StartPos: 1338, + EndPos: 1357, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1345, - EndPos: 1345, + EndLine: 67, + StartPos: 1345, + EndPos: 1345, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1348, - EndPos: 1357, + EndLine: 67, + StartPos: 1348, + EndPos: 1357, }, Stmts: []node.Node{ &stmt.Break{ Position: &position.Position{ StartLine: 67, - EndLine: 67, - StartPos: 1350, - EndPos: 1355, + EndLine: 67, + StartPos: 1350, + EndPos: 1355, }, }, }, @@ -3421,40 +3419,40 @@ func TestPhp7(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1361, - EndPos: 1382, + EndLine: 68, + StartPos: 1361, + EndPos: 1382, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1368, - EndPos: 1368, + EndLine: 68, + StartPos: 1368, + EndPos: 1368, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1371, - EndPos: 1382, + EndLine: 68, + StartPos: 1371, + EndPos: 1382, }, Stmts: []node.Node{ &stmt.Break{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1373, - EndPos: 1380, + EndLine: 68, + StartPos: 1373, + EndPos: 1380, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 68, - EndLine: 68, - StartPos: 1379, - EndPos: 1379, + EndLine: 68, + StartPos: 1379, + EndPos: 1379, }, Value: "2", }, @@ -3465,40 +3463,40 @@ func TestPhp7(t *testing.T) { &stmt.AltWhile{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1386, - EndPos: 1416, + EndLine: 69, + StartPos: 1386, + EndPos: 1416, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1393, - EndPos: 1393, + EndLine: 69, + StartPos: 1393, + EndPos: 1393, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1398, - EndPos: 1406, + EndLine: 69, + StartPos: 1398, + EndPos: 1406, }, Stmts: []node.Node{ &stmt.Break{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1398, - EndPos: 1406, + EndLine: 69, + StartPos: 1398, + EndPos: 1406, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 69, - EndLine: 69, - StartPos: 1404, - EndPos: 1404, + EndLine: 69, + StartPos: 1404, + EndPos: 1404, }, Value: "3", }, @@ -3509,17 +3507,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1420, - EndPos: 1462, + EndLine: 70, + StartPos: 1420, + EndPos: 1462, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1426, - EndPos: 1428, + EndLine: 70, + StartPos: 1426, + EndPos: 1428, }, Value: "foo", }, @@ -3527,17 +3525,17 @@ func TestPhp7(t *testing.T) { &stmt.ClassConstList{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1431, - EndPos: 1460, + EndLine: 70, + StartPos: 1431, + EndPos: 1460, }, Modifiers: []node.Node{ &node.Identifier{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1431, - EndPos: 1436, + EndLine: 70, + StartPos: 1431, + EndPos: 1436, }, Value: "public", }, @@ -3546,26 +3544,26 @@ func TestPhp7(t *testing.T) { &stmt.Constant{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1444, - EndPos: 1450, + EndLine: 70, + StartPos: 1444, + EndPos: 1450, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1444, - EndPos: 1446, + EndLine: 70, + StartPos: 1444, + EndPos: 1446, }, Value: "FOO", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1450, - EndPos: 1450, + EndLine: 70, + StartPos: 1450, + EndPos: 1450, }, Value: "1", }, @@ -3573,26 +3571,26 @@ func TestPhp7(t *testing.T) { &stmt.Constant{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1453, - EndPos: 1459, + EndLine: 70, + StartPos: 1453, + EndPos: 1459, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1453, - EndPos: 1455, + EndLine: 70, + StartPos: 1453, + EndPos: 1455, }, Value: "BAR", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 70, - EndLine: 70, - StartPos: 1459, - EndPos: 1459, + EndLine: 70, + StartPos: 1459, + EndPos: 1459, }, Value: "2", }, @@ -3604,17 +3602,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1466, - EndPos: 1501, + EndLine: 71, + StartPos: 1466, + EndPos: 1501, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1472, - EndPos: 1474, + EndLine: 71, + StartPos: 1472, + EndPos: 1474, }, Value: "foo", }, @@ -3622,34 +3620,34 @@ func TestPhp7(t *testing.T) { &stmt.ClassConstList{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1477, - EndPos: 1499, + EndLine: 71, + StartPos: 1477, + EndPos: 1499, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1483, - EndPos: 1489, + EndLine: 71, + StartPos: 1483, + EndPos: 1489, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1483, - EndPos: 1485, + EndLine: 71, + StartPos: 1483, + EndPos: 1485, }, Value: "FOO", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1489, - EndPos: 1489, + EndLine: 71, + StartPos: 1489, + EndPos: 1489, }, Value: "1", }, @@ -3657,26 +3655,26 @@ func TestPhp7(t *testing.T) { &stmt.Constant{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1492, - EndPos: 1498, + EndLine: 71, + StartPos: 1492, + EndPos: 1498, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1492, - EndPos: 1494, + EndLine: 71, + StartPos: 1492, + EndPos: 1494, }, Value: "BAR", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 71, - EndLine: 71, - StartPos: 1498, - EndPos: 1498, + EndLine: 71, + StartPos: 1498, + EndPos: 1498, }, Value: "2", }, @@ -3688,17 +3686,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1505, - EndPos: 1534, + EndLine: 72, + StartPos: 1505, + EndPos: 1534, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1511, - EndPos: 1513, + EndLine: 72, + StartPos: 1511, + EndPos: 1513, }, Value: "foo", }, @@ -3706,30 +3704,29 @@ func TestPhp7(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1516, - EndPos: 1532, + EndLine: 72, + StartPos: 1516, + EndPos: 1532, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1525, - EndPos: 1527, + EndLine: 72, + StartPos: 1525, + EndPos: 1527, }, Value: "bar", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1531, - EndPos: 1532, - }, - Stmts: []node.Node{ + EndLine: 72, + StartPos: 1531, + EndPos: 1532, }, + Stmts: []node.Node{}, }, }, }, @@ -3737,17 +3734,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1538, - EndPos: 1582, + EndLine: 73, + StartPos: 1538, + EndPos: 1582, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1544, - EndPos: 1546, + EndLine: 73, + StartPos: 1544, + EndPos: 1546, }, Value: "foo", }, @@ -3755,18 +3752,18 @@ func TestPhp7(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1549, - EndPos: 1580, + EndLine: 73, + StartPos: 1549, + EndPos: 1580, }, - ReturnsRef: true, PhpDocComment: "", + ReturnsRef: true, MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1573, - EndPos: 1575, + EndLine: 73, + StartPos: 1573, + EndPos: 1575, }, Value: "bar", }, @@ -3774,18 +3771,18 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1549, - EndPos: 1554, + EndLine: 73, + StartPos: 1549, + EndPos: 1554, }, Value: "public", }, &node.Identifier{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1556, - EndPos: 1561, + EndLine: 73, + StartPos: 1556, + EndPos: 1561, }, Value: "static", }, @@ -3793,12 +3790,11 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1579, - EndPos: 1580, - }, - Stmts: []node.Node{ + EndLine: 73, + StartPos: 1579, + EndPos: 1580, }, + Stmts: []node.Node{}, }, }, }, @@ -3806,17 +3802,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1586, - EndPos: 1636, + EndLine: 74, + StartPos: 1586, + EndPos: 1636, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1592, - EndPos: 1594, + EndLine: 74, + StartPos: 1592, + EndPos: 1594, }, Value: "foo", }, @@ -3824,18 +3820,18 @@ func TestPhp7(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1597, - EndPos: 1634, + EndLine: 74, + StartPos: 1597, + EndPos: 1634, }, - ReturnsRef: true, + ReturnsRef: true, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1621, - EndPos: 1623, + EndLine: 74, + StartPos: 1621, + EndPos: 1623, }, Value: "bar", }, @@ -3843,18 +3839,18 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1597, - EndPos: 1602, + EndLine: 74, + StartPos: 1597, + EndPos: 1602, }, Value: "public", }, &node.Identifier{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1604, - EndPos: 1609, + EndLine: 74, + StartPos: 1604, + EndPos: 1609, }, Value: "static", }, @@ -3862,17 +3858,17 @@ func TestPhp7(t *testing.T) { ReturnType: &name.Name{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1628, - EndPos: 1631, + EndLine: 74, + StartPos: 1628, + EndPos: 1631, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1628, - EndPos: 1631, + EndLine: 74, + StartPos: 1628, + EndPos: 1631, }, Value: "void", }, @@ -3881,12 +3877,11 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1633, - EndPos: 1634, - }, - Stmts: []node.Node{ + EndLine: 74, + StartPos: 1633, + EndPos: 1634, }, + Stmts: []node.Node{}, }, }, }, @@ -3894,17 +3889,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 75, - EndLine: 75, - StartPos: 1640, - EndPos: 1660, + EndLine: 75, + StartPos: 1640, + EndPos: 1660, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 75, - EndLine: 75, - StartPos: 1655, - EndPos: 1657, + EndLine: 75, + StartPos: 1655, + EndPos: 1657, }, Value: "foo", }, @@ -3912,30 +3907,29 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 75, - EndLine: 75, - StartPos: 1640, - EndPos: 1647, + EndLine: 75, + StartPos: 1640, + EndPos: 1647, }, Value: "abstract", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1664, - EndPos: 1694, + EndLine: 76, + StartPos: 1664, + EndPos: 1694, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1676, - EndPos: 1678, + EndLine: 76, + StartPos: 1676, + EndPos: 1678, }, Value: "foo", }, @@ -3943,9 +3937,9 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1664, - EndPos: 1668, + EndLine: 76, + StartPos: 1664, + EndPos: 1668, }, Value: "final", }, @@ -3953,47 +3947,46 @@ func TestPhp7(t *testing.T) { Extends: &stmt.ClassExtends{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1680, - EndPos: 1690, + EndLine: 76, + StartPos: 1680, + EndPos: 1690, }, ClassName: &name.Name{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1688, - EndPos: 1690, + EndLine: 76, + StartPos: 1688, + EndPos: 1690, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 76, - EndLine: 76, - StartPos: 1688, - EndPos: 1690, + EndLine: 76, + StartPos: 1688, + EndPos: 1690, }, Value: "bar", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1698, - EndPos: 1731, + EndLine: 77, + StartPos: 1698, + EndPos: 1731, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1710, - EndPos: 1712, + EndLine: 77, + StartPos: 1710, + EndPos: 1712, }, Value: "foo", }, @@ -4001,9 +3994,9 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1698, - EndPos: 1702, + EndLine: 77, + StartPos: 1698, + EndPos: 1702, }, Value: "final", }, @@ -4011,25 +4004,25 @@ func TestPhp7(t *testing.T) { Implements: &stmt.ClassImplements{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1714, - EndPos: 1727, + EndLine: 77, + StartPos: 1714, + EndPos: 1727, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1725, - EndPos: 1727, + EndLine: 77, + StartPos: 1725, + EndPos: 1727, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1725, - EndPos: 1727, + EndLine: 77, + StartPos: 1725, + EndPos: 1727, }, Value: "bar", }, @@ -4037,23 +4030,22 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1735, - EndPos: 1773, + EndLine: 78, + StartPos: 1735, + EndPos: 1773, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1747, - EndPos: 1749, + EndLine: 78, + StartPos: 1747, + EndPos: 1749, }, Value: "foo", }, @@ -4061,9 +4053,9 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1735, - EndPos: 1739, + EndLine: 78, + StartPos: 1735, + EndPos: 1739, }, Value: "final", }, @@ -4071,25 +4063,25 @@ func TestPhp7(t *testing.T) { Implements: &stmt.ClassImplements{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1751, - EndPos: 1769, + EndLine: 78, + StartPos: 1751, + EndPos: 1769, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1762, - EndPos: 1764, + EndLine: 78, + StartPos: 1762, + EndPos: 1764, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1762, - EndPos: 1764, + EndLine: 78, + StartPos: 1762, + EndPos: 1764, }, Value: "bar", }, @@ -4098,17 +4090,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1767, - EndPos: 1769, + EndLine: 78, + StartPos: 1767, + EndPos: 1769, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 78, - EndLine: 78, - StartPos: 1767, - EndPos: 1769, + EndLine: 78, + StartPos: 1767, + EndPos: 1769, }, Value: "baz", }, @@ -4116,60 +4108,59 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Expression{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1777, - EndPos: 1824, + EndLine: 79, + StartPos: 1777, + EndPos: 1824, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1777, - EndPos: 1823, + EndLine: 79, + StartPos: 1777, + EndPos: 1823, }, Class: &stmt.Class{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1781, - EndPos: 1823, + EndLine: 79, + StartPos: 1781, + EndPos: 1823, }, PhpDocComment: "", ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1786, - EndPos: 1787, + EndLine: 79, + StartPos: 1786, + EndPos: 1787, }, }, Extends: &stmt.ClassExtends{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1789, - EndPos: 1799, + EndLine: 79, + StartPos: 1789, + EndPos: 1799, }, ClassName: &name.Name{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1797, - EndPos: 1799, + EndLine: 79, + StartPos: 1797, + EndPos: 1799, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1797, - EndPos: 1799, + EndLine: 79, + StartPos: 1797, + EndPos: 1799, }, Value: "foo", }, @@ -4179,25 +4170,25 @@ func TestPhp7(t *testing.T) { Implements: &stmt.ClassImplements{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1801, - EndPos: 1819, + EndLine: 79, + StartPos: 1801, + EndPos: 1819, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1812, - EndPos: 1814, + EndLine: 79, + StartPos: 1812, + EndPos: 1814, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1812, - EndPos: 1814, + EndLine: 79, + StartPos: 1812, + EndPos: 1814, }, Value: "bar", }, @@ -4206,17 +4197,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1817, - EndPos: 1819, + EndLine: 79, + StartPos: 1817, + EndPos: 1819, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1817, - EndPos: 1819, + EndLine: 79, + StartPos: 1817, + EndPos: 1819, }, Value: "baz", }, @@ -4224,42 +4215,41 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.ConstList{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1829, - EndPos: 1851, + EndLine: 81, + StartPos: 1829, + EndPos: 1851, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1835, - EndPos: 1841, + EndLine: 81, + StartPos: 1835, + EndPos: 1841, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1835, - EndPos: 1837, + EndLine: 81, + StartPos: 1835, + EndPos: 1837, }, Value: "FOO", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1841, - EndPos: 1841, + EndLine: 81, + StartPos: 1841, + EndPos: 1841, }, Value: "1", }, @@ -4267,26 +4257,26 @@ func TestPhp7(t *testing.T) { &stmt.Constant{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1844, - EndPos: 1850, + EndLine: 81, + StartPos: 1844, + EndPos: 1850, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1844, - EndPos: 1846, + EndLine: 81, + StartPos: 1844, + EndPos: 1846, }, Value: "BAR", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 81, - EndLine: 81, - StartPos: 1850, - EndPos: 1850, + EndLine: 81, + StartPos: 1850, + EndPos: 1850, }, Value: "2", }, @@ -4296,33 +4286,33 @@ func TestPhp7(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1855, - EndPos: 1877, + EndLine: 82, + StartPos: 1855, + EndPos: 1877, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1862, - EndPos: 1862, + EndLine: 82, + StartPos: 1862, + EndPos: 1862, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1865, - EndPos: 1877, + EndLine: 82, + StartPos: 1865, + EndPos: 1877, }, Stmts: []node.Node{ &stmt.Continue{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1867, - EndPos: 1875, + EndLine: 82, + StartPos: 1867, + EndPos: 1875, }, }, }, @@ -4331,40 +4321,40 @@ func TestPhp7(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1881, - EndPos: 1905, + EndLine: 83, + StartPos: 1881, + EndPos: 1905, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1888, - EndPos: 1888, + EndLine: 83, + StartPos: 1888, + EndPos: 1888, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1891, - EndPos: 1905, + EndLine: 83, + StartPos: 1891, + EndPos: 1905, }, Stmts: []node.Node{ &stmt.Continue{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1893, - EndPos: 1903, + EndLine: 83, + StartPos: 1893, + EndPos: 1903, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1902, - EndPos: 1902, + EndLine: 83, + StartPos: 1902, + EndPos: 1902, }, Value: "2", }, @@ -4375,40 +4365,40 @@ func TestPhp7(t *testing.T) { &stmt.While{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1909, - EndPos: 1934, + EndLine: 84, + StartPos: 1909, + EndPos: 1934, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1916, - EndPos: 1916, + EndLine: 84, + StartPos: 1916, + EndPos: 1916, }, Value: "1", }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1919, - EndPos: 1934, + EndLine: 84, + StartPos: 1919, + EndPos: 1934, }, Stmts: []node.Node{ &stmt.Continue{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1921, - EndPos: 1932, + EndLine: 84, + StartPos: 1921, + EndPos: 1932, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 1930, - EndPos: 1930, + EndLine: 84, + StartPos: 1930, + EndPos: 1930, }, Value: "3", }, @@ -4419,34 +4409,34 @@ func TestPhp7(t *testing.T) { &stmt.Declare{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 1938, - EndPos: 1954, + EndLine: 85, + StartPos: 1938, + EndPos: 1954, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 1946, - EndPos: 1952, + EndLine: 85, + StartPos: 1946, + EndPos: 1952, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 1946, - EndPos: 1950, + EndLine: 85, + StartPos: 1946, + EndPos: 1950, }, Value: "ticks", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 1952, - EndPos: 1952, + EndLine: 85, + StartPos: 1952, + EndPos: 1952, }, Value: "1", }, @@ -4455,43 +4445,43 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.Nop{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 1954, - EndPos: 1954, + EndLine: 85, + StartPos: 1954, + EndPos: 1954, }, }, }, &stmt.Declare{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 1958, - EndPos: 1976, + EndLine: 86, + StartPos: 1958, + EndPos: 1976, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 1966, - EndPos: 1972, + EndLine: 86, + StartPos: 1966, + EndPos: 1972, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 1966, - EndPos: 1970, + EndLine: 86, + StartPos: 1966, + EndPos: 1970, }, Value: "ticks", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 1972, - EndPos: 1972, + EndLine: 86, + StartPos: 1972, + EndPos: 1972, }, Value: "1", }, @@ -4500,45 +4490,44 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 1975, - EndPos: 1976, - }, - Stmts: []node.Node{ + EndLine: 86, + StartPos: 1975, + EndPos: 1976, }, + Stmts: []node.Node{}, }, }, &stmt.Declare{ Position: &position.Position{ StartLine: 87, - EndLine: 87, - StartPos: 1980, - EndPos: 2008, + EndLine: 87, + StartPos: 1980, + EndPos: 2008, }, Consts: []node.Node{ &stmt.Constant{ Position: &position.Position{ StartLine: 87, - EndLine: 87, - StartPos: 1988, - EndPos: 1994, + EndLine: 87, + StartPos: 1988, + EndPos: 1994, }, PhpDocComment: "", ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 87, - EndLine: 87, - StartPos: 1988, - EndPos: 1992, + EndLine: 87, + StartPos: 1988, + EndPos: 1992, }, Value: "ticks", }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 87, - EndLine: 87, - StartPos: 1994, - EndPos: 1994, + EndLine: 87, + StartPos: 1994, + EndPos: 1994, }, Value: "1", }, @@ -4547,37 +4536,35 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 87, - EndLine: 87, - StartPos: 1996, - EndPos: 2008, - }, - Stmts: []node.Node{ + EndLine: 87, + StartPos: 1996, + EndPos: 2008, }, + Stmts: []node.Node{}, }, }, &stmt.Do{ Position: &position.Position{ StartLine: 88, - EndLine: 88, - StartPos: 2012, - EndPos: 2026, + EndLine: 88, + StartPos: 2012, + EndPos: 2026, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 88, - EndLine: 88, - StartPos: 2015, - EndPos: 2016, - }, - Stmts: []node.Node{ + EndLine: 88, + StartPos: 2015, + EndPos: 2016, }, + Stmts: []node.Node{}, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 88, - EndLine: 88, - StartPos: 2024, - EndPos: 2024, + EndLine: 88, + StartPos: 2024, + EndPos: 2024, }, Value: "1", }, @@ -4585,24 +4572,24 @@ func TestPhp7(t *testing.T) { &stmt.Echo{ Position: &position.Position{ StartLine: 89, - EndLine: 89, - StartPos: 2030, - EndPos: 2040, + EndLine: 89, + StartPos: 2030, + EndPos: 2040, }, Exprs: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 89, - EndLine: 89, - StartPos: 2035, - EndPos: 2036, + EndLine: 89, + StartPos: 2035, + EndPos: 2036, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 89, - EndLine: 89, - StartPos: 2035, - EndPos: 2036, + EndLine: 89, + StartPos: 2035, + EndPos: 2036, }, Value: "a", }, @@ -4610,9 +4597,9 @@ func TestPhp7(t *testing.T) { &scalar.Lnumber{ Position: &position.Position{ StartLine: 89, - EndLine: 89, - StartPos: 2039, - EndPos: 2039, + EndLine: 89, + StartPos: 2039, + EndPos: 2039, }, Value: "1", }, @@ -4621,24 +4608,24 @@ func TestPhp7(t *testing.T) { &stmt.Echo{ Position: &position.Position{ StartLine: 90, - EndLine: 90, - StartPos: 2044, - EndPos: 2052, + EndLine: 90, + StartPos: 2044, + EndPos: 2052, }, Exprs: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 90, - EndLine: 90, - StartPos: 2049, - EndPos: 2050, + EndLine: 90, + StartPos: 2049, + EndPos: 2050, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 90, - EndLine: 90, - StartPos: 2049, - EndPos: 2050, + EndLine: 90, + StartPos: 2049, + EndPos: 2050, }, Value: "a", }, @@ -4648,31 +4635,31 @@ func TestPhp7(t *testing.T) { &stmt.For{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2056, - EndPos: 2090, + EndLine: 91, + StartPos: 2056, + EndPos: 2090, }, Init: []node.Node{ &assign.Assign{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2060, - EndPos: 2065, + EndLine: 91, + StartPos: 2060, + EndPos: 2065, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2060, - EndPos: 2061, + EndLine: 91, + StartPos: 2060, + EndPos: 2061, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2060, - EndPos: 2061, + EndLine: 91, + StartPos: 2060, + EndPos: 2061, }, Value: "i", }, @@ -4680,9 +4667,9 @@ func TestPhp7(t *testing.T) { Expression: &scalar.Lnumber{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2065, - EndPos: 2065, + EndLine: 91, + StartPos: 2065, + EndPos: 2065, }, Value: "0", }, @@ -4692,23 +4679,23 @@ func TestPhp7(t *testing.T) { &binary.Smaller{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2068, - EndPos: 2074, + EndLine: 91, + StartPos: 2068, + EndPos: 2074, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2068, - EndPos: 2069, + EndLine: 91, + StartPos: 2068, + EndPos: 2069, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2068, - EndPos: 2069, + EndLine: 91, + StartPos: 2068, + EndPos: 2069, }, Value: "i", }, @@ -4716,9 +4703,9 @@ func TestPhp7(t *testing.T) { Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2073, - EndPos: 2074, + EndLine: 91, + StartPos: 2073, + EndPos: 2074, }, Value: "10", }, @@ -4728,23 +4715,23 @@ func TestPhp7(t *testing.T) { &expr.PostInc{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2077, - EndPos: 2080, + EndLine: 91, + StartPos: 2077, + EndPos: 2080, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2077, - EndPos: 2078, + EndLine: 91, + StartPos: 2077, + EndPos: 2078, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2077, - EndPos: 2078, + EndLine: 91, + StartPos: 2077, + EndPos: 2078, }, Value: "i", }, @@ -4753,23 +4740,23 @@ func TestPhp7(t *testing.T) { &expr.PostInc{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2083, - EndPos: 2086, + EndLine: 91, + StartPos: 2083, + EndPos: 2086, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2083, - EndPos: 2084, + EndLine: 91, + StartPos: 2083, + EndPos: 2084, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2083, - EndPos: 2084, + EndLine: 91, + StartPos: 2083, + EndPos: 2084, }, Value: "i", }, @@ -4779,42 +4766,41 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2089, - EndPos: 2090, - }, - Stmts: []node.Node{ + EndLine: 91, + StartPos: 2089, + EndPos: 2090, }, + Stmts: []node.Node{}, }, }, &stmt.AltFor{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2094, - EndPos: 2129, + EndLine: 92, + StartPos: 2094, + EndPos: 2129, }, Cond: []node.Node{ &binary.Smaller{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2100, - EndPos: 2106, + EndLine: 92, + StartPos: 2100, + EndPos: 2106, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2100, - EndPos: 2101, + EndLine: 92, + StartPos: 2100, + EndPos: 2101, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2100, - EndPos: 2101, + EndLine: 92, + StartPos: 2100, + EndPos: 2101, }, Value: "i", }, @@ -4822,9 +4808,9 @@ func TestPhp7(t *testing.T) { Right: &scalar.Lnumber{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2105, - EndPos: 2106, + EndLine: 92, + StartPos: 2105, + EndPos: 2106, }, Value: "10", }, @@ -4834,23 +4820,23 @@ func TestPhp7(t *testing.T) { &expr.PostInc{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2109, - EndPos: 2112, + EndLine: 92, + StartPos: 2109, + EndPos: 2112, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2109, - EndPos: 2110, + EndLine: 92, + StartPos: 2109, + EndPos: 2110, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2109, - EndPos: 2110, + EndLine: 92, + StartPos: 2109, + EndPos: 2110, }, Value: "i", }, @@ -4859,23 +4845,23 @@ func TestPhp7(t *testing.T) { &expr.PostInc{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2115, - EndPos: 2118, + EndLine: 92, + StartPos: 2115, + EndPos: 2118, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2115, - EndPos: 2116, + EndLine: 92, + StartPos: 2115, + EndPos: 2116, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 92, - EndLine: 92, - StartPos: 2115, - EndPos: 2116, + EndLine: 92, + StartPos: 2115, + EndPos: 2116, }, Value: "i", }, @@ -4885,34 +4871,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 93, - EndLine: 93, - StartPos: 2133, - EndPos: 2153, + EndLine: 93, + StartPos: 2133, + EndPos: 2153, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 93, - EndLine: 93, - StartPos: 2142, - EndPos: 2143, + EndLine: 93, + StartPos: 2142, + EndPos: 2143, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 93, - EndLine: 93, - StartPos: 2142, - EndPos: 2143, + EndLine: 93, + StartPos: 2142, + EndPos: 2143, }, Value: "a", }, @@ -4920,16 +4905,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 93, - EndLine: 93, - StartPos: 2148, - EndPos: 2149, + EndLine: 93, + StartPos: 2148, + EndPos: 2149, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 93, - EndLine: 93, - StartPos: 2148, - EndPos: 2149, + EndLine: 93, + StartPos: 2148, + EndPos: 2149, }, Value: "v", }, @@ -4937,34 +4922,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 93, - EndLine: 93, - StartPos: 2152, - EndPos: 2153, - }, - Stmts: []node.Node{ + EndLine: 93, + StartPos: 2152, + EndPos: 2153, }, + Stmts: []node.Node{}, }, }, &stmt.AltForeach{ Position: &position.Position{ StartLine: 94, - EndLine: 94, - StartPos: 2157, - EndPos: 2188, + EndLine: 94, + StartPos: 2157, + EndPos: 2188, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 94, - EndLine: 94, - StartPos: 2166, - EndPos: 2167, + EndLine: 94, + StartPos: 2166, + EndPos: 2167, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 94, - EndLine: 94, - StartPos: 2166, - EndPos: 2167, + EndLine: 94, + StartPos: 2166, + EndPos: 2167, }, Value: "a", }, @@ -4972,16 +4956,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 94, - EndLine: 94, - StartPos: 2172, - EndPos: 2173, + EndLine: 94, + StartPos: 2172, + EndPos: 2173, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 94, - EndLine: 94, - StartPos: 2172, - EndPos: 2173, + EndLine: 94, + StartPos: 2172, + EndPos: 2173, }, Value: "v", }, @@ -4989,34 +4973,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: -1, + EndPos: -1, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2192, - EndPos: 2218, + EndLine: 95, + StartPos: 2192, + EndPos: 2218, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2201, - EndPos: 2202, + EndLine: 95, + StartPos: 2201, + EndPos: 2202, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2201, - EndPos: 2202, + EndLine: 95, + StartPos: 2201, + EndPos: 2202, }, Value: "a", }, @@ -5024,16 +5007,16 @@ func TestPhp7(t *testing.T) { Key: &expr.Variable{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2207, - EndPos: 2208, + EndLine: 95, + StartPos: 2207, + EndPos: 2208, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2207, - EndPos: 2208, + EndLine: 95, + StartPos: 2207, + EndPos: 2208, }, Value: "k", }, @@ -5041,16 +5024,16 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2213, - EndPos: 2214, + EndLine: 95, + StartPos: 2213, + EndPos: 2214, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2213, - EndPos: 2214, + EndLine: 95, + StartPos: 2213, + EndPos: 2214, }, Value: "v", }, @@ -5058,34 +5041,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2217, - EndPos: 2218, - }, - Stmts: []node.Node{ + EndLine: 95, + StartPos: 2217, + EndPos: 2218, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2222, - EndPos: 2249, + EndLine: 96, + StartPos: 2222, + EndPos: 2249, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2231, - EndPos: 2232, + EndLine: 96, + StartPos: 2231, + EndPos: 2232, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2231, - EndPos: 2232, + EndLine: 96, + StartPos: 2231, + EndPos: 2232, }, Value: "a", }, @@ -5093,16 +5075,16 @@ func TestPhp7(t *testing.T) { Key: &expr.Variable{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2237, - EndPos: 2238, + EndLine: 96, + StartPos: 2237, + EndPos: 2238, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2237, - EndPos: 2238, + EndLine: 96, + StartPos: 2237, + EndPos: 2238, }, Value: "k", }, @@ -5110,23 +5092,23 @@ func TestPhp7(t *testing.T) { Variable: &expr.Reference{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2243, - EndPos: 2245, + EndLine: 96, + StartPos: 2243, + EndPos: 2245, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2244, - EndPos: 2245, + EndLine: 96, + StartPos: 2244, + EndPos: 2245, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2244, - EndPos: 2245, + EndLine: 96, + StartPos: 2244, + EndPos: 2245, }, Value: "v", }, @@ -5135,34 +5117,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2248, - EndPos: 2249, - }, - Stmts: []node.Node{ + EndLine: 96, + StartPos: 2248, + EndPos: 2249, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2253, - EndPos: 2285, + EndLine: 97, + StartPos: 2253, + EndPos: 2285, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2262, - EndPos: 2263, + EndLine: 97, + StartPos: 2262, + EndPos: 2263, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2262, - EndPos: 2263, + EndLine: 97, + StartPos: 2262, + EndPos: 2263, }, Value: "a", }, @@ -5170,16 +5151,16 @@ func TestPhp7(t *testing.T) { Key: &expr.Variable{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2268, - EndPos: 2269, + EndLine: 97, + StartPos: 2268, + EndPos: 2269, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2268, - EndPos: 2269, + EndLine: 97, + StartPos: 2268, + EndPos: 2269, }, Value: "k", }, @@ -5187,31 +5168,31 @@ func TestPhp7(t *testing.T) { Variable: &expr.List{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2274, - EndPos: 2281, + EndLine: 97, + StartPos: 2274, + EndPos: 2281, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2279, - EndPos: 2280, + EndLine: 97, + StartPos: 2279, + EndPos: 2280, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2279, - EndPos: 2280, + EndLine: 97, + StartPos: 2279, + EndPos: 2280, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2279, - EndPos: 2280, + EndLine: 97, + StartPos: 2279, + EndPos: 2280, }, Value: "v", }, @@ -5222,34 +5203,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2284, - EndPos: 2285, - }, - Stmts: []node.Node{ + EndLine: 97, + StartPos: 2284, + EndPos: 2285, }, + Stmts: []node.Node{}, }, }, &stmt.Foreach{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2289, - EndPos: 2317, + EndLine: 98, + StartPos: 2289, + EndPos: 2317, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2298, - EndPos: 2299, + EndLine: 98, + StartPos: 2298, + EndPos: 2299, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2298, - EndPos: 2299, + EndLine: 98, + StartPos: 2298, + EndPos: 2299, }, Value: "a", }, @@ -5257,16 +5237,16 @@ func TestPhp7(t *testing.T) { Key: &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2304, - EndPos: 2305, + EndLine: 98, + StartPos: 2304, + EndPos: 2305, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2304, - EndPos: 2305, + EndLine: 98, + StartPos: 2304, + EndPos: 2305, }, Value: "k", }, @@ -5274,31 +5254,31 @@ func TestPhp7(t *testing.T) { Variable: &expr.ShortList{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2310, - EndPos: 2313, + EndLine: 98, + StartPos: 2310, + EndPos: 2313, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2311, - EndPos: 2312, + EndLine: 98, + StartPos: 2311, + EndPos: 2312, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2311, - EndPos: 2312, + EndLine: 98, + StartPos: 2311, + EndPos: 2312, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2311, - EndPos: 2312, + EndLine: 98, + StartPos: 2311, + EndPos: 2312, }, Value: "v", }, @@ -5309,50 +5289,48 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2316, - EndPos: 2317, - }, - Stmts: []node.Node{ + EndLine: 98, + StartPos: 2316, + EndPos: 2317, }, + Stmts: []node.Node{}, }, }, &stmt.Function{ Position: &position.Position{ StartLine: 99, - EndLine: 99, - StartPos: 2321, - EndPos: 2337, + EndLine: 99, + StartPos: 2321, + EndPos: 2337, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 99, - EndLine: 99, - StartPos: 2330, - EndPos: 2332, + EndLine: 99, + StartPos: 2330, + EndPos: 2332, }, Value: "foo", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Function{ Position: &position.Position{ StartLine: 100, - EndLine: 100, - StartPos: 2341, - EndPos: 2364, + EndLine: 100, + StartPos: 2341, + EndPos: 2364, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 100, - EndLine: 100, - StartPos: 2350, - EndPos: 2352, + EndLine: 100, + StartPos: 2350, + EndPos: 2352, }, Value: "foo", }, @@ -5360,9 +5338,9 @@ func TestPhp7(t *testing.T) { &stmt.Return{ Position: &position.Position{ StartLine: 100, - EndLine: 100, - StartPos: 2357, - EndPos: 2363, + EndLine: 100, + StartPos: 2357, + EndPos: 2363, }, }, }, @@ -5370,18 +5348,18 @@ func TestPhp7(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 101, - EndLine: 101, - StartPos: 2368, - EndPos: 2394, + EndLine: 101, + StartPos: 2368, + EndPos: 2394, }, - ReturnsRef: true, + ReturnsRef: true, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 101, - EndLine: 101, - StartPos: 2378, - EndPos: 2380, + EndLine: 101, + StartPos: 2378, + EndPos: 2380, }, Value: "foo", }, @@ -5389,16 +5367,16 @@ func TestPhp7(t *testing.T) { &stmt.Return{ Position: &position.Position{ StartLine: 101, - EndLine: 101, - StartPos: 2385, - EndPos: 2393, + EndLine: 101, + StartPos: 2385, + EndPos: 2393, }, Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 101, - EndLine: 101, - StartPos: 2392, - EndPos: 2392, + EndLine: 101, + StartPos: 2392, + EndPos: 2392, }, Value: "1", }, @@ -5408,64 +5386,63 @@ func TestPhp7(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2398, - EndPos: 2421, + EndLine: 102, + StartPos: 2398, + EndPos: 2421, }, - ReturnsRef: true, + ReturnsRef: true, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2408, - EndPos: 2410, + EndLine: 102, + StartPos: 2408, + EndPos: 2410, }, Value: "foo", }, ReturnType: &name.Name{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2415, - EndPos: 2418, + EndLine: 102, + StartPos: 2415, + EndPos: 2418, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2415, - EndPos: 2418, + EndLine: 102, + StartPos: 2415, + EndPos: 2418, }, Value: "void", }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Global{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2425, - EndPos: 2438, + EndLine: 103, + StartPos: 2425, + EndPos: 2438, }, Vars: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2432, - EndPos: 2433, + EndLine: 103, + StartPos: 2432, + EndPos: 2433, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2432, - EndPos: 2433, + EndLine: 103, + StartPos: 2432, + EndPos: 2433, }, Value: "a", }, @@ -5473,16 +5450,16 @@ func TestPhp7(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2436, - EndPos: 2437, + EndLine: 103, + StartPos: 2436, + EndPos: 2437, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2436, - EndPos: 2437, + EndLine: 103, + StartPos: 2436, + EndPos: 2437, }, Value: "b", }, @@ -5492,16 +5469,16 @@ func TestPhp7(t *testing.T) { &stmt.Label{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2442, - EndPos: 2443, + EndLine: 104, + StartPos: 2442, + EndPos: 2443, }, LabelName: &node.Identifier{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2442, - EndPos: 2442, + EndLine: 104, + StartPos: 2442, + EndPos: 2442, }, Value: "a", }, @@ -5509,16 +5486,16 @@ func TestPhp7(t *testing.T) { &stmt.Goto{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2448, - EndPos: 2454, + EndLine: 105, + StartPos: 2448, + EndPos: 2454, }, Label: &node.Identifier{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2453, - EndPos: 2453, + EndLine: 105, + StartPos: 2453, + EndPos: 2453, }, Value: "a", }, @@ -5526,31 +5503,31 @@ func TestPhp7(t *testing.T) { &stmt.HaltCompiler{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2458, - EndPos: 2475, + EndLine: 106, + StartPos: 2458, + EndPos: 2475, }, }, &stmt.If{ Position: &position.Position{ StartLine: 107, - EndLine: 107, - StartPos: 2479, - EndPos: 2488, + EndLine: 107, + StartPos: 2479, + EndPos: 2488, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 107, - EndLine: 107, - StartPos: 2483, - EndPos: 2484, + EndLine: 107, + StartPos: 2483, + EndPos: 2484, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 107, - EndLine: 107, - StartPos: 2483, - EndPos: 2484, + EndLine: 107, + StartPos: 2483, + EndPos: 2484, }, Value: "a", }, @@ -5558,34 +5535,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 107, - EndLine: 107, - StartPos: 2487, - EndPos: 2488, - }, - Stmts: []node.Node{ + EndLine: 107, + StartPos: 2487, + EndPos: 2488, }, + Stmts: []node.Node{}, }, }, &stmt.If{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2492, - EndPos: 2516, + EndLine: 108, + StartPos: 2492, + EndPos: 2516, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2496, - EndPos: 2497, + EndLine: 108, + StartPos: 2496, + EndPos: 2497, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2496, - EndPos: 2497, + EndLine: 108, + StartPos: 2496, + EndPos: 2497, }, Value: "a", }, @@ -5593,34 +5569,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2500, - EndPos: 2501, - }, - Stmts: []node.Node{ + EndLine: 108, + StartPos: 2500, + EndPos: 2501, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.ElseIf{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2503, - EndPos: 2516, + EndLine: 108, + StartPos: 2503, + EndPos: 2516, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2511, - EndPos: 2512, + EndLine: 108, + StartPos: 2511, + EndPos: 2512, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2511, - EndPos: 2512, + EndLine: 108, + StartPos: 2511, + EndPos: 2512, }, Value: "b", }, @@ -5628,12 +5603,11 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2515, - EndPos: 2516, - }, - Stmts: []node.Node{ + EndLine: 108, + StartPos: 2515, + EndPos: 2516, }, + Stmts: []node.Node{}, }, }, }, @@ -5641,23 +5615,23 @@ func TestPhp7(t *testing.T) { &stmt.If{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2520, - EndPos: 2537, + EndLine: 109, + StartPos: 2520, + EndPos: 2537, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2524, - EndPos: 2525, + EndLine: 109, + StartPos: 2524, + EndPos: 2525, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2524, - EndPos: 2525, + EndLine: 109, + StartPos: 2524, + EndPos: 2525, }, Value: "a", }, @@ -5665,52 +5639,50 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2528, - EndPos: 2529, - }, - Stmts: []node.Node{ + EndLine: 109, + StartPos: 2528, + EndPos: 2529, }, + Stmts: []node.Node{}, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2531, - EndPos: 2537, + EndLine: 109, + StartPos: 2531, + EndPos: 2537, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2536, - EndPos: 2537, - }, - Stmts: []node.Node{ + EndLine: 109, + StartPos: 2536, + EndPos: 2537, }, + Stmts: []node.Node{}, }, }, }, &stmt.If{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2541, - EndPos: 2588, + EndLine: 110, + StartPos: 2541, + EndPos: 2588, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2545, - EndPos: 2546, + EndLine: 110, + StartPos: 2545, + EndPos: 2546, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2545, - EndPos: 2546, + EndLine: 110, + StartPos: 2545, + EndPos: 2546, }, Value: "a", }, @@ -5718,34 +5690,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2549, - EndPos: 2550, - }, - Stmts: []node.Node{ + EndLine: 110, + StartPos: 2549, + EndPos: 2550, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.ElseIf{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2552, - EndPos: 2565, + EndLine: 110, + StartPos: 2552, + EndPos: 2565, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2560, - EndPos: 2561, + EndLine: 110, + StartPos: 2560, + EndPos: 2561, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2560, - EndPos: 2561, + EndLine: 110, + StartPos: 2560, + EndPos: 2561, }, Value: "b", }, @@ -5753,34 +5724,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2564, - EndPos: 2565, - }, - Stmts: []node.Node{ + EndLine: 110, + StartPos: 2564, + EndPos: 2565, }, + Stmts: []node.Node{}, }, }, &stmt.ElseIf{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2567, - EndPos: 2580, + EndLine: 110, + StartPos: 2567, + EndPos: 2580, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2575, - EndPos: 2576, + EndLine: 110, + StartPos: 2575, + EndPos: 2576, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2575, - EndPos: 2576, + EndLine: 110, + StartPos: 2575, + EndPos: 2576, }, Value: "c", }, @@ -5788,54 +5758,52 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2579, - EndPos: 2580, - }, - Stmts: []node.Node{ + EndLine: 110, + StartPos: 2579, + EndPos: 2580, }, + Stmts: []node.Node{}, }, }, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2582, - EndPos: 2588, + EndLine: 110, + StartPos: 2582, + EndPos: 2588, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2587, - EndPos: 2588, - }, - Stmts: []node.Node{ + EndLine: 110, + StartPos: 2587, + EndPos: 2588, }, + Stmts: []node.Node{}, }, }, }, &stmt.If{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2592, - EndPos: 2640, + EndLine: 111, + StartPos: 2592, + EndPos: 2640, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2596, - EndPos: 2597, + EndLine: 111, + StartPos: 2596, + EndPos: 2597, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2596, - EndPos: 2597, + EndLine: 111, + StartPos: 2596, + EndPos: 2597, }, Value: "a", }, @@ -5843,34 +5811,33 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2600, - EndPos: 2601, - }, - Stmts: []node.Node{ + EndLine: 111, + StartPos: 2600, + EndPos: 2601, }, + Stmts: []node.Node{}, }, ElseIf: []node.Node{ &stmt.ElseIf{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2603, - EndPos: 2616, + EndLine: 111, + StartPos: 2603, + EndPos: 2616, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2611, - EndPos: 2612, + EndLine: 111, + StartPos: 2611, + EndPos: 2612, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2611, - EndPos: 2612, + EndLine: 111, + StartPos: 2611, + EndPos: 2612, }, Value: "b", }, @@ -5878,42 +5845,41 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2615, - EndPos: 2616, - }, - Stmts: []node.Node{ + EndLine: 111, + StartPos: 2615, + EndPos: 2616, }, + Stmts: []node.Node{}, }, }, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2618, - EndPos: 2640, + EndLine: 111, + StartPos: 2618, + EndPos: 2640, }, Stmt: &stmt.If{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2623, - EndPos: 2640, + EndLine: 111, + StartPos: 2623, + EndPos: 2640, }, Cond: &expr.Variable{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2627, - EndPos: 2628, + EndLine: 111, + StartPos: 2627, + EndPos: 2628, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2627, - EndPos: 2628, + EndLine: 111, + StartPos: 2627, + EndPos: 2628, }, Value: "c", }, @@ -5921,29 +5887,27 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2631, - EndPos: 2632, - }, - Stmts: []node.Node{ + EndLine: 111, + StartPos: 2631, + EndPos: 2632, }, + Stmts: []node.Node{}, }, Else: &stmt.Else{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2634, - EndPos: 2640, + EndLine: 111, + StartPos: 2634, + EndPos: 2640, }, Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2639, - EndPos: 2640, - }, - Stmts: []node.Node{ + EndLine: 111, + StartPos: 2639, + EndPos: 2640, }, + Stmts: []node.Node{}, }, }, }, @@ -5952,79 +5916,78 @@ func TestPhp7(t *testing.T) { &stmt.Nop{ Position: &position.Position{ StartLine: 112, - EndLine: 112, - StartPos: 2644, - EndPos: 2645, + EndLine: 112, + StartPos: 2644, + EndPos: 2645, }, }, &stmt.InlineHtml{ Position: &position.Position{ StartLine: 112, - EndLine: 112, - StartPos: 2647, - EndPos: 2658, + EndLine: 112, + StartPos: 2647, + EndPos: 2658, }, Value: "
", }, &stmt.Interface{ Position: &position.Position{ StartLine: 113, - EndLine: 113, - StartPos: 2664, - EndPos: 2679, + EndLine: 113, + StartPos: 2664, + EndPos: 2679, }, PhpDocComment: "", InterfaceName: &node.Identifier{ Position: &position.Position{ StartLine: 113, - EndLine: 113, - StartPos: 2674, - EndPos: 2676, + EndLine: 113, + StartPos: 2674, + EndPos: 2676, }, Value: "Foo", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Interface{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2683, - EndPos: 2710, + EndLine: 114, + StartPos: 2683, + EndPos: 2710, }, PhpDocComment: "", InterfaceName: &node.Identifier{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2693, - EndPos: 2695, + EndLine: 114, + StartPos: 2693, + EndPos: 2695, }, Value: "Foo", }, Extends: &stmt.InterfaceExtends{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2697, - EndPos: 2707, + EndLine: 114, + StartPos: 2697, + EndPos: 2707, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2705, - EndPos: 2707, + EndLine: 114, + StartPos: 2705, + EndPos: 2707, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 114, - EndLine: 114, - StartPos: 2705, - EndPos: 2707, + EndLine: 114, + StartPos: 2705, + EndPos: 2707, }, Value: "Bar", }, @@ -6032,48 +5995,47 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Interface{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2714, - EndPos: 2746, + EndLine: 115, + StartPos: 2714, + EndPos: 2746, }, PhpDocComment: "", InterfaceName: &node.Identifier{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2724, - EndPos: 2726, + EndLine: 115, + StartPos: 2724, + EndPos: 2726, }, Value: "Foo", }, Extends: &stmt.InterfaceExtends{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2728, - EndPos: 2743, + EndLine: 115, + StartPos: 2728, + EndPos: 2743, }, InterfaceNames: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2736, - EndPos: 2738, + EndLine: 115, + StartPos: 2736, + EndPos: 2738, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2736, - EndPos: 2738, + EndLine: 115, + StartPos: 2736, + EndPos: 2738, }, Value: "Bar", }, @@ -6082,17 +6044,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2741, - EndPos: 2743, + EndLine: 115, + StartPos: 2741, + EndPos: 2743, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 115, - EndLine: 115, - StartPos: 2741, - EndPos: 2743, + EndLine: 115, + StartPos: 2741, + EndPos: 2743, }, Value: "Baz", }, @@ -6100,30 +6062,29 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Namespace{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2750, - EndPos: 2763, + EndLine: 116, + StartPos: 2750, + EndPos: 2763, }, NamespaceName: &name.Name{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2760, - EndPos: 2762, + EndLine: 116, + StartPos: 2760, + EndPos: 2762, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 116, - EndLine: 116, - StartPos: 2760, - EndPos: 2762, + EndLine: 116, + StartPos: 2760, + EndPos: 2762, }, Value: "Foo", }, @@ -6133,56 +6094,54 @@ func TestPhp7(t *testing.T) { &stmt.Namespace{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2767, - EndPos: 2782, + EndLine: 117, + StartPos: 2767, + EndPos: 2782, }, NamespaceName: &name.Name{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2777, - EndPos: 2779, + EndLine: 117, + StartPos: 2777, + EndPos: 2779, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 117, - EndLine: 117, - StartPos: 2777, - EndPos: 2779, + EndLine: 117, + StartPos: 2777, + EndPos: 2779, }, Value: "Foo", }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Namespace{ Position: &position.Position{ StartLine: 118, - EndLine: 118, - StartPos: 2786, - EndPos: 2797, - }, - Stmts: []node.Node{ + EndLine: 118, + StartPos: 2786, + EndPos: 2797, }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 119, - EndLine: 119, - StartPos: 2801, - EndPos: 2819, + EndLine: 119, + StartPos: 2801, + EndPos: 2819, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 119, - EndLine: 119, - StartPos: 2807, - EndPos: 2809, + EndLine: 119, + StartPos: 2807, + EndPos: 2809, }, Value: "foo", }, @@ -6190,17 +6149,17 @@ func TestPhp7(t *testing.T) { &stmt.PropertyList{ Position: &position.Position{ StartLine: 119, - EndLine: 119, - StartPos: 2812, - EndPos: 2818, + EndLine: 119, + StartPos: 2812, + EndPos: 2818, }, Modifiers: []node.Node{ &node.Identifier{ Position: &position.Position{ StartLine: 119, - EndLine: 119, - StartPos: 2812, - EndPos: 2814, + EndLine: 119, + StartPos: 2812, + EndPos: 2814, }, Value: "var", }, @@ -6209,24 +6168,24 @@ func TestPhp7(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 119, - EndLine: 119, - StartPos: 2816, - EndPos: 2817, + EndLine: 119, + StartPos: 2816, + EndPos: 2817, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 119, - EndLine: 119, - StartPos: 2816, - EndPos: 2817, + EndLine: 119, + StartPos: 2816, + EndPos: 2817, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 119, - EndLine: 119, - StartPos: 2816, - EndPos: 2817, + EndLine: 119, + StartPos: 2816, + EndPos: 2817, }, Value: "a", }, @@ -6239,17 +6198,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2823, - EndPos: 2859, + EndLine: 120, + StartPos: 2823, + EndPos: 2859, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2829, - EndPos: 2831, + EndLine: 120, + StartPos: 2829, + EndPos: 2831, }, Value: "foo", }, @@ -6257,26 +6216,26 @@ func TestPhp7(t *testing.T) { &stmt.PropertyList{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2834, - EndPos: 2858, + EndLine: 120, + StartPos: 2834, + EndPos: 2858, }, Modifiers: []node.Node{ &node.Identifier{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2834, - EndPos: 2839, + EndLine: 120, + StartPos: 2834, + EndPos: 2839, }, Value: "public", }, &node.Identifier{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2841, - EndPos: 2846, + EndLine: 120, + StartPos: 2841, + EndPos: 2846, }, Value: "static", }, @@ -6285,24 +6244,24 @@ func TestPhp7(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2848, - EndPos: 2849, + EndLine: 120, + StartPos: 2848, + EndPos: 2849, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2848, - EndPos: 2849, + EndLine: 120, + StartPos: 2848, + EndPos: 2849, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2848, - EndPos: 2849, + EndLine: 120, + StartPos: 2848, + EndPos: 2849, }, Value: "a", }, @@ -6311,24 +6270,24 @@ func TestPhp7(t *testing.T) { &stmt.Property{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2852, - EndPos: 2857, + EndLine: 120, + StartPos: 2852, + EndPos: 2857, }, PhpDocComment: "", Variable: &expr.Variable{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2852, - EndPos: 2853, + EndLine: 120, + StartPos: 2852, + EndPos: 2853, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2852, - EndPos: 2853, + EndLine: 120, + StartPos: 2852, + EndPos: 2853, }, Value: "b", }, @@ -6336,9 +6295,9 @@ func TestPhp7(t *testing.T) { Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 120, - EndLine: 120, - StartPos: 2857, - EndPos: 2857, + EndLine: 120, + StartPos: 2857, + EndPos: 2857, }, Value: "1", }, @@ -6350,31 +6309,31 @@ func TestPhp7(t *testing.T) { &stmt.Static{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2863, - EndPos: 2880, + EndLine: 121, + StartPos: 2863, + EndPos: 2880, }, Vars: []node.Node{ &stmt.StaticVar{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2870, - EndPos: 2871, + EndLine: 121, + StartPos: 2870, + EndPos: 2871, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2870, - EndPos: 2871, + EndLine: 121, + StartPos: 2870, + EndPos: 2871, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2870, - EndPos: 2871, + EndLine: 121, + StartPos: 2870, + EndPos: 2871, }, Value: "a", }, @@ -6383,23 +6342,23 @@ func TestPhp7(t *testing.T) { &stmt.StaticVar{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2874, - EndPos: 2879, + EndLine: 121, + StartPos: 2874, + EndPos: 2879, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2874, - EndPos: 2875, + EndLine: 121, + StartPos: 2874, + EndPos: 2875, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2874, - EndPos: 2875, + EndLine: 121, + StartPos: 2874, + EndPos: 2875, }, Value: "b", }, @@ -6407,9 +6366,9 @@ func TestPhp7(t *testing.T) { Expr: &scalar.Lnumber{ Position: &position.Position{ StartLine: 121, - EndLine: 121, - StartPos: 2879, - EndPos: 2879, + EndLine: 121, + StartPos: 2879, + EndPos: 2879, }, Value: "1", }, @@ -6419,74 +6378,71 @@ func TestPhp7(t *testing.T) { &stmt.AltSwitch{ Position: &position.Position{ StartLine: 123, - EndLine: 127, - StartPos: 2885, - EndPos: 2943, + EndLine: 127, + StartPos: 2885, + EndPos: 2943, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 123, - EndLine: 123, - StartPos: 2893, - EndPos: 2893, + EndLine: 123, + StartPos: 2893, + EndPos: 2893, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 124, - EndLine: -1, - StartPos: 2901, - EndPos: -1, + EndLine: -1, + StartPos: 2901, + EndPos: -1, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 124, - EndLine: -1, - StartPos: 2901, - EndPos: -1, + EndLine: -1, + StartPos: 2901, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 124, - EndLine: 124, - StartPos: 2906, - EndPos: 2906, + EndLine: 124, + StartPos: 2906, + EndPos: 2906, }, Value: "1", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Default{ Position: &position.Position{ StartLine: 125, - EndLine: -1, - StartPos: 2912, - EndPos: -1, - }, - Stmts: []node.Node{ + EndLine: -1, + StartPos: 2912, + EndPos: -1, }, + Stmts: []node.Node{}, }, &stmt.Case{ Position: &position.Position{ StartLine: 126, - EndLine: -1, - StartPos: 2924, - EndPos: -1, + EndLine: -1, + StartPos: 2924, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 126, - EndLine: 126, - StartPos: 2929, - EndPos: 2929, + EndLine: 126, + StartPos: 2929, + EndPos: 2929, }, Value: "2", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, @@ -6494,64 +6450,62 @@ func TestPhp7(t *testing.T) { &stmt.AltSwitch{ Position: &position.Position{ StartLine: 129, - EndLine: 132, - StartPos: 2948, - EndPos: 2995, + EndLine: 132, + StartPos: 2948, + EndPos: 2995, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 129, - EndLine: 129, - StartPos: 2956, - EndPos: 2956, + EndLine: 129, + StartPos: 2956, + EndPos: 2956, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 130, - EndLine: -1, - StartPos: 2965, - EndPos: -1, + EndLine: -1, + StartPos: 2965, + EndPos: -1, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 130, - EndLine: -1, - StartPos: 2965, - EndPos: -1, + EndLine: -1, + StartPos: 2965, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 130, - EndLine: 130, - StartPos: 2970, - EndPos: 2970, + EndLine: 130, + StartPos: 2970, + EndPos: 2970, }, Value: "1", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Case{ Position: &position.Position{ StartLine: 131, - EndLine: -1, - StartPos: 2976, - EndPos: -1, + EndLine: -1, + StartPos: 2976, + EndPos: -1, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 131, - EndLine: 131, - StartPos: 2981, - EndPos: 2981, + EndLine: 131, + StartPos: 2981, + EndPos: 2981, }, Value: "2", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, @@ -6559,40 +6513,40 @@ func TestPhp7(t *testing.T) { &stmt.Switch{ Position: &position.Position{ StartLine: 134, - EndLine: 137, - StartPos: 3002, - EndPos: 3053, + EndLine: 137, + StartPos: 3002, + EndPos: 3053, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 134, - EndLine: 134, - StartPos: 3010, - EndPos: 3010, + EndLine: 134, + StartPos: 3010, + EndPos: 3010, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 134, - EndLine: 137, - StartPos: 3013, - EndPos: 3053, + EndLine: 137, + StartPos: 3013, + EndPos: 3053, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 135, - EndLine: 135, - StartPos: 3018, - EndPos: 3031, + EndLine: 135, + StartPos: 3018, + EndPos: 3031, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 135, - EndLine: 135, - StartPos: 3023, - EndPos: 3023, + EndLine: 135, + StartPos: 3023, + EndPos: 3023, }, Value: "1", }, @@ -6600,9 +6554,9 @@ func TestPhp7(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 135, - EndLine: 135, - StartPos: 3026, - EndPos: 3031, + EndLine: 135, + StartPos: 3026, + EndPos: 3031, }, }, }, @@ -6610,16 +6564,16 @@ func TestPhp7(t *testing.T) { &stmt.Case{ Position: &position.Position{ StartLine: 136, - EndLine: 136, - StartPos: 3036, - EndPos: 3049, + EndLine: 136, + StartPos: 3036, + EndPos: 3049, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 136, - EndLine: 136, - StartPos: 3041, - EndPos: 3041, + EndLine: 136, + StartPos: 3041, + EndPos: 3041, }, Value: "2", }, @@ -6627,9 +6581,9 @@ func TestPhp7(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 136, - EndLine: 136, - StartPos: 3044, - EndPos: 3049, + EndLine: 136, + StartPos: 3044, + EndPos: 3049, }, }, }, @@ -6640,40 +6594,40 @@ func TestPhp7(t *testing.T) { &stmt.Switch{ Position: &position.Position{ StartLine: 139, - EndLine: 142, - StartPos: 3060, - EndPos: 3112, + EndLine: 142, + StartPos: 3060, + EndPos: 3112, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 139, - EndLine: 139, - StartPos: 3068, - EndPos: 3068, + EndLine: 139, + StartPos: 3068, + EndPos: 3068, }, Value: "1", }, CaseList: &stmt.CaseList{ Position: &position.Position{ StartLine: 139, - EndLine: 142, - StartPos: 3071, - EndPos: 3112, + EndLine: 142, + StartPos: 3071, + EndPos: 3112, }, Cases: []node.Node{ &stmt.Case{ Position: &position.Position{ StartLine: 140, - EndLine: 140, - StartPos: 3077, - EndPos: 3090, + EndLine: 140, + StartPos: 3077, + EndPos: 3090, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 140, - EndLine: 140, - StartPos: 3082, - EndPos: 3082, + EndLine: 140, + StartPos: 3082, + EndPos: 3082, }, Value: "1", }, @@ -6681,9 +6635,9 @@ func TestPhp7(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 140, - EndLine: 140, - StartPos: 3085, - EndPos: 3090, + EndLine: 140, + StartPos: 3085, + EndPos: 3090, }, }, }, @@ -6691,16 +6645,16 @@ func TestPhp7(t *testing.T) { &stmt.Case{ Position: &position.Position{ StartLine: 141, - EndLine: 141, - StartPos: 3095, - EndPos: 3108, + EndLine: 141, + StartPos: 3095, + EndPos: 3108, }, Cond: &scalar.Lnumber{ Position: &position.Position{ StartLine: 141, - EndLine: 141, - StartPos: 3100, - EndPos: 3100, + EndLine: 141, + StartPos: 3100, + EndPos: 3100, }, Value: "2", }, @@ -6708,9 +6662,9 @@ func TestPhp7(t *testing.T) { &stmt.Break{ Position: &position.Position{ StartLine: 141, - EndLine: 141, - StartPos: 3103, - EndPos: 3108, + EndLine: 141, + StartPos: 3103, + EndPos: 3108, }, }, }, @@ -6721,23 +6675,23 @@ func TestPhp7(t *testing.T) { &stmt.Throw{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3117, - EndPos: 3125, + EndLine: 144, + StartPos: 3117, + EndPos: 3125, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3123, - EndPos: 3124, + EndLine: 144, + StartPos: 3123, + EndPos: 3124, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 144, - EndLine: 144, - StartPos: 3123, - EndPos: 3124, + EndLine: 144, + StartPos: 3123, + EndPos: 3124, }, Value: "e", }, @@ -6746,37 +6700,36 @@ func TestPhp7(t *testing.T) { &stmt.Trait{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3130, - EndPos: 3141, + EndLine: 146, + StartPos: 3130, + EndPos: 3141, }, PhpDocComment: "", TraitName: &node.Identifier{ Position: &position.Position{ StartLine: 146, - EndLine: 146, - StartPos: 3136, - EndPos: 3138, + EndLine: 146, + StartPos: 3136, + EndPos: 3138, }, Value: "Foo", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 147, - EndLine: 147, - StartPos: 3145, - EndPos: 3166, + EndLine: 147, + StartPos: 3145, + EndPos: 3166, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 147, - EndLine: 147, - StartPos: 3151, - EndPos: 3153, + EndLine: 147, + StartPos: 3151, + EndPos: 3153, }, Value: "Foo", }, @@ -6784,25 +6737,25 @@ func TestPhp7(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 147, - EndLine: 147, - StartPos: 3157, - EndPos: 3164, + EndLine: 147, + StartPos: 3157, + EndPos: 3164, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 147, - EndLine: 147, - StartPos: 3161, - EndPos: 3163, + EndLine: 147, + StartPos: 3161, + EndPos: 3163, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 147, - EndLine: 147, - StartPos: 3161, - EndPos: 3163, + EndLine: 147, + StartPos: 3161, + EndPos: 3163, }, Value: "Bar", }, @@ -6815,17 +6768,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3170, - EndPos: 3198, + EndLine: 148, + StartPos: 3170, + EndPos: 3198, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3176, - EndPos: 3178, + EndLine: 148, + StartPos: 3176, + EndPos: 3178, }, Value: "Foo", }, @@ -6833,25 +6786,25 @@ func TestPhp7(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3182, - EndPos: 3196, + EndLine: 148, + StartPos: 3182, + EndPos: 3196, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3186, - EndPos: 3188, + EndLine: 148, + StartPos: 3186, + EndPos: 3188, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3186, - EndPos: 3188, + EndLine: 148, + StartPos: 3186, + EndPos: 3188, }, Value: "Bar", }, @@ -6860,17 +6813,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3191, - EndPos: 3193, + EndLine: 148, + StartPos: 3191, + EndPos: 3193, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3191, - EndPos: 3193, + EndLine: 148, + StartPos: 3191, + EndPos: 3193, }, Value: "Baz", }, @@ -6880,9 +6833,9 @@ func TestPhp7(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 148, - EndLine: 148, - StartPos: 3195, - EndPos: 3196, + EndLine: 148, + StartPos: 3195, + EndPos: 3196, }, }, }, @@ -6891,17 +6844,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3202, - EndPos: 3247, + EndLine: 149, + StartPos: 3202, + EndPos: 3247, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3208, - EndPos: 3210, + EndLine: 149, + StartPos: 3208, + EndPos: 3210, }, Value: "Foo", }, @@ -6909,25 +6862,25 @@ func TestPhp7(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3214, - EndPos: 3245, + EndLine: 149, + StartPos: 3214, + EndPos: 3245, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3218, - EndPos: 3220, + EndLine: 149, + StartPos: 3218, + EndPos: 3220, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3218, - EndPos: 3220, + EndLine: 149, + StartPos: 3218, + EndPos: 3220, }, Value: "Bar", }, @@ -6936,17 +6889,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3223, - EndPos: 3225, + EndLine: 149, + StartPos: 3223, + EndPos: 3225, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3223, - EndPos: 3225, + EndLine: 149, + StartPos: 3223, + EndPos: 3225, }, Value: "Baz", }, @@ -6956,31 +6909,31 @@ func TestPhp7(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3227, - EndPos: 3245, + EndLine: 149, + StartPos: 3227, + EndPos: 3245, }, Adaptations: []node.Node{ &stmt.TraitUseAlias{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3229, - EndPos: 3242, + EndLine: 149, + StartPos: 3229, + EndPos: 3242, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3229, - EndPos: 3231, + EndLine: 149, + StartPos: 3229, + EndPos: 3231, }, Method: &node.Identifier{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3229, - EndPos: 3231, + EndLine: 149, + StartPos: 3229, + EndPos: 3231, }, Value: "one", }, @@ -6988,9 +6941,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3236, - EndPos: 3242, + EndLine: 149, + StartPos: 3236, + EndPos: 3242, }, Value: "include", }, @@ -7003,17 +6956,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3251, - EndPos: 3295, + EndLine: 150, + StartPos: 3251, + EndPos: 3295, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3257, - EndPos: 3259, + EndLine: 150, + StartPos: 3257, + EndPos: 3259, }, Value: "Foo", }, @@ -7021,25 +6974,25 @@ func TestPhp7(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3263, - EndPos: 3293, + EndLine: 150, + StartPos: 3263, + EndPos: 3293, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3267, - EndPos: 3269, + EndLine: 150, + StartPos: 3267, + EndPos: 3269, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3267, - EndPos: 3269, + EndLine: 150, + StartPos: 3267, + EndPos: 3269, }, Value: "Bar", }, @@ -7048,17 +7001,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3272, - EndPos: 3274, + EndLine: 150, + StartPos: 3272, + EndPos: 3274, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3272, - EndPos: 3274, + EndLine: 150, + StartPos: 3272, + EndPos: 3274, }, Value: "Baz", }, @@ -7068,31 +7021,31 @@ func TestPhp7(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3276, - EndPos: 3293, + EndLine: 150, + StartPos: 3276, + EndPos: 3293, }, Adaptations: []node.Node{ &stmt.TraitUseAlias{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3278, - EndPos: 3290, + EndLine: 150, + StartPos: 3278, + EndPos: 3290, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3278, - EndPos: 3280, + EndLine: 150, + StartPos: 3278, + EndPos: 3280, }, Method: &node.Identifier{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3278, - EndPos: 3280, + EndLine: 150, + StartPos: 3278, + EndPos: 3280, }, Value: "one", }, @@ -7100,9 +7053,9 @@ func TestPhp7(t *testing.T) { Modifier: &node.Identifier{ Position: &position.Position{ StartLine: 150, - EndLine: 150, - StartPos: 3285, - EndPos: 3290, + EndLine: 150, + StartPos: 3285, + EndPos: 3290, }, Value: "public", }, @@ -7115,17 +7068,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3299, - EndPos: 3347, + EndLine: 151, + StartPos: 3299, + EndPos: 3347, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3305, - EndPos: 3307, + EndLine: 151, + StartPos: 3305, + EndPos: 3307, }, Value: "Foo", }, @@ -7133,25 +7086,25 @@ func TestPhp7(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3311, - EndPos: 3345, + EndLine: 151, + StartPos: 3311, + EndPos: 3345, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3315, - EndPos: 3317, + EndLine: 151, + StartPos: 3315, + EndPos: 3317, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3315, - EndPos: 3317, + EndLine: 151, + StartPos: 3315, + EndPos: 3317, }, Value: "Bar", }, @@ -7160,17 +7113,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3320, - EndPos: 3322, + EndLine: 151, + StartPos: 3320, + EndPos: 3322, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3320, - EndPos: 3322, + EndLine: 151, + StartPos: 3320, + EndPos: 3322, }, Value: "Baz", }, @@ -7180,31 +7133,31 @@ func TestPhp7(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3324, - EndPos: 3345, + EndLine: 151, + StartPos: 3324, + EndPos: 3345, }, Adaptations: []node.Node{ &stmt.TraitUseAlias{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3326, - EndPos: 3342, + EndLine: 151, + StartPos: 3326, + EndPos: 3342, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3326, - EndPos: 3328, + EndLine: 151, + StartPos: 3326, + EndPos: 3328, }, Method: &node.Identifier{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3326, - EndPos: 3328, + EndLine: 151, + StartPos: 3326, + EndPos: 3328, }, Value: "one", }, @@ -7212,18 +7165,18 @@ func TestPhp7(t *testing.T) { Modifier: &node.Identifier{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3333, - EndPos: 3338, + EndLine: 151, + StartPos: 3333, + EndPos: 3338, }, Value: "public", }, Alias: &node.Identifier{ Position: &position.Position{ StartLine: 151, - EndLine: 151, - StartPos: 3340, - EndPos: 3342, + EndLine: 151, + StartPos: 3340, + EndPos: 3342, }, Value: "two", }, @@ -7236,17 +7189,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3351, - EndPos: 3427, + EndLine: 152, + StartPos: 3351, + EndPos: 3427, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3357, - EndPos: 3359, + EndLine: 152, + StartPos: 3357, + EndPos: 3359, }, Value: "Foo", }, @@ -7254,25 +7207,25 @@ func TestPhp7(t *testing.T) { &stmt.TraitUse{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3363, - EndPos: 3425, + EndLine: 152, + StartPos: 3363, + EndPos: 3425, }, Traits: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3367, - EndPos: 3369, + EndLine: 152, + StartPos: 3367, + EndPos: 3369, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3367, - EndPos: 3369, + EndLine: 152, + StartPos: 3367, + EndPos: 3369, }, Value: "Bar", }, @@ -7281,17 +7234,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3372, - EndPos: 3374, + EndLine: 152, + StartPos: 3372, + EndPos: 3374, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3372, - EndPos: 3374, + EndLine: 152, + StartPos: 3372, + EndPos: 3374, }, Value: "Baz", }, @@ -7301,39 +7254,39 @@ func TestPhp7(t *testing.T) { TraitAdaptationList: &stmt.TraitAdaptationList{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3376, - EndPos: 3425, + EndLine: 152, + StartPos: 3376, + EndPos: 3425, }, Adaptations: []node.Node{ &stmt.TraitUsePrecedence{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3378, - EndPos: 3405, + EndLine: 152, + StartPos: 3378, + EndPos: 3405, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3378, - EndPos: 3385, + EndLine: 152, + StartPos: 3378, + EndPos: 3385, }, Trait: &name.Name{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3378, - EndPos: 3380, + EndLine: 152, + StartPos: 3378, + EndPos: 3380, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3378, - EndPos: 3380, + EndLine: 152, + StartPos: 3378, + EndPos: 3380, }, Value: "Bar", }, @@ -7342,9 +7295,9 @@ func TestPhp7(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3383, - EndPos: 3385, + EndLine: 152, + StartPos: 3383, + EndPos: 3385, }, Value: "one", }, @@ -7353,17 +7306,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3397, - EndPos: 3399, + EndLine: 152, + StartPos: 3397, + EndPos: 3399, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3397, - EndPos: 3399, + EndLine: 152, + StartPos: 3397, + EndPos: 3399, }, Value: "Baz", }, @@ -7372,17 +7325,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3402, - EndPos: 3405, + EndLine: 152, + StartPos: 3402, + EndPos: 3405, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3402, - EndPos: 3405, + EndLine: 152, + StartPos: 3402, + EndPos: 3405, }, Value: "Quux", }, @@ -7393,31 +7346,31 @@ func TestPhp7(t *testing.T) { &stmt.TraitUseAlias{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3408, - EndPos: 3422, + EndLine: 152, + StartPos: 3408, + EndPos: 3422, }, Ref: &stmt.TraitMethodRef{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3408, - EndPos: 3415, + EndLine: 152, + StartPos: 3408, + EndPos: 3415, }, Trait: &name.Name{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3408, - EndPos: 3410, + EndLine: 152, + StartPos: 3408, + EndPos: 3410, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3408, - EndPos: 3410, + EndLine: 152, + StartPos: 3408, + EndPos: 3410, }, Value: "Baz", }, @@ -7426,9 +7379,9 @@ func TestPhp7(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3413, - EndPos: 3415, + EndLine: 152, + StartPos: 3413, + EndPos: 3415, }, Value: "one", }, @@ -7436,9 +7389,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 152, - EndLine: 152, - StartPos: 3420, - EndPos: 3422, + EndLine: 152, + StartPos: 3420, + EndPos: 3422, }, Value: "two", }, @@ -7451,47 +7404,44 @@ func TestPhp7(t *testing.T) { &stmt.Try{ Position: &position.Position{ StartLine: 154, - EndLine: -1, - StartPos: 3432, - EndPos: -1, - }, - Stmts: []node.Node{ - }, - Catches: []node.Node{ + EndLine: -1, + StartPos: 3432, + EndPos: -1, }, + Stmts: []node.Node{}, + Catches: []node.Node{}, }, &stmt.Try{ Position: &position.Position{ StartLine: 155, - EndLine: 155, - StartPos: 3441, - EndPos: 3470, - }, - Stmts: []node.Node{ + EndLine: 155, + StartPos: 3441, + EndPos: 3470, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 155, - EndLine: 155, - StartPos: 3448, - EndPos: 3470, + EndLine: 155, + StartPos: 3448, + EndPos: 3470, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 155, - EndLine: 155, - StartPos: 3455, - EndPos: 3463, + EndLine: 155, + StartPos: 3455, + EndPos: 3463, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 155, - EndLine: 155, - StartPos: 3455, - EndPos: 3463, + EndLine: 155, + StartPos: 3455, + EndPos: 3463, }, Value: "Exception", }, @@ -7501,57 +7451,55 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 155, - EndLine: 155, - StartPos: 3465, - EndPos: 3466, + EndLine: 155, + StartPos: 3465, + EndPos: 3466, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 155, - EndLine: 155, - StartPos: 3465, - EndPos: 3466, + EndLine: 155, + StartPos: 3465, + EndPos: 3466, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Try{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3474, - EndPos: 3520, - }, - Stmts: []node.Node{ + EndLine: 156, + StartPos: 3474, + EndPos: 3520, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3481, - EndPos: 3520, + EndLine: 156, + StartPos: 3481, + EndPos: 3520, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3488, - EndPos: 3496, + EndLine: 156, + StartPos: 3488, + EndPos: 3496, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3488, - EndPos: 3496, + EndLine: 156, + StartPos: 3488, + EndPos: 3496, }, Value: "Exception", }, @@ -7560,17 +7508,17 @@ func TestPhp7(t *testing.T) { &name.Name{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3498, - EndPos: 3513, + EndLine: 156, + StartPos: 3498, + EndPos: 3513, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3498, - EndPos: 3513, + EndLine: 156, + StartPos: 3498, + EndPos: 3513, }, Value: "RuntimeException", }, @@ -7580,57 +7528,55 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3515, - EndPos: 3516, + EndLine: 156, + StartPos: 3515, + EndPos: 3516, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 156, - EndLine: 156, - StartPos: 3515, - EndPos: 3516, + EndLine: 156, + StartPos: 3515, + EndPos: 3516, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Try{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3524, - EndPos: 3584, - }, - Stmts: []node.Node{ + EndLine: 157, + StartPos: 3524, + EndPos: 3584, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3531, - EndPos: 3553, + EndLine: 157, + StartPos: 3531, + EndPos: 3553, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3538, - EndPos: 3546, + EndLine: 157, + StartPos: 3538, + EndPos: 3546, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3538, - EndPos: 3546, + EndLine: 157, + StartPos: 3538, + EndPos: 3546, }, Value: "Exception", }, @@ -7640,45 +7586,44 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3548, - EndPos: 3549, + EndLine: 157, + StartPos: 3548, + EndPos: 3549, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3548, - EndPos: 3549, + EndLine: 157, + StartPos: 3548, + EndPos: 3549, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Catch{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3555, - EndPos: 3584, + EndLine: 157, + StartPos: 3555, + EndPos: 3584, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3562, - EndPos: 3577, + EndLine: 157, + StartPos: 3562, + EndPos: 3577, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3562, - EndPos: 3577, + EndLine: 157, + StartPos: 3562, + EndPos: 3577, }, Value: "RuntimeException", }, @@ -7688,57 +7633,55 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3579, - EndPos: 3580, + EndLine: 157, + StartPos: 3579, + EndPos: 3580, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 157, - EndLine: 157, - StartPos: 3579, - EndPos: 3580, + EndLine: 157, + StartPos: 3579, + EndPos: 3580, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Try{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3588, - EndPos: 3628, - }, - Stmts: []node.Node{ + EndLine: 158, + StartPos: 3588, + EndPos: 3628, }, + Stmts: []node.Node{}, Catches: []node.Node{ &stmt.Catch{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3595, - EndPos: 3617, + EndLine: 158, + StartPos: 3595, + EndPos: 3617, }, Types: []node.Node{ &name.Name{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3602, - EndPos: 3610, + EndLine: 158, + StartPos: 3602, + EndPos: 3610, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3602, - EndPos: 3610, + EndLine: 158, + StartPos: 3602, + EndPos: 3610, }, Value: "Exception", }, @@ -7748,56 +7691,54 @@ func TestPhp7(t *testing.T) { Variable: &expr.Variable{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3612, - EndPos: 3613, + EndLine: 158, + StartPos: 3612, + EndPos: 3613, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3612, - EndPos: 3613, + EndLine: 158, + StartPos: 3612, + EndPos: 3613, }, Value: "e", }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, Finally: &stmt.Finally{ Position: &position.Position{ StartLine: 158, - EndLine: 158, - StartPos: 3619, - EndPos: 3628, - }, - Stmts: []node.Node{ + EndLine: 158, + StartPos: 3619, + EndPos: 3628, }, + Stmts: []node.Node{}, }, }, &stmt.Unset{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3633, - EndPos: 3647, + EndLine: 160, + StartPos: 3633, + EndPos: 3647, }, Vars: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3639, - EndPos: 3640, + EndLine: 160, + StartPos: 3639, + EndPos: 3640, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3639, - EndPos: 3640, + EndLine: 160, + StartPos: 3639, + EndPos: 3640, }, Value: "a", }, @@ -7805,16 +7746,16 @@ func TestPhp7(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3643, - EndPos: 3644, + EndLine: 160, + StartPos: 3643, + EndPos: 3644, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 160, - EndLine: 160, - StartPos: 3643, - EndPos: 3644, + EndLine: 160, + StartPos: 3643, + EndPos: 3644, }, Value: "b", }, @@ -7824,32 +7765,32 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3652, - EndPos: 3659, + EndLine: 162, + StartPos: 3652, + EndPos: 3659, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3656, - EndPos: 3658, + EndLine: 162, + StartPos: 3656, + EndPos: 3658, }, Use: &name.Name{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3656, - EndPos: 3658, + EndLine: 162, + StartPos: 3656, + EndPos: 3658, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 162, - EndLine: 162, - StartPos: 3656, - EndPos: 3658, + EndLine: 162, + StartPos: 3656, + EndPos: 3658, }, Value: "Foo", }, @@ -7861,32 +7802,32 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3663, - EndPos: 3671, + EndLine: 163, + StartPos: 3663, + EndPos: 3671, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3668, - EndPos: 3670, + EndLine: 163, + StartPos: 3668, + EndPos: 3670, }, Use: &name.Name{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3668, - EndPos: 3670, + EndLine: 163, + StartPos: 3668, + EndPos: 3670, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 163, - EndLine: 163, - StartPos: 3668, - EndPos: 3670, + EndLine: 163, + StartPos: 3668, + EndPos: 3670, }, Value: "Foo", }, @@ -7898,32 +7839,32 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3675, - EndPos: 3690, + EndLine: 164, + StartPos: 3675, + EndPos: 3690, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3680, - EndPos: 3689, + EndLine: 164, + StartPos: 3680, + EndPos: 3689, }, Use: &name.Name{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3680, - EndPos: 3682, + EndLine: 164, + StartPos: 3680, + EndPos: 3682, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3680, - EndPos: 3682, + EndLine: 164, + StartPos: 3680, + EndPos: 3682, }, Value: "Foo", }, @@ -7932,9 +7873,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 164, - EndLine: 164, - StartPos: 3687, - EndPos: 3689, + EndLine: 164, + StartPos: 3687, + EndPos: 3689, }, Value: "Bar", }, @@ -7944,32 +7885,32 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 165, - EndLine: 165, - StartPos: 3694, - EndPos: 3706, + EndLine: 165, + StartPos: 3694, + EndPos: 3706, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 165, - EndLine: 165, - StartPos: 3698, - EndPos: 3700, + EndLine: 165, + StartPos: 3698, + EndPos: 3700, }, Use: &name.Name{ Position: &position.Position{ StartLine: 165, - EndLine: 165, - StartPos: 3698, - EndPos: 3700, + EndLine: 165, + StartPos: 3698, + EndPos: 3700, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 165, - EndLine: 165, - StartPos: 3698, - EndPos: 3700, + EndLine: 165, + StartPos: 3698, + EndPos: 3700, }, Value: "Foo", }, @@ -7979,24 +7920,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 165, - EndLine: 165, - StartPos: 3703, - EndPos: 3705, + EndLine: 165, + StartPos: 3703, + EndPos: 3705, }, Use: &name.Name{ Position: &position.Position{ StartLine: 165, - EndLine: 165, - StartPos: 3703, - EndPos: 3705, + EndLine: 165, + StartPos: 3703, + EndPos: 3705, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 165, - EndLine: 165, - StartPos: 3703, - EndPos: 3705, + EndLine: 165, + StartPos: 3703, + EndPos: 3705, }, Value: "Bar", }, @@ -8008,32 +7949,32 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3710, - EndPos: 3729, + EndLine: 166, + StartPos: 3710, + EndPos: 3729, }, Uses: []node.Node{ &stmt.Use{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3714, - EndPos: 3716, + EndLine: 166, + StartPos: 3714, + EndPos: 3716, }, Use: &name.Name{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3714, - EndPos: 3716, + EndLine: 166, + StartPos: 3714, + EndPos: 3716, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3714, - EndPos: 3716, + EndLine: 166, + StartPos: 3714, + EndPos: 3716, }, Value: "Foo", }, @@ -8043,24 +7984,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3719, - EndPos: 3728, + EndLine: 166, + StartPos: 3719, + EndPos: 3728, }, Use: &name.Name{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3719, - EndPos: 3721, + EndLine: 166, + StartPos: 3719, + EndPos: 3721, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3719, - EndPos: 3721, + EndLine: 166, + StartPos: 3719, + EndPos: 3721, }, Value: "Bar", }, @@ -8069,9 +8010,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 166, - EndLine: 166, - StartPos: 3726, - EndPos: 3728, + EndLine: 166, + StartPos: 3726, + EndPos: 3728, }, Value: "Baz", }, @@ -8081,16 +8022,16 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3733, - EndPos: 3755, + EndLine: 167, + StartPos: 3733, + EndPos: 3755, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3737, - EndPos: 3744, + EndLine: 167, + StartPos: 3737, + EndPos: 3744, }, Value: "function", }, @@ -8098,24 +8039,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3746, - EndPos: 3748, + EndLine: 167, + StartPos: 3746, + EndPos: 3748, }, Use: &name.Name{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3746, - EndPos: 3748, + EndLine: 167, + StartPos: 3746, + EndPos: 3748, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3746, - EndPos: 3748, + EndLine: 167, + StartPos: 3746, + EndPos: 3748, }, Value: "Foo", }, @@ -8125,24 +8066,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3752, - EndPos: 3754, + EndLine: 167, + StartPos: 3752, + EndPos: 3754, }, Use: &name.Name{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3752, - EndPos: 3754, + EndLine: 167, + StartPos: 3752, + EndPos: 3754, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 167, - EndLine: 167, - StartPos: 3752, - EndPos: 3754, + EndLine: 167, + StartPos: 3752, + EndPos: 3754, }, Value: "Bar", }, @@ -8154,16 +8095,16 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3759, - EndPos: 3795, + EndLine: 168, + StartPos: 3759, + EndPos: 3795, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3763, - EndPos: 3770, + EndLine: 168, + StartPos: 3763, + EndPos: 3770, }, Value: "function", }, @@ -8171,24 +8112,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3772, - EndPos: 3781, + EndLine: 168, + StartPos: 3772, + EndPos: 3781, }, Use: &name.Name{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3772, - EndPos: 3774, + EndLine: 168, + StartPos: 3772, + EndPos: 3774, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3772, - EndPos: 3774, + EndLine: 168, + StartPos: 3772, + EndPos: 3774, }, Value: "Foo", }, @@ -8197,9 +8138,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3779, - EndPos: 3781, + EndLine: 168, + StartPos: 3779, + EndPos: 3781, }, Value: "foo", }, @@ -8207,24 +8148,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3785, - EndPos: 3794, + EndLine: 168, + StartPos: 3785, + EndPos: 3794, }, Use: &name.Name{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3785, - EndPos: 3787, + EndLine: 168, + StartPos: 3785, + EndPos: 3787, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3785, - EndPos: 3787, + EndLine: 168, + StartPos: 3785, + EndPos: 3787, }, Value: "Bar", }, @@ -8233,9 +8174,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 168, - EndLine: 168, - StartPos: 3792, - EndPos: 3794, + EndLine: 168, + StartPos: 3792, + EndPos: 3794, }, Value: "bar", }, @@ -8245,16 +8186,16 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3799, - EndPos: 3818, + EndLine: 169, + StartPos: 3799, + EndPos: 3818, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3803, - EndPos: 3807, + EndLine: 169, + StartPos: 3803, + EndPos: 3807, }, Value: "const", }, @@ -8262,24 +8203,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3809, - EndPos: 3811, + EndLine: 169, + StartPos: 3809, + EndPos: 3811, }, Use: &name.Name{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3809, - EndPos: 3811, + EndLine: 169, + StartPos: 3809, + EndPos: 3811, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3809, - EndPos: 3811, + EndLine: 169, + StartPos: 3809, + EndPos: 3811, }, Value: "Foo", }, @@ -8289,24 +8230,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3815, - EndPos: 3817, + EndLine: 169, + StartPos: 3815, + EndPos: 3817, }, Use: &name.Name{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3815, - EndPos: 3817, + EndLine: 169, + StartPos: 3815, + EndPos: 3817, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 169, - EndLine: 169, - StartPos: 3815, - EndPos: 3817, + EndLine: 169, + StartPos: 3815, + EndPos: 3817, }, Value: "Bar", }, @@ -8318,16 +8259,16 @@ func TestPhp7(t *testing.T) { &stmt.UseList{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3822, - EndPos: 3855, + EndLine: 170, + StartPos: 3822, + EndPos: 3855, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3826, - EndPos: 3830, + EndLine: 170, + StartPos: 3826, + EndPos: 3830, }, Value: "const", }, @@ -8335,24 +8276,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3832, - EndPos: 3841, + EndLine: 170, + StartPos: 3832, + EndPos: 3841, }, Use: &name.Name{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3832, - EndPos: 3834, + EndLine: 170, + StartPos: 3832, + EndPos: 3834, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3832, - EndPos: 3834, + EndLine: 170, + StartPos: 3832, + EndPos: 3834, }, Value: "Foo", }, @@ -8361,9 +8302,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3839, - EndPos: 3841, + EndLine: 170, + StartPos: 3839, + EndPos: 3841, }, Value: "foo", }, @@ -8371,24 +8312,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3845, - EndPos: 3854, + EndLine: 170, + StartPos: 3845, + EndPos: 3854, }, Use: &name.Name{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3845, - EndPos: 3847, + EndLine: 170, + StartPos: 3845, + EndPos: 3847, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3845, - EndPos: 3847, + EndLine: 170, + StartPos: 3845, + EndPos: 3847, }, Value: "Bar", }, @@ -8397,9 +8338,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 170, - EndLine: 170, - StartPos: 3852, - EndPos: 3854, + EndLine: 170, + StartPos: 3852, + EndPos: 3854, }, Value: "bar", }, @@ -8409,24 +8350,24 @@ func TestPhp7(t *testing.T) { &stmt.GroupUse{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3860, - EndPos: 3879, + EndLine: 172, + StartPos: 3860, + EndPos: 3879, }, Prefix: &name.Name{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3865, - EndPos: 3867, + EndLine: 172, + StartPos: 3865, + EndPos: 3867, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3865, - EndPos: 3867, + EndLine: 172, + StartPos: 3865, + EndPos: 3867, }, Value: "Foo", }, @@ -8436,24 +8377,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3870, - EndPos: 3872, + EndLine: 172, + StartPos: 3870, + EndPos: 3872, }, Use: &name.Name{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3870, - EndPos: 3872, + EndLine: 172, + StartPos: 3870, + EndPos: 3872, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3870, - EndPos: 3872, + EndLine: 172, + StartPos: 3870, + EndPos: 3872, }, Value: "Bar", }, @@ -8463,24 +8404,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3875, - EndPos: 3877, + EndLine: 172, + StartPos: 3875, + EndPos: 3877, }, Use: &name.Name{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3875, - EndPos: 3877, + EndLine: 172, + StartPos: 3875, + EndPos: 3877, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 172, - EndLine: 172, - StartPos: 3875, - EndPos: 3877, + EndLine: 172, + StartPos: 3875, + EndPos: 3877, }, Value: "Baz", }, @@ -8492,24 +8433,24 @@ func TestPhp7(t *testing.T) { &stmt.GroupUse{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3883, - EndPos: 3909, + EndLine: 173, + StartPos: 3883, + EndPos: 3909, }, Prefix: &name.Name{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3887, - EndPos: 3889, + EndLine: 173, + StartPos: 3887, + EndPos: 3889, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3887, - EndPos: 3889, + EndLine: 173, + StartPos: 3887, + EndPos: 3889, }, Value: "Foo", }, @@ -8519,24 +8460,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3892, - EndPos: 3894, + EndLine: 173, + StartPos: 3892, + EndPos: 3894, }, Use: &name.Name{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3892, - EndPos: 3894, + EndLine: 173, + StartPos: 3892, + EndPos: 3894, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3892, - EndPos: 3894, + EndLine: 173, + StartPos: 3892, + EndPos: 3894, }, Value: "Bar", }, @@ -8546,24 +8487,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3897, - EndPos: 3907, + EndLine: 173, + StartPos: 3897, + EndPos: 3907, }, Use: &name.Name{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3897, - EndPos: 3899, + EndLine: 173, + StartPos: 3897, + EndPos: 3899, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3897, - EndPos: 3899, + EndLine: 173, + StartPos: 3897, + EndPos: 3899, }, Value: "Baz", }, @@ -8572,9 +8513,9 @@ func TestPhp7(t *testing.T) { Alias: &node.Identifier{ Position: &position.Position{ StartLine: 173, - EndLine: 173, - StartPos: 3904, - EndPos: 3907, + EndLine: 173, + StartPos: 3904, + EndPos: 3907, }, Value: "quux", }, @@ -8584,33 +8525,33 @@ func TestPhp7(t *testing.T) { &stmt.GroupUse{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3913, - EndPos: 3940, + EndLine: 174, + StartPos: 3913, + EndPos: 3940, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3917, - EndPos: 3924, + EndLine: 174, + StartPos: 3917, + EndPos: 3924, }, Value: "function", }, Prefix: &name.Name{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3926, - EndPos: 3928, + EndLine: 174, + StartPos: 3926, + EndPos: 3928, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3926, - EndPos: 3928, + EndLine: 174, + StartPos: 3926, + EndPos: 3928, }, Value: "Foo", }, @@ -8620,24 +8561,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3931, - EndPos: 3933, + EndLine: 174, + StartPos: 3931, + EndPos: 3933, }, Use: &name.Name{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3931, - EndPos: 3933, + EndLine: 174, + StartPos: 3931, + EndPos: 3933, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3931, - EndPos: 3933, + EndLine: 174, + StartPos: 3931, + EndPos: 3933, }, Value: "Bar", }, @@ -8647,24 +8588,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3936, - EndPos: 3938, + EndLine: 174, + StartPos: 3936, + EndPos: 3938, }, Use: &name.Name{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3936, - EndPos: 3938, + EndLine: 174, + StartPos: 3936, + EndPos: 3938, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 174, - EndLine: 174, - StartPos: 3936, - EndPos: 3938, + EndLine: 174, + StartPos: 3936, + EndPos: 3938, }, Value: "Baz", }, @@ -8676,33 +8617,33 @@ func TestPhp7(t *testing.T) { &stmt.GroupUse{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3944, - EndPos: 3969, + EndLine: 175, + StartPos: 3944, + EndPos: 3969, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3948, - EndPos: 3952, + EndLine: 175, + StartPos: 3948, + EndPos: 3952, }, Value: "const", }, Prefix: &name.Name{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3955, - EndPos: 3957, + EndLine: 175, + StartPos: 3955, + EndPos: 3957, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3955, - EndPos: 3957, + EndLine: 175, + StartPos: 3955, + EndPos: 3957, }, Value: "Foo", }, @@ -8712,24 +8653,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3960, - EndPos: 3962, + EndLine: 175, + StartPos: 3960, + EndPos: 3962, }, Use: &name.Name{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3960, - EndPos: 3962, + EndLine: 175, + StartPos: 3960, + EndPos: 3962, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3960, - EndPos: 3962, + EndLine: 175, + StartPos: 3960, + EndPos: 3962, }, Value: "Bar", }, @@ -8739,24 +8680,24 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3965, - EndPos: 3967, + EndLine: 175, + StartPos: 3965, + EndPos: 3967, }, Use: &name.Name{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3965, - EndPos: 3967, + EndLine: 175, + StartPos: 3965, + EndPos: 3967, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 175, - EndLine: 175, - StartPos: 3965, - EndPos: 3967, + EndLine: 175, + StartPos: 3965, + EndPos: 3967, }, Value: "Baz", }, @@ -8768,24 +8709,24 @@ func TestPhp7(t *testing.T) { &stmt.GroupUse{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3973, - EndPos: 4006, + EndLine: 176, + StartPos: 3973, + EndPos: 4006, }, Prefix: &name.Name{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3977, - EndPos: 3979, + EndLine: 176, + StartPos: 3977, + EndPos: 3979, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3977, - EndPos: 3979, + EndLine: 176, + StartPos: 3977, + EndPos: 3979, }, Value: "Foo", }, @@ -8795,33 +8736,33 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3988, - EndPos: 3990, + EndLine: 176, + StartPos: 3988, + EndPos: 3990, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3982, - EndPos: 3986, + EndLine: 176, + StartPos: 3982, + EndPos: 3986, }, Value: "const", }, Use: &name.Name{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3988, - EndPos: 3990, + EndLine: 176, + StartPos: 3988, + EndPos: 3990, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3988, - EndPos: 3990, + EndLine: 176, + StartPos: 3988, + EndPos: 3990, }, Value: "Bar", }, @@ -8831,33 +8772,33 @@ func TestPhp7(t *testing.T) { &stmt.Use{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 4002, - EndPos: 4004, + EndLine: 176, + StartPos: 4002, + EndPos: 4004, }, UseType: &node.Identifier{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 3993, - EndPos: 4000, + EndLine: 176, + StartPos: 3993, + EndPos: 4000, }, Value: "function", }, Use: &name.Name{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 4002, - EndPos: 4004, + EndLine: 176, + StartPos: 4002, + EndPos: 4004, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 176, - EndLine: 176, - StartPos: 4002, - EndPos: 4004, + EndLine: 176, + StartPos: 4002, + EndPos: 4004, }, Value: "Baz", }, @@ -8869,30 +8810,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 4011, - EndPos: 4016, + EndLine: 178, + StartPos: 4011, + EndPos: 4016, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 4011, - EndPos: 4015, + EndLine: 178, + StartPos: 4011, + EndPos: 4015, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 4011, - EndPos: 4012, + EndLine: 178, + StartPos: 4011, + EndPos: 4012, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 4011, - EndPos: 4012, + EndLine: 178, + StartPos: 4011, + EndPos: 4012, }, Value: "a", }, @@ -8900,9 +8841,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 178, - EndLine: 178, - StartPos: 4014, - EndPos: 4014, + EndLine: 178, + StartPos: 4014, + EndPos: 4014, }, Value: "1", }, @@ -8911,37 +8852,37 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 4020, - EndPos: 4028, + EndLine: 179, + StartPos: 4020, + EndPos: 4028, }, Expr: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 4020, - EndPos: 4027, + EndLine: 179, + StartPos: 4020, + EndPos: 4027, }, Variable: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 4020, - EndPos: 4024, + EndLine: 179, + StartPos: 4020, + EndPos: 4024, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 4020, - EndPos: 4021, + EndLine: 179, + StartPos: 4020, + EndPos: 4021, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 4020, - EndPos: 4021, + EndLine: 179, + StartPos: 4020, + EndPos: 4021, }, Value: "a", }, @@ -8949,9 +8890,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 4023, - EndPos: 4023, + EndLine: 179, + StartPos: 4023, + EndPos: 4023, }, Value: "1", }, @@ -8959,9 +8900,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 179, - EndLine: 179, - StartPos: 4026, - EndPos: 4026, + EndLine: 179, + StartPos: 4026, + EndPos: 4026, }, Value: "2", }, @@ -8970,49 +8911,48 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 4032, - EndPos: 4039, + EndLine: 180, + StartPos: 4032, + EndPos: 4039, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 180, - EndLine: 180, - StartPos: 4032, - EndPos: 4038, - }, - Items: []node.Node{ + EndLine: 180, + StartPos: 4032, + EndPos: 4038, }, + Items: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4043, - EndPos: 4051, + EndLine: 181, + StartPos: 4043, + EndPos: 4051, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4043, - EndPos: 4050, + EndLine: 181, + StartPos: 4043, + EndPos: 4050, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4049, - EndPos: 4049, + EndLine: 181, + StartPos: 4049, + EndPos: 4049, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 181, - EndLine: 181, - StartPos: 4049, - EndPos: 4049, + EndLine: 181, + StartPos: 4049, + EndPos: 4049, }, Value: "1", }, @@ -9023,40 +8963,40 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4055, - EndPos: 4072, + EndLine: 182, + StartPos: 4055, + EndPos: 4072, }, Expr: &expr.Array{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4055, - EndPos: 4071, + EndLine: 182, + StartPos: 4055, + EndPos: 4071, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4061, - EndPos: 4064, + EndLine: 182, + StartPos: 4061, + EndPos: 4064, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4061, - EndPos: 4061, + EndLine: 182, + StartPos: 4061, + EndPos: 4061, }, Value: "1", }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4064, - EndPos: 4064, + EndLine: 182, + StartPos: 4064, + EndPos: 4064, }, Value: "1", }, @@ -9064,30 +9004,30 @@ func TestPhp7(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4067, - EndPos: 4069, + EndLine: 182, + StartPos: 4067, + EndPos: 4069, }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4067, - EndPos: 4069, + EndLine: 182, + StartPos: 4067, + EndPos: 4069, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4068, - EndPos: 4069, + EndLine: 182, + StartPos: 4068, + EndPos: 4069, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 182, - EndLine: 182, - StartPos: 4068, - EndPos: 4069, + EndLine: 182, + StartPos: 4068, + EndPos: 4069, }, Value: "b", }, @@ -9100,30 +9040,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4076, - EndPos: 4079, + EndLine: 183, + StartPos: 4076, + EndPos: 4079, }, Expr: &expr.BitwiseNot{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4076, - EndPos: 4078, + EndLine: 183, + StartPos: 4076, + EndPos: 4078, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4077, - EndPos: 4078, + EndLine: 183, + StartPos: 4077, + EndPos: 4078, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 183, - EndLine: 183, - StartPos: 4077, - EndPos: 4078, + EndLine: 183, + StartPos: 4077, + EndPos: 4078, }, Value: "a", }, @@ -9133,30 +9073,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4083, - EndPos: 4086, + EndLine: 184, + StartPos: 4083, + EndPos: 4086, }, Expr: &expr.BooleanNot{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4083, - EndPos: 4085, + EndLine: 184, + StartPos: 4083, + EndPos: 4085, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4084, - EndPos: 4085, + EndLine: 184, + StartPos: 4084, + EndPos: 4085, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 184, - EndLine: 184, - StartPos: 4084, - EndPos: 4085, + EndLine: 184, + StartPos: 4084, + EndPos: 4085, }, Value: "a", }, @@ -9166,31 +9106,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 186, - EndLine: 186, - StartPos: 4091, - EndPos: 4099, + EndLine: 186, + StartPos: 4091, + EndPos: 4099, }, Expr: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 186, - EndLine: 186, - StartPos: 4091, - EndPos: 4098, + EndLine: 186, + StartPos: 4091, + EndPos: 4098, }, Class: &name.Name{ Position: &position.Position{ StartLine: 186, - EndLine: 186, - StartPos: 4091, - EndPos: 4093, + EndLine: 186, + StartPos: 4091, + EndPos: 4093, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 186, - EndLine: 186, - StartPos: 4091, - EndPos: 4093, + EndLine: 186, + StartPos: 4091, + EndPos: 4093, }, Value: "Foo", }, @@ -9199,9 +9139,9 @@ func TestPhp7(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 186, - EndLine: 186, - StartPos: 4096, - EndPos: 4098, + EndLine: 186, + StartPos: 4096, + EndPos: 4098, }, Value: "Bar", }, @@ -9210,30 +9150,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4103, - EndPos: 4112, + EndLine: 187, + StartPos: 4103, + EndPos: 4112, }, Expr: &expr.ClassConstFetch{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4103, - EndPos: 4111, + EndLine: 187, + StartPos: 4103, + EndPos: 4111, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4103, - EndPos: 4106, + EndLine: 187, + StartPos: 4103, + EndPos: 4106, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4103, - EndPos: 4106, + EndLine: 187, + StartPos: 4103, + EndPos: 4106, }, Value: "foo", }, @@ -9241,9 +9181,9 @@ func TestPhp7(t *testing.T) { ConstantName: &node.Identifier{ Position: &position.Position{ StartLine: 187, - EndLine: 187, - StartPos: 4109, - EndPos: 4111, + EndLine: 187, + StartPos: 4109, + EndPos: 4111, }, Value: "Bar", }, @@ -9252,30 +9192,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4116, - EndPos: 4125, + EndLine: 188, + StartPos: 4116, + EndPos: 4125, }, Expr: &expr.Clone{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4116, - EndPos: 4123, + EndLine: 188, + StartPos: 4116, + EndPos: 4123, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4122, - EndPos: 4123, + EndLine: 188, + StartPos: 4122, + EndPos: 4123, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 188, - EndLine: 188, - StartPos: 4122, - EndPos: 4123, + EndLine: 188, + StartPos: 4122, + EndPos: 4123, }, Value: "a", }, @@ -9285,30 +9225,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4129, - EndPos: 4137, + EndLine: 189, + StartPos: 4129, + EndPos: 4137, }, Expr: &expr.Clone{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4129, - EndPos: 4136, + EndLine: 189, + StartPos: 4129, + EndPos: 4136, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4135, - EndPos: 4136, + EndLine: 189, + StartPos: 4135, + EndPos: 4136, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 189, - EndLine: 189, - StartPos: 4135, - EndPos: 4136, + EndLine: 189, + StartPos: 4135, + EndPos: 4136, }, Value: "a", }, @@ -9318,64 +9258,63 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 190, - EndLine: 190, - StartPos: 4141, - EndPos: 4153, + EndLine: 190, + StartPos: 4141, + EndPos: 4153, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 190, - EndLine: 190, - StartPos: 4141, - EndPos: 4152, + EndLine: 190, + StartPos: 4141, + EndPos: 4152, }, - ReturnsRef: false, - Static: false, + ReturnsRef: false, + Static: false, PhpDocComment: "", - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4157, - EndPos: 4190, + EndLine: 191, + StartPos: 4157, + EndPos: 4190, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4157, - EndPos: 4189, + EndLine: 191, + StartPos: 4157, + EndPos: 4189, }, - Static: false, + Static: false, PhpDocComment: "", - ReturnsRef: false, + ReturnsRef: false, Params: []node.Node{ &node.Parameter{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4166, - EndPos: 4167, + EndLine: 191, + StartPos: 4166, + EndPos: 4167, }, - ByRef: false, + ByRef: false, Variadic: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4166, - EndPos: 4167, + EndLine: 191, + StartPos: 4166, + EndPos: 4167, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4166, - EndPos: 4167, + EndLine: 191, + StartPos: 4166, + EndPos: 4167, }, Value: "a", }, @@ -9384,25 +9323,25 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4170, - EndPos: 4171, + EndLine: 191, + StartPos: 4170, + EndPos: 4171, }, + ByRef: false, Variadic: false, - ByRef: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4170, - EndPos: 4171, + EndLine: 191, + StartPos: 4170, + EndPos: 4171, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4170, - EndPos: 4171, + EndLine: 191, + StartPos: 4170, + EndPos: 4171, }, Value: "b", }, @@ -9412,24 +9351,24 @@ func TestPhp7(t *testing.T) { ClosureUse: &expr.ClosureUse{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4174, - EndPos: 4186, + EndLine: 191, + StartPos: 4174, + EndPos: 4186, }, Uses: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4179, - EndPos: 4180, + EndLine: 191, + StartPos: 4179, + EndPos: 4180, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4179, - EndPos: 4180, + EndLine: 191, + StartPos: 4179, + EndPos: 4180, }, Value: "c", }, @@ -9437,23 +9376,23 @@ func TestPhp7(t *testing.T) { &expr.Reference{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4183, - EndPos: 4185, + EndLine: 191, + StartPos: 4183, + EndPos: 4185, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4184, - EndPos: 4185, + EndLine: 191, + StartPos: 4184, + EndPos: 4185, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 191, - EndLine: 191, - StartPos: 4184, - EndPos: 4185, + EndLine: 191, + StartPos: 4184, + EndPos: 4185, }, Value: "d", }, @@ -9461,78 +9400,76 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4194, - EndPos: 4213, + EndLine: 192, + StartPos: 4194, + EndPos: 4213, }, Expr: &expr.Closure{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4194, - EndPos: 4212, + EndLine: 192, + StartPos: 4194, + EndPos: 4212, }, - ReturnsRef: false, - Static: false, + Static: false, PhpDocComment: "", + ReturnsRef: false, ReturnType: &name.Name{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4206, - EndPos: 4209, + EndLine: 192, + StartPos: 4206, + EndPos: 4209, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 192, - EndLine: 192, - StartPos: 4206, - EndPos: 4209, + EndLine: 192, + StartPos: 4206, + EndPos: 4209, }, Value: "void", }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 193, - EndLine: 193, - StartPos: 4217, - EndPos: 4220, + EndLine: 193, + StartPos: 4217, + EndPos: 4220, }, Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 193, - EndLine: 193, - StartPos: 4217, - EndPos: 4219, + EndLine: 193, + StartPos: 4217, + EndPos: 4219, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 193, - EndLine: 193, - StartPos: 4217, - EndPos: 4219, + EndLine: 193, + StartPos: 4217, + EndPos: 4219, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 193, - EndLine: 193, - StartPos: 4217, - EndPos: 4219, + EndLine: 193, + StartPos: 4217, + EndPos: 4219, }, Value: "foo", }, @@ -9543,31 +9480,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4224, - EndPos: 4237, + EndLine: 194, + StartPos: 4224, + EndPos: 4237, }, Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4224, - EndPos: 4236, + EndLine: 194, + StartPos: 4224, + EndPos: 4236, }, Constant: &name.Relative{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4224, - EndPos: 4236, + EndLine: 194, + StartPos: 4224, + EndPos: 4236, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 194, - EndLine: 194, - StartPos: 4234, - EndPos: 4236, + EndLine: 194, + StartPos: 4234, + EndPos: 4236, }, Value: "foo", }, @@ -9578,31 +9515,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4241, - EndPos: 4245, + EndLine: 195, + StartPos: 4241, + EndPos: 4245, }, Expr: &expr.ConstFetch{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4241, - EndPos: 4244, + EndLine: 195, + StartPos: 4241, + EndPos: 4244, }, Constant: &name.FullyQualified{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4241, - EndPos: 4244, + EndLine: 195, + StartPos: 4241, + EndPos: 4244, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 195, - EndLine: 195, - StartPos: 4242, - EndPos: 4244, + EndLine: 195, + StartPos: 4242, + EndPos: 4244, }, Value: "foo", }, @@ -9613,30 +9550,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4250, - EndPos: 4259, + EndLine: 197, + StartPos: 4250, + EndPos: 4259, }, Expr: &expr.Empty{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4250, - EndPos: 4258, + EndLine: 197, + StartPos: 4250, + EndPos: 4258, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4256, - EndPos: 4257, + EndLine: 197, + StartPos: 4256, + EndPos: 4257, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 197, - EndLine: 197, - StartPos: 4256, - EndPos: 4257, + EndLine: 197, + StartPos: 4256, + EndPos: 4257, }, Value: "a", }, @@ -9646,30 +9583,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4263, - EndPos: 4266, + EndLine: 198, + StartPos: 4263, + EndPos: 4266, }, Expr: &expr.ErrorSuppress{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4263, - EndPos: 4265, + EndLine: 198, + StartPos: 4263, + EndPos: 4265, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4264, - EndPos: 4265, + EndLine: 198, + StartPos: 4264, + EndPos: 4265, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 198, - EndLine: 198, - StartPos: 4264, - EndPos: 4265, + EndLine: 198, + StartPos: 4264, + EndPos: 4265, }, Value: "a", }, @@ -9679,30 +9616,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 199, - EndLine: 199, - StartPos: 4270, - EndPos: 4278, + EndLine: 199, + StartPos: 4270, + EndPos: 4278, }, Expr: &expr.Eval{ Position: &position.Position{ StartLine: 199, - EndLine: 199, - StartPos: 4270, - EndPos: 4277, + EndLine: 199, + StartPos: 4270, + EndPos: 4277, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 199, - EndLine: 199, - StartPos: 4275, - EndPos: 4276, + EndLine: 199, + StartPos: 4275, + EndPos: 4276, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 199, - EndLine: 199, - StartPos: 4275, - EndPos: 4276, + EndLine: 199, + StartPos: 4275, + EndPos: 4276, }, Value: "a", }, @@ -9712,46 +9649,46 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 200, - EndLine: 200, - StartPos: 4282, - EndPos: 4286, + EndLine: 200, + StartPos: 4282, + EndPos: 4286, }, Expr: &expr.Exit{ Position: &position.Position{ StartLine: 200, - EndLine: 200, - StartPos: 4282, - EndPos: 4285, + EndLine: 200, + StartPos: 4282, + EndPos: 4285, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4290, - EndPos: 4298, + EndLine: 201, + StartPos: 4290, + EndPos: 4298, }, Expr: &expr.Exit{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4290, - EndPos: 4297, + EndLine: 201, + StartPos: 4290, + EndPos: 4297, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4295, - EndPos: 4296, + EndLine: 201, + StartPos: 4295, + EndPos: 4296, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 201, - EndLine: 201, - StartPos: 4295, - EndPos: 4296, + EndLine: 201, + StartPos: 4295, + EndPos: 4296, }, Value: "a", }, @@ -9761,46 +9698,46 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 202, - EndLine: 202, - StartPos: 4302, - EndPos: 4305, + EndLine: 202, + StartPos: 4302, + EndPos: 4305, }, Expr: &expr.Die{ Position: &position.Position{ StartLine: 202, - EndLine: 202, - StartPos: 4302, - EndPos: 4304, + EndLine: 202, + StartPos: 4302, + EndPos: 4304, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4309, - EndPos: 4316, + EndLine: 203, + StartPos: 4309, + EndPos: 4316, }, Expr: &expr.Die{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4309, - EndPos: 4315, + EndLine: 203, + StartPos: 4309, + EndPos: 4315, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4313, - EndPos: 4314, + EndLine: 203, + StartPos: 4313, + EndPos: 4314, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 203, - EndLine: 203, - StartPos: 4313, - EndPos: 4314, + EndLine: 203, + StartPos: 4313, + EndPos: 4314, }, Value: "a", }, @@ -9810,31 +9747,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 204, - EndLine: 204, - StartPos: 4320, - EndPos: 4325, + EndLine: 204, + StartPos: 4320, + EndPos: 4325, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 204, - EndLine: 204, - StartPos: 4320, - EndPos: 4324, + EndLine: 204, + StartPos: 4320, + EndPos: 4324, }, Function: &name.Name{ Position: &position.Position{ StartLine: 204, - EndLine: 204, - StartPos: 4320, - EndPos: 4322, + EndLine: 204, + StartPos: 4320, + EndPos: 4322, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 204, - EndLine: 204, - StartPos: 4320, - EndPos: 4322, + EndLine: 204, + StartPos: 4320, + EndPos: 4322, }, Value: "foo", }, @@ -9843,9 +9780,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 204, - EndLine: 204, - StartPos: 4323, - EndPos: 4324, + EndLine: 204, + StartPos: 4323, + EndPos: 4324, }, }, }, @@ -9853,31 +9790,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4329, - EndPos: 4344, + EndLine: 205, + StartPos: 4329, + EndPos: 4344, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4329, - EndPos: 4343, + EndLine: 205, + StartPos: 4329, + EndPos: 4343, }, Function: &name.Relative{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4329, - EndPos: 4341, + EndLine: 205, + StartPos: 4329, + EndPos: 4341, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4339, - EndPos: 4341, + EndLine: 205, + StartPos: 4339, + EndPos: 4341, }, Value: "foo", }, @@ -9886,9 +9823,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 205, - EndLine: 205, - StartPos: 4342, - EndPos: 4343, + EndLine: 205, + StartPos: 4342, + EndPos: 4343, }, }, }, @@ -9896,31 +9833,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4348, - EndPos: 4354, + EndLine: 206, + StartPos: 4348, + EndPos: 4354, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4348, - EndPos: 4353, + EndLine: 206, + StartPos: 4348, + EndPos: 4353, }, Function: &name.FullyQualified{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4348, - EndPos: 4351, + EndLine: 206, + StartPos: 4348, + EndPos: 4351, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4349, - EndPos: 4351, + EndLine: 206, + StartPos: 4349, + EndPos: 4351, }, Value: "foo", }, @@ -9929,9 +9866,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 206, - EndLine: 206, - StartPos: 4352, - EndPos: 4353, + EndLine: 206, + StartPos: 4352, + EndPos: 4353, }, }, }, @@ -9939,30 +9876,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4358, - EndPos: 4364, + EndLine: 207, + StartPos: 4358, + EndPos: 4364, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4358, - EndPos: 4363, + EndLine: 207, + StartPos: 4358, + EndPos: 4363, }, Function: &expr.Variable{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4358, - EndPos: 4361, + EndLine: 207, + StartPos: 4358, + EndPos: 4361, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4358, - EndPos: 4361, + EndLine: 207, + StartPos: 4358, + EndPos: 4361, }, Value: "foo", }, @@ -9970,9 +9907,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 207, - EndLine: 207, - StartPos: 4362, - EndPos: 4363, + EndLine: 207, + StartPos: 4362, + EndPos: 4363, }, }, }, @@ -9980,30 +9917,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 209, - EndLine: 209, - StartPos: 4369, - EndPos: 4373, + EndLine: 209, + StartPos: 4369, + EndPos: 4373, }, Expr: &expr.PostDec{ Position: &position.Position{ StartLine: 209, - EndLine: 209, - StartPos: 4369, - EndPos: 4372, + EndLine: 209, + StartPos: 4369, + EndPos: 4372, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 209, - EndLine: 209, - StartPos: 4369, - EndPos: 4370, + EndLine: 209, + StartPos: 4369, + EndPos: 4370, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 209, - EndLine: 209, - StartPos: 4369, - EndPos: 4370, + EndLine: 209, + StartPos: 4369, + EndPos: 4370, }, Value: "a", }, @@ -10013,30 +9950,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4377, - EndPos: 4381, + EndLine: 210, + StartPos: 4377, + EndPos: 4381, }, Expr: &expr.PostInc{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4377, - EndPos: 4380, + EndLine: 210, + StartPos: 4377, + EndPos: 4380, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4377, - EndPos: 4378, + EndLine: 210, + StartPos: 4377, + EndPos: 4378, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 210, - EndLine: 210, - StartPos: 4377, - EndPos: 4378, + EndLine: 210, + StartPos: 4377, + EndPos: 4378, }, Value: "a", }, @@ -10046,30 +9983,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4385, - EndPos: 4389, + EndLine: 211, + StartPos: 4385, + EndPos: 4389, }, Expr: &expr.PreDec{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4385, - EndPos: 4388, + EndLine: 211, + StartPos: 4385, + EndPos: 4388, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4387, - EndPos: 4388, + EndLine: 211, + StartPos: 4387, + EndPos: 4388, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 211, - EndLine: 211, - StartPos: 4387, - EndPos: 4388, + EndLine: 211, + StartPos: 4387, + EndPos: 4388, }, Value: "a", }, @@ -10079,30 +10016,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4393, - EndPos: 4397, + EndLine: 212, + StartPos: 4393, + EndPos: 4397, }, Expr: &expr.PreInc{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4393, - EndPos: 4396, + EndLine: 212, + StartPos: 4393, + EndPos: 4396, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4395, - EndPos: 4396, + EndLine: 212, + StartPos: 4395, + EndPos: 4396, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 212, - EndLine: 212, - StartPos: 4395, - EndPos: 4396, + EndLine: 212, + StartPos: 4395, + EndPos: 4396, }, Value: "a", }, @@ -10112,30 +10049,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4402, - EndPos: 4412, + EndLine: 214, + StartPos: 4402, + EndPos: 4412, }, Expr: &expr.Include{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4402, - EndPos: 4411, + EndLine: 214, + StartPos: 4402, + EndPos: 4411, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4410, - EndPos: 4411, + EndLine: 214, + StartPos: 4410, + EndPos: 4411, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 214, - EndLine: 214, - StartPos: 4410, - EndPos: 4411, + EndLine: 214, + StartPos: 4410, + EndPos: 4411, }, Value: "a", }, @@ -10145,30 +10082,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4416, - EndPos: 4431, + EndLine: 215, + StartPos: 4416, + EndPos: 4431, }, Expr: &expr.IncludeOnce{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4416, - EndPos: 4430, + EndLine: 215, + StartPos: 4416, + EndPos: 4430, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4429, - EndPos: 4430, + EndLine: 215, + StartPos: 4429, + EndPos: 4430, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 215, - EndLine: 215, - StartPos: 4429, - EndPos: 4430, + EndLine: 215, + StartPos: 4429, + EndPos: 4430, }, Value: "a", }, @@ -10178,30 +10115,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4435, - EndPos: 4445, + EndLine: 216, + StartPos: 4435, + EndPos: 4445, }, Expr: &expr.Require{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4435, - EndPos: 4444, + EndLine: 216, + StartPos: 4435, + EndPos: 4444, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4443, - EndPos: 4444, + EndLine: 216, + StartPos: 4443, + EndPos: 4444, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 216, - EndLine: 216, - StartPos: 4443, - EndPos: 4444, + EndLine: 216, + StartPos: 4443, + EndPos: 4444, }, Value: "a", }, @@ -10211,30 +10148,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4449, - EndPos: 4464, + EndLine: 217, + StartPos: 4449, + EndPos: 4464, }, Expr: &expr.RequireOnce{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4449, - EndPos: 4463, + EndLine: 217, + StartPos: 4449, + EndPos: 4463, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4462, - EndPos: 4463, + EndLine: 217, + StartPos: 4462, + EndPos: 4463, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 217, - EndLine: 217, - StartPos: 4462, - EndPos: 4463, + EndLine: 217, + StartPos: 4462, + EndPos: 4463, }, Value: "a", }, @@ -10244,30 +10181,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4469, - EndPos: 4486, + EndLine: 219, + StartPos: 4469, + EndPos: 4486, }, Expr: &expr.InstanceOf{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4469, - EndPos: 4485, + EndLine: 219, + StartPos: 4469, + EndPos: 4485, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4469, - EndPos: 4470, + EndLine: 219, + StartPos: 4469, + EndPos: 4470, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4469, - EndPos: 4470, + EndLine: 219, + StartPos: 4469, + EndPos: 4470, }, Value: "a", }, @@ -10275,17 +10212,17 @@ func TestPhp7(t *testing.T) { Class: &name.Name{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4483, - EndPos: 4485, + EndLine: 219, + StartPos: 4483, + EndPos: 4485, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 219, - EndLine: 219, - StartPos: 4483, - EndPos: 4485, + EndLine: 219, + StartPos: 4483, + EndPos: 4485, }, Value: "Foo", }, @@ -10296,30 +10233,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 220, - EndLine: 220, - StartPos: 4490, - EndPos: 4517, + EndLine: 220, + StartPos: 4490, + EndPos: 4517, }, Expr: &expr.InstanceOf{ Position: &position.Position{ StartLine: 220, - EndLine: 220, - StartPos: 4490, - EndPos: 4516, + EndLine: 220, + StartPos: 4490, + EndPos: 4516, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 220, - EndLine: 220, - StartPos: 4490, - EndPos: 4491, + EndLine: 220, + StartPos: 4490, + EndPos: 4491, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 220, - EndLine: 220, - StartPos: 4490, - EndPos: 4491, + EndLine: 220, + StartPos: 4490, + EndPos: 4491, }, Value: "a", }, @@ -10327,17 +10264,17 @@ func TestPhp7(t *testing.T) { Class: &name.Relative{ Position: &position.Position{ StartLine: 220, - EndLine: 220, - StartPos: 4504, - EndPos: 4516, + EndLine: 220, + StartPos: 4504, + EndPos: 4516, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 220, - EndLine: 220, - StartPos: 4514, - EndPos: 4516, + EndLine: 220, + StartPos: 4514, + EndPos: 4516, }, Value: "Foo", }, @@ -10348,30 +10285,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4521, - EndPos: 4539, + EndLine: 221, + StartPos: 4521, + EndPos: 4539, }, Expr: &expr.InstanceOf{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4521, - EndPos: 4538, + EndLine: 221, + StartPos: 4521, + EndPos: 4538, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4521, - EndPos: 4522, + EndLine: 221, + StartPos: 4521, + EndPos: 4522, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4521, - EndPos: 4522, + EndLine: 221, + StartPos: 4521, + EndPos: 4522, }, Value: "a", }, @@ -10379,17 +10316,17 @@ func TestPhp7(t *testing.T) { Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4535, - EndPos: 4538, + EndLine: 221, + StartPos: 4535, + EndPos: 4538, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 221, - EndLine: 221, - StartPos: 4536, - EndPos: 4538, + EndLine: 221, + StartPos: 4536, + EndPos: 4538, }, Value: "Foo", }, @@ -10400,31 +10337,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4544, - EndPos: 4557, + EndLine: 223, + StartPos: 4544, + EndPos: 4557, }, Expr: &expr.Isset{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4544, - EndPos: 4556, + EndLine: 223, + StartPos: 4544, + EndPos: 4556, }, Variables: []node.Node{ &expr.Variable{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4550, - EndPos: 4551, + EndLine: 223, + StartPos: 4550, + EndPos: 4551, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4550, - EndPos: 4551, + EndLine: 223, + StartPos: 4550, + EndPos: 4551, }, Value: "a", }, @@ -10432,16 +10369,16 @@ func TestPhp7(t *testing.T) { &expr.Variable{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4554, - EndPos: 4555, + EndLine: 223, + StartPos: 4554, + EndPos: 4555, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 223, - EndLine: 223, - StartPos: 4554, - EndPos: 4555, + EndLine: 223, + StartPos: 4554, + EndPos: 4555, }, Value: "b", }, @@ -10452,45 +10389,45 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4561, - EndPos: 4574, + EndLine: 224, + StartPos: 4561, + EndPos: 4574, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4561, - EndPos: 4573, + EndLine: 224, + StartPos: 4561, + EndPos: 4573, }, Variable: &expr.List{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4561, - EndPos: 4568, + EndLine: 224, + StartPos: 4561, + EndPos: 4568, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4566, - EndPos: 4567, + EndLine: 224, + StartPos: 4566, + EndPos: 4567, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4566, - EndPos: 4567, + EndLine: 224, + StartPos: 4566, + EndPos: 4567, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4566, - EndPos: 4567, + EndLine: 224, + StartPos: 4566, + EndPos: 4567, }, Value: "a", }, @@ -10501,16 +10438,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4572, - EndPos: 4573, + EndLine: 224, + StartPos: 4572, + EndPos: 4573, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 224, - EndLine: 224, - StartPos: 4572, - EndPos: 4573, + EndLine: 224, + StartPos: 4572, + EndPos: 4573, }, Value: "b", }, @@ -10520,52 +10457,52 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4578, - EndPos: 4593, + EndLine: 225, + StartPos: 4578, + EndPos: 4593, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4578, - EndPos: 4592, + EndLine: 225, + StartPos: 4578, + EndPos: 4592, }, Variable: &expr.List{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4578, - EndPos: 4587, + EndLine: 225, + StartPos: 4578, + EndPos: 4587, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4583, - EndPos: 4586, + EndLine: 225, + StartPos: 4583, + EndPos: 4586, }, Val: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4583, - EndPos: 4586, + EndLine: 225, + StartPos: 4583, + EndPos: 4586, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4583, - EndPos: 4584, + EndLine: 225, + StartPos: 4583, + EndPos: 4584, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4583, - EndPos: 4584, + EndLine: 225, + StartPos: 4583, + EndPos: 4584, }, Value: "a", }, @@ -10577,16 +10514,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4591, - EndPos: 4592, + EndLine: 225, + StartPos: 4591, + EndPos: 4592, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 225, - EndLine: 225, - StartPos: 4591, - EndPos: 4592, + EndLine: 225, + StartPos: 4591, + EndPos: 4592, }, Value: "b", }, @@ -10596,60 +10533,60 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4597, - EndPos: 4616, + EndLine: 226, + StartPos: 4597, + EndPos: 4616, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4597, - EndPos: 4615, + EndLine: 226, + StartPos: 4597, + EndPos: 4615, }, Variable: &expr.List{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4597, - EndPos: 4610, + EndLine: 226, + StartPos: 4597, + EndPos: 4610, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4602, - EndPos: 4609, + EndLine: 226, + StartPos: 4602, + EndPos: 4609, }, Val: &expr.List{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4602, - EndPos: 4609, + EndLine: 226, + StartPos: 4602, + EndPos: 4609, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4607, - EndPos: 4608, + EndLine: 226, + StartPos: 4607, + EndPos: 4608, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4607, - EndPos: 4608, + EndLine: 226, + StartPos: 4607, + EndPos: 4608, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4607, - EndPos: 4608, + EndLine: 226, + StartPos: 4607, + EndPos: 4608, }, Value: "a", }, @@ -10663,16 +10600,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4614, - EndPos: 4615, + EndLine: 226, + StartPos: 4614, + EndPos: 4615, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 226, - EndLine: 226, - StartPos: 4614, - EndPos: 4615, + EndLine: 226, + StartPos: 4614, + EndPos: 4615, }, Value: "b", }, @@ -10682,30 +10619,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4621, - EndPos: 4630, + EndLine: 228, + StartPos: 4621, + EndPos: 4630, }, Expr: &expr.MethodCall{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4621, - EndPos: 4629, + EndLine: 228, + StartPos: 4621, + EndPos: 4629, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4621, - EndPos: 4622, + EndLine: 228, + StartPos: 4621, + EndPos: 4622, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4621, - EndPos: 4622, + EndLine: 228, + StartPos: 4621, + EndPos: 4622, }, Value: "a", }, @@ -10713,18 +10650,18 @@ func TestPhp7(t *testing.T) { Method: &node.Identifier{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4625, - EndPos: 4627, + EndLine: 228, + StartPos: 4625, + EndPos: 4627, }, Value: "foo", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 228, - EndLine: 228, - StartPos: 4628, - EndPos: 4629, + EndLine: 228, + StartPos: 4628, + EndPos: 4629, }, }, }, @@ -10732,31 +10669,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4634, - EndPos: 4643, + EndLine: 229, + StartPos: 4634, + EndPos: 4643, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4634, - EndPos: 4642, + EndLine: 229, + StartPos: 4634, + EndPos: 4642, }, Class: &name.Name{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4638, - EndPos: 4640, + EndLine: 229, + StartPos: 4638, + EndPos: 4640, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4638, - EndPos: 4640, + EndLine: 229, + StartPos: 4638, + EndPos: 4640, }, Value: "Foo", }, @@ -10765,9 +10702,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 229, - EndLine: 229, - StartPos: 4641, - EndPos: 4642, + EndLine: 229, + StartPos: 4641, + EndPos: 4642, }, }, }, @@ -10775,31 +10712,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4647, - EndPos: 4666, + EndLine: 230, + StartPos: 4647, + EndPos: 4666, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4647, - EndPos: 4665, + EndLine: 230, + StartPos: 4647, + EndPos: 4665, }, Class: &name.Relative{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4651, - EndPos: 4663, + EndLine: 230, + StartPos: 4651, + EndPos: 4663, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4661, - EndPos: 4663, + EndLine: 230, + StartPos: 4661, + EndPos: 4663, }, Value: "Foo", }, @@ -10808,9 +10745,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 230, - EndLine: 230, - StartPos: 4664, - EndPos: 4665, + EndLine: 230, + StartPos: 4664, + EndPos: 4665, }, }, }, @@ -10818,31 +10755,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 231, - EndLine: 231, - StartPos: 4670, - EndPos: 4680, + EndLine: 231, + StartPos: 4670, + EndPos: 4680, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 231, - EndLine: 231, - StartPos: 4670, - EndPos: 4679, + EndLine: 231, + StartPos: 4670, + EndPos: 4679, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 231, - EndLine: 231, - StartPos: 4674, - EndPos: 4677, + EndLine: 231, + StartPos: 4674, + EndPos: 4677, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 231, - EndLine: 231, - StartPos: 4675, - EndPos: 4677, + EndLine: 231, + StartPos: 4675, + EndPos: 4677, }, Value: "Foo", }, @@ -10851,9 +10788,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 231, - EndLine: 231, - StartPos: 4678, - EndPos: 4679, + EndLine: 231, + StartPos: 4678, + EndPos: 4679, }, }, }, @@ -10861,55 +10798,55 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4684, - EndPos: 4708, + EndLine: 232, + StartPos: 4684, + EndPos: 4708, }, Expr: &expr.New{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4684, - EndPos: 4707, + EndLine: 232, + StartPos: 4684, + EndPos: 4707, }, Class: &stmt.Class{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4688, - EndPos: 4707, + EndLine: 232, + StartPos: 4688, + EndPos: 4707, }, PhpDocComment: "", ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4694, - EndPos: 4704, + EndLine: 232, + StartPos: 4694, + EndPos: 4704, }, Arguments: []node.Node{ &node.Argument{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4695, - EndPos: 4696, + EndLine: 232, + StartPos: 4695, + EndPos: 4696, }, - Variadic: false, IsReference: false, + Variadic: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4695, - EndPos: 4696, + EndLine: 232, + StartPos: 4695, + EndPos: 4696, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4695, - EndPos: 4696, + EndLine: 232, + StartPos: 4695, + EndPos: 4696, }, Value: "a", }, @@ -10918,25 +10855,25 @@ func TestPhp7(t *testing.T) { &node.Argument{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4699, - EndPos: 4703, + EndLine: 232, + StartPos: 4699, + EndPos: 4703, }, - Variadic: true, + Variadic: true, IsReference: false, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4702, - EndPos: 4703, + EndLine: 232, + StartPos: 4702, + EndPos: 4703, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 232, - EndLine: 232, - StartPos: 4702, - EndPos: 4703, + EndLine: 232, + StartPos: 4702, + EndPos: 4703, }, Value: "b", }, @@ -10944,38 +10881,37 @@ func TestPhp7(t *testing.T) { }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 233, - EndLine: 233, - StartPos: 4712, - EndPos: 4721, + EndLine: 233, + StartPos: 4712, + EndPos: 4721, }, Expr: &expr.Print{ Position: &position.Position{ StartLine: 233, - EndLine: 233, - StartPos: 4712, - EndPos: 4719, + EndLine: 233, + StartPos: 4712, + EndPos: 4719, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 233, - EndLine: 233, - StartPos: 4718, - EndPos: 4719, + EndLine: 233, + StartPos: 4718, + EndPos: 4719, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 233, - EndLine: 233, - StartPos: 4718, - EndPos: 4719, + EndLine: 233, + StartPos: 4718, + EndPos: 4719, }, Value: "a", }, @@ -10985,30 +10921,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4725, - EndPos: 4732, + EndLine: 234, + StartPos: 4725, + EndPos: 4732, }, Expr: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4725, - EndPos: 4731, + EndLine: 234, + StartPos: 4725, + EndPos: 4731, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4725, - EndPos: 4726, + EndLine: 234, + StartPos: 4725, + EndPos: 4726, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4725, - EndPos: 4726, + EndLine: 234, + StartPos: 4725, + EndPos: 4726, }, Value: "a", }, @@ -11016,9 +10952,9 @@ func TestPhp7(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 234, - EndLine: 234, - StartPos: 4729, - EndPos: 4731, + EndLine: 234, + StartPos: 4729, + EndPos: 4731, }, Value: "foo", }, @@ -11027,40 +10963,40 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4736, - EndPos: 4744, + EndLine: 235, + StartPos: 4736, + EndPos: 4744, }, Expr: &expr.ShellExec{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4736, - EndPos: 4743, + EndLine: 235, + StartPos: 4736, + EndPos: 4743, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4737, - EndPos: 4740, + EndLine: 235, + StartPos: 4737, + EndPos: 4740, }, Value: "cmd ", }, &expr.Variable{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4741, - EndPos: 4742, + EndLine: 235, + StartPos: 4741, + EndPos: 4742, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 235, - EndLine: 235, - StartPos: 4741, - EndPos: 4742, + EndLine: 235, + StartPos: 4741, + EndPos: 4742, }, Value: "a", }, @@ -11071,16 +11007,16 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 236, - EndLine: 236, - StartPos: 4748, - EndPos: 4753, + EndLine: 236, + StartPos: 4748, + EndPos: 4753, }, Expr: &expr.ShellExec{ Position: &position.Position{ StartLine: 236, - EndLine: 236, - StartPos: 4748, - EndPos: 4752, + EndLine: 236, + StartPos: 4748, + EndPos: 4752, }, Parts: []node.Node{ &scalar.EncapsedStringPart{ @@ -11092,67 +11028,65 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4757, - EndPos: 4759, + EndLine: 237, + StartPos: 4757, + EndPos: 4759, }, Expr: &expr.ShellExec{ Position: &position.Position{ StartLine: 237, - EndLine: 237, - StartPos: 4757, - EndPos: 4758, - }, - Parts: []node.Node{ + EndLine: 237, + StartPos: 4757, + EndPos: 4758, }, + Parts: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4763, - EndPos: 4765, + EndLine: 238, + StartPos: 4763, + EndPos: 4765, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 238, - EndLine: 238, - StartPos: 4763, - EndPos: 4764, - }, - Items: []node.Node{ + EndLine: 238, + StartPos: 4763, + EndPos: 4764, }, + Items: []node.Node{}, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4769, - EndPos: 4772, + EndLine: 239, + StartPos: 4769, + EndPos: 4772, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4769, - EndPos: 4771, + EndLine: 239, + StartPos: 4769, + EndPos: 4771, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4770, - EndPos: 4770, + EndLine: 239, + StartPos: 4770, + EndPos: 4770, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 239, - EndLine: 239, - StartPos: 4770, - EndPos: 4770, + EndLine: 239, + StartPos: 4770, + EndPos: 4770, }, Value: "1", }, @@ -11163,40 +11097,40 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4776, - EndPos: 4788, + EndLine: 240, + StartPos: 4776, + EndPos: 4788, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4776, - EndPos: 4787, + EndLine: 240, + StartPos: 4776, + EndPos: 4787, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4777, - EndPos: 4780, + EndLine: 240, + StartPos: 4777, + EndPos: 4780, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4777, - EndPos: 4777, + EndLine: 240, + StartPos: 4777, + EndPos: 4777, }, Value: "1", }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4780, - EndPos: 4780, + EndLine: 240, + StartPos: 4780, + EndPos: 4780, }, Value: "1", }, @@ -11204,30 +11138,30 @@ func TestPhp7(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4783, - EndPos: 4785, + EndLine: 240, + StartPos: 4783, + EndPos: 4785, }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4783, - EndPos: 4785, + EndLine: 240, + StartPos: 4783, + EndPos: 4785, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4784, - EndPos: 4785, + EndLine: 240, + StartPos: 4784, + EndPos: 4785, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 240, - EndLine: 240, - StartPos: 4784, - EndPos: 4785, + EndLine: 240, + StartPos: 4784, + EndPos: 4785, }, Value: "b", }, @@ -11240,45 +11174,45 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4793, - EndPos: 4802, + EndLine: 242, + StartPos: 4793, + EndPos: 4802, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4793, - EndPos: 4801, + EndLine: 242, + StartPos: 4793, + EndPos: 4801, }, Variable: &expr.ShortList{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4793, - EndPos: 4796, + EndLine: 242, + StartPos: 4793, + EndPos: 4796, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4794, - EndPos: 4795, + EndLine: 242, + StartPos: 4794, + EndPos: 4795, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4794, - EndPos: 4795, + EndLine: 242, + StartPos: 4794, + EndPos: 4795, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4794, - EndPos: 4795, + EndLine: 242, + StartPos: 4794, + EndPos: 4795, }, Value: "a", }, @@ -11289,16 +11223,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4800, - EndPos: 4801, + EndLine: 242, + StartPos: 4800, + EndPos: 4801, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 242, - EndLine: 242, - StartPos: 4800, - EndPos: 4801, + EndLine: 242, + StartPos: 4800, + EndPos: 4801, }, Value: "b", }, @@ -11308,52 +11242,52 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4806, - EndPos: 4817, + EndLine: 243, + StartPos: 4806, + EndPos: 4817, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4806, - EndPos: 4816, + EndLine: 243, + StartPos: 4806, + EndPos: 4816, }, Variable: &expr.ShortList{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4806, - EndPos: 4811, + EndLine: 243, + StartPos: 4806, + EndPos: 4811, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4807, - EndPos: 4810, + EndLine: 243, + StartPos: 4807, + EndPos: 4810, }, Val: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4807, - EndPos: 4810, + EndLine: 243, + StartPos: 4807, + EndPos: 4810, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4807, - EndPos: 4808, + EndLine: 243, + StartPos: 4807, + EndPos: 4808, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4807, - EndPos: 4808, + EndLine: 243, + StartPos: 4807, + EndPos: 4808, }, Value: "a", }, @@ -11365,16 +11299,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4815, - EndPos: 4816, + EndLine: 243, + StartPos: 4815, + EndPos: 4816, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 243, - EndLine: 243, - StartPos: 4815, - EndPos: 4816, + EndLine: 243, + StartPos: 4815, + EndPos: 4816, }, Value: "b", }, @@ -11384,60 +11318,60 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4821, - EndPos: 4836, + EndLine: 244, + StartPos: 4821, + EndPos: 4836, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4821, - EndPos: 4835, + EndLine: 244, + StartPos: 4821, + EndPos: 4835, }, Variable: &expr.ShortList{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4821, - EndPos: 4830, + EndLine: 244, + StartPos: 4821, + EndPos: 4830, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4822, - EndPos: 4829, + EndLine: 244, + StartPos: 4822, + EndPos: 4829, }, Val: &expr.List{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4822, - EndPos: 4829, + EndLine: 244, + StartPos: 4822, + EndPos: 4829, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4827, - EndPos: 4828, + EndLine: 244, + StartPos: 4827, + EndPos: 4828, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4827, - EndPos: 4828, + EndLine: 244, + StartPos: 4827, + EndPos: 4828, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4827, - EndPos: 4828, + EndLine: 244, + StartPos: 4827, + EndPos: 4828, }, Value: "a", }, @@ -11451,16 +11385,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4834, - EndPos: 4835, + EndLine: 244, + StartPos: 4834, + EndPos: 4835, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 244, - EndLine: 244, - StartPos: 4834, - EndPos: 4835, + EndLine: 244, + StartPos: 4834, + EndPos: 4835, }, Value: "b", }, @@ -11470,31 +11404,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4840, - EndPos: 4850, + EndLine: 245, + StartPos: 4840, + EndPos: 4850, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4840, - EndPos: 4849, + EndLine: 245, + StartPos: 4840, + EndPos: 4849, }, Class: &name.Name{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4840, - EndPos: 4842, + EndLine: 245, + StartPos: 4840, + EndPos: 4842, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4840, - EndPos: 4842, + EndLine: 245, + StartPos: 4840, + EndPos: 4842, }, Value: "Foo", }, @@ -11503,18 +11437,18 @@ func TestPhp7(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4845, - EndPos: 4847, + EndLine: 245, + StartPos: 4845, + EndPos: 4847, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 245, - EndLine: 245, - StartPos: 4848, - EndPos: 4849, + EndLine: 245, + StartPos: 4848, + EndPos: 4849, }, }, }, @@ -11522,31 +11456,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4854, - EndPos: 4874, + EndLine: 246, + StartPos: 4854, + EndPos: 4874, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4854, - EndPos: 4873, + EndLine: 246, + StartPos: 4854, + EndPos: 4873, }, Class: &name.Relative{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4854, - EndPos: 4866, + EndLine: 246, + StartPos: 4854, + EndPos: 4866, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4864, - EndPos: 4866, + EndLine: 246, + StartPos: 4864, + EndPos: 4866, }, Value: "Foo", }, @@ -11555,18 +11489,18 @@ func TestPhp7(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4869, - EndPos: 4871, + EndLine: 246, + StartPos: 4869, + EndPos: 4871, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 246, - EndLine: 246, - StartPos: 4872, - EndPos: 4873, + EndLine: 246, + StartPos: 4872, + EndPos: 4873, }, }, }, @@ -11574,31 +11508,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4878, - EndPos: 4889, + EndLine: 247, + StartPos: 4878, + EndPos: 4889, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4878, - EndPos: 4888, + EndLine: 247, + StartPos: 4878, + EndPos: 4888, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4878, - EndPos: 4881, + EndLine: 247, + StartPos: 4878, + EndPos: 4881, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4879, - EndPos: 4881, + EndLine: 247, + StartPos: 4879, + EndPos: 4881, }, Value: "Foo", }, @@ -11607,18 +11541,18 @@ func TestPhp7(t *testing.T) { Call: &node.Identifier{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4884, - EndPos: 4886, + EndLine: 247, + StartPos: 4884, + EndPos: 4886, }, Value: "bar", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 247, - EndLine: 247, - StartPos: 4887, - EndPos: 4888, + EndLine: 247, + StartPos: 4887, + EndPos: 4888, }, }, }, @@ -11626,31 +11560,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4893, - EndPos: 4902, + EndLine: 248, + StartPos: 4893, + EndPos: 4902, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4893, - EndPos: 4901, + EndLine: 248, + StartPos: 4893, + EndPos: 4901, }, Class: &name.Name{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4893, - EndPos: 4895, + EndLine: 248, + StartPos: 4893, + EndPos: 4895, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4893, - EndPos: 4895, + EndLine: 248, + StartPos: 4893, + EndPos: 4895, }, Value: "Foo", }, @@ -11659,16 +11593,16 @@ func TestPhp7(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4898, - EndPos: 4901, + EndLine: 248, + StartPos: 4898, + EndPos: 4901, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 248, - EndLine: 248, - StartPos: 4898, - EndPos: 4901, + EndLine: 248, + StartPos: 4898, + EndPos: 4901, }, Value: "bar", }, @@ -11678,30 +11612,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4906, - EndPos: 4916, + EndLine: 249, + StartPos: 4906, + EndPos: 4916, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4906, - EndPos: 4915, + EndLine: 249, + StartPos: 4906, + EndPos: 4915, }, Class: &expr.Variable{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4906, - EndPos: 4909, + EndLine: 249, + StartPos: 4906, + EndPos: 4909, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4906, - EndPos: 4909, + EndLine: 249, + StartPos: 4906, + EndPos: 4909, }, Value: "foo", }, @@ -11709,16 +11643,16 @@ func TestPhp7(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4912, - EndPos: 4915, + EndLine: 249, + StartPos: 4912, + EndPos: 4915, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 249, - EndLine: 249, - StartPos: 4912, - EndPos: 4915, + EndLine: 249, + StartPos: 4912, + EndPos: 4915, }, Value: "bar", }, @@ -11728,31 +11662,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4920, - EndPos: 4939, + EndLine: 250, + StartPos: 4920, + EndPos: 4939, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4920, - EndPos: 4938, + EndLine: 250, + StartPos: 4920, + EndPos: 4938, }, Class: &name.Relative{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4920, - EndPos: 4932, + EndLine: 250, + StartPos: 4920, + EndPos: 4932, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4930, - EndPos: 4932, + EndLine: 250, + StartPos: 4930, + EndPos: 4932, }, Value: "Foo", }, @@ -11761,16 +11695,16 @@ func TestPhp7(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4935, - EndPos: 4938, + EndLine: 250, + StartPos: 4935, + EndPos: 4938, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 250, - EndLine: 250, - StartPos: 4935, - EndPos: 4938, + EndLine: 250, + StartPos: 4935, + EndPos: 4938, }, Value: "bar", }, @@ -11780,31 +11714,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4943, - EndPos: 4953, + EndLine: 251, + StartPos: 4943, + EndPos: 4953, }, Expr: &expr.StaticPropertyFetch{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4943, - EndPos: 4952, + EndLine: 251, + StartPos: 4943, + EndPos: 4952, }, Class: &name.FullyQualified{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4943, - EndPos: 4946, + EndLine: 251, + StartPos: 4943, + EndPos: 4946, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4944, - EndPos: 4946, + EndLine: 251, + StartPos: 4944, + EndPos: 4946, }, Value: "Foo", }, @@ -11813,16 +11747,16 @@ func TestPhp7(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4949, - EndPos: 4952, + EndLine: 251, + StartPos: 4949, + EndPos: 4952, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 251, - EndLine: 251, - StartPos: 4949, - EndPos: 4952, + EndLine: 251, + StartPos: 4949, + EndPos: 4952, }, Value: "bar", }, @@ -11832,30 +11766,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4957, - EndPos: 4969, + EndLine: 252, + StartPos: 4957, + EndPos: 4969, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4957, - EndPos: 4968, + EndLine: 252, + StartPos: 4957, + EndPos: 4968, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4957, - EndPos: 4958, + EndLine: 252, + StartPos: 4957, + EndPos: 4958, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4957, - EndPos: 4958, + EndLine: 252, + StartPos: 4957, + EndPos: 4958, }, Value: "a", }, @@ -11863,16 +11797,16 @@ func TestPhp7(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4962, - EndPos: 4963, + EndLine: 252, + StartPos: 4962, + EndPos: 4963, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4962, - EndPos: 4963, + EndLine: 252, + StartPos: 4962, + EndPos: 4963, }, Value: "b", }, @@ -11880,16 +11814,16 @@ func TestPhp7(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4967, - EndPos: 4968, + EndLine: 252, + StartPos: 4967, + EndPos: 4968, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 252, - EndLine: 252, - StartPos: 4967, - EndPos: 4968, + EndLine: 252, + StartPos: 4967, + EndPos: 4968, }, Value: "c", }, @@ -11899,30 +11833,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4973, - EndPos: 4982, + EndLine: 253, + StartPos: 4973, + EndPos: 4982, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4973, - EndPos: 4981, + EndLine: 253, + StartPos: 4973, + EndPos: 4981, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4973, - EndPos: 4974, + EndLine: 253, + StartPos: 4973, + EndPos: 4974, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4973, - EndPos: 4974, + EndLine: 253, + StartPos: 4973, + EndPos: 4974, }, Value: "a", }, @@ -11930,16 +11864,16 @@ func TestPhp7(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4980, - EndPos: 4981, + EndLine: 253, + StartPos: 4980, + EndPos: 4981, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 253, - EndLine: 253, - StartPos: 4980, - EndPos: 4981, + EndLine: 253, + StartPos: 4980, + EndPos: 4981, }, Value: "c", }, @@ -11949,30 +11883,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4986, - EndPos: 5008, + EndLine: 254, + StartPos: 4986, + EndPos: 5008, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4986, - EndPos: 5007, + EndLine: 254, + StartPos: 4986, + EndPos: 5007, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4986, - EndPos: 4987, + EndLine: 254, + StartPos: 4986, + EndPos: 4987, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4986, - EndPos: 4987, + EndLine: 254, + StartPos: 4986, + EndPos: 4987, }, Value: "a", }, @@ -11980,23 +11914,23 @@ func TestPhp7(t *testing.T) { IfTrue: &expr.Ternary{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4991, - EndPos: 5002, + EndLine: 254, + StartPos: 4991, + EndPos: 5002, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4991, - EndPos: 4992, + EndLine: 254, + StartPos: 4991, + EndPos: 4992, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4991, - EndPos: 4992, + EndLine: 254, + StartPos: 4991, + EndPos: 4992, }, Value: "b", }, @@ -12004,16 +11938,16 @@ func TestPhp7(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4996, - EndPos: 4997, + EndLine: 254, + StartPos: 4996, + EndPos: 4997, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 4996, - EndPos: 4997, + EndLine: 254, + StartPos: 4996, + EndPos: 4997, }, Value: "c", }, @@ -12021,16 +11955,16 @@ func TestPhp7(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 5001, - EndPos: 5002, + EndLine: 254, + StartPos: 5001, + EndPos: 5002, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 5001, - EndPos: 5002, + EndLine: 254, + StartPos: 5001, + EndPos: 5002, }, Value: "d", }, @@ -12039,16 +11973,16 @@ func TestPhp7(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 5006, - EndPos: 5007, + EndLine: 254, + StartPos: 5006, + EndPos: 5007, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 254, - EndLine: 254, - StartPos: 5006, - EndPos: 5007, + EndLine: 254, + StartPos: 5006, + EndPos: 5007, }, Value: "e", }, @@ -12058,37 +11992,37 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5012, - EndPos: 5034, + EndLine: 255, + StartPos: 5012, + EndPos: 5034, }, Expr: &expr.Ternary{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5012, - EndPos: 5033, + EndLine: 255, + StartPos: 5012, + EndPos: 5033, }, Condition: &expr.Ternary{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5012, - EndPos: 5023, + EndLine: 255, + StartPos: 5012, + EndPos: 5023, }, Condition: &expr.Variable{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5012, - EndPos: 5013, + EndLine: 255, + StartPos: 5012, + EndPos: 5013, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5012, - EndPos: 5013, + EndLine: 255, + StartPos: 5012, + EndPos: 5013, }, Value: "a", }, @@ -12096,16 +12030,16 @@ func TestPhp7(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5017, - EndPos: 5018, + EndLine: 255, + StartPos: 5017, + EndPos: 5018, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5017, - EndPos: 5018, + EndLine: 255, + StartPos: 5017, + EndPos: 5018, }, Value: "b", }, @@ -12113,16 +12047,16 @@ func TestPhp7(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5022, - EndPos: 5023, + EndLine: 255, + StartPos: 5022, + EndPos: 5023, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5022, - EndPos: 5023, + EndLine: 255, + StartPos: 5022, + EndPos: 5023, }, Value: "c", }, @@ -12131,16 +12065,16 @@ func TestPhp7(t *testing.T) { IfTrue: &expr.Variable{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5027, - EndPos: 5028, + EndLine: 255, + StartPos: 5027, + EndPos: 5028, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5027, - EndPos: 5028, + EndLine: 255, + StartPos: 5027, + EndPos: 5028, }, Value: "d", }, @@ -12148,16 +12082,16 @@ func TestPhp7(t *testing.T) { IfFalse: &expr.Variable{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5032, - EndPos: 5033, + EndLine: 255, + StartPos: 5032, + EndPos: 5033, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 255, - EndLine: 255, - StartPos: 5032, - EndPos: 5033, + EndLine: 255, + StartPos: 5032, + EndPos: 5033, }, Value: "e", }, @@ -12167,30 +12101,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5038, - EndPos: 5041, + EndLine: 256, + StartPos: 5038, + EndPos: 5041, }, Expr: &expr.UnaryMinus{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5038, - EndPos: 5040, + EndLine: 256, + StartPos: 5038, + EndPos: 5040, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5039, - EndPos: 5040, + EndLine: 256, + StartPos: 5039, + EndPos: 5040, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 256, - EndLine: 256, - StartPos: 5039, - EndPos: 5040, + EndLine: 256, + StartPos: 5039, + EndPos: 5040, }, Value: "a", }, @@ -12200,30 +12134,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5045, - EndPos: 5048, + EndLine: 257, + StartPos: 5045, + EndPos: 5048, }, Expr: &expr.UnaryPlus{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5045, - EndPos: 5047, + EndLine: 257, + StartPos: 5045, + EndPos: 5047, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5046, - EndPos: 5047, + EndLine: 257, + StartPos: 5046, + EndPos: 5047, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 257, - EndLine: 257, - StartPos: 5046, - EndPos: 5047, + EndLine: 257, + StartPos: 5046, + EndPos: 5047, }, Value: "a", }, @@ -12233,30 +12167,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 258, - EndLine: 258, - StartPos: 5052, - EndPos: 5055, + EndLine: 258, + StartPos: 5052, + EndPos: 5055, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 258, - EndLine: 258, - StartPos: 5052, - EndPos: 5054, + EndLine: 258, + StartPos: 5052, + EndPos: 5054, }, VarName: &expr.Variable{ Position: &position.Position{ StartLine: 258, - EndLine: 258, - StartPos: 5053, - EndPos: 5054, + EndLine: 258, + StartPos: 5053, + EndPos: 5054, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 258, - EndLine: 258, - StartPos: 5053, - EndPos: 5054, + EndLine: 258, + StartPos: 5053, + EndPos: 5054, }, Value: "a", }, @@ -12266,46 +12200,46 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 259, - EndLine: 259, - StartPos: 5059, - EndPos: 5064, + EndLine: 259, + StartPos: 5059, + EndPos: 5064, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 259, - EndLine: 259, - StartPos: 5059, - EndPos: 5063, + EndLine: 259, + StartPos: 5059, + EndPos: 5063, }, }, }, &stmt.Expression{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5068, - EndPos: 5076, + EndLine: 260, + StartPos: 5068, + EndPos: 5076, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5068, - EndPos: 5075, + EndLine: 260, + StartPos: 5068, + EndPos: 5075, }, Value: &expr.Variable{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5074, - EndPos: 5075, + EndLine: 260, + StartPos: 5074, + EndPos: 5075, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 260, - EndLine: 260, - StartPos: 5074, - EndPos: 5075, + EndLine: 260, + StartPos: 5074, + EndPos: 5075, }, Value: "a", }, @@ -12315,30 +12249,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5080, - EndPos: 5094, + EndLine: 261, + StartPos: 5080, + EndPos: 5094, }, Expr: &expr.Yield{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5080, - EndPos: 5093, + EndLine: 261, + StartPos: 5080, + EndPos: 5093, }, Key: &expr.Variable{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5086, - EndPos: 5087, + EndLine: 261, + StartPos: 5086, + EndPos: 5087, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5086, - EndPos: 5087, + EndLine: 261, + StartPos: 5086, + EndPos: 5087, }, Value: "a", }, @@ -12346,16 +12280,16 @@ func TestPhp7(t *testing.T) { Value: &expr.Variable{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5092, - EndPos: 5093, + EndLine: 261, + StartPos: 5092, + EndPos: 5093, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 261, - EndLine: 261, - StartPos: 5092, - EndPos: 5093, + EndLine: 261, + StartPos: 5092, + EndPos: 5093, }, Value: "b", }, @@ -12365,30 +12299,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5098, - EndPos: 5111, + EndLine: 262, + StartPos: 5098, + EndPos: 5111, }, Expr: &expr.YieldFrom{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5098, - EndPos: 5110, + EndLine: 262, + StartPos: 5098, + EndPos: 5110, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5109, - EndPos: 5110, + EndLine: 262, + StartPos: 5109, + EndPos: 5110, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 262, - EndLine: 262, - StartPos: 5109, - EndPos: 5110, + EndLine: 262, + StartPos: 5109, + EndPos: 5110, }, Value: "a", }, @@ -12398,30 +12332,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5118, - EndPos: 5127, + EndLine: 264, + StartPos: 5118, + EndPos: 5127, }, Expr: &cast.Array{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5118, - EndPos: 5126, + EndLine: 264, + StartPos: 5118, + EndPos: 5126, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5125, - EndPos: 5126, + EndLine: 264, + StartPos: 5125, + EndPos: 5126, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 264, - EndLine: 264, - StartPos: 5125, - EndPos: 5126, + EndLine: 264, + StartPos: 5125, + EndPos: 5126, }, Value: "a", }, @@ -12431,30 +12365,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5131, - EndPos: 5142, + EndLine: 265, + StartPos: 5131, + EndPos: 5142, }, Expr: &cast.Bool{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5131, - EndPos: 5141, + EndLine: 265, + StartPos: 5131, + EndPos: 5141, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5140, - EndPos: 5141, + EndLine: 265, + StartPos: 5140, + EndPos: 5141, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 265, - EndLine: 265, - StartPos: 5140, - EndPos: 5141, + EndLine: 265, + StartPos: 5140, + EndPos: 5141, }, Value: "a", }, @@ -12464,30 +12398,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5146, - EndPos: 5154, + EndLine: 266, + StartPos: 5146, + EndPos: 5154, }, Expr: &cast.Bool{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5146, - EndPos: 5153, + EndLine: 266, + StartPos: 5146, + EndPos: 5153, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5152, - EndPos: 5153, + EndLine: 266, + StartPos: 5152, + EndPos: 5153, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 266, - EndLine: 266, - StartPos: 5152, - EndPos: 5153, + EndLine: 266, + StartPos: 5152, + EndPos: 5153, }, Value: "a", }, @@ -12497,30 +12431,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5158, - EndPos: 5168, + EndLine: 267, + StartPos: 5158, + EndPos: 5168, }, Expr: &cast.Double{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5158, - EndPos: 5167, + EndLine: 267, + StartPos: 5158, + EndPos: 5167, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5166, - EndPos: 5167, + EndLine: 267, + StartPos: 5166, + EndPos: 5167, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 267, - EndLine: 267, - StartPos: 5166, - EndPos: 5167, + EndLine: 267, + StartPos: 5166, + EndPos: 5167, }, Value: "a", }, @@ -12530,30 +12464,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5172, - EndPos: 5181, + EndLine: 268, + StartPos: 5172, + EndPos: 5181, }, Expr: &cast.Double{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5172, - EndPos: 5180, + EndLine: 268, + StartPos: 5172, + EndPos: 5180, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5179, - EndPos: 5180, + EndLine: 268, + StartPos: 5179, + EndPos: 5180, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 268, - EndLine: 268, - StartPos: 5179, - EndPos: 5180, + EndLine: 268, + StartPos: 5179, + EndPos: 5180, }, Value: "a", }, @@ -12563,30 +12497,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 269, - EndLine: 269, - StartPos: 5185, - EndPos: 5196, + EndLine: 269, + StartPos: 5185, + EndPos: 5196, }, Expr: &cast.Int{ Position: &position.Position{ StartLine: 269, - EndLine: 269, - StartPos: 5185, - EndPos: 5195, + EndLine: 269, + StartPos: 5185, + EndPos: 5195, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 269, - EndLine: 269, - StartPos: 5194, - EndPos: 5195, + EndLine: 269, + StartPos: 5194, + EndPos: 5195, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 269, - EndLine: 269, - StartPos: 5194, - EndPos: 5195, + EndLine: 269, + StartPos: 5194, + EndPos: 5195, }, Value: "a", }, @@ -12596,30 +12530,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5200, - EndPos: 5207, + EndLine: 270, + StartPos: 5200, + EndPos: 5207, }, Expr: &cast.Int{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5200, - EndPos: 5206, + EndLine: 270, + StartPos: 5200, + EndPos: 5206, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5205, - EndPos: 5206, + EndLine: 270, + StartPos: 5205, + EndPos: 5206, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 270, - EndLine: 270, - StartPos: 5205, - EndPos: 5206, + EndLine: 270, + StartPos: 5205, + EndPos: 5206, }, Value: "a", }, @@ -12629,30 +12563,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5211, - EndPos: 5221, + EndLine: 271, + StartPos: 5211, + EndPos: 5221, }, Expr: &cast.Object{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5211, - EndPos: 5220, + EndLine: 271, + StartPos: 5211, + EndPos: 5220, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5219, - EndPos: 5220, + EndLine: 271, + StartPos: 5219, + EndPos: 5220, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 271, - EndLine: 271, - StartPos: 5219, - EndPos: 5220, + EndLine: 271, + StartPos: 5219, + EndPos: 5220, }, Value: "a", }, @@ -12662,30 +12596,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5225, - EndPos: 5235, + EndLine: 272, + StartPos: 5225, + EndPos: 5235, }, Expr: &cast.String{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5225, - EndPos: 5234, + EndLine: 272, + StartPos: 5225, + EndPos: 5234, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5233, - EndPos: 5234, + EndLine: 272, + StartPos: 5233, + EndPos: 5234, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 272, - EndLine: 272, - StartPos: 5233, - EndPos: 5234, + EndLine: 272, + StartPos: 5233, + EndPos: 5234, }, Value: "a", }, @@ -12695,30 +12629,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5239, - EndPos: 5248, + EndLine: 273, + StartPos: 5239, + EndPos: 5248, }, Expr: &cast.Unset{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5239, - EndPos: 5247, + EndLine: 273, + StartPos: 5239, + EndPos: 5247, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5246, - EndPos: 5247, + EndLine: 273, + StartPos: 5246, + EndPos: 5247, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 273, - EndLine: 273, - StartPos: 5246, - EndPos: 5247, + EndLine: 273, + StartPos: 5246, + EndPos: 5247, }, Value: "a", }, @@ -12728,30 +12662,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5253, - EndPos: 5260, + EndLine: 275, + StartPos: 5253, + EndPos: 5260, }, Expr: &binary.BitwiseAnd{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5253, - EndPos: 5259, + EndLine: 275, + StartPos: 5253, + EndPos: 5259, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5253, - EndPos: 5254, + EndLine: 275, + StartPos: 5253, + EndPos: 5254, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5253, - EndPos: 5254, + EndLine: 275, + StartPos: 5253, + EndPos: 5254, }, Value: "a", }, @@ -12759,16 +12693,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5258, - EndPos: 5259, + EndLine: 275, + StartPos: 5258, + EndPos: 5259, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 275, - EndLine: 275, - StartPos: 5258, - EndPos: 5259, + EndLine: 275, + StartPos: 5258, + EndPos: 5259, }, Value: "b", }, @@ -12778,30 +12712,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5264, - EndPos: 5271, + EndLine: 276, + StartPos: 5264, + EndPos: 5271, }, Expr: &binary.BitwiseOr{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5264, - EndPos: 5270, + EndLine: 276, + StartPos: 5264, + EndPos: 5270, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5264, - EndPos: 5265, + EndLine: 276, + StartPos: 5264, + EndPos: 5265, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5264, - EndPos: 5265, + EndLine: 276, + StartPos: 5264, + EndPos: 5265, }, Value: "a", }, @@ -12809,16 +12743,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5269, - EndPos: 5270, + EndLine: 276, + StartPos: 5269, + EndPos: 5270, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 276, - EndLine: 276, - StartPos: 5269, - EndPos: 5270, + EndLine: 276, + StartPos: 5269, + EndPos: 5270, }, Value: "b", }, @@ -12828,30 +12762,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5275, - EndPos: 5282, + EndLine: 277, + StartPos: 5275, + EndPos: 5282, }, Expr: &binary.BitwiseXor{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5275, - EndPos: 5281, + EndLine: 277, + StartPos: 5275, + EndPos: 5281, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5275, - EndPos: 5276, + EndLine: 277, + StartPos: 5275, + EndPos: 5276, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5275, - EndPos: 5276, + EndLine: 277, + StartPos: 5275, + EndPos: 5276, }, Value: "a", }, @@ -12859,16 +12793,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5280, - EndPos: 5281, + EndLine: 277, + StartPos: 5280, + EndPos: 5281, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 277, - EndLine: 277, - StartPos: 5280, - EndPos: 5281, + EndLine: 277, + StartPos: 5280, + EndPos: 5281, }, Value: "b", }, @@ -12878,30 +12812,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5286, - EndPos: 5294, + EndLine: 278, + StartPos: 5286, + EndPos: 5294, }, Expr: &binary.BooleanAnd{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5286, - EndPos: 5293, + EndLine: 278, + StartPos: 5286, + EndPos: 5293, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5286, - EndPos: 5287, + EndLine: 278, + StartPos: 5286, + EndPos: 5287, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5286, - EndPos: 5287, + EndLine: 278, + StartPos: 5286, + EndPos: 5287, }, Value: "a", }, @@ -12909,16 +12843,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5292, - EndPos: 5293, + EndLine: 278, + StartPos: 5292, + EndPos: 5293, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 278, - EndLine: 278, - StartPos: 5292, - EndPos: 5293, + EndLine: 278, + StartPos: 5292, + EndPos: 5293, }, Value: "b", }, @@ -12928,30 +12862,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5298, - EndPos: 5306, + EndLine: 279, + StartPos: 5298, + EndPos: 5306, }, Expr: &binary.BooleanOr{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5298, - EndPos: 5305, + EndLine: 279, + StartPos: 5298, + EndPos: 5305, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5298, - EndPos: 5299, + EndLine: 279, + StartPos: 5298, + EndPos: 5299, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5298, - EndPos: 5299, + EndLine: 279, + StartPos: 5298, + EndPos: 5299, }, Value: "a", }, @@ -12959,16 +12893,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5304, - EndPos: 5305, + EndLine: 279, + StartPos: 5304, + EndPos: 5305, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 279, - EndLine: 279, - StartPos: 5304, - EndPos: 5305, + EndLine: 279, + StartPos: 5304, + EndPos: 5305, }, Value: "b", }, @@ -12978,30 +12912,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5310, - EndPos: 5318, + EndLine: 280, + StartPos: 5310, + EndPos: 5318, }, Expr: &binary.Coalesce{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5310, - EndPos: 5317, + EndLine: 280, + StartPos: 5310, + EndPos: 5317, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5310, - EndPos: 5311, + EndLine: 280, + StartPos: 5310, + EndPos: 5311, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5310, - EndPos: 5311, + EndLine: 280, + StartPos: 5310, + EndPos: 5311, }, Value: "a", }, @@ -13009,16 +12943,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5316, - EndPos: 5317, + EndLine: 280, + StartPos: 5316, + EndPos: 5317, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 280, - EndLine: 280, - StartPos: 5316, - EndPos: 5317, + EndLine: 280, + StartPos: 5316, + EndPos: 5317, }, Value: "b", }, @@ -13028,30 +12962,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5322, - EndPos: 5329, + EndLine: 281, + StartPos: 5322, + EndPos: 5329, }, Expr: &binary.Concat{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5322, - EndPos: 5328, + EndLine: 281, + StartPos: 5322, + EndPos: 5328, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5322, - EndPos: 5323, + EndLine: 281, + StartPos: 5322, + EndPos: 5323, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5322, - EndPos: 5323, + EndLine: 281, + StartPos: 5322, + EndPos: 5323, }, Value: "a", }, @@ -13059,16 +12993,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5327, - EndPos: 5328, + EndLine: 281, + StartPos: 5327, + EndPos: 5328, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 281, - EndLine: 281, - StartPos: 5327, - EndPos: 5328, + EndLine: 281, + StartPos: 5327, + EndPos: 5328, }, Value: "b", }, @@ -13078,30 +13012,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5333, - EndPos: 5340, + EndLine: 282, + StartPos: 5333, + EndPos: 5340, }, Expr: &binary.Div{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5333, - EndPos: 5339, + EndLine: 282, + StartPos: 5333, + EndPos: 5339, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5333, - EndPos: 5334, + EndLine: 282, + StartPos: 5333, + EndPos: 5334, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5333, - EndPos: 5334, + EndLine: 282, + StartPos: 5333, + EndPos: 5334, }, Value: "a", }, @@ -13109,16 +13043,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5338, - EndPos: 5339, + EndLine: 282, + StartPos: 5338, + EndPos: 5339, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 282, - EndLine: 282, - StartPos: 5338, - EndPos: 5339, + EndLine: 282, + StartPos: 5338, + EndPos: 5339, }, Value: "b", }, @@ -13128,30 +13062,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5344, - EndPos: 5352, + EndLine: 283, + StartPos: 5344, + EndPos: 5352, }, Expr: &binary.Equal{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5344, - EndPos: 5351, + EndLine: 283, + StartPos: 5344, + EndPos: 5351, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5344, - EndPos: 5345, + EndLine: 283, + StartPos: 5344, + EndPos: 5345, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5344, - EndPos: 5345, + EndLine: 283, + StartPos: 5344, + EndPos: 5345, }, Value: "a", }, @@ -13159,16 +13093,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5350, - EndPos: 5351, + EndLine: 283, + StartPos: 5350, + EndPos: 5351, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 283, - EndLine: 283, - StartPos: 5350, - EndPos: 5351, + EndLine: 283, + StartPos: 5350, + EndPos: 5351, }, Value: "b", }, @@ -13178,30 +13112,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5356, - EndPos: 5364, + EndLine: 284, + StartPos: 5356, + EndPos: 5364, }, Expr: &binary.GreaterOrEqual{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5356, - EndPos: 5363, + EndLine: 284, + StartPos: 5356, + EndPos: 5363, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5356, - EndPos: 5357, + EndLine: 284, + StartPos: 5356, + EndPos: 5357, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5356, - EndPos: 5357, + EndLine: 284, + StartPos: 5356, + EndPos: 5357, }, Value: "a", }, @@ -13209,16 +13143,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5362, - EndPos: 5363, + EndLine: 284, + StartPos: 5362, + EndPos: 5363, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 284, - EndLine: 284, - StartPos: 5362, - EndPos: 5363, + EndLine: 284, + StartPos: 5362, + EndPos: 5363, }, Value: "b", }, @@ -13228,30 +13162,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5368, - EndPos: 5375, + EndLine: 285, + StartPos: 5368, + EndPos: 5375, }, Expr: &binary.Greater{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5368, - EndPos: 5374, + EndLine: 285, + StartPos: 5368, + EndPos: 5374, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5368, - EndPos: 5369, + EndLine: 285, + StartPos: 5368, + EndPos: 5369, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5368, - EndPos: 5369, + EndLine: 285, + StartPos: 5368, + EndPos: 5369, }, Value: "a", }, @@ -13259,16 +13193,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5373, - EndPos: 5374, + EndLine: 285, + StartPos: 5373, + EndPos: 5374, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 285, - EndLine: 285, - StartPos: 5373, - EndPos: 5374, + EndLine: 285, + StartPos: 5373, + EndPos: 5374, }, Value: "b", }, @@ -13278,30 +13212,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5379, - EndPos: 5388, + EndLine: 286, + StartPos: 5379, + EndPos: 5388, }, Expr: &binary.Identical{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5379, - EndPos: 5387, + EndLine: 286, + StartPos: 5379, + EndPos: 5387, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5379, - EndPos: 5380, + EndLine: 286, + StartPos: 5379, + EndPos: 5380, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5379, - EndPos: 5380, + EndLine: 286, + StartPos: 5379, + EndPos: 5380, }, Value: "a", }, @@ -13309,16 +13243,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5386, - EndPos: 5387, + EndLine: 286, + StartPos: 5386, + EndPos: 5387, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 286, - EndLine: 286, - StartPos: 5386, - EndPos: 5387, + EndLine: 286, + StartPos: 5386, + EndPos: 5387, }, Value: "b", }, @@ -13328,30 +13262,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5401, + EndLine: 287, + StartPos: 5392, + EndPos: 5401, }, Expr: &binary.LogicalAnd{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5400, + EndLine: 287, + StartPos: 5392, + EndPos: 5400, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5393, + EndLine: 287, + StartPos: 5392, + EndPos: 5393, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5392, - EndPos: 5393, + EndLine: 287, + StartPos: 5392, + EndPos: 5393, }, Value: "a", }, @@ -13359,16 +13293,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5399, - EndPos: 5400, + EndLine: 287, + StartPos: 5399, + EndPos: 5400, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 287, - EndLine: 287, - StartPos: 5399, - EndPos: 5400, + EndLine: 287, + StartPos: 5399, + EndPos: 5400, }, Value: "b", }, @@ -13378,30 +13312,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5405, - EndPos: 5413, + EndLine: 288, + StartPos: 5405, + EndPos: 5413, }, Expr: &binary.LogicalOr{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5405, - EndPos: 5412, + EndLine: 288, + StartPos: 5405, + EndPos: 5412, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5405, - EndPos: 5406, + EndLine: 288, + StartPos: 5405, + EndPos: 5406, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5405, - EndPos: 5406, + EndLine: 288, + StartPos: 5405, + EndPos: 5406, }, Value: "a", }, @@ -13409,16 +13343,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5411, - EndPos: 5412, + EndLine: 288, + StartPos: 5411, + EndPos: 5412, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 288, - EndLine: 288, - StartPos: 5411, - EndPos: 5412, + EndLine: 288, + StartPos: 5411, + EndPos: 5412, }, Value: "b", }, @@ -13428,30 +13362,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5426, + EndLine: 289, + StartPos: 5417, + EndPos: 5426, }, Expr: &binary.LogicalXor{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5425, + EndLine: 289, + StartPos: 5417, + EndPos: 5425, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5418, + EndLine: 289, + StartPos: 5417, + EndPos: 5418, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5417, - EndPos: 5418, + EndLine: 289, + StartPos: 5417, + EndPos: 5418, }, Value: "a", }, @@ -13459,16 +13393,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5424, - EndPos: 5425, + EndLine: 289, + StartPos: 5424, + EndPos: 5425, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 289, - EndLine: 289, - StartPos: 5424, - EndPos: 5425, + EndLine: 289, + StartPos: 5424, + EndPos: 5425, }, Value: "b", }, @@ -13478,30 +13412,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5430, - EndPos: 5437, + EndLine: 290, + StartPos: 5430, + EndPos: 5437, }, Expr: &binary.Minus{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5430, - EndPos: 5436, + EndLine: 290, + StartPos: 5430, + EndPos: 5436, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5430, - EndPos: 5431, + EndLine: 290, + StartPos: 5430, + EndPos: 5431, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5430, - EndPos: 5431, + EndLine: 290, + StartPos: 5430, + EndPos: 5431, }, Value: "a", }, @@ -13509,16 +13443,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5435, - EndPos: 5436, + EndLine: 290, + StartPos: 5435, + EndPos: 5436, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 290, - EndLine: 290, - StartPos: 5435, - EndPos: 5436, + EndLine: 290, + StartPos: 5435, + EndPos: 5436, }, Value: "b", }, @@ -13528,30 +13462,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5441, - EndPos: 5448, + EndLine: 291, + StartPos: 5441, + EndPos: 5448, }, Expr: &binary.Mod{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5441, - EndPos: 5447, + EndLine: 291, + StartPos: 5441, + EndPos: 5447, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5441, - EndPos: 5442, + EndLine: 291, + StartPos: 5441, + EndPos: 5442, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5441, - EndPos: 5442, + EndLine: 291, + StartPos: 5441, + EndPos: 5442, }, Value: "a", }, @@ -13559,16 +13493,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5446, - EndPos: 5447, + EndLine: 291, + StartPos: 5446, + EndPos: 5447, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 291, - EndLine: 291, - StartPos: 5446, - EndPos: 5447, + EndLine: 291, + StartPos: 5446, + EndPos: 5447, }, Value: "b", }, @@ -13578,30 +13512,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5459, + EndLine: 292, + StartPos: 5452, + EndPos: 5459, }, Expr: &binary.Mul{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5458, + EndLine: 292, + StartPos: 5452, + EndPos: 5458, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5453, + EndLine: 292, + StartPos: 5452, + EndPos: 5453, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5452, - EndPos: 5453, + EndLine: 292, + StartPos: 5452, + EndPos: 5453, }, Value: "a", }, @@ -13609,16 +13543,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5457, - EndPos: 5458, + EndLine: 292, + StartPos: 5457, + EndPos: 5458, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 292, - EndLine: 292, - StartPos: 5457, - EndPos: 5458, + EndLine: 292, + StartPos: 5457, + EndPos: 5458, }, Value: "b", }, @@ -13628,30 +13562,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5463, - EndPos: 5471, + EndLine: 293, + StartPos: 5463, + EndPos: 5471, }, Expr: &binary.NotEqual{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5463, - EndPos: 5470, + EndLine: 293, + StartPos: 5463, + EndPos: 5470, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5463, - EndPos: 5464, + EndLine: 293, + StartPos: 5463, + EndPos: 5464, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5463, - EndPos: 5464, + EndLine: 293, + StartPos: 5463, + EndPos: 5464, }, Value: "a", }, @@ -13659,16 +13593,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5469, - EndPos: 5470, + EndLine: 293, + StartPos: 5469, + EndPos: 5470, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 293, - EndLine: 293, - StartPos: 5469, - EndPos: 5470, + EndLine: 293, + StartPos: 5469, + EndPos: 5470, }, Value: "b", }, @@ -13678,30 +13612,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5475, - EndPos: 5484, + EndLine: 294, + StartPos: 5475, + EndPos: 5484, }, Expr: &binary.NotIdentical{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5475, - EndPos: 5483, + EndLine: 294, + StartPos: 5475, + EndPos: 5483, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5475, - EndPos: 5476, + EndLine: 294, + StartPos: 5475, + EndPos: 5476, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5475, - EndPos: 5476, + EndLine: 294, + StartPos: 5475, + EndPos: 5476, }, Value: "a", }, @@ -13709,16 +13643,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5482, - EndPos: 5483, + EndLine: 294, + StartPos: 5482, + EndPos: 5483, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 294, - EndLine: 294, - StartPos: 5482, - EndPos: 5483, + EndLine: 294, + StartPos: 5482, + EndPos: 5483, }, Value: "b", }, @@ -13728,30 +13662,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 295, - EndLine: 295, - StartPos: 5488, - EndPos: 5495, + EndLine: 295, + StartPos: 5488, + EndPos: 5495, }, Expr: &binary.Plus{ Position: &position.Position{ StartLine: 295, - EndLine: 295, - StartPos: 5488, - EndPos: 5494, + EndLine: 295, + StartPos: 5488, + EndPos: 5494, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 295, - EndLine: 295, - StartPos: 5488, - EndPos: 5489, + EndLine: 295, + StartPos: 5488, + EndPos: 5489, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 295, - EndLine: 295, - StartPos: 5488, - EndPos: 5489, + EndLine: 295, + StartPos: 5488, + EndPos: 5489, }, Value: "a", }, @@ -13759,16 +13693,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 295, - EndLine: 295, - StartPos: 5493, - EndPos: 5494, + EndLine: 295, + StartPos: 5493, + EndPos: 5494, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 295, - EndLine: 295, - StartPos: 5493, - EndPos: 5494, + EndLine: 295, + StartPos: 5493, + EndPos: 5494, }, Value: "b", }, @@ -13778,30 +13712,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5499, - EndPos: 5507, + EndLine: 296, + StartPos: 5499, + EndPos: 5507, }, Expr: &binary.Pow{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5499, - EndPos: 5506, + EndLine: 296, + StartPos: 5499, + EndPos: 5506, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5499, - EndPos: 5500, + EndLine: 296, + StartPos: 5499, + EndPos: 5500, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5499, - EndPos: 5500, + EndLine: 296, + StartPos: 5499, + EndPos: 5500, }, Value: "a", }, @@ -13809,16 +13743,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5505, - EndPos: 5506, + EndLine: 296, + StartPos: 5505, + EndPos: 5506, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 296, - EndLine: 296, - StartPos: 5505, - EndPos: 5506, + EndLine: 296, + StartPos: 5505, + EndPos: 5506, }, Value: "b", }, @@ -13828,30 +13762,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5511, - EndPos: 5519, + EndLine: 297, + StartPos: 5511, + EndPos: 5519, }, Expr: &binary.ShiftLeft{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5511, - EndPos: 5518, + EndLine: 297, + StartPos: 5511, + EndPos: 5518, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5511, - EndPos: 5512, + EndLine: 297, + StartPos: 5511, + EndPos: 5512, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5511, - EndPos: 5512, + EndLine: 297, + StartPos: 5511, + EndPos: 5512, }, Value: "a", }, @@ -13859,16 +13793,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5517, - EndPos: 5518, + EndLine: 297, + StartPos: 5517, + EndPos: 5518, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 297, - EndLine: 297, - StartPos: 5517, - EndPos: 5518, + EndLine: 297, + StartPos: 5517, + EndPos: 5518, }, Value: "b", }, @@ -13878,30 +13812,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5523, - EndPos: 5531, + EndLine: 298, + StartPos: 5523, + EndPos: 5531, }, Expr: &binary.ShiftRight{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5523, - EndPos: 5530, + EndLine: 298, + StartPos: 5523, + EndPos: 5530, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5523, - EndPos: 5524, + EndLine: 298, + StartPos: 5523, + EndPos: 5524, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5523, - EndPos: 5524, + EndLine: 298, + StartPos: 5523, + EndPos: 5524, }, Value: "a", }, @@ -13909,16 +13843,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5529, - EndPos: 5530, + EndLine: 298, + StartPos: 5529, + EndPos: 5530, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 298, - EndLine: 298, - StartPos: 5529, - EndPos: 5530, + EndLine: 298, + StartPos: 5529, + EndPos: 5530, }, Value: "b", }, @@ -13928,30 +13862,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5535, - EndPos: 5543, + EndLine: 299, + StartPos: 5535, + EndPos: 5543, }, Expr: &binary.SmallerOrEqual{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5535, - EndPos: 5542, + EndLine: 299, + StartPos: 5535, + EndPos: 5542, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5535, - EndPos: 5536, + EndLine: 299, + StartPos: 5535, + EndPos: 5536, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5535, - EndPos: 5536, + EndLine: 299, + StartPos: 5535, + EndPos: 5536, }, Value: "a", }, @@ -13959,16 +13893,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5541, - EndPos: 5542, + EndLine: 299, + StartPos: 5541, + EndPos: 5542, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 299, - EndLine: 299, - StartPos: 5541, - EndPos: 5542, + EndLine: 299, + StartPos: 5541, + EndPos: 5542, }, Value: "b", }, @@ -13978,30 +13912,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5547, - EndPos: 5554, + EndLine: 300, + StartPos: 5547, + EndPos: 5554, }, Expr: &binary.Smaller{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5547, - EndPos: 5553, + EndLine: 300, + StartPos: 5547, + EndPos: 5553, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5547, - EndPos: 5548, + EndLine: 300, + StartPos: 5547, + EndPos: 5548, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5547, - EndPos: 5548, + EndLine: 300, + StartPos: 5547, + EndPos: 5548, }, Value: "a", }, @@ -14009,16 +13943,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5552, - EndPos: 5553, + EndLine: 300, + StartPos: 5552, + EndPos: 5553, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 300, - EndLine: 300, - StartPos: 5552, - EndPos: 5553, + EndLine: 300, + StartPos: 5552, + EndPos: 5553, }, Value: "b", }, @@ -14028,30 +13962,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5558, - EndPos: 5567, + EndLine: 301, + StartPos: 5558, + EndPos: 5567, }, Expr: &binary.Spaceship{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5558, - EndPos: 5566, + EndLine: 301, + StartPos: 5558, + EndPos: 5566, }, Left: &expr.Variable{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5558, - EndPos: 5559, + EndLine: 301, + StartPos: 5558, + EndPos: 5559, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5558, - EndPos: 5559, + EndLine: 301, + StartPos: 5558, + EndPos: 5559, }, Value: "a", }, @@ -14059,16 +13993,16 @@ func TestPhp7(t *testing.T) { Right: &expr.Variable{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5565, - EndPos: 5566, + EndLine: 301, + StartPos: 5565, + EndPos: 5566, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 301, - EndLine: 301, - StartPos: 5565, - EndPos: 5566, + EndLine: 301, + StartPos: 5565, + EndPos: 5566, }, Value: "b", }, @@ -14078,30 +14012,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5572, - EndPos: 5580, + EndLine: 303, + StartPos: 5572, + EndPos: 5580, }, Expr: &assign.Reference{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5572, - EndPos: 5579, + EndLine: 303, + StartPos: 5572, + EndPos: 5579, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5572, - EndPos: 5573, + EndLine: 303, + StartPos: 5572, + EndPos: 5573, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5572, - EndPos: 5573, + EndLine: 303, + StartPos: 5572, + EndPos: 5573, }, Value: "a", }, @@ -14109,16 +14043,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5578, - EndPos: 5579, + EndLine: 303, + StartPos: 5578, + EndPos: 5579, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 303, - EndLine: 303, - StartPos: 5578, - EndPos: 5579, + EndLine: 303, + StartPos: 5578, + EndPos: 5579, }, Value: "b", }, @@ -14128,30 +14062,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5584, - EndPos: 5591, + EndLine: 304, + StartPos: 5584, + EndPos: 5591, }, Expr: &assign.Assign{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5584, - EndPos: 5590, + EndLine: 304, + StartPos: 5584, + EndPos: 5590, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5584, - EndPos: 5585, + EndLine: 304, + StartPos: 5584, + EndPos: 5585, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5584, - EndPos: 5585, + EndLine: 304, + StartPos: 5584, + EndPos: 5585, }, Value: "a", }, @@ -14159,16 +14093,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5589, - EndPos: 5590, + EndLine: 304, + StartPos: 5589, + EndPos: 5590, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 304, - EndLine: 304, - StartPos: 5589, - EndPos: 5590, + EndLine: 304, + StartPos: 5589, + EndPos: 5590, }, Value: "b", }, @@ -14178,30 +14112,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5595, - EndPos: 5603, + EndLine: 305, + StartPos: 5595, + EndPos: 5603, }, Expr: &assign.BitwiseAnd{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5595, - EndPos: 5602, + EndLine: 305, + StartPos: 5595, + EndPos: 5602, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5595, - EndPos: 5596, + EndLine: 305, + StartPos: 5595, + EndPos: 5596, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5595, - EndPos: 5596, + EndLine: 305, + StartPos: 5595, + EndPos: 5596, }, Value: "a", }, @@ -14209,16 +14143,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5601, - EndPos: 5602, + EndLine: 305, + StartPos: 5601, + EndPos: 5602, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 305, - EndLine: 305, - StartPos: 5601, - EndPos: 5602, + EndLine: 305, + StartPos: 5601, + EndPos: 5602, }, Value: "b", }, @@ -14228,30 +14162,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5607, - EndPos: 5615, + EndLine: 306, + StartPos: 5607, + EndPos: 5615, }, Expr: &assign.BitwiseOr{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5607, - EndPos: 5614, + EndLine: 306, + StartPos: 5607, + EndPos: 5614, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5607, - EndPos: 5608, + EndLine: 306, + StartPos: 5607, + EndPos: 5608, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5607, - EndPos: 5608, + EndLine: 306, + StartPos: 5607, + EndPos: 5608, }, Value: "a", }, @@ -14259,16 +14193,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5613, - EndPos: 5614, + EndLine: 306, + StartPos: 5613, + EndPos: 5614, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 306, - EndLine: 306, - StartPos: 5613, - EndPos: 5614, + EndLine: 306, + StartPos: 5613, + EndPos: 5614, }, Value: "b", }, @@ -14278,30 +14212,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5619, - EndPos: 5627, + EndLine: 307, + StartPos: 5619, + EndPos: 5627, }, Expr: &assign.BitwiseXor{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5619, - EndPos: 5626, + EndLine: 307, + StartPos: 5619, + EndPos: 5626, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5619, - EndPos: 5620, + EndLine: 307, + StartPos: 5619, + EndPos: 5620, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5619, - EndPos: 5620, + EndLine: 307, + StartPos: 5619, + EndPos: 5620, }, Value: "a", }, @@ -14309,16 +14243,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5625, - EndPos: 5626, + EndLine: 307, + StartPos: 5625, + EndPos: 5626, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 307, - EndLine: 307, - StartPos: 5625, - EndPos: 5626, + EndLine: 307, + StartPos: 5625, + EndPos: 5626, }, Value: "b", }, @@ -14328,30 +14262,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5631, - EndPos: 5639, + EndLine: 308, + StartPos: 5631, + EndPos: 5639, }, Expr: &assign.Concat{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5631, - EndPos: 5638, + EndLine: 308, + StartPos: 5631, + EndPos: 5638, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5631, - EndPos: 5632, + EndLine: 308, + StartPos: 5631, + EndPos: 5632, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5631, - EndPos: 5632, + EndLine: 308, + StartPos: 5631, + EndPos: 5632, }, Value: "a", }, @@ -14359,16 +14293,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5637, - EndPos: 5638, + EndLine: 308, + StartPos: 5637, + EndPos: 5638, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 308, - EndLine: 308, - StartPos: 5637, - EndPos: 5638, + EndLine: 308, + StartPos: 5637, + EndPos: 5638, }, Value: "b", }, @@ -14378,30 +14312,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5643, - EndPos: 5651, + EndLine: 309, + StartPos: 5643, + EndPos: 5651, }, Expr: &assign.Div{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5643, - EndPos: 5650, + EndLine: 309, + StartPos: 5643, + EndPos: 5650, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5643, - EndPos: 5644, + EndLine: 309, + StartPos: 5643, + EndPos: 5644, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5643, - EndPos: 5644, + EndLine: 309, + StartPos: 5643, + EndPos: 5644, }, Value: "a", }, @@ -14409,16 +14343,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5649, - EndPos: 5650, + EndLine: 309, + StartPos: 5649, + EndPos: 5650, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 309, - EndLine: 309, - StartPos: 5649, - EndPos: 5650, + EndLine: 309, + StartPos: 5649, + EndPos: 5650, }, Value: "b", }, @@ -14428,30 +14362,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5655, - EndPos: 5663, + EndLine: 310, + StartPos: 5655, + EndPos: 5663, }, Expr: &assign.Minus{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5655, - EndPos: 5662, + EndLine: 310, + StartPos: 5655, + EndPos: 5662, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5655, - EndPos: 5656, + EndLine: 310, + StartPos: 5655, + EndPos: 5656, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5655, - EndPos: 5656, + EndLine: 310, + StartPos: 5655, + EndPos: 5656, }, Value: "a", }, @@ -14459,16 +14393,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5661, - EndPos: 5662, + EndLine: 310, + StartPos: 5661, + EndPos: 5662, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 310, - EndLine: 310, - StartPos: 5661, - EndPos: 5662, + EndLine: 310, + StartPos: 5661, + EndPos: 5662, }, Value: "b", }, @@ -14478,30 +14412,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5667, - EndPos: 5675, + EndLine: 311, + StartPos: 5667, + EndPos: 5675, }, Expr: &assign.Mod{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5667, - EndPos: 5674, + EndLine: 311, + StartPos: 5667, + EndPos: 5674, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5667, - EndPos: 5668, + EndLine: 311, + StartPos: 5667, + EndPos: 5668, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5667, - EndPos: 5668, + EndLine: 311, + StartPos: 5667, + EndPos: 5668, }, Value: "a", }, @@ -14509,16 +14443,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5673, - EndPos: 5674, + EndLine: 311, + StartPos: 5673, + EndPos: 5674, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 311, - EndLine: 311, - StartPos: 5673, - EndPos: 5674, + EndLine: 311, + StartPos: 5673, + EndPos: 5674, }, Value: "b", }, @@ -14528,30 +14462,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 312, - EndLine: 312, - StartPos: 5679, - EndPos: 5687, + EndLine: 312, + StartPos: 5679, + EndPos: 5687, }, Expr: &assign.Mul{ Position: &position.Position{ StartLine: 312, - EndLine: 312, - StartPos: 5679, - EndPos: 5686, + EndLine: 312, + StartPos: 5679, + EndPos: 5686, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 312, - EndLine: 312, - StartPos: 5679, - EndPos: 5680, + EndLine: 312, + StartPos: 5679, + EndPos: 5680, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 312, - EndLine: 312, - StartPos: 5679, - EndPos: 5680, + EndLine: 312, + StartPos: 5679, + EndPos: 5680, }, Value: "a", }, @@ -14559,16 +14493,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 312, - EndLine: 312, - StartPos: 5685, - EndPos: 5686, + EndLine: 312, + StartPos: 5685, + EndPos: 5686, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 312, - EndLine: 312, - StartPos: 5685, - EndPos: 5686, + EndLine: 312, + StartPos: 5685, + EndPos: 5686, }, Value: "b", }, @@ -14578,30 +14512,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 313, - EndLine: 313, - StartPos: 5691, - EndPos: 5699, + EndLine: 313, + StartPos: 5691, + EndPos: 5699, }, Expr: &assign.Plus{ Position: &position.Position{ StartLine: 313, - EndLine: 313, - StartPos: 5691, - EndPos: 5698, + EndLine: 313, + StartPos: 5691, + EndPos: 5698, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 313, - EndLine: 313, - StartPos: 5691, - EndPos: 5692, + EndLine: 313, + StartPos: 5691, + EndPos: 5692, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 313, - EndLine: 313, - StartPos: 5691, - EndPos: 5692, + EndLine: 313, + StartPos: 5691, + EndPos: 5692, }, Value: "a", }, @@ -14609,16 +14543,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 313, - EndLine: 313, - StartPos: 5697, - EndPos: 5698, + EndLine: 313, + StartPos: 5697, + EndPos: 5698, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 313, - EndLine: 313, - StartPos: 5697, - EndPos: 5698, + EndLine: 313, + StartPos: 5697, + EndPos: 5698, }, Value: "b", }, @@ -14628,30 +14562,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5703, - EndPos: 5712, + EndLine: 314, + StartPos: 5703, + EndPos: 5712, }, Expr: &assign.Pow{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5703, - EndPos: 5711, + EndLine: 314, + StartPos: 5703, + EndPos: 5711, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5703, - EndPos: 5704, + EndLine: 314, + StartPos: 5703, + EndPos: 5704, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5703, - EndPos: 5704, + EndLine: 314, + StartPos: 5703, + EndPos: 5704, }, Value: "a", }, @@ -14659,16 +14593,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5710, - EndPos: 5711, + EndLine: 314, + StartPos: 5710, + EndPos: 5711, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 314, - EndLine: 314, - StartPos: 5710, - EndPos: 5711, + EndLine: 314, + StartPos: 5710, + EndPos: 5711, }, Value: "b", }, @@ -14678,30 +14612,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5716, - EndPos: 5725, + EndLine: 315, + StartPos: 5716, + EndPos: 5725, }, Expr: &assign.ShiftLeft{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5716, - EndPos: 5724, + EndLine: 315, + StartPos: 5716, + EndPos: 5724, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5716, - EndPos: 5717, + EndLine: 315, + StartPos: 5716, + EndPos: 5717, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5716, - EndPos: 5717, + EndLine: 315, + StartPos: 5716, + EndPos: 5717, }, Value: "a", }, @@ -14709,16 +14643,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5723, - EndPos: 5724, + EndLine: 315, + StartPos: 5723, + EndPos: 5724, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 315, - EndLine: 315, - StartPos: 5723, - EndPos: 5724, + EndLine: 315, + StartPos: 5723, + EndPos: 5724, }, Value: "b", }, @@ -14728,30 +14662,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5729, - EndPos: 5738, + EndLine: 316, + StartPos: 5729, + EndPos: 5738, }, Expr: &assign.ShiftRight{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5729, - EndPos: 5737, + EndLine: 316, + StartPos: 5729, + EndPos: 5737, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5729, - EndPos: 5730, + EndLine: 316, + StartPos: 5729, + EndPos: 5730, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5729, - EndPos: 5730, + EndLine: 316, + StartPos: 5729, + EndPos: 5730, }, Value: "a", }, @@ -14759,16 +14693,16 @@ func TestPhp7(t *testing.T) { Expression: &expr.Variable{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5736, - EndPos: 5737, + EndLine: 316, + StartPos: 5736, + EndPos: 5737, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 316, - EndLine: 316, - StartPos: 5736, - EndPos: 5737, + EndLine: 316, + StartPos: 5736, + EndPos: 5737, }, Value: "b", }, @@ -14778,17 +14712,17 @@ func TestPhp7(t *testing.T) { &stmt.Class{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5743, - EndPos: 5781, + EndLine: 318, + StartPos: 5743, + EndPos: 5781, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5749, - EndPos: 5751, + EndLine: 318, + StartPos: 5749, + EndPos: 5751, }, Value: "foo", }, @@ -14796,18 +14730,18 @@ func TestPhp7(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5754, - EndPos: 5779, + EndLine: 318, + StartPos: 5754, + EndPos: 5779, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5770, - EndPos: 5774, + EndLine: 318, + StartPos: 5770, + EndPos: 5774, }, Value: "class", }, @@ -14815,9 +14749,9 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5754, - EndPos: 5759, + EndLine: 318, + StartPos: 5754, + EndPos: 5759, }, Value: "public", }, @@ -14825,12 +14759,11 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5778, - EndPos: 5779, - }, - Stmts: []node.Node{ + EndLine: 318, + StartPos: 5778, + EndPos: 5779, }, + Stmts: []node.Node{}, }, }, }, @@ -14838,40 +14771,40 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5785, - EndPos: 5795, + EndLine: 319, + StartPos: 5785, + EndPos: 5795, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5785, - EndPos: 5794, + EndLine: 319, + StartPos: 5785, + EndPos: 5794, }, Function: &name.FullyQualified{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5785, - EndPos: 5792, + EndLine: 319, + StartPos: 5785, + EndPos: 5792, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5786, - EndPos: 5788, + EndLine: 319, + StartPos: 5786, + EndPos: 5788, }, Value: "foo", }, &name.NamePart{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5790, - EndPos: 5792, + EndLine: 319, + StartPos: 5790, + EndPos: 5792, }, Value: "bar", }, @@ -14880,9 +14813,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 319, - EndLine: 319, - StartPos: 5793, - EndPos: 5794, + EndLine: 319, + StartPos: 5793, + EndPos: 5794, }, }, }, @@ -14890,18 +14823,18 @@ func TestPhp7(t *testing.T) { &stmt.Function{ Position: &position.Position{ StartLine: 321, - EndLine: 327, - StartPos: 5800, - EndPos: 5926, + EndLine: 327, + StartPos: 5800, + EndPos: 5926, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5809, - EndPos: 5811, + EndLine: 321, + StartPos: 5809, + EndPos: 5811, }, Value: "foo", }, @@ -14909,25 +14842,25 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5813, - EndPos: 5815, + EndLine: 321, + StartPos: 5813, + EndPos: 5815, }, - ByRef: true, + ByRef: true, Variadic: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5814, - EndPos: 5815, + EndLine: 321, + StartPos: 5814, + EndPos: 5815, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5814, - EndPos: 5815, + EndLine: 321, + StartPos: 5814, + EndPos: 5815, }, Value: "a", }, @@ -14936,25 +14869,25 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5818, - EndPos: 5822, + EndLine: 321, + StartPos: 5818, + EndPos: 5822, }, - ByRef: false, + ByRef: false, Variadic: true, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5821, - EndPos: 5822, + EndLine: 321, + StartPos: 5821, + EndPos: 5822, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 321, - EndLine: 321, - StartPos: 5821, - EndPos: 5822, + EndLine: 321, + StartPos: 5821, + EndPos: 5822, }, Value: "b", }, @@ -14965,109 +14898,105 @@ func TestPhp7(t *testing.T) { &stmt.HaltCompiler{ Position: &position.Position{ StartLine: 322, - EndLine: 322, - StartPos: 5830, - EndPos: 5847, + EndLine: 322, + StartPos: 5830, + EndPos: 5847, }, }, &stmt.Function{ Position: &position.Position{ StartLine: 323, - EndLine: 323, - StartPos: 5852, - EndPos: 5868, + EndLine: 323, + StartPos: 5852, + EndPos: 5868, }, + ReturnsRef: false, PhpDocComment: "", - ReturnsRef: false, FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 323, - EndLine: 323, - StartPos: 5861, - EndPos: 5863, + EndLine: 323, + StartPos: 5861, + EndPos: 5863, }, Value: "bar", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 324, - EndLine: 324, - StartPos: 5873, - EndPos: 5884, + EndLine: 324, + StartPos: 5873, + EndPos: 5884, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 324, - EndLine: 324, - StartPos: 5879, - EndPos: 5881, + EndLine: 324, + StartPos: 5879, + EndPos: 5881, }, Value: "Baz", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Trait{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5889, - EndPos: 5900, + EndLine: 325, + StartPos: 5889, + EndPos: 5900, }, PhpDocComment: "", TraitName: &node.Identifier{ Position: &position.Position{ StartLine: 325, - EndLine: 325, - StartPos: 5895, - EndPos: 5898, + EndLine: 325, + StartPos: 5895, + EndPos: 5898, }, Value: "Quux", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Interface{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5905, - EndPos: 5922, + EndLine: 326, + StartPos: 5905, + EndPos: 5922, }, PhpDocComment: "", InterfaceName: &node.Identifier{ Position: &position.Position{ StartLine: 326, - EndLine: 326, - StartPos: 5915, - EndPos: 5919, + EndLine: 326, + StartPos: 5915, + EndPos: 5919, }, Value: "Quuux", }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, }, }, &stmt.Function{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5933, - EndPos: 5975, + EndLine: 329, + StartPos: 5933, + EndPos: 5975, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5942, - EndPos: 5944, + EndLine: 329, + StartPos: 5942, + EndPos: 5944, }, Value: "foo", }, @@ -15075,25 +15004,25 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5946, - EndPos: 5952, + EndLine: 329, + StartPos: 5946, + EndPos: 5952, }, - ByRef: true, + ByRef: true, Variadic: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5947, - EndPos: 5948, + EndLine: 329, + StartPos: 5947, + EndPos: 5948, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5947, - EndPos: 5948, + EndLine: 329, + StartPos: 5947, + EndPos: 5948, }, Value: "a", }, @@ -15101,9 +15030,9 @@ func TestPhp7(t *testing.T) { DefaultValue: &scalar.Lnumber{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5952, - EndPos: 5952, + EndLine: 329, + StartPos: 5952, + EndPos: 5952, }, Value: "1", }, @@ -15111,25 +15040,25 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5955, - EndPos: 5963, + EndLine: 329, + StartPos: 5955, + EndPos: 5963, }, + ByRef: false, Variadic: true, - ByRef: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5958, - EndPos: 5959, + EndLine: 329, + StartPos: 5958, + EndPos: 5959, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5958, - EndPos: 5959, + EndLine: 329, + StartPos: 5958, + EndPos: 5959, }, Value: "b", }, @@ -15137,9 +15066,9 @@ func TestPhp7(t *testing.T) { DefaultValue: &scalar.Lnumber{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5963, - EndPos: 5963, + EndLine: 329, + StartPos: 5963, + EndPos: 5963, }, Value: "1", }, @@ -15147,25 +15076,25 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5966, - EndPos: 5971, + EndLine: 329, + StartPos: 5966, + EndPos: 5971, }, - ByRef: false, + ByRef: false, Variadic: false, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5966, - EndPos: 5967, + EndLine: 329, + StartPos: 5966, + EndPos: 5967, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5966, - EndPos: 5967, + EndLine: 329, + StartPos: 5966, + EndPos: 5967, }, Value: "c", }, @@ -15173,32 +15102,31 @@ func TestPhp7(t *testing.T) { DefaultValue: &scalar.Lnumber{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5971, - EndPos: 5971, + EndLine: 329, + StartPos: 5971, + EndPos: 5971, }, Value: "1", }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Function{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5979, - EndPos: 6016, + EndLine: 330, + StartPos: 5979, + EndPos: 6016, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5988, - EndPos: 5990, + EndLine: 330, + StartPos: 5988, + EndPos: 5990, }, Value: "foo", }, @@ -15206,34 +15134,34 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5992, - EndPos: 5999, + EndLine: 330, + StartPos: 5992, + EndPos: 5999, }, - ByRef: false, + ByRef: false, Variadic: false, VariableType: &node.Identifier{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5992, - EndPos: 5996, + EndLine: 330, + StartPos: 5992, + EndPos: 5996, }, Value: "array", }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5998, - EndPos: 5999, + EndLine: 330, + StartPos: 5998, + EndPos: 5999, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 5998, - EndPos: 5999, + EndLine: 330, + StartPos: 5998, + EndPos: 5999, }, Value: "a", }, @@ -15242,57 +15170,56 @@ func TestPhp7(t *testing.T) { &node.Parameter{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 6002, - EndPos: 6012, + EndLine: 330, + StartPos: 6002, + EndPos: 6012, }, - ByRef: false, Variadic: false, + ByRef: false, VariableType: &node.Identifier{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 6002, - EndPos: 6009, + EndLine: 330, + StartPos: 6002, + EndPos: 6009, }, Value: "callable", }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 6011, - EndPos: 6012, + EndLine: 330, + StartPos: 6011, + EndPos: 6012, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 330, - EndLine: 330, - StartPos: 6011, - EndPos: 6012, + EndLine: 330, + StartPos: 6011, + EndPos: 6012, }, Value: "b", }, }, }, }, - Stmts: []node.Node{ - }, + Stmts: []node.Node{}, }, &stmt.Class{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6020, - EndPos: 6121, + EndLine: 331, + StartPos: 6020, + EndPos: 6121, }, PhpDocComment: "", ClassName: &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6041, - EndPos: 6043, + EndLine: 331, + StartPos: 6041, + EndPos: 6043, }, Value: "foo", }, @@ -15300,18 +15227,18 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6020, - EndPos: 6027, + EndLine: 331, + StartPos: 6020, + EndPos: 6027, }, Value: "abstract", }, &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6029, - EndPos: 6033, + EndLine: 331, + StartPos: 6029, + EndPos: 6033, }, Value: "final", }, @@ -15320,18 +15247,18 @@ func TestPhp7(t *testing.T) { &stmt.ClassMethod{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6047, - EndPos: 6087, + EndLine: 331, + StartPos: 6047, + EndPos: 6087, }, + ReturnsRef: false, PhpDocComment: "", - ReturnsRef: false, MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6082, - EndPos: 6084, + EndLine: 331, + StartPos: 6082, + EndPos: 6084, }, Value: "bar", }, @@ -15339,27 +15266,27 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6047, - EndPos: 6054, + EndLine: 331, + StartPos: 6047, + EndPos: 6054, }, Value: "abstract", }, &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6056, - EndPos: 6064, + EndLine: 331, + StartPos: 6056, + EndPos: 6064, }, Value: "protected", }, &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6066, - EndPos: 6071, + EndLine: 331, + StartPos: 6066, + EndPos: 6071, }, Value: "static", }, @@ -15367,27 +15294,27 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.Nop{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6087, - EndPos: 6087, + EndLine: 331, + StartPos: 6087, + EndPos: 6087, }, }, }, &stmt.ClassMethod{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6089, - EndPos: 6119, + EndLine: 331, + StartPos: 6089, + EndPos: 6119, }, - ReturnsRef: false, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6112, - EndPos: 6114, + EndLine: 331, + StartPos: 6112, + EndPos: 6114, }, Value: "baz", }, @@ -15395,18 +15322,18 @@ func TestPhp7(t *testing.T) { &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6089, - EndPos: 6093, + EndLine: 331, + StartPos: 6089, + EndPos: 6093, }, Value: "final", }, &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6095, - EndPos: 6101, + EndLine: 331, + StartPos: 6095, + EndPos: 6101, }, Value: "private", }, @@ -15414,12 +15341,11 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6118, - EndPos: 6119, - }, - Stmts: []node.Node{ + EndLine: 331, + StartPos: 6118, + EndPos: 6119, }, + Stmts: []node.Node{}, }, }, }, @@ -15427,38 +15353,38 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6127, - EndPos: 6140, + EndLine: 333, + StartPos: 6127, + EndPos: 6140, }, Expr: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6127, - EndPos: 6139, + EndLine: 333, + StartPos: 6127, + EndPos: 6139, }, Variable: &expr.New{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6127, - EndPos: 6133, + EndLine: 333, + StartPos: 6127, + EndPos: 6133, }, Class: &name.Name{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6131, - EndPos: 6133, + EndLine: 333, + StartPos: 6131, + EndPos: 6133, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6131, - EndPos: 6133, + EndLine: 333, + StartPos: 6131, + EndPos: 6133, }, Value: "Foo", }, @@ -15468,9 +15394,9 @@ func TestPhp7(t *testing.T) { Property: &node.Identifier{ Position: &position.Position{ StartLine: 333, - EndLine: 333, - StartPos: 6137, - EndPos: 6139, + EndLine: 333, + StartPos: 6137, + EndPos: 6139, }, Value: "bar", }, @@ -15479,38 +15405,38 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6145, - EndPos: 6155, + EndLine: 334, + StartPos: 6145, + EndPos: 6155, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6145, - EndPos: 6154, + EndLine: 334, + StartPos: 6145, + EndPos: 6154, }, Function: &expr.New{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6145, - EndPos: 6151, + EndLine: 334, + StartPos: 6145, + EndPos: 6151, }, Class: &name.Name{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6149, - EndPos: 6151, + EndLine: 334, + StartPos: 6149, + EndPos: 6151, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6149, - EndPos: 6151, + EndLine: 334, + StartPos: 6149, + EndPos: 6151, }, Value: "Foo", }, @@ -15520,9 +15446,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 334, - EndLine: 334, - StartPos: 6153, - EndPos: 6154, + EndLine: 334, + StartPos: 6153, + EndPos: 6154, }, }, }, @@ -15530,52 +15456,52 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6159, - EndPos: 6170, + EndLine: 335, + StartPos: 6159, + EndPos: 6170, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6159, - EndPos: 6169, + EndLine: 335, + StartPos: 6159, + EndPos: 6169, }, Function: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6159, - EndPos: 6167, + EndLine: 335, + StartPos: 6159, + EndPos: 6167, }, Variable: &expr.ShortArray{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6159, - EndPos: 6164, + EndLine: 335, + StartPos: 6159, + EndPos: 6164, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6160, - EndPos: 6163, + EndLine: 335, + StartPos: 6160, + EndPos: 6163, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6160, - EndPos: 6163, + EndLine: 335, + StartPos: 6160, + EndPos: 6163, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6160, - EndPos: 6163, + EndLine: 335, + StartPos: 6160, + EndPos: 6163, }, Value: "foo", }, @@ -15586,9 +15512,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6166, - EndPos: 6166, + EndLine: 335, + StartPos: 6166, + EndPos: 6166, }, Value: "0", }, @@ -15596,9 +15522,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 335, - EndLine: 335, - StartPos: 6168, - EndPos: 6169, + EndLine: 335, + StartPos: 6168, + EndPos: 6169, }, }, }, @@ -15606,45 +15532,45 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6174, - EndPos: 6182, + EndLine: 336, + StartPos: 6174, + EndPos: 6182, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6174, - EndPos: 6181, + EndLine: 336, + StartPos: 6174, + EndPos: 6181, }, Function: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6174, - EndPos: 6179, + EndLine: 336, + StartPos: 6174, + EndPos: 6179, }, Variable: &expr.ConstFetch{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6174, - EndPos: 6176, + EndLine: 336, + StartPos: 6174, + EndPos: 6176, }, Constant: &name.Name{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6174, - EndPos: 6176, + EndLine: 336, + StartPos: 6174, + EndPos: 6176, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6174, - EndPos: 6176, + EndLine: 336, + StartPos: 6174, + EndPos: 6176, }, Value: "foo", }, @@ -15654,9 +15580,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6178, - EndPos: 6178, + EndLine: 336, + StartPos: 6178, + EndPos: 6178, }, Value: "1", }, @@ -15664,9 +15590,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 336, - EndLine: 336, - StartPos: 6180, - EndPos: 6181, + EndLine: 336, + StartPos: 6180, + EndPos: 6181, }, }, }, @@ -15674,32 +15600,32 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6186, - EndPos: 6193, + EndLine: 337, + StartPos: 6186, + EndPos: 6193, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6186, - EndPos: 6192, + EndLine: 337, + StartPos: 6186, + EndPos: 6192, }, Function: &scalar.String{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6186, - EndPos: 6190, + EndLine: 337, + StartPos: 6186, + EndPos: 6190, }, Value: "\"foo\"", }, ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 337, - EndLine: 337, - StartPos: 6191, - EndPos: 6192, + EndLine: 337, + StartPos: 6191, + EndPos: 6192, }, }, }, @@ -15707,45 +15633,45 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6197, - EndPos: 6208, + EndLine: 338, + StartPos: 6197, + EndPos: 6208, }, Expr: &expr.FunctionCall{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6197, - EndPos: 6207, + EndLine: 338, + StartPos: 6197, + EndPos: 6207, }, Function: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6197, - EndPos: 6205, + EndLine: 338, + StartPos: 6197, + EndPos: 6205, }, Variable: &expr.ShortArray{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6197, - EndPos: 6199, + EndLine: 338, + StartPos: 6197, + EndPos: 6199, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6198, - EndPos: 6198, + EndLine: 338, + StartPos: 6198, + EndPos: 6198, }, Val: &scalar.Lnumber{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6198, - EndPos: 6198, + EndLine: 338, + StartPos: 6198, + EndPos: 6198, }, Value: "1", }, @@ -15755,16 +15681,16 @@ func TestPhp7(t *testing.T) { Dim: &expr.Variable{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6201, - EndPos: 6204, + EndLine: 338, + StartPos: 6201, + EndPos: 6204, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6201, - EndPos: 6204, + EndLine: 338, + StartPos: 6201, + EndPos: 6204, }, Value: "foo", }, @@ -15773,9 +15699,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 338, - EndLine: 338, - StartPos: 6206, - EndPos: 6207, + EndLine: 338, + StartPos: 6206, + EndPos: 6207, }, }, }, @@ -15783,38 +15709,38 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6212, - EndPos: 6220, + EndLine: 339, + StartPos: 6212, + EndPos: 6220, }, Expr: &expr.Variable{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6212, - EndPos: 6219, + EndLine: 339, + StartPos: 6212, + EndPos: 6219, }, VarName: &expr.FunctionCall{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6214, - EndPos: 6218, + EndLine: 339, + StartPos: 6214, + EndPos: 6218, }, Function: &name.Name{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6214, - EndPos: 6216, + EndLine: 339, + StartPos: 6214, + EndPos: 6216, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6214, - EndPos: 6216, + EndLine: 339, + StartPos: 6214, + EndPos: 6216, }, Value: "foo", }, @@ -15823,9 +15749,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 339, - EndLine: 339, - StartPos: 6217, - EndPos: 6218, + EndLine: 339, + StartPos: 6217, + EndPos: 6218, }, }, }, @@ -15834,31 +15760,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6225, - EndPos: 6236, + EndLine: 341, + StartPos: 6225, + EndPos: 6236, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6225, - EndPos: 6235, + EndLine: 341, + StartPos: 6225, + EndPos: 6235, }, Class: &name.Name{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6225, - EndPos: 6227, + EndLine: 341, + StartPos: 6225, + EndPos: 6227, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6225, - EndPos: 6227, + EndLine: 341, + StartPos: 6225, + EndPos: 6227, }, Value: "Foo", }, @@ -15867,16 +15793,16 @@ func TestPhp7(t *testing.T) { Call: &expr.Variable{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6230, - EndPos: 6233, + EndLine: 341, + StartPos: 6230, + EndPos: 6233, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6230, - EndPos: 6233, + EndLine: 341, + StartPos: 6230, + EndPos: 6233, }, Value: "bar", }, @@ -15884,9 +15810,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 341, - EndLine: 341, - StartPos: 6234, - EndPos: 6235, + EndLine: 341, + StartPos: 6234, + EndPos: 6235, }, }, }, @@ -15894,31 +15820,31 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6240, - EndPos: 6256, + EndLine: 342, + StartPos: 6240, + EndPos: 6256, }, Expr: &expr.StaticCall{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6240, - EndPos: 6255, + EndLine: 342, + StartPos: 6240, + EndPos: 6255, }, Class: &name.Name{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6240, - EndPos: 6242, + EndLine: 342, + StartPos: 6240, + EndPos: 6242, }, Parts: []node.Node{ &name.NamePart{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6240, - EndPos: 6242, + EndLine: 342, + StartPos: 6240, + EndPos: 6242, }, Value: "Foo", }, @@ -15927,23 +15853,23 @@ func TestPhp7(t *testing.T) { Call: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6246, - EndPos: 6252, + EndLine: 342, + StartPos: 6246, + EndPos: 6252, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6246, - EndPos: 6249, + EndLine: 342, + StartPos: 6246, + EndPos: 6249, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6246, - EndPos: 6249, + EndLine: 342, + StartPos: 6246, + EndPos: 6249, }, Value: "bar", }, @@ -15951,9 +15877,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6251, - EndPos: 6251, + EndLine: 342, + StartPos: 6251, + EndPos: 6251, }, Value: "0", }, @@ -15961,9 +15887,9 @@ func TestPhp7(t *testing.T) { ArgumentList: &node.ArgumentList{ Position: &position.Position{ StartLine: 342, - EndLine: 342, - StartPos: 6254, - EndPos: 6255, + EndLine: 342, + StartPos: 6254, + EndPos: 6255, }, }, }, @@ -15971,30 +15897,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6263, - EndPos: 6273, + EndLine: 344, + StartPos: 6263, + EndPos: 6273, }, Expr: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6263, - EndPos: 6272, + EndLine: 344, + StartPos: 6263, + EndPos: 6272, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6263, - EndPos: 6266, + EndLine: 344, + StartPos: 6263, + EndPos: 6266, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6263, - EndPos: 6266, + EndLine: 344, + StartPos: 6263, + EndPos: 6266, }, Value: "foo", }, @@ -16002,16 +15928,16 @@ func TestPhp7(t *testing.T) { Property: &expr.Variable{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6269, - EndPos: 6272, + EndLine: 344, + StartPos: 6269, + EndPos: 6272, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 344, - EndLine: 344, - StartPos: 6269, - EndPos: 6272, + EndLine: 344, + StartPos: 6269, + EndPos: 6272, }, Value: "bar", }, @@ -16021,30 +15947,30 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6277, - EndPos: 6292, + EndLine: 345, + StartPos: 6277, + EndPos: 6292, }, Expr: &expr.PropertyFetch{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6277, - EndPos: 6290, + EndLine: 345, + StartPos: 6277, + EndPos: 6290, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6277, - EndPos: 6280, + EndLine: 345, + StartPos: 6277, + EndPos: 6280, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6277, - EndPos: 6280, + EndLine: 345, + StartPos: 6277, + EndPos: 6280, }, Value: "foo", }, @@ -16052,23 +15978,23 @@ func TestPhp7(t *testing.T) { Property: &expr.ArrayDimFetch{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6284, - EndPos: 6290, + EndLine: 345, + StartPos: 6284, + EndPos: 6290, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6284, - EndPos: 6287, + EndLine: 345, + StartPos: 6284, + EndPos: 6287, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6284, - EndPos: 6287, + EndLine: 345, + StartPos: 6284, + EndPos: 6287, }, Value: "bar", }, @@ -16076,9 +16002,9 @@ func TestPhp7(t *testing.T) { Dim: &scalar.Lnumber{ Position: &position.Position{ StartLine: 345, - EndLine: 345, - StartPos: 6289, - EndPos: 6289, + EndLine: 345, + StartPos: 6289, + EndPos: 6289, }, Value: "0", }, @@ -16088,54 +16014,54 @@ func TestPhp7(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6297, - EndPos: 6318, + EndLine: 347, + StartPos: 6297, + EndPos: 6318, }, Expr: &expr.ShortArray{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6297, - EndPos: 6317, + EndLine: 347, + StartPos: 6297, + EndPos: 6317, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6298, - EndPos: 6303, + EndLine: 347, + StartPos: 6298, + EndPos: 6303, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6298, - EndPos: 6298, + EndLine: 347, + StartPos: 6298, + EndPos: 6298, }, Value: "1", }, Val: &expr.Reference{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6301, - EndPos: 6303, + EndLine: 347, + StartPos: 6301, + EndPos: 6303, }, Variable: &expr.Variable{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6302, - EndPos: 6303, + EndLine: 347, + StartPos: 6302, + EndPos: 6303, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6302, - EndPos: 6303, + EndLine: 347, + StartPos: 6302, + EndPos: 6303, }, Value: "a", }, @@ -16145,47 +16071,47 @@ func TestPhp7(t *testing.T) { &expr.ArrayItem{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6306, - EndPos: 6316, + EndLine: 347, + StartPos: 6306, + EndPos: 6316, }, Key: &scalar.Lnumber{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6306, - EndPos: 6306, + EndLine: 347, + StartPos: 6306, + EndPos: 6306, }, Value: "2", }, Val: &expr.List{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6309, - EndPos: 6316, + EndLine: 347, + StartPos: 6309, + EndPos: 6316, }, Items: []node.Node{ &expr.ArrayItem{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6314, - EndPos: 6315, + EndLine: 347, + StartPos: 6314, + EndPos: 6315, }, Val: &expr.Variable{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6314, - EndPos: 6315, + EndLine: 347, + StartPos: 6314, + EndPos: 6315, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 347, - EndLine: 347, - StartPos: 6314, - EndPos: 6315, + EndLine: 347, + StartPos: 6314, + EndPos: 6315, }, Value: "b", }, @@ -16199,7 +16125,6 @@ func TestPhp7(t *testing.T) { }, }, } - php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php") php7parser.Parse() @@ -16223,24 +16148,24 @@ func TestPhp5Strings(t *testing.T) { expected := &node.Root{ Position: &position.Position{ StartLine: 2, - EndLine: 10, - StartPos: 6, - EndPos: 70, + EndLine: 10, + StartPos: 6, + EndPos: 70, }, Stmts: []node.Node{ &stmt.Expression{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 12, + EndLine: 2, + StartPos: 6, + EndPos: 12, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 2, - EndLine: 2, - StartPos: 6, - EndPos: 11, + EndLine: 2, + StartPos: 6, + EndPos: 11, }, Value: "\"test\"", }, @@ -16248,16 +16173,16 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 16, - EndPos: 24, + EndLine: 3, + StartPos: 16, + EndPos: 24, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 3, - EndLine: 3, - StartPos: 16, - EndPos: 23, + EndLine: 3, + StartPos: 16, + EndPos: 23, }, Value: "\"\\$test\"", }, @@ -16265,16 +16190,16 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 28, - EndPos: 41, + EndLine: 6, + StartPos: 28, + EndPos: 41, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 28, - EndPos: 40, + EndLine: 6, + StartPos: 28, + EndPos: 40, }, Value: "\"\n\t\t\ttest\n\t\t\"", }, @@ -16282,16 +16207,16 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 45, - EndPos: 52, + EndLine: 7, + StartPos: 45, + EndPos: 52, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 7, - EndLine: 7, - StartPos: 45, - EndPos: 51, + EndLine: 7, + StartPos: 45, + EndPos: 51, }, Value: "'$test'", }, @@ -16299,23 +16224,22 @@ func TestPhp5Strings(t *testing.T) { &stmt.Expression{ Position: &position.Position{ StartLine: 8, - EndLine: 10, - StartPos: 56, - EndPos: 70, + EndLine: 10, + StartPos: 56, + EndPos: 70, }, Expr: &scalar.String{ Position: &position.Position{ StartLine: 8, - EndLine: 10, - StartPos: 56, - EndPos: 69, + EndLine: 10, + StartPos: 56, + EndPos: 69, }, Value: "'\n\t\t\t$test\n\t\t'", }, }, }, } - php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php") php7parser.Parse() @@ -16344,24 +16268,24 @@ CAD; expected := &node.Root{ Position: &position.Position{ StartLine: 2, - EndLine: 15, - StartPos: 9, - EndPos: 120, + EndLine: 15, + StartPos: 9, + EndPos: 120, }, Stmts: []node.Node{ &stmt.Expression{ Position: &position.Position{ StartLine: 2, - EndLine: 3, - StartPos: 9, - EndPos: 16, + EndLine: 3, + StartPos: 9, + EndPos: 16, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 2, - EndLine: 3, - StartPos: 9, - EndPos: 15, + EndLine: 3, + StartPos: 9, + EndPos: 15, }, Label: "CAD", }, @@ -16369,25 +16293,25 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 23, - EndPos: 37, + EndLine: 6, + StartPos: 23, + EndPos: 37, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 4, - EndLine: 6, - StartPos: 23, - EndPos: 36, + EndLine: 6, + StartPos: 23, + EndPos: 36, }, Label: "CAD", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 5, - EndLine: 5, - StartPos: 27, - EndPos: 33, + EndLine: 5, + StartPos: 27, + EndPos: 33, }, Value: "\thello\n", }, @@ -16397,25 +16321,25 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 7, - EndLine: 9, - StartPos: 44, - EndPos: 60, + EndLine: 9, + StartPos: 44, + EndPos: 60, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 7, - EndLine: 9, - StartPos: 44, - EndPos: 59, + EndLine: 9, + StartPos: 44, + EndPos: 59, }, Label: "\"CAD\"", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 8, - EndLine: 8, - StartPos: 50, - EndPos: 56, + EndLine: 8, + StartPos: 50, + EndPos: 56, }, Value: "\thello\n", }, @@ -16425,41 +16349,41 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 10, - EndLine: 12, - StartPos: 67, - EndPos: 90, + EndLine: 12, + StartPos: 67, + EndPos: 90, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 10, - EndLine: 12, - StartPos: 67, - EndPos: 89, + EndLine: 12, + StartPos: 67, + EndPos: 89, }, Label: "\"CAD\"", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 73, - EndPos: 79, + EndLine: 11, + StartPos: 73, + EndPos: 79, }, Value: "\thello ", }, &expr.Variable{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 80, - EndPos: 85, + EndLine: 11, + StartPos: 80, + EndPos: 85, }, VarName: &node.Identifier{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 80, - EndPos: 85, + EndLine: 11, + StartPos: 80, + EndPos: 85, }, Value: "world", }, @@ -16467,9 +16391,9 @@ CAD; &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 11, - EndLine: 11, - StartPos: 86, - EndPos: 86, + EndLine: 11, + StartPos: 86, + EndPos: 86, }, Value: "\n", }, @@ -16479,25 +16403,25 @@ CAD; &stmt.Expression{ Position: &position.Position{ StartLine: 13, - EndLine: 15, - StartPos: 97, - EndPos: 120, + EndLine: 15, + StartPos: 97, + EndPos: 120, }, Expr: &scalar.Heredoc{ Position: &position.Position{ StartLine: 13, - EndLine: 15, - StartPos: 97, - EndPos: 119, + EndLine: 15, + StartPos: 97, + EndPos: 119, }, Label: "'CAD'", Parts: []node.Node{ &scalar.EncapsedStringPart{ Position: &position.Position{ StartLine: 14, - EndLine: 14, - StartPos: 103, - EndPos: 116, + EndLine: 14, + StartPos: 103, + EndPos: 116, }, Value: "\thello $world\n", }, @@ -16506,7 +16430,6 @@ CAD; }, }, } - php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php") php7parser.Parse() diff --git a/visitor/dumper.go b/visitor/dumper.go index ac4708b..88582fa 100644 --- a/visitor/dumper.go +++ b/visitor/dumper.go @@ -39,12 +39,10 @@ func (d *Dumper) EnterNode(w walker.Walkable) bool { } } - if d.Comments != nil { - if c := d.Comments[n]; len(c) > 0 { - fmt.Fprintf(d.Writer, "%v\"Comments\":\n", d.Indent+" ") - for _, cc := range c { - fmt.Fprintf(d.Writer, "%v%q before %q\n", d.Indent+" ", cc, comment.TokenNames[cc.TokenName()]) - } + if c := n.GetComments(); len(c) > 0 { + fmt.Fprintf(d.Writer, "%v\"Comments\":\n", d.Indent+" ") + for _, cc := range c { + fmt.Fprintf(d.Writer, "%v%q before %q\n", d.Indent+" ", cc, comment.TokenNames[cc.TokenName]) } } diff --git a/visitor/go_dumper.go b/visitor/go_dumper.go index 49c08e1..97ba85a 100644 --- a/visitor/go_dumper.go +++ b/visitor/go_dumper.go @@ -59,6 +59,44 @@ func (d *GoDumper) EnterNode(w walker.Walkable) bool { fmt.Fprint(d.Writer, "},\n") } + if cc := n.GetComments(); len(cc) > 0 { + printIndent(d.Writer, d.depth) + fmt.Fprint(d.Writer, "Comments: []*comment.Comment{\n") + d.depth++ + for _, c := range cc { + printIndent(d.Writer, d.depth) + fmt.Fprint(d.Writer, "&comment.Comment{\n") + d.depth++ + + printIndent(d.Writer, d.depth) + fmt.Fprint(d.Writer, "Position: &position.Position{\n") + d.depth++ + printIndent(d.Writer, d.depth) + fmt.Fprintf(d.Writer, "StartLine: %d,\n", c.Position.StartLine) + printIndent(d.Writer, d.depth) + fmt.Fprintf(d.Writer, "EndLine: %d,\n", c.Position.EndLine) + printIndent(d.Writer, d.depth) + fmt.Fprintf(d.Writer, "StartPos: %d,\n", c.Position.StartPos) + printIndent(d.Writer, d.depth) + fmt.Fprintf(d.Writer, "EndPos: %d,\n", c.Position.EndPos) + d.depth-- + printIndent(d.Writer, d.depth) + fmt.Fprint(d.Writer, "},\n") + + printIndent(d.Writer, d.depth) + fmt.Fprintf(d.Writer, "Value: %q,\n", c.Value) + printIndent(d.Writer, d.depth) + fmt.Fprintf(d.Writer, "TokenName: %q,\n", c.TokenName) + + d.depth-- + printIndent(d.Writer, d.depth) + fmt.Fprint(d.Writer, "},\n") + } + d.depth-- + printIndent(d.Writer, d.depth) + fmt.Fprint(d.Writer, "},\n") + } + if a := n.Attributes(); len(a) > 0 { for key, attr := range a { printIndent(d.Writer, d.depth) diff --git a/visitor/go_dumper_test.go b/visitor/go_dumper_test.go index e2f23d8..154ca73 100644 --- a/visitor/go_dumper_test.go +++ b/visitor/go_dumper_test.go @@ -214,6 +214,18 @@ func ExampleGoDumper() { // StartPos: 123, // EndPos: 126, // }, + // Comments: []*comment.Comment{ + // &comment.Comment{ + // Position: &position.Position{ + // StartLine: 7, + // EndLine: 7, + // StartPos: 103, + // EndPos: 117, + // }, + // Value: "//some comment\n", + // TokenName: '\t', + // }, + // }, // VarName: &node.Identifier{ // Position: &position.Position{ // StartLine: 8, diff --git a/visitor/json_dumper.go b/visitor/json_dumper.go index 8b21755..dfc2c0f 100644 --- a/visitor/json_dumper.go +++ b/visitor/json_dumper.go @@ -42,20 +42,18 @@ func (d *JsonDumper) EnterNode(w walker.Walkable) bool { } } - if d.Comments != nil { - if c := d.Comments[n]; len(c) > 0 { - fmt.Fprintf(d.Writer, ",%q:[", "comments") + if c := n.GetComments(); len(c) > 0 { + fmt.Fprintf(d.Writer, ",%q:[", "comments") - for k, cc := range c { - if k == 0 { - fmt.Fprintf(d.Writer, "%q", cc) - } else { - fmt.Fprintf(d.Writer, ",%q", cc) - } + for k, cc := range c { + if k == 0 { + fmt.Fprintf(d.Writer, "%q", cc) + } else { + fmt.Fprintf(d.Writer, ",%q", cc) } - - fmt.Fprint(d.Writer, "]") } + + fmt.Fprint(d.Writer, "]") } if a := n.Attributes(); len(a) > 0 { diff --git a/visitor/pretty_json_dumper.go b/visitor/pretty_json_dumper.go index b81d56f..6a34e16 100644 --- a/visitor/pretty_json_dumper.go +++ b/visitor/pretty_json_dumper.go @@ -69,27 +69,25 @@ func (d *PrettyJsonDumper) EnterNode(w walker.Walkable) bool { } } - if d.Comments != nil { - if c := d.Comments[n]; len(c) > 0 { - fmt.Fprint(d.Writer, ",\n") - d.printIndent(d.Writer) - fmt.Fprint(d.Writer, "\"comments\": [\n") - d.depth++ - for k, cc := range c { - if k == 0 { - d.printIndent(d.Writer) - fmt.Fprintf(d.Writer, "%q", cc) - } else { - fmt.Fprint(d.Writer, ",\n") - d.printIndent(d.Writer) - fmt.Fprintf(d.Writer, "%q", cc) - } + if c := n.GetComments(); len(c) > 0 { + fmt.Fprint(d.Writer, ",\n") + d.printIndent(d.Writer) + fmt.Fprint(d.Writer, "\"comments\": [\n") + d.depth++ + for k, cc := range c { + if k == 0 { + d.printIndent(d.Writer) + fmt.Fprintf(d.Writer, "%q", cc) + } else { + fmt.Fprint(d.Writer, ",\n") + d.printIndent(d.Writer) + fmt.Fprintf(d.Writer, "%q", cc) } - d.depth-- - fmt.Fprint(d.Writer, "\n") - d.printIndent(d.Writer) - fmt.Fprint(d.Writer, "]") } + d.depth-- + fmt.Fprint(d.Writer, "\n") + d.printIndent(d.Writer) + fmt.Fprint(d.Writer, "]") } if a := n.Attributes(); len(a) > 0 {