From e90df8ef5f1226267204cdf81c1623d5a380aca7 Mon Sep 17 00:00:00 2001 From: z7zmey Date: Sat, 30 Jun 2018 00:51:11 +0300 Subject: [PATCH] #33 comment package has renamed to meta and parser now saves whitespaces --- README.md | 4 +- comment/comment_test.go | 31 - main.go | 16 +- {comment => meta}/comment.go | 11 +- meta/comment_test.go | 44 + meta/meta.go | 12 + {comment => meta}/tokenNames.go | 2 +- meta/white_space.go | 37 + meta/white_space_test.go | 44 + node/expr/assign/n_assign.go | 15 +- node/expr/assign/n_assign_ref.go | 15 +- node/expr/assign/n_bitwise_and.go | 15 +- node/expr/assign/n_bitwise_or.go | 15 +- node/expr/assign/n_bitwise_xor.go | 15 +- node/expr/assign/n_concat.go | 15 +- node/expr/assign/n_div.go | 15 +- node/expr/assign/n_minus.go | 15 +- node/expr/assign/n_mod.go | 15 +- node/expr/assign/n_mul.go | 15 +- node/expr/assign/n_plus.go | 15 +- node/expr/assign/n_pow.go | 15 +- node/expr/assign/n_shift_left.go | 15 +- node/expr/assign/n_shift_right.go | 15 +- node/expr/binary/n_bitwise_and.go | 15 +- node/expr/binary/n_bitwise_or.go | 15 +- node/expr/binary/n_bitwise_xor.go | 15 +- node/expr/binary/n_boolean_and.go | 15 +- node/expr/binary/n_boolean_or.go | 15 +- node/expr/binary/n_coalesce.go | 15 +- node/expr/binary/n_concat.go | 15 +- node/expr/binary/n_div.go | 15 +- node/expr/binary/n_equal.go | 15 +- node/expr/binary/n_greater.go | 15 +- node/expr/binary/n_greater_or_equal.go | 15 +- node/expr/binary/n_identical.go | 15 +- node/expr/binary/n_logical_and.go | 15 +- node/expr/binary/n_logical_or.go | 15 +- node/expr/binary/n_logical_xor.go | 15 +- node/expr/binary/n_minus.go | 15 +- node/expr/binary/n_mod.go | 15 +- node/expr/binary/n_mul.go | 15 +- node/expr/binary/n_not_equal.go | 15 +- node/expr/binary/n_not_identical.go | 15 +- node/expr/binary/n_plus.go | 15 +- node/expr/binary/n_pow.go | 15 +- node/expr/binary/n_shift_left.go | 15 +- node/expr/binary/n_shift_right.go | 15 +- node/expr/binary/n_smaller.go | 15 +- node/expr/binary/n_smaller_or_equal.go | 15 +- node/expr/binary/n_spaceship.go | 15 +- node/expr/cast/n_cast_array.go | 15 +- node/expr/cast/n_cast_bool.go | 15 +- node/expr/cast/n_cast_double.go | 15 +- node/expr/cast/n_cast_int.go | 15 +- node/expr/cast/n_cast_object.go | 15 +- node/expr/cast/n_cast_string.go | 15 +- node/expr/cast/n_cast_unset.go | 15 +- node/expr/n_array.go | 15 +- node/expr/n_array_dim_fetch.go | 15 +- node/expr/n_array_item.go | 15 +- node/expr/n_bitwise_not.go | 15 +- node/expr/n_boolean_not.go | 15 +- node/expr/n_class_const_fetch.go | 15 +- node/expr/n_clone.go | 15 +- node/expr/n_closure.go | 15 +- node/expr/n_closure_use.go | 15 +- node/expr/n_const_fetch.go | 15 +- node/expr/n_die.go | 15 +- node/expr/n_empty.go | 15 +- node/expr/n_error_suppress.go | 15 +- node/expr/n_eval.go | 15 +- node/expr/n_exit.go | 15 +- node/expr/n_function_call.go | 15 +- node/expr/n_include.go | 15 +- node/expr/n_include_once.go | 15 +- node/expr/n_instance_of.go | 15 +- node/expr/n_isset.go | 15 +- node/expr/n_list.go | 15 +- node/expr/n_method_call.go | 15 +- node/expr/n_new.go | 15 +- node/expr/n_post_dec.go | 15 +- node/expr/n_post_inc.go | 15 +- node/expr/n_pre_dec.go | 15 +- node/expr/n_pre_inc.go | 15 +- node/expr/n_print.go | 15 +- node/expr/n_property_fetch.go | 15 +- node/expr/n_reference.go | 15 +- node/expr/n_require.go | 15 +- node/expr/n_require_once.go | 15 +- node/expr/n_shell_exec.go | 15 +- node/expr/n_short_array.go | 15 +- node/expr/n_short_list.go | 15 +- node/expr/n_static_call.go | 15 +- node/expr/n_static_property_fetch.go | 15 +- node/expr/n_ternary.go | 15 +- node/expr/n_unary_minus.go | 15 +- node/expr/n_unary_plus.go | 15 +- node/expr/n_variable.go | 15 +- node/expr/n_yield.go | 15 +- node/expr/n_yield_from.go | 15 +- node/n_argument.go | 15 +- node/n_argument_list.go | 16 +- node/n_identifier.go | 15 +- node/n_nullable.go | 15 +- node/n_parameter.go | 15 +- node/n_root.go | 15 +- node/name/n_fully_qualified.go | 15 +- node/name/n_name.go | 15 +- node/name/n_name_part.go | 15 +- node/name/n_relative.go | 15 +- node/node.go | 6 +- node/scalar/node_dnumber.go | 15 +- node/scalar/node_encapsed.go | 15 +- node/scalar/node_encapsed_string_part.go | 15 +- node/scalar/node_heredoc.go | 15 +- node/scalar/node_lnumber.go | 15 +- node/scalar/node_magic_constant.go | 15 +- node/scalar/node_string.go | 15 +- node/stmt/n_alt_else.go | 15 +- node/stmt/n_alt_else_if.go | 15 +- node/stmt/n_alt_for.go | 15 +- node/stmt/n_alt_foreach.go | 15 +- node/stmt/n_alt_if.go | 15 +- node/stmt/n_alt_switch.go | 15 +- node/stmt/n_alt_while.go | 15 +- node/stmt/n_break.go | 15 +- node/stmt/n_case.go | 15 +- node/stmt/n_case_list.go | 15 +- node/stmt/n_catch.go | 15 +- node/stmt/n_class.go | 15 +- node/stmt/n_class_const_list.go | 15 +- node/stmt/n_class_extends.go | 15 +- node/stmt/n_class_implements.go | 15 +- node/stmt/n_class_method.go | 15 +- node/stmt/n_const_list.go | 15 +- node/stmt/n_constant.go | 15 +- node/stmt/n_continue.go | 15 +- node/stmt/n_declare.go | 15 +- node/stmt/n_default.go | 15 +- node/stmt/n_do.go | 15 +- node/stmt/n_echo.go | 15 +- node/stmt/n_else.go | 15 +- node/stmt/n_else_if.go | 15 +- node/stmt/n_expression.go | 15 +- node/stmt/n_finally.go | 15 +- node/stmt/n_for.go | 15 +- node/stmt/n_foreach.go | 15 +- node/stmt/n_function.go | 15 +- node/stmt/n_global.go | 15 +- node/stmt/n_goto.go | 15 +- node/stmt/n_group_use.go | 15 +- node/stmt/n_halt_compiler.go | 15 +- node/stmt/n_if.go | 15 +- node/stmt/n_inline_html.go | 15 +- node/stmt/n_interface.go | 15 +- node/stmt/n_interface_extends.go | 15 +- node/stmt/n_label.go | 15 +- node/stmt/n_namespace.go | 15 +- node/stmt/n_nop.go | 15 +- node/stmt/n_property.go | 15 +- node/stmt/n_property_list.go | 15 +- node/stmt/n_return.go | 15 +- node/stmt/n_static.go | 15 +- node/stmt/n_static_var.go | 15 +- node/stmt/n_stmt_list.go | 15 +- node/stmt/n_switch.go | 15 +- node/stmt/n_throw.go | 15 +- node/stmt/n_trait.go | 15 +- node/stmt/n_trait_adaptation_list.go | 15 +- node/stmt/n_trait_method_ref.go | 15 +- node/stmt/n_trait_use.go | 15 +- node/stmt/n_trait_use_alias.go | 15 +- node/stmt/n_trait_use_precedence.go | 15 +- node/stmt/n_try.go | 15 +- node/stmt/n_unset.go | 15 +- node/stmt/n_use.go | 15 +- node/stmt/n_use_list.go | 15 +- node/stmt/n_while.go | 15 +- node/t_node_test.go | 13 - parser/comments.go | 30 - parser/comments_test.go | 28 - parser/parser.go | 2 +- php5/parser.go | 26 +- php5/php5.go | 1628 ++- php5/php5.y | 1176 +- php5/php5_test.go | 12716 +++++++++++---------- php7/parser.go | 22 +- php7/php7.go | 1511 ++- php7/php7.y | 1019 +- php7/php7_test.go | 11150 +++++++++--------- scanner/lexer.go | 38 +- scanner/scanner.go | 15 +- scanner/scanner.l | 12 +- scanner/scanner_test.go | 74 +- scanner/token.go | 4 +- scanner/token_test.go | 10 +- visitor/dumper.go | 12 +- visitor/dumper_test.go | 34 +- visitor/go_dumper.go | 27 +- visitor/go_dumper_test.go | 210 +- visitor/json_dumper.go | 38 +- visitor/json_dumper_test.go | 7 +- visitor/namespace_resolver_test.go | 1 - visitor/pretty_json_dumper.go | 60 +- visitor/pretty_json_dumper_test.go | 196 +- 205 files changed, 16485 insertions(+), 16302 deletions(-) delete mode 100644 comment/comment_test.go rename {comment => meta}/comment.go (74%) create mode 100644 meta/comment_test.go create mode 100644 meta/meta.go rename {comment => meta}/tokenNames.go (99%) create mode 100644 meta/white_space.go create mode 100644 meta/white_space_test.go delete mode 100644 parser/comments.go delete mode 100644 parser/comments_test.go diff --git a/README.md b/README.md index a6dc150..c347b95 100644 --- a/README.md +++ b/README.md @@ -53,10 +53,10 @@ php-parser [flags] ... | flag | type | description | |-------|------|----------------------------------------------| | -d |string| dump format: [custom, go, json, pretty-json] | -| -prof |string| start profiler: [cpu, mem] | | -p | bool | show positions | -| -c | bool | show comments | | -r | bool | resolve names | +| -prof |string| start profiler: [cpu, mem] | +| -meta | bool | show meta info | | -php5 | bool | parse as PHP5 | Dump AST to stdout. diff --git a/comment/comment_test.go b/comment/comment_test.go deleted file mode 100644 index d9e671a..0000000 --- a/comment/comment_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package comment_test - -import ( - "testing" - - "github.com/z7zmey/php-parser/comment" -) - -func TestCommentPrint(t *testing.T) { - expected := "/** hello world */" - - comment := comment.NewComment(expected, nil) - - actual := comment.String() - - if expected != actual { - 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/main.go b/main.go index 6233d3d..2c46f11 100644 --- a/main.go +++ b/main.go @@ -21,12 +21,12 @@ var wg sync.WaitGroup var usePhp5 *bool var dumpType string var profiler string -var showComments *bool +var withMeta *bool var showResolvedNs *bool func main() { usePhp5 = flag.Bool("php5", false, "parse as PHP5") - showComments = flag.Bool("c", false, "show comments") + withMeta = flag.Bool("meta", false, "show meta") showResolvedNs = flag.Bool("r", false, "resolve names") flag.StringVar(&dumpType, "d", "", "dump format: [custom, go, json, pretty_json]") flag.StringVar(&profiler, "prof", "", "start profiler: [cpu, mem]") @@ -107,6 +107,10 @@ func parserWorker(pathCh <-chan string, result chan<- parser.Parser) { parserWorker = php7.NewParser(src, path) } + if *withMeta { + parserWorker.WithMeta() + } + parserWorker.Parse() src.Close() @@ -138,31 +142,23 @@ func printer(result <-chan parser.Parser) { parserWorker.GetRootNode().Walk(nsResolver) } - var comments parser.Comments - if *showComments { - comments = parserWorker.GetComments() - } - switch dumpType { case "custom": dumper := &visitor.Dumper{ Writer: os.Stdout, Indent: "| ", - Comments: comments, NsResolver: nsResolver, } parserWorker.GetRootNode().Walk(dumper) case "json": dumper := &visitor.JsonDumper{ Writer: os.Stdout, - Comments: comments, NsResolver: nsResolver, } parserWorker.GetRootNode().Walk(dumper) case "pretty_json": dumper := &visitor.PrettyJsonDumper{ Writer: os.Stdout, - Comments: comments, NsResolver: nsResolver, } parserWorker.GetRootNode().Walk(dumper) diff --git a/comment/comment.go b/meta/comment.go similarity index 74% rename from comment/comment.go rename to meta/comment.go index 87252e9..c264f58 100644 --- a/comment/comment.go +++ b/meta/comment.go @@ -1,4 +1,4 @@ -package comment +package meta import ( "github.com/z7zmey/php-parser/position" @@ -25,6 +25,15 @@ func (c *Comment) SetTokenName(tokenName TokenName) { c.TokenName = tokenName } +// GetTokenName returns token name +func (c *Comment) GetTokenName() TokenName { + return c.TokenName +} + func (c *Comment) String() string { return c.Value } + +func (c *Comment) GetPosition() *position.Position { + return c.Position +} diff --git a/meta/comment_test.go b/meta/comment_test.go new file mode 100644 index 0000000..d509113 --- /dev/null +++ b/meta/comment_test.go @@ -0,0 +1,44 @@ +package meta_test + +import ( + "testing" + + "github.com/z7zmey/php-parser/position" + + "github.com/z7zmey/php-parser/meta" +) + +func TestCommentPrint(t *testing.T) { + expected := "/** hello world */" + + comment := meta.NewComment(expected, nil) + + actual := comment.String() + + if expected != actual { + t.Errorf("expected and actual are not equal\n") + } +} + +func TestCommentSetGetTokenName(t *testing.T) { + expected := meta.ArrayToken + c := meta.NewComment("/** hello world */", nil) + c.SetTokenName(expected) + + actual := c.GetTokenName() + + if expected != actual { + t.Errorf("expected and actual are not equal\n") + } +} + +func TestCommentGetPosition(t *testing.T) { + expected := position.NewPosition(1, 1, 1, 1) + c := meta.NewComment("/** hello world */", expected) + + actual := c.GetPosition() + + if expected != actual { + t.Errorf("expected and actual are not equal\n") + } +} diff --git a/meta/meta.go b/meta/meta.go new file mode 100644 index 0000000..d14d504 --- /dev/null +++ b/meta/meta.go @@ -0,0 +1,12 @@ +package meta + +import ( + "github.com/z7zmey/php-parser/position" +) + +type Meta interface { + String() string + SetTokenName(tn TokenName) + GetTokenName() TokenName + GetPosition() *position.Position +} diff --git a/comment/tokenNames.go b/meta/tokenNames.go similarity index 99% rename from comment/tokenNames.go rename to meta/tokenNames.go index f02c45b..87ab28f 100644 --- a/comment/tokenNames.go +++ b/meta/tokenNames.go @@ -1,4 +1,4 @@ -package comment +package meta // TokenName is used to specify a comment position type TokenName int diff --git a/meta/white_space.go b/meta/white_space.go new file mode 100644 index 0000000..ea12613 --- /dev/null +++ b/meta/white_space.go @@ -0,0 +1,37 @@ +package meta + +import ( + "github.com/z7zmey/php-parser/position" +) + +type WhiteSpace struct { + Value string + Position *position.Position + TokenName TokenName +} + +func NewWhiteSpace(value string, pos *position.Position) *WhiteSpace { + return &WhiteSpace{ + Value: value, + Position: pos, + TokenName: UnknownToken, + } +} + +// SetTokenName sets token name +func (c *WhiteSpace) SetTokenName(tokenName TokenName) { + c.TokenName = tokenName +} + +// GetTokenName returns token name +func (c *WhiteSpace) GetTokenName() TokenName { + return c.TokenName +} + +func (el *WhiteSpace) String() string { + return el.Value +} + +func (el *WhiteSpace) GetPosition() *position.Position { + return el.Position +} diff --git a/meta/white_space_test.go b/meta/white_space_test.go new file mode 100644 index 0000000..b609126 --- /dev/null +++ b/meta/white_space_test.go @@ -0,0 +1,44 @@ +package meta_test + +import ( + "testing" + + "github.com/z7zmey/php-parser/position" + + "github.com/z7zmey/php-parser/meta" +) + +func TestWhiteSpacePrint(t *testing.T) { + expected := "\n " + + w := meta.NewWhiteSpace(expected, nil) + + actual := w.String() + + if expected != actual { + t.Errorf("expected and actual are not equal\n") + } +} + +func TestWhiteSpaceSetGetTokenName(t *testing.T) { + expected := meta.ArrayToken + w := meta.NewWhiteSpace("\n ", nil) + w.SetTokenName(expected) + + actual := w.GetTokenName() + + if expected != actual { + t.Errorf("expected and actual are not equal\n") + } +} + +func TestWhiteSpaceGetPosition(t *testing.T) { + expected := position.NewPosition(1, 1, 1, 1) + q := meta.NewWhiteSpace("\n ", expected) + + actual := q.GetPosition() + + 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 7f53f2a..87048b0 100644 --- a/node/expr/assign/n_assign.go +++ b/node/expr/assign/n_assign.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Assign node type Assign struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Assign) GetComments() []*comment.Comment { - return n.Comments +func (n *Assign) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_assign_ref.go b/node/expr/assign/n_assign_ref.go index 9469162..ec9970e 100644 --- a/node/expr/assign/n_assign_ref.go +++ b/node/expr/assign/n_assign_ref.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Reference node type Reference struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Reference) GetComments() []*comment.Comment { - return n.Comments +func (n *Reference) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_bitwise_and.go b/node/expr/assign/n_bitwise_and.go index 8ee3e06..088e125 100644 --- a/node/expr/assign/n_bitwise_and.go +++ b/node/expr/assign/n_bitwise_and.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BitwiseAnd node type BitwiseAnd struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BitwiseAnd) GetComments() []*comment.Comment { - return n.Comments +func (n *BitwiseAnd) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_bitwise_or.go b/node/expr/assign/n_bitwise_or.go index b1662c2..216d511 100644 --- a/node/expr/assign/n_bitwise_or.go +++ b/node/expr/assign/n_bitwise_or.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BitwiseOr node type BitwiseOr struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BitwiseOr) GetComments() []*comment.Comment { - return n.Comments +func (n *BitwiseOr) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_bitwise_xor.go b/node/expr/assign/n_bitwise_xor.go index 8dfca55..2d43254 100644 --- a/node/expr/assign/n_bitwise_xor.go +++ b/node/expr/assign/n_bitwise_xor.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BitwiseXor node type BitwiseXor struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BitwiseXor) GetComments() []*comment.Comment { - return n.Comments +func (n *BitwiseXor) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_concat.go b/node/expr/assign/n_concat.go index 2c818d4..9b8f65a 100644 --- a/node/expr/assign/n_concat.go +++ b/node/expr/assign/n_concat.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Concat node type Concat struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Concat) GetComments() []*comment.Comment { - return n.Comments +func (n *Concat) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_div.go b/node/expr/assign/n_div.go index 58a9488..ca53aa9 100644 --- a/node/expr/assign/n_div.go +++ b/node/expr/assign/n_div.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Div node type Div struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Div) GetComments() []*comment.Comment { - return n.Comments +func (n *Div) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_minus.go b/node/expr/assign/n_minus.go index a9e77ca..af84b16 100644 --- a/node/expr/assign/n_minus.go +++ b/node/expr/assign/n_minus.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Minus node type Minus struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Minus) GetComments() []*comment.Comment { - return n.Comments +func (n *Minus) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_mod.go b/node/expr/assign/n_mod.go index 2ce65b4..64c9dac 100644 --- a/node/expr/assign/n_mod.go +++ b/node/expr/assign/n_mod.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Mod node type Mod struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Mod) GetComments() []*comment.Comment { - return n.Comments +func (n *Mod) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_mul.go b/node/expr/assign/n_mul.go index 8278719..5e9b4fe 100644 --- a/node/expr/assign/n_mul.go +++ b/node/expr/assign/n_mul.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Mul node type Mul struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Mul) GetComments() []*comment.Comment { - return n.Comments +func (n *Mul) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_plus.go b/node/expr/assign/n_plus.go index 4a6e4ba..fd3d6a3 100644 --- a/node/expr/assign/n_plus.go +++ b/node/expr/assign/n_plus.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Plus node type Plus struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Plus) GetComments() []*comment.Comment { - return n.Comments +func (n *Plus) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_pow.go b/node/expr/assign/n_pow.go index 538f73c..e42ee3e 100644 --- a/node/expr/assign/n_pow.go +++ b/node/expr/assign/n_pow.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Pow node type Pow struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Pow) GetComments() []*comment.Comment { - return n.Comments +func (n *Pow) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_shift_left.go b/node/expr/assign/n_shift_left.go index d56a06f..38184e4 100644 --- a/node/expr/assign/n_shift_left.go +++ b/node/expr/assign/n_shift_left.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ShiftLeft node type ShiftLeft struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ShiftLeft) GetComments() []*comment.Comment { - return n.Comments +func (n *ShiftLeft) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/assign/n_shift_right.go b/node/expr/assign/n_shift_right.go index ab3971b..728ccd3 100644 --- a/node/expr/assign/n_shift_right.go +++ b/node/expr/assign/n_shift_right.go @@ -1,7 +1,7 @@ package assign import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ShiftRight node type ShiftRight struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expression node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ShiftRight) GetComments() []*comment.Comment { - return n.Comments +func (n *ShiftRight) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_bitwise_and.go b/node/expr/binary/n_bitwise_and.go index fe66522..667cf67 100644 --- a/node/expr/binary/n_bitwise_and.go +++ b/node/expr/binary/n_bitwise_and.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BitwiseAnd node type BitwiseAnd struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BitwiseAnd) GetComments() []*comment.Comment { - return n.Comments +func (n *BitwiseAnd) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_bitwise_or.go b/node/expr/binary/n_bitwise_or.go index 3d4c1d1..3acce02 100644 --- a/node/expr/binary/n_bitwise_or.go +++ b/node/expr/binary/n_bitwise_or.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BitwiseOr node type BitwiseOr struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BitwiseOr) GetComments() []*comment.Comment { - return n.Comments +func (n *BitwiseOr) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_bitwise_xor.go b/node/expr/binary/n_bitwise_xor.go index 98dace5..56885e3 100644 --- a/node/expr/binary/n_bitwise_xor.go +++ b/node/expr/binary/n_bitwise_xor.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BitwiseXor node type BitwiseXor struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BitwiseXor) GetComments() []*comment.Comment { - return n.Comments +func (n *BitwiseXor) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_boolean_and.go b/node/expr/binary/n_boolean_and.go index ecfd326..ef62f9d 100644 --- a/node/expr/binary/n_boolean_and.go +++ b/node/expr/binary/n_boolean_and.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BooleanAnd node type BooleanAnd struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BooleanAnd) GetComments() []*comment.Comment { - return n.Comments +func (n *BooleanAnd) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_boolean_or.go b/node/expr/binary/n_boolean_or.go index 7d85a4b..6cc1aaa 100644 --- a/node/expr/binary/n_boolean_or.go +++ b/node/expr/binary/n_boolean_or.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BooleanOr node type BooleanOr struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BooleanOr) GetComments() []*comment.Comment { - return n.Comments +func (n *BooleanOr) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_coalesce.go b/node/expr/binary/n_coalesce.go index 2efd1a7..f015108 100644 --- a/node/expr/binary/n_coalesce.go +++ b/node/expr/binary/n_coalesce.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Coalesce node type Coalesce struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Coalesce) GetComments() []*comment.Comment { - return n.Comments +func (n *Coalesce) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_concat.go b/node/expr/binary/n_concat.go index c81dc4f..2a35877 100644 --- a/node/expr/binary/n_concat.go +++ b/node/expr/binary/n_concat.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Concat node type Concat struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Concat) GetComments() []*comment.Comment { - return n.Comments +func (n *Concat) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_div.go b/node/expr/binary/n_div.go index e165d96..833ba44 100644 --- a/node/expr/binary/n_div.go +++ b/node/expr/binary/n_div.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Div node type Div struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Div) GetComments() []*comment.Comment { - return n.Comments +func (n *Div) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_equal.go b/node/expr/binary/n_equal.go index 1086fa7..d5ff654 100644 --- a/node/expr/binary/n_equal.go +++ b/node/expr/binary/n_equal.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Equal node type Equal struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Equal) GetComments() []*comment.Comment { - return n.Comments +func (n *Equal) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_greater.go b/node/expr/binary/n_greater.go index 686dd1a..d177855 100644 --- a/node/expr/binary/n_greater.go +++ b/node/expr/binary/n_greater.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Greater node type Greater struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Greater) GetComments() []*comment.Comment { - return n.Comments +func (n *Greater) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_greater_or_equal.go b/node/expr/binary/n_greater_or_equal.go index 9a84f83..abf9bb6 100644 --- a/node/expr/binary/n_greater_or_equal.go +++ b/node/expr/binary/n_greater_or_equal.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // GreaterOrEqual node type GreaterOrEqual struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *GreaterOrEqual) GetComments() []*comment.Comment { - return n.Comments +func (n *GreaterOrEqual) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_identical.go b/node/expr/binary/n_identical.go index 0aed14d..885f6d7 100644 --- a/node/expr/binary/n_identical.go +++ b/node/expr/binary/n_identical.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Identical node type Identical struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Identical) GetComments() []*comment.Comment { - return n.Comments +func (n *Identical) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_logical_and.go b/node/expr/binary/n_logical_and.go index 3232bf9..7296a1d 100644 --- a/node/expr/binary/n_logical_and.go +++ b/node/expr/binary/n_logical_and.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // LogicalAnd node type LogicalAnd struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *LogicalAnd) GetComments() []*comment.Comment { - return n.Comments +func (n *LogicalAnd) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_logical_or.go b/node/expr/binary/n_logical_or.go index b96fcf6..35d1609 100644 --- a/node/expr/binary/n_logical_or.go +++ b/node/expr/binary/n_logical_or.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // LogicalOr node type LogicalOr struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *LogicalOr) GetComments() []*comment.Comment { - return n.Comments +func (n *LogicalOr) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_logical_xor.go b/node/expr/binary/n_logical_xor.go index 49dc951..f986eb9 100644 --- a/node/expr/binary/n_logical_xor.go +++ b/node/expr/binary/n_logical_xor.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // LogicalXor node type LogicalXor struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *LogicalXor) GetComments() []*comment.Comment { - return n.Comments +func (n *LogicalXor) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_minus.go b/node/expr/binary/n_minus.go index 9001cda..89909e8 100644 --- a/node/expr/binary/n_minus.go +++ b/node/expr/binary/n_minus.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Minus node type Minus struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Minus) GetComments() []*comment.Comment { - return n.Comments +func (n *Minus) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_mod.go b/node/expr/binary/n_mod.go index e9f5b42..aeaaa67 100644 --- a/node/expr/binary/n_mod.go +++ b/node/expr/binary/n_mod.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Mod node type Mod struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Mod) GetComments() []*comment.Comment { - return n.Comments +func (n *Mod) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_mul.go b/node/expr/binary/n_mul.go index 083ed1e..9f92791 100644 --- a/node/expr/binary/n_mul.go +++ b/node/expr/binary/n_mul.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Mul node type Mul struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Mul) GetComments() []*comment.Comment { - return n.Comments +func (n *Mul) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_not_equal.go b/node/expr/binary/n_not_equal.go index e713676..9a684c1 100644 --- a/node/expr/binary/n_not_equal.go +++ b/node/expr/binary/n_not_equal.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // NotEqual node type NotEqual struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *NotEqual) GetComments() []*comment.Comment { - return n.Comments +func (n *NotEqual) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_not_identical.go b/node/expr/binary/n_not_identical.go index 41491dc..de510ba 100644 --- a/node/expr/binary/n_not_identical.go +++ b/node/expr/binary/n_not_identical.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // NotIdentical node type NotIdentical struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *NotIdentical) GetComments() []*comment.Comment { - return n.Comments +func (n *NotIdentical) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_plus.go b/node/expr/binary/n_plus.go index 10561b4..1c2e9ec 100644 --- a/node/expr/binary/n_plus.go +++ b/node/expr/binary/n_plus.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Plus node type Plus struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Plus) GetComments() []*comment.Comment { - return n.Comments +func (n *Plus) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_pow.go b/node/expr/binary/n_pow.go index 25af5c9..82a7993 100644 --- a/node/expr/binary/n_pow.go +++ b/node/expr/binary/n_pow.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Pow node type Pow struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Pow) GetComments() []*comment.Comment { - return n.Comments +func (n *Pow) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_shift_left.go b/node/expr/binary/n_shift_left.go index d6028fa..5cb657d 100644 --- a/node/expr/binary/n_shift_left.go +++ b/node/expr/binary/n_shift_left.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ShiftLeft node type ShiftLeft struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ShiftLeft) GetComments() []*comment.Comment { - return n.Comments +func (n *ShiftLeft) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_shift_right.go b/node/expr/binary/n_shift_right.go index 14b4f95..aa94382 100644 --- a/node/expr/binary/n_shift_right.go +++ b/node/expr/binary/n_shift_right.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ShiftRight node type ShiftRight struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ShiftRight) GetComments() []*comment.Comment { - return n.Comments +func (n *ShiftRight) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_smaller.go b/node/expr/binary/n_smaller.go index b3deb82..cdaeeba 100644 --- a/node/expr/binary/n_smaller.go +++ b/node/expr/binary/n_smaller.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Smaller node type Smaller struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Smaller) GetComments() []*comment.Comment { - return n.Comments +func (n *Smaller) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_smaller_or_equal.go b/node/expr/binary/n_smaller_or_equal.go index d2b2aef..c2b81e4 100644 --- a/node/expr/binary/n_smaller_or_equal.go +++ b/node/expr/binary/n_smaller_or_equal.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // SmallerOrEqual node type SmallerOrEqual struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *SmallerOrEqual) GetComments() []*comment.Comment { - return n.Comments +func (n *SmallerOrEqual) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/binary/n_spaceship.go b/node/expr/binary/n_spaceship.go index 99945d3..3c18715 100644 --- a/node/expr/binary/n_spaceship.go +++ b/node/expr/binary/n_spaceship.go @@ -1,7 +1,7 @@ package binary import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Spaceship node type Spaceship struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Left node.Node Right node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Spaceship) GetComments() []*comment.Comment { - return n.Comments +func (n *Spaceship) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/cast/n_cast_array.go b/node/expr/cast/n_cast_array.go index 47b5524..7d5c417 100644 --- a/node/expr/cast/n_cast_array.go +++ b/node/expr/cast/n_cast_array.go @@ -1,7 +1,7 @@ package cast import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Array node type Array struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Array) GetComments() []*comment.Comment { - return n.Comments +func (n *Array) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/cast/n_cast_bool.go b/node/expr/cast/n_cast_bool.go index 8af7697..00e807c 100644 --- a/node/expr/cast/n_cast_bool.go +++ b/node/expr/cast/n_cast_bool.go @@ -1,7 +1,7 @@ package cast import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Bool node type Bool struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Bool) GetComments() []*comment.Comment { - return n.Comments +func (n *Bool) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/cast/n_cast_double.go b/node/expr/cast/n_cast_double.go index 56715e5..0abc582 100644 --- a/node/expr/cast/n_cast_double.go +++ b/node/expr/cast/n_cast_double.go @@ -1,7 +1,7 @@ package cast import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Double node type Double struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Double) GetComments() []*comment.Comment { - return n.Comments +func (n *Double) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/cast/n_cast_int.go b/node/expr/cast/n_cast_int.go index 4c6e730..d9247b2 100644 --- a/node/expr/cast/n_cast_int.go +++ b/node/expr/cast/n_cast_int.go @@ -1,7 +1,7 @@ package cast import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Int node type Int struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Int) GetComments() []*comment.Comment { - return n.Comments +func (n *Int) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/cast/n_cast_object.go b/node/expr/cast/n_cast_object.go index b44aa9c..02de408 100644 --- a/node/expr/cast/n_cast_object.go +++ b/node/expr/cast/n_cast_object.go @@ -1,7 +1,7 @@ package cast import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Object node type Object struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Object) GetComments() []*comment.Comment { - return n.Comments +func (n *Object) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/cast/n_cast_string.go b/node/expr/cast/n_cast_string.go index 7081b26..e58fb5e 100644 --- a/node/expr/cast/n_cast_string.go +++ b/node/expr/cast/n_cast_string.go @@ -1,7 +1,7 @@ package cast import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // String node type String struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *String) GetComments() []*comment.Comment { - return n.Comments +func (n *String) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/cast/n_cast_unset.go b/node/expr/cast/n_cast_unset.go index 7eadb26..8e52521 100644 --- a/node/expr/cast/n_cast_unset.go +++ b/node/expr/cast/n_cast_unset.go @@ -1,7 +1,7 @@ package cast import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Unset node type Unset struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Unset) GetComments() []*comment.Comment { - return n.Comments +func (n *Unset) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_array.go b/node/expr/n_array.go index e032563..986d070 100644 --- a/node/expr/n_array.go +++ b/node/expr/n_array.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Array node type Array struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Items []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Array) GetComments() []*comment.Comment { - return n.Comments +func (n *Array) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_array_dim_fetch.go b/node/expr/n_array_dim_fetch.go index 9e61c68..71e9bce 100644 --- a/node/expr/n_array_dim_fetch.go +++ b/node/expr/n_array_dim_fetch.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ArrayDimFetch node type ArrayDimFetch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Dim node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ArrayDimFetch) GetComments() []*comment.Comment { - return n.Comments +func (n *ArrayDimFetch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_array_item.go b/node/expr/n_array_item.go index 48c01a4..e41c6e7 100644 --- a/node/expr/n_array_item.go +++ b/node/expr/n_array_item.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ArrayItem node type ArrayItem struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Key node.Node Val node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ArrayItem) GetComments() []*comment.Comment { - return n.Comments +func (n *ArrayItem) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_bitwise_not.go b/node/expr/n_bitwise_not.go index 37cc08f..102acbc 100644 --- a/node/expr/n_bitwise_not.go +++ b/node/expr/n_bitwise_not.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BitwiseNot node type BitwiseNot struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BitwiseNot) GetComments() []*comment.Comment { - return n.Comments +func (n *BitwiseNot) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_boolean_not.go b/node/expr/n_boolean_not.go index c5d8e0a..7f688fa 100644 --- a/node/expr/n_boolean_not.go +++ b/node/expr/n_boolean_not.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // BooleanNot node type BooleanNot struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *BooleanNot) GetComments() []*comment.Comment { - return n.Comments +func (n *BooleanNot) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_class_const_fetch.go b/node/expr/n_class_const_fetch.go index c223ebc..093a3b9 100644 --- a/node/expr/n_class_const_fetch.go +++ b/node/expr/n_class_const_fetch.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ClassConstFetch node type ClassConstFetch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Class node.Node ConstantName node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ClassConstFetch) GetComments() []*comment.Comment { - return n.Comments +func (n *ClassConstFetch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_clone.go b/node/expr/n_clone.go index 61b81dd..09a4a1b 100644 --- a/node/expr/n_clone.go +++ b/node/expr/n_clone.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Clone node type Clone struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Clone) GetComments() []*comment.Comment { - return n.Comments +func (n *Clone) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_closure.go b/node/expr/n_closure.go index 48e7e9a..57e455e 100644 --- a/node/expr/n_closure.go +++ b/node/expr/n_closure.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Closure node type Closure struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position ReturnsRef bool Static bool @@ -43,15 +43,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Closure) GetComments() []*comment.Comment { - return n.Comments +func (n *Closure) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_closure_use.go b/node/expr/n_closure_use.go index fd944f1..d17cbe7 100644 --- a/node/expr/n_closure_use.go +++ b/node/expr/n_closure_use.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ClosureUse node type ClosureUse struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Uses []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ClosureUse) GetComments() []*comment.Comment { - return n.Comments +func (n *ClosureUse) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_const_fetch.go b/node/expr/n_const_fetch.go index d10b0b4..ef027da 100644 --- a/node/expr/n_const_fetch.go +++ b/node/expr/n_const_fetch.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ConstFetch node type ConstFetch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Constant node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ConstFetch) GetComments() []*comment.Comment { - return n.Comments +func (n *ConstFetch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_die.go b/node/expr/n_die.go index f4dcc9d..6346645 100644 --- a/node/expr/n_die.go +++ b/node/expr/n_die.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Die node type Die struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Die) GetComments() []*comment.Comment { - return n.Comments +func (n *Die) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_empty.go b/node/expr/n_empty.go index 71eb94a..a46f25e 100644 --- a/node/expr/n_empty.go +++ b/node/expr/n_empty.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Empty node type Empty struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Empty) GetComments() []*comment.Comment { - return n.Comments +func (n *Empty) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_error_suppress.go b/node/expr/n_error_suppress.go index f3b7371..8c61212 100644 --- a/node/expr/n_error_suppress.go +++ b/node/expr/n_error_suppress.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ErrorSuppress node type ErrorSuppress struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ErrorSuppress) GetComments() []*comment.Comment { - return n.Comments +func (n *ErrorSuppress) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_eval.go b/node/expr/n_eval.go index 6b002c2..4b6e32c 100644 --- a/node/expr/n_eval.go +++ b/node/expr/n_eval.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Eval node type Eval struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Eval) GetComments() []*comment.Comment { - return n.Comments +func (n *Eval) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_exit.go b/node/expr/n_exit.go index 306169a..d2e90be 100644 --- a/node/expr/n_exit.go +++ b/node/expr/n_exit.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Exit node type Exit struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Exit) GetComments() []*comment.Comment { - return n.Comments +func (n *Exit) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_function_call.go b/node/expr/n_function_call.go index 2762e09..ef12d05 100644 --- a/node/expr/n_function_call.go +++ b/node/expr/n_function_call.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // FunctionCall node type FunctionCall struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Function node.Node ArgumentList *node.ArgumentList @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *FunctionCall) GetComments() []*comment.Comment { - return n.Comments +func (n *FunctionCall) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_include.go b/node/expr/n_include.go index 1b15cb9..ccae9be 100644 --- a/node/expr/n_include.go +++ b/node/expr/n_include.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Include node type Include struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Include) GetComments() []*comment.Comment { - return n.Comments +func (n *Include) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_include_once.go b/node/expr/n_include_once.go index 66a927e..5e54048 100644 --- a/node/expr/n_include_once.go +++ b/node/expr/n_include_once.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // IncludeOnce node type IncludeOnce struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *IncludeOnce) GetComments() []*comment.Comment { - return n.Comments +func (n *IncludeOnce) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_instance_of.go b/node/expr/n_instance_of.go index 19a6472..1e2d6ce 100644 --- a/node/expr/n_instance_of.go +++ b/node/expr/n_instance_of.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // InstanceOf node type InstanceOf struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node Class node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *InstanceOf) GetComments() []*comment.Comment { - return n.Comments +func (n *InstanceOf) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_isset.go b/node/expr/n_isset.go index d09e18a..6d556b2 100644 --- a/node/expr/n_isset.go +++ b/node/expr/n_isset.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Isset node type Isset struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variables []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Isset) GetComments() []*comment.Comment { - return n.Comments +func (n *Isset) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_list.go b/node/expr/n_list.go index 0f368c8..d1862a3 100644 --- a/node/expr/n_list.go +++ b/node/expr/n_list.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // List node type List struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Items []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *List) GetComments() []*comment.Comment { - return n.Comments +func (n *List) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_method_call.go b/node/expr/n_method_call.go index e2d8415..6cd1b33 100644 --- a/node/expr/n_method_call.go +++ b/node/expr/n_method_call.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // MethodCall node type MethodCall struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Method node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *MethodCall) GetComments() []*comment.Comment { - return n.Comments +func (n *MethodCall) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_new.go b/node/expr/n_new.go index 7f28ae5..3ff14fb 100644 --- a/node/expr/n_new.go +++ b/node/expr/n_new.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // New node type New struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Class node.Node ArgumentList *node.ArgumentList @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *New) GetComments() []*comment.Comment { - return n.Comments +func (n *New) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_post_dec.go b/node/expr/n_post_dec.go index 476d572..ef5d0c2 100644 --- a/node/expr/n_post_dec.go +++ b/node/expr/n_post_dec.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // PostDec node type PostDec struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *PostDec) GetComments() []*comment.Comment { - return n.Comments +func (n *PostDec) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_post_inc.go b/node/expr/n_post_inc.go index f9aaf0e..2d1e917 100644 --- a/node/expr/n_post_inc.go +++ b/node/expr/n_post_inc.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // PostInc node type PostInc struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *PostInc) GetComments() []*comment.Comment { - return n.Comments +func (n *PostInc) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_pre_dec.go b/node/expr/n_pre_dec.go index 93c65e5..f5bf0fb 100644 --- a/node/expr/n_pre_dec.go +++ b/node/expr/n_pre_dec.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // PreDec node type PreDec struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *PreDec) GetComments() []*comment.Comment { - return n.Comments +func (n *PreDec) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_pre_inc.go b/node/expr/n_pre_inc.go index aac0747..8b31e4e 100644 --- a/node/expr/n_pre_inc.go +++ b/node/expr/n_pre_inc.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // PreInc node type PreInc struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *PreInc) GetComments() []*comment.Comment { - return n.Comments +func (n *PreInc) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_print.go b/node/expr/n_print.go index cdfd4fb..52bef36 100644 --- a/node/expr/n_print.go +++ b/node/expr/n_print.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Print node type Print struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Print) GetComments() []*comment.Comment { - return n.Comments +func (n *Print) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_property_fetch.go b/node/expr/n_property_fetch.go index 7256011..4b7f56d 100644 --- a/node/expr/n_property_fetch.go +++ b/node/expr/n_property_fetch.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // PropertyFetch node type PropertyFetch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Property node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *PropertyFetch) GetComments() []*comment.Comment { - return n.Comments +func (n *PropertyFetch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_reference.go b/node/expr/n_reference.go index df0cd5f..22f305a 100644 --- a/node/expr/n_reference.go +++ b/node/expr/n_reference.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Reference node type Reference struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Reference) GetComments() []*comment.Comment { - return n.Comments +func (n *Reference) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_require.go b/node/expr/n_require.go index b145288..0a3144e 100644 --- a/node/expr/n_require.go +++ b/node/expr/n_require.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Require node type Require struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Require) GetComments() []*comment.Comment { - return n.Comments +func (n *Require) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_require_once.go b/node/expr/n_require_once.go index b36ab63..2dc6161 100644 --- a/node/expr/n_require_once.go +++ b/node/expr/n_require_once.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // RequireOnce node type RequireOnce struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *RequireOnce) GetComments() []*comment.Comment { - return n.Comments +func (n *RequireOnce) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_shell_exec.go b/node/expr/n_shell_exec.go index bbcf24d..749a51b 100644 --- a/node/expr/n_shell_exec.go +++ b/node/expr/n_shell_exec.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ShellExec node type ShellExec struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Parts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ShellExec) GetComments() []*comment.Comment { - return n.Comments +func (n *ShellExec) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_short_array.go b/node/expr/n_short_array.go index b6f5ebb..ab04658 100644 --- a/node/expr/n_short_array.go +++ b/node/expr/n_short_array.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ShortArray node type ShortArray struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Items []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ShortArray) GetComments() []*comment.Comment { - return n.Comments +func (n *ShortArray) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_short_list.go b/node/expr/n_short_list.go index 3714832..c2ba2a7 100644 --- a/node/expr/n_short_list.go +++ b/node/expr/n_short_list.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ShortList node type ShortList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Items []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ShortList) GetComments() []*comment.Comment { - return n.Comments +func (n *ShortList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_static_call.go b/node/expr/n_static_call.go index be0c7f2..61ac3ff 100644 --- a/node/expr/n_static_call.go +++ b/node/expr/n_static_call.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // StaticCall node type StaticCall struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Class node.Node Call node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *StaticCall) GetComments() []*comment.Comment { - return n.Comments +func (n *StaticCall) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_static_property_fetch.go b/node/expr/n_static_property_fetch.go index 1e52c37..58b2b96 100644 --- a/node/expr/n_static_property_fetch.go +++ b/node/expr/n_static_property_fetch.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // StaticPropertyFetch node type StaticPropertyFetch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Class node.Node Property node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *StaticPropertyFetch) GetComments() []*comment.Comment { - return n.Comments +func (n *StaticPropertyFetch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_ternary.go b/node/expr/n_ternary.go index f94aef3..99bbb50 100644 --- a/node/expr/n_ternary.go +++ b/node/expr/n_ternary.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Ternary node type Ternary struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Condition node.Node IfTrue node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Ternary) GetComments() []*comment.Comment { - return n.Comments +func (n *Ternary) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_unary_minus.go b/node/expr/n_unary_minus.go index f1c21eb..aa89cd8 100644 --- a/node/expr/n_unary_minus.go +++ b/node/expr/n_unary_minus.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // UnaryMinus node type UnaryMinus struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *UnaryMinus) GetComments() []*comment.Comment { - return n.Comments +func (n *UnaryMinus) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_unary_plus.go b/node/expr/n_unary_plus.go index 5e50fcd..4de08aa 100644 --- a/node/expr/n_unary_plus.go +++ b/node/expr/n_unary_plus.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // UnaryPlus node type UnaryPlus struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *UnaryPlus) GetComments() []*comment.Comment { - return n.Comments +func (n *UnaryPlus) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_variable.go b/node/expr/n_variable.go index b0dc735..5b29038 100644 --- a/node/expr/n_variable.go +++ b/node/expr/n_variable.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Variable node type Variable struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position VarName node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Variable) GetComments() []*comment.Comment { - return n.Comments +func (n *Variable) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_yield.go b/node/expr/n_yield.go index 999f0bf..453b479 100644 --- a/node/expr/n_yield.go +++ b/node/expr/n_yield.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Yield node type Yield struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Key node.Node Value node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Yield) GetComments() []*comment.Comment { - return n.Comments +func (n *Yield) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/expr/n_yield_from.go b/node/expr/n_yield_from.go index 6651856..561cec1 100644 --- a/node/expr/n_yield_from.go +++ b/node/expr/n_yield_from.go @@ -1,7 +1,7 @@ package expr import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // YieldFrom node type YieldFrom struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *YieldFrom) GetComments() []*comment.Comment { - return n.Comments +func (n *YieldFrom) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/n_argument.go b/node/n_argument.go index c32582a..5d42fb4 100644 --- a/node/n_argument.go +++ b/node/n_argument.go @@ -1,14 +1,14 @@ package node import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Argument node type Argument struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variadic bool // if ... before variable IsReference bool // if & before variable @@ -34,15 +34,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Argument) GetComments() []*comment.Comment { - return n.Comments +func (n *Argument) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/n_argument_list.go b/node/n_argument_list.go index 49de0cc..ef5563f 100644 --- a/node/n_argument_list.go +++ b/node/n_argument_list.go @@ -1,14 +1,14 @@ package node import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // ArgumentList node type ArgumentList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Arguments []Node } @@ -30,16 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ArgumentList) GetComments() []*comment.Comment { - return n.Comments +func (n *ArgumentList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/n_identifier.go b/node/n_identifier.go index 5d3ad0a..9604465 100644 --- a/node/n_identifier.go +++ b/node/n_identifier.go @@ -1,14 +1,14 @@ package node import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Identifier node type Identifier struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Identifier) GetComments() []*comment.Comment { - return n.Comments +func (n *Identifier) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/n_nullable.go b/node/n_nullable.go index 5354efd..aa1e745 100644 --- a/node/n_nullable.go +++ b/node/n_nullable.go @@ -1,14 +1,14 @@ package node import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Nullable node type Nullable struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr Node } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Nullable) GetComments() []*comment.Comment { - return n.Comments +func (n *Nullable) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/n_parameter.go b/node/n_parameter.go index 236690e..6a571e3 100644 --- a/node/n_parameter.go +++ b/node/n_parameter.go @@ -1,14 +1,14 @@ package node import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Parameter node type Parameter struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position ByRef bool Variadic bool @@ -38,15 +38,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Parameter) GetComments() []*comment.Comment { - return n.Comments +func (n *Parameter) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/n_root.go b/node/n_root.go index 9f2ee53..1b14629 100644 --- a/node/n_root.go +++ b/node/n_root.go @@ -1,14 +1,14 @@ package node import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Root node type Root struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmts []Node } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Root) GetComments() []*comment.Comment { - return n.Comments +func (n *Root) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/name/n_fully_qualified.go b/node/name/n_fully_qualified.go index eb239bb..ca936b9 100644 --- a/node/name/n_fully_qualified.go +++ b/node/name/n_fully_qualified.go @@ -1,7 +1,7 @@ package name import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // FullyQualified node type FullyQualified struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Parts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *FullyQualified) GetComments() []*comment.Comment { - return n.Comments +func (n *FullyQualified) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/name/n_name.go b/node/name/n_name.go index d032b3c..d6cc74d 100644 --- a/node/name/n_name.go +++ b/node/name/n_name.go @@ -1,7 +1,7 @@ package name import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Name node type Name struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Parts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Name) GetComments() []*comment.Comment { - return n.Comments +func (n *Name) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/name/n_name_part.go b/node/name/n_name_part.go index a331231..3074009 100644 --- a/node/name/n_name_part.go +++ b/node/name/n_name_part.go @@ -1,14 +1,14 @@ package name import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // NamePart node type NamePart struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *NamePart) GetComments() []*comment.Comment { - return n.Comments +func (n *NamePart) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/name/n_relative.go b/node/name/n_relative.go index 56230a1..271110e 100644 --- a/node/name/n_relative.go +++ b/node/name/n_relative.go @@ -1,7 +1,7 @@ package name import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Relative node type Relative struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Parts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Relative) GetComments() []*comment.Comment { - return n.Comments +func (n *Relative) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/node.go b/node/node.go index dd53b20..c3c94e1 100644 --- a/node/node.go +++ b/node/node.go @@ -1,7 +1,7 @@ package node import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) @@ -12,6 +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 + AddMeta(m []meta.Meta) + GetMeta() []meta.Meta } diff --git a/node/scalar/node_dnumber.go b/node/scalar/node_dnumber.go index fa65f0a..06e1946 100644 --- a/node/scalar/node_dnumber.go +++ b/node/scalar/node_dnumber.go @@ -1,14 +1,14 @@ package scalar import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Dnumber node type Dnumber struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Dnumber) GetComments() []*comment.Comment { - return n.Comments +func (n *Dnumber) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/scalar/node_encapsed.go b/node/scalar/node_encapsed.go index 98b312d..1a971e5 100644 --- a/node/scalar/node_encapsed.go +++ b/node/scalar/node_encapsed.go @@ -1,7 +1,7 @@ package scalar import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Encapsed node type Encapsed struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Parts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Encapsed) GetComments() []*comment.Comment { - return n.Comments +func (n *Encapsed) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/scalar/node_encapsed_string_part.go b/node/scalar/node_encapsed_string_part.go index 71e596c..a0d6ab7 100644 --- a/node/scalar/node_encapsed_string_part.go +++ b/node/scalar/node_encapsed_string_part.go @@ -1,14 +1,14 @@ package scalar import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // EncapsedStringPart node type EncapsedStringPart struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *EncapsedStringPart) GetComments() []*comment.Comment { - return n.Comments +func (n *EncapsedStringPart) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/scalar/node_heredoc.go b/node/scalar/node_heredoc.go index 31f72f5..6d49063 100644 --- a/node/scalar/node_heredoc.go +++ b/node/scalar/node_heredoc.go @@ -1,7 +1,7 @@ package scalar import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Heredoc node type Heredoc struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Label string Parts []node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Heredoc) GetComments() []*comment.Comment { - return n.Comments +func (n *Heredoc) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/scalar/node_lnumber.go b/node/scalar/node_lnumber.go index 198d9e2..96fd4d3 100644 --- a/node/scalar/node_lnumber.go +++ b/node/scalar/node_lnumber.go @@ -1,14 +1,14 @@ package scalar import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Lnumber node type Lnumber struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Lnumber) GetComments() []*comment.Comment { - return n.Comments +func (n *Lnumber) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/scalar/node_magic_constant.go b/node/scalar/node_magic_constant.go index 0f06f7b..5edc129 100644 --- a/node/scalar/node_magic_constant.go +++ b/node/scalar/node_magic_constant.go @@ -1,14 +1,14 @@ package scalar import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // MagicConstant node type MagicConstant struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *MagicConstant) GetComments() []*comment.Comment { - return n.Comments +func (n *MagicConstant) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/scalar/node_string.go b/node/scalar/node_string.go index bbabf35..8692098 100644 --- a/node/scalar/node_string.go +++ b/node/scalar/node_string.go @@ -1,14 +1,14 @@ package scalar import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // String node type String struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *String) GetComments() []*comment.Comment { - return n.Comments +func (n *String) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_alt_else.go b/node/stmt/n_alt_else.go index 682a155..d3534e7 100644 --- a/node/stmt/n_alt_else.go +++ b/node/stmt/n_alt_else.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // AltElse node type AltElse struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmt node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *AltElse) GetComments() []*comment.Comment { - return n.Comments +func (n *AltElse) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_alt_else_if.go b/node/stmt/n_alt_else_if.go index e2cb2dd..e42f4c3 100644 --- a/node/stmt/n_alt_else_if.go +++ b/node/stmt/n_alt_else_if.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // AltElseIf node type AltElseIf struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node Stmt node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *AltElseIf) GetComments() []*comment.Comment { - return n.Comments +func (n *AltElseIf) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_alt_for.go b/node/stmt/n_alt_for.go index e4fa03f..df75b75 100644 --- a/node/stmt/n_alt_for.go +++ b/node/stmt/n_alt_for.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // AltFor node type AltFor struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Init []node.Node Cond []node.Node @@ -37,15 +37,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *AltFor) GetComments() []*comment.Comment { - return n.Comments +func (n *AltFor) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_alt_foreach.go b/node/stmt/n_alt_foreach.go index 066fbc8..d953524 100644 --- a/node/stmt/n_alt_foreach.go +++ b/node/stmt/n_alt_foreach.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // AltForeach node type AltForeach struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node Key node.Node @@ -37,15 +37,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *AltForeach) GetComments() []*comment.Comment { - return n.Comments +func (n *AltForeach) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_alt_if.go b/node/stmt/n_alt_if.go index 17ce857..928bc1b 100644 --- a/node/stmt/n_alt_if.go +++ b/node/stmt/n_alt_if.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // AltIf node type AltIf struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node Stmt node.Node @@ -37,15 +37,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *AltIf) GetComments() []*comment.Comment { - return n.Comments +func (n *AltIf) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_alt_switch.go b/node/stmt/n_alt_switch.go index 8a5d6fe..7156324 100644 --- a/node/stmt/n_alt_switch.go +++ b/node/stmt/n_alt_switch.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // AltSwitch node type AltSwitch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node CaseList *CaseList @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *AltSwitch) GetComments() []*comment.Comment { - return n.Comments +func (n *AltSwitch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_alt_while.go b/node/stmt/n_alt_while.go index e68abcc..563477c 100644 --- a/node/stmt/n_alt_while.go +++ b/node/stmt/n_alt_while.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // AltWhile node type AltWhile struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node Stmt node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *AltWhile) GetComments() []*comment.Comment { - return n.Comments +func (n *AltWhile) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_break.go b/node/stmt/n_break.go index 3e037ec..ef0edb0 100644 --- a/node/stmt/n_break.go +++ b/node/stmt/n_break.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Break node type Break struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Break) GetComments() []*comment.Comment { - return n.Comments +func (n *Break) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_case.go b/node/stmt/n_case.go index 0da6917..4e811fe 100644 --- a/node/stmt/n_case.go +++ b/node/stmt/n_case.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Case node type Case struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node Stmts []node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Case) GetComments() []*comment.Comment { - return n.Comments +func (n *Case) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_case_list.go b/node/stmt/n_case_list.go index aa7ba24..11a4db3 100644 --- a/node/stmt/n_case_list.go +++ b/node/stmt/n_case_list.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // CaseList node type CaseList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cases []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *CaseList) GetComments() []*comment.Comment { - return n.Comments +func (n *CaseList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_catch.go b/node/stmt/n_catch.go index 826f0a1..124660b 100644 --- a/node/stmt/n_catch.go +++ b/node/stmt/n_catch.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Catch node type Catch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Types []node.Node Variable node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Catch) GetComments() []*comment.Comment { - return n.Comments +func (n *Catch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_class.go b/node/stmt/n_class.go index 564cd8c..c47225b 100644 --- a/node/stmt/n_class.go +++ b/node/stmt/n_class.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Class node type Class struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position PhpDocComment string ClassName node.Node @@ -43,15 +43,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Class) GetComments() []*comment.Comment { - return n.Comments +func (n *Class) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_class_const_list.go b/node/stmt/n_class_const_list.go index 240f271..5370239 100644 --- a/node/stmt/n_class_const_list.go +++ b/node/stmt/n_class_const_list.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ClassConstList node type ClassConstList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Modifiers []node.Node Consts []node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ClassConstList) GetComments() []*comment.Comment { - return n.Comments +func (n *ClassConstList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_class_extends.go b/node/stmt/n_class_extends.go index b95dbd7..5400b21 100644 --- a/node/stmt/n_class_extends.go +++ b/node/stmt/n_class_extends.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ClassExtends node type ClassExtends struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position ClassName node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ClassExtends) GetComments() []*comment.Comment { - return n.Comments +func (n *ClassExtends) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_class_implements.go b/node/stmt/n_class_implements.go index f8f823f..e47a83f 100644 --- a/node/stmt/n_class_implements.go +++ b/node/stmt/n_class_implements.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ClassImplements node type ClassImplements struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position InterfaceNames []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ClassImplements) GetComments() []*comment.Comment { - return n.Comments +func (n *ClassImplements) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_class_method.go b/node/stmt/n_class_method.go index 599e1e8..7d849f0 100644 --- a/node/stmt/n_class_method.go +++ b/node/stmt/n_class_method.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ClassMethod node type ClassMethod struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position ReturnsRef bool PhpDocComment string @@ -43,15 +43,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ClassMethod) GetComments() []*comment.Comment { - return n.Comments +func (n *ClassMethod) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_const_list.go b/node/stmt/n_const_list.go index 65d758d..3a284fe 100644 --- a/node/stmt/n_const_list.go +++ b/node/stmt/n_const_list.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ConstList node type ConstList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Consts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ConstList) GetComments() []*comment.Comment { - return n.Comments +func (n *ConstList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_constant.go b/node/stmt/n_constant.go index 8a7dd43..c544cdc 100644 --- a/node/stmt/n_constant.go +++ b/node/stmt/n_constant.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Constant node type Constant struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position PhpDocComment string ConstantName node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Constant) GetComments() []*comment.Comment { - return n.Comments +func (n *Constant) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_continue.go b/node/stmt/n_continue.go index c553b4c..a155b0f 100644 --- a/node/stmt/n_continue.go +++ b/node/stmt/n_continue.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Continue node type Continue struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Continue) GetComments() []*comment.Comment { - return n.Comments +func (n *Continue) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_declare.go b/node/stmt/n_declare.go index 1b71c9c..e5a5805 100644 --- a/node/stmt/n_declare.go +++ b/node/stmt/n_declare.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Declare node type Declare struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Consts []node.Node Stmt node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Declare) GetComments() []*comment.Comment { - return n.Comments +func (n *Declare) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_default.go b/node/stmt/n_default.go index 8c34e50..7197b44 100644 --- a/node/stmt/n_default.go +++ b/node/stmt/n_default.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Default node type Default struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Default) GetComments() []*comment.Comment { - return n.Comments +func (n *Default) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_do.go b/node/stmt/n_do.go index 4786d07..ebcd3d9 100644 --- a/node/stmt/n_do.go +++ b/node/stmt/n_do.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Do node type Do struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmt node.Node Cond node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Do) GetComments() []*comment.Comment { - return n.Comments +func (n *Do) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_echo.go b/node/stmt/n_echo.go index 5e61660..5770cdc 100644 --- a/node/stmt/n_echo.go +++ b/node/stmt/n_echo.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Echo node type Echo struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Exprs []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Echo) GetComments() []*comment.Comment { - return n.Comments +func (n *Echo) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_else.go b/node/stmt/n_else.go index d97438a..209caa0 100644 --- a/node/stmt/n_else.go +++ b/node/stmt/n_else.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Else node type Else struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmt node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Else) GetComments() []*comment.Comment { - return n.Comments +func (n *Else) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_else_if.go b/node/stmt/n_else_if.go index 06b6dbc..504a800 100644 --- a/node/stmt/n_else_if.go +++ b/node/stmt/n_else_if.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // ElseIf node type ElseIf struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node Stmt node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *ElseIf) GetComments() []*comment.Comment { - return n.Comments +func (n *ElseIf) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_expression.go b/node/stmt/n_expression.go index 87d3fbd..189f8f0 100644 --- a/node/stmt/n_expression.go +++ b/node/stmt/n_expression.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Expression node type Expression struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Expression) GetComments() []*comment.Comment { - return n.Comments +func (n *Expression) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_finally.go b/node/stmt/n_finally.go index 333e0fe..a5e2803 100644 --- a/node/stmt/n_finally.go +++ b/node/stmt/n_finally.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Finally node type Finally struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Finally) GetComments() []*comment.Comment { - return n.Comments +func (n *Finally) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_for.go b/node/stmt/n_for.go index b4f8477..e9c04d9 100644 --- a/node/stmt/n_for.go +++ b/node/stmt/n_for.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // For node type For struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Init []node.Node Cond []node.Node @@ -37,15 +37,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *For) GetComments() []*comment.Comment { - return n.Comments +func (n *For) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_foreach.go b/node/stmt/n_foreach.go index acea5f0..243618b 100644 --- a/node/stmt/n_foreach.go +++ b/node/stmt/n_foreach.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Foreach node type Foreach struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node Key node.Node @@ -37,15 +37,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Foreach) GetComments() []*comment.Comment { - return n.Comments +func (n *Foreach) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_function.go b/node/stmt/n_function.go index eb62219..8138a37 100644 --- a/node/stmt/n_function.go +++ b/node/stmt/n_function.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Function node type Function struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position ReturnsRef bool PhpDocComment string @@ -41,15 +41,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Function) GetComments() []*comment.Comment { - return n.Comments +func (n *Function) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_global.go b/node/stmt/n_global.go index 51c8deb..61e23a2 100644 --- a/node/stmt/n_global.go +++ b/node/stmt/n_global.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Global node type Global struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Vars []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Global) GetComments() []*comment.Comment { - return n.Comments +func (n *Global) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_goto.go b/node/stmt/n_goto.go index f5d12ad..b5531ec 100644 --- a/node/stmt/n_goto.go +++ b/node/stmt/n_goto.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Goto node type Goto struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Label node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Goto) GetComments() []*comment.Comment { - return n.Comments +func (n *Goto) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_group_use.go b/node/stmt/n_group_use.go index e3f5946..ad857de 100644 --- a/node/stmt/n_group_use.go +++ b/node/stmt/n_group_use.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // GroupUse node type GroupUse struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position UseType node.Node Prefix node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *GroupUse) GetComments() []*comment.Comment { - return n.Comments +func (n *GroupUse) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_halt_compiler.go b/node/stmt/n_halt_compiler.go index 3b4e856..4e13216 100644 --- a/node/stmt/n_halt_compiler.go +++ b/node/stmt/n_halt_compiler.go @@ -1,14 +1,14 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // HaltCompiler node type HaltCompiler struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position } @@ -27,15 +27,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *HaltCompiler) GetComments() []*comment.Comment { - return n.Comments +func (n *HaltCompiler) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_if.go b/node/stmt/n_if.go index eb39917..b88f4db 100644 --- a/node/stmt/n_if.go +++ b/node/stmt/n_if.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // If node type If struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node Stmt node.Node @@ -37,15 +37,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *If) GetComments() []*comment.Comment { - return n.Comments +func (n *If) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_inline_html.go b/node/stmt/n_inline_html.go index d16f45d..0e0d073 100644 --- a/node/stmt/n_inline_html.go +++ b/node/stmt/n_inline_html.go @@ -1,14 +1,14 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // InlineHtml node type InlineHtml struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Value string } @@ -30,15 +30,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *InlineHtml) GetComments() []*comment.Comment { - return n.Comments +func (n *InlineHtml) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_interface.go b/node/stmt/n_interface.go index 0a5d0fc..4d69753 100644 --- a/node/stmt/n_interface.go +++ b/node/stmt/n_interface.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Interface node type Interface struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position PhpDocComment string InterfaceName node.Node @@ -37,15 +37,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Interface) GetComments() []*comment.Comment { - return n.Comments +func (n *Interface) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_interface_extends.go b/node/stmt/n_interface_extends.go index 7422a67..1e6950f 100644 --- a/node/stmt/n_interface_extends.go +++ b/node/stmt/n_interface_extends.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // InterfaceExtends node type InterfaceExtends struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position InterfaceNames []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *InterfaceExtends) GetComments() []*comment.Comment { - return n.Comments +func (n *InterfaceExtends) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_label.go b/node/stmt/n_label.go index d337797..06d850a 100644 --- a/node/stmt/n_label.go +++ b/node/stmt/n_label.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Label node type Label struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position LabelName node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Label) GetComments() []*comment.Comment { - return n.Comments +func (n *Label) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_namespace.go b/node/stmt/n_namespace.go index 96b4fea..8680b0c 100644 --- a/node/stmt/n_namespace.go +++ b/node/stmt/n_namespace.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Namespace node type Namespace struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position NamespaceName node.Node Stmts []node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Namespace) GetComments() []*comment.Comment { - return n.Comments +func (n *Namespace) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_nop.go b/node/stmt/n_nop.go index e5d92dd..1b1282c 100644 --- a/node/stmt/n_nop.go +++ b/node/stmt/n_nop.go @@ -1,14 +1,14 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" ) // Nop node type Nop struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position } @@ -27,15 +27,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Nop) GetComments() []*comment.Comment { - return n.Comments +func (n *Nop) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_property.go b/node/stmt/n_property.go index 0e02bcc..0e8d595 100644 --- a/node/stmt/n_property.go +++ b/node/stmt/n_property.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Property node type Property struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position PhpDocComment string Variable node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Property) GetComments() []*comment.Comment { - return n.Comments +func (n *Property) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_property_list.go b/node/stmt/n_property_list.go index ba2af4b..0819af5 100644 --- a/node/stmt/n_property_list.go +++ b/node/stmt/n_property_list.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // PropertyList node type PropertyList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Modifiers []node.Node Properties []node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *PropertyList) GetComments() []*comment.Comment { - return n.Comments +func (n *PropertyList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_return.go b/node/stmt/n_return.go index 5b5fe1e..8a6fea2 100644 --- a/node/stmt/n_return.go +++ b/node/stmt/n_return.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Return node type Return struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Return) GetComments() []*comment.Comment { - return n.Comments +func (n *Return) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_static.go b/node/stmt/n_static.go index 717bfd3..f4486af 100644 --- a/node/stmt/n_static.go +++ b/node/stmt/n_static.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Static node type Static struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Vars []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Static) GetComments() []*comment.Comment { - return n.Comments +func (n *Static) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_static_var.go b/node/stmt/n_static_var.go index 6ee8ef6..8b25dbd 100644 --- a/node/stmt/n_static_var.go +++ b/node/stmt/n_static_var.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // StaticVar node type StaticVar struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Variable node.Node Expr node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *StaticVar) GetComments() []*comment.Comment { - return n.Comments +func (n *StaticVar) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_stmt_list.go b/node/stmt/n_stmt_list.go index ae3e699..929765c 100644 --- a/node/stmt/n_stmt_list.go +++ b/node/stmt/n_stmt_list.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // StmtList node type StmtList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmts []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *StmtList) GetComments() []*comment.Comment { - return n.Comments +func (n *StmtList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_switch.go b/node/stmt/n_switch.go index c8ff240..7db1b82 100644 --- a/node/stmt/n_switch.go +++ b/node/stmt/n_switch.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Switch node type Switch struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node CaseList *CaseList @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Switch) GetComments() []*comment.Comment { - return n.Comments +func (n *Switch) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_throw.go b/node/stmt/n_throw.go index aa4caef..bc80c84 100644 --- a/node/stmt/n_throw.go +++ b/node/stmt/n_throw.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Throw node type Throw struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Expr node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Throw) GetComments() []*comment.Comment { - return n.Comments +func (n *Throw) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_trait.go b/node/stmt/n_trait.go index 8c8a3cd..9b54109 100644 --- a/node/stmt/n_trait.go +++ b/node/stmt/n_trait.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Trait node type Trait struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position PhpDocComment string TraitName node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Trait) GetComments() []*comment.Comment { - return n.Comments +func (n *Trait) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_trait_adaptation_list.go b/node/stmt/n_trait_adaptation_list.go index 80d6902..0624c72 100644 --- a/node/stmt/n_trait_adaptation_list.go +++ b/node/stmt/n_trait_adaptation_list.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // TraitAdaptationList node type TraitAdaptationList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Adaptations []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *TraitAdaptationList) GetComments() []*comment.Comment { - return n.Comments +func (n *TraitAdaptationList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_trait_method_ref.go b/node/stmt/n_trait_method_ref.go index 9f7cd1f..7f90bbb 100644 --- a/node/stmt/n_trait_method_ref.go +++ b/node/stmt/n_trait_method_ref.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // TraitMethodRef node type TraitMethodRef struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Trait node.Node Method node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *TraitMethodRef) GetComments() []*comment.Comment { - return n.Comments +func (n *TraitMethodRef) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_trait_use.go b/node/stmt/n_trait_use.go index 1c5b49a..18316df 100644 --- a/node/stmt/n_trait_use.go +++ b/node/stmt/n_trait_use.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // TraitUse node type TraitUse struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Traits []node.Node TraitAdaptationList *TraitAdaptationList @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *TraitUse) GetComments() []*comment.Comment { - return n.Comments +func (n *TraitUse) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_trait_use_alias.go b/node/stmt/n_trait_use_alias.go index 32c311b..0b23a20 100644 --- a/node/stmt/n_trait_use_alias.go +++ b/node/stmt/n_trait_use_alias.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // TraitUseAlias node type TraitUseAlias struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Ref node.Node Modifier node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *TraitUseAlias) GetComments() []*comment.Comment { - return n.Comments +func (n *TraitUseAlias) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_trait_use_precedence.go b/node/stmt/n_trait_use_precedence.go index 24f388c..c6ae475 100644 --- a/node/stmt/n_trait_use_precedence.go +++ b/node/stmt/n_trait_use_precedence.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // TraitUsePrecedence node type TraitUsePrecedence struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Ref node.Node Insteadof []node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *TraitUsePrecedence) GetComments() []*comment.Comment { - return n.Comments +func (n *TraitUsePrecedence) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_try.go b/node/stmt/n_try.go index 865f6d4..6a93cb3 100644 --- a/node/stmt/n_try.go +++ b/node/stmt/n_try.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Try node type Try struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Stmts []node.Node Catches []node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Try) GetComments() []*comment.Comment { - return n.Comments +func (n *Try) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_unset.go b/node/stmt/n_unset.go index d7480a2..d787066 100644 --- a/node/stmt/n_unset.go +++ b/node/stmt/n_unset.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Unset node type Unset struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Vars []node.Node } @@ -31,15 +31,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Unset) GetComments() []*comment.Comment { - return n.Comments +func (n *Unset) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_use.go b/node/stmt/n_use.go index fd46664..e5fb6f3 100644 --- a/node/stmt/n_use.go +++ b/node/stmt/n_use.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // Use node type Use struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position UseType node.Node Use node.Node @@ -35,15 +35,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *Use) GetComments() []*comment.Comment { - return n.Comments +func (n *Use) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_use_list.go b/node/stmt/n_use_list.go index 6dbf295..09ef434 100644 --- a/node/stmt/n_use_list.go +++ b/node/stmt/n_use_list.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // UseList node type UseList struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position UseType node.Node Uses []node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *UseList) GetComments() []*comment.Comment { - return n.Comments +func (n *UseList) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/stmt/n_while.go b/node/stmt/n_while.go index 2252928..897425b 100644 --- a/node/stmt/n_while.go +++ b/node/stmt/n_while.go @@ -1,7 +1,7 @@ package stmt import ( - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/walker" @@ -9,7 +9,7 @@ import ( // While node type While struct { - Comments []*comment.Comment + Meta []meta.Meta Position *position.Position Cond node.Node Stmt node.Node @@ -33,15 +33,12 @@ 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) AddMeta(m []meta.Meta) { + n.Meta = append(n.Meta, m...) } -func (n *While) GetComments() []*comment.Comment { - return n.Comments +func (n *While) GetMeta() []meta.Meta { + return n.Meta } // Attributes returns node attributes as map diff --git a/node/t_node_test.go b/node/t_node_test.go index 374dc6a..c58ff60 100644 --- a/node/t_node_test.go +++ b/node/t_node_test.go @@ -5,7 +5,6 @@ import ( "reflect" "testing" - "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/node/name" "github.com/z7zmey/php-parser/position" @@ -730,18 +729,6 @@ 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/parser/comments.go b/parser/comments.go deleted file mode 100644 index d030cd5..0000000 --- a/parser/comments.go +++ /dev/null @@ -1,30 +0,0 @@ -package parser - -import ( - "github.com/z7zmey/php-parser/comment" - "github.com/z7zmey/php-parser/node" - "github.com/z7zmey/php-parser/scanner" -) - -// Comments a collection of comment groups assigned to nodes -type Comments map[node.Node][]*comment.Comment - -// AddComments add comment group to the collection -func (c Comments) AddComments(node node.Node, comments []*comment.Comment) { - c[node] = append(c[node], comments...) -} - -func (c Comments) AddFromToken(node node.Node, token *scanner.Token, tokenName comment.TokenName) { - comments := token.Comments - - for _, cmt := range comments { - cmt.SetTokenName(tokenName) - } - - c.AddComments(node, comments) -} - -func (c Comments) AddFromChildNode(n node.Node, ch node.Node) { - c.AddComments(n, c[ch]) - delete(c, ch) -} diff --git a/parser/comments_test.go b/parser/comments_test.go deleted file mode 100644 index bdec9ef..0000000 --- a/parser/comments_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package parser_test - -import ( - "testing" - - "github.com/z7zmey/php-parser/comment" - "github.com/z7zmey/php-parser/node" - "github.com/z7zmey/php-parser/parser" -) - -func TestComments(t *testing.T) { - n := node.NewIdentifier("test") - - commentGroup := []*comment.Comment{ - comment.NewComment("/** hello world */", nil), - comment.NewComment("// hello world", nil), - } - - comments := parser.Comments{} - comments.AddComments(n, commentGroup) - - if comments[n][0].String() != "/** hello world */" { - t.Errorf("expected and actual are not equal\n") - } - if comments[n][1].String() != "// hello world" { - t.Errorf("expected and actual are not equal\n") - } -} diff --git a/parser/parser.go b/parser/parser.go index 6fbb9c4..7fb233b 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -11,5 +11,5 @@ type Parser interface { GetPath() string GetRootNode() node.Node GetErrors() []*errors.Error - GetComments() Comments + WithMeta() } diff --git a/php5/parser.go b/php5/parser.go index 873112f..ee887f8 100644 --- a/php5/parser.go +++ b/php5/parser.go @@ -3,8 +3,8 @@ package php5 import ( "io" - "github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/errors" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/parser" "github.com/z7zmey/php-parser/scanner" @@ -22,7 +22,6 @@ type Parser struct { positionBuilder *parser.PositionBuilder errors []*errors.Error rootNode node.Node - comments parser.Comments } // NewParser creates and returns new Parser @@ -36,7 +35,6 @@ func NewParser(src io.Reader, path string) *Parser { nil, nil, nil, - nil, } } @@ -51,12 +49,15 @@ func (l *Parser) Error(msg string) { l.errors = append(l.errors, errors.NewError(msg, l.currentToken)) } +func (l *Parser) WithMeta() { + l.Lexer.WithMeta = true +} + // Parse the php7 Parser entrypoint func (l *Parser) Parse() int { // init l.errors = nil l.rootNode = nil - l.comments = parser.Comments{} l.positionBuilder = &parser.PositionBuilder{} // parse @@ -64,14 +65,14 @@ func (l *Parser) Parse() int { return yyParse(l) } -func (l *Parser) listGetFirstNodeComments(list []node.Node) []*comment.Comment { +func (l *Parser) listGetFirstNodeMeta(list []node.Node) []meta.Meta { if len(list) == 0 { return nil } node := list[0] - return l.comments[node] + return node.GetMeta() } // GetPath return path to file @@ -89,11 +90,6 @@ func (l *Parser) GetErrors() []*errors.Error { return l.errors } -// GetComments returns comments list -func (l *Parser) GetComments() parser.Comments { - return l.comments -} - // helpers func lastNode(nn []node.Node) node.Node { @@ -111,6 +107,14 @@ func isDollar(r rune) bool { return r == '$' } +func addMeta(n node.Node, mm []meta.Meta, tn meta.TokenName) { + for _, m := range mm { + m.SetTokenName(tn) + } + + n.AddMeta(mm) +} + func (p *Parser) returnTokenToPool(yyDollar []yySymType, yyVAL *yySymType) { for i := 1; i < len(yyDollar); i++ { if yyDollar[i].token != nil { diff --git a/php5/php5.go b/php5/php5.go index d733f91..431607c 100644 --- a/php5/php5.go +++ b/php5/php5.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/expr" "github.com/z7zmey/php-parser/node/expr/assign" @@ -346,7 +346,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line php5/php5.y:6795 +//line php5/php5.y:6789 type simpleIndirectReference struct { all []*expr.Variable @@ -2362,7 +2362,7 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - namePart.AddComments(yyDollar[1].token.Comments, comment.StringToken) + addMeta(namePart, yyDollar[1].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2377,8 +2377,8 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) - namePart.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.NsSeparatorToken) + addMeta(namePart, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2425,10 +2425,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.HaltCompilerToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2444,8 +2444,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2461,9 +2461,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2477,9 +2477,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2493,8 +2493,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2510,9 +2510,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) + addMeta(useType, yyDollar[2].token.Meta, meta.UseToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2528,9 +2528,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) + addMeta(useType, yyDollar[2].token.Meta, meta.UseToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2544,7 +2544,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2555,7 +2555,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2594,8 +2594,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2611,7 +2611,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition(yyDollar[2].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2629,9 +2629,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AsToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2642,7 +2642,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2681,8 +2681,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2698,7 +2698,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition(yyDollar[2].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2716,9 +2716,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AsToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2729,7 +2729,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2768,8 +2768,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2785,7 +2785,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition(yyDollar[2].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2803,9 +2803,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AsToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2825,9 +2825,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, constList.Consts)) // save comments - 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) + addMeta(lastNode(constList.Consts), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(name, yyDollar[3].token.Meta, meta.StringToken) + addMeta(constant, yyDollar[4].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2846,9 +2846,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, constList)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ConstToken) + addMeta(name, yyDollar[2].token.Meta, meta.StringToken) + addMeta(constant, yyDollar[3].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2913,10 +2913,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.HaltCompilerToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2940,8 +2940,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - label.AddComments(yyDollar[1].token.Comments, comment.StringToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ColonToken) + addMeta(label, yyDollar[1].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2955,8 +2955,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2976,7 +2976,7 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IfToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IfToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2992,10 +2992,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IfToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.EndifToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3016,7 +3016,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.WhileToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.WhileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3030,9 +3030,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DoToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.WhileToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3057,11 +3057,11 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ForToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.ForInitSemicolonToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.ForCondSemicolonToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3084,7 +3084,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SwitchToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SwitchToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3098,8 +3098,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BreakToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.BreakToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3113,8 +3113,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BreakToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.BreakToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3128,8 +3128,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ContinueToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ContinueToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3143,8 +3143,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ContinueToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ContinueToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3158,8 +3158,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ReturnToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3173,8 +3173,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ReturnToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3188,8 +3188,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ReturnToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3203,7 +3203,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3217,8 +3217,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.GlobalToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.GlobalToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3232,8 +3232,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3247,8 +3247,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EchoToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EchoToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3262,7 +3262,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.InlineHTMLToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.InlineHTMLToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3276,7 +3276,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3290,10 +3290,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UnsetToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3329,10 +3329,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[8].node)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ForeachToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.AsToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3368,10 +3368,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[8].node)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ForeachToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.AsToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3385,9 +3385,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DeclareToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3401,7 +3401,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3419,9 +3419,9 @@ yydefault: } // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TryToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3435,8 +3435,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ThrowToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ThrowToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3452,9 +3452,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.GotoToken) + addMeta(label, yyDollar[2].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3481,12 +3481,12 @@ yydefault: catch.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - 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) + addMeta(catch, yyDollar[1].token.Meta, meta.CatchToken) + addMeta(catch, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(variable, yyDollar[4].token.Meta, meta.StringToken) + addMeta(catch, yyDollar[5].token.Meta, meta.CloseParenthesisToken) + addMeta(catch, yyDollar[6].token.Meta, meta.OpenCurlyBracesToken) + addMeta(catch, yyDollar[8].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3508,9 +3508,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FinallyToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3560,12 +3560,12 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.CatchToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(variable, yyDollar[4].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3584,7 +3584,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3648,15 +3648,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[9].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FunctionToken) if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } - 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) + addMeta(name, yyDollar[3].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[9].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3684,9 +3684,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[7].token)) // save comments - 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) + addMeta(name, yyDollar[2].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3702,9 +3702,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - 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) + addMeta(name, yyDollar[2].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3718,7 +3718,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3734,8 +3734,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - classModifier.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ClassToken) + addMeta(classModifier, yyDollar[1].token.Meta, meta.AbstractToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3749,7 +3749,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TraitToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TraitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3765,8 +3765,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - classModifier.AddComments(yyDollar[1].token.Comments, comment.FinalToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ClassToken) + addMeta(classModifier, yyDollar[1].token.Meta, meta.FinalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3788,7 +3788,7 @@ yydefault: yyVAL.ClassExtends.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.ClassExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) + addMeta(yyVAL.ClassExtends, yyDollar[1].token.Meta, meta.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3816,7 +3816,7 @@ yydefault: yyVAL.InterfaceExtends.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yyVAL.InterfaceExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) + addMeta(yyVAL.InterfaceExtends, yyDollar[1].token.Meta, meta.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3838,7 +3838,7 @@ yydefault: yyVAL.ClassImplements.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yyVAL.ClassImplements.AddComments(yyDollar[1].token.Comments, comment.ImplementsToken) + addMeta(yyVAL.ClassImplements, yyDollar[1].token.Meta, meta.ImplementsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3857,7 +3857,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3876,7 +3876,7 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleArrowToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3898,7 +3898,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3912,9 +3912,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ListToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3941,9 +3941,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EndforToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3970,9 +3970,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EndforeachToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3994,9 +3994,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EnddeclareToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4013,8 +4013,8 @@ yydefault: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - name.AddComments(yyDollar[1].token.Comments, comment.StringToken) - constant.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(name, yyDollar[1].token.Meta, meta.StringToken) + addMeta(constant, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4031,9 +4031,9 @@ yydefault: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) // save comments - 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) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(name, yyDollar[3].token.Meta, meta.StringToken) + addMeta(constant, yyDollar[4].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4049,8 +4049,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4066,9 +4066,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) - caseList.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, yyDollar[2].token.Meta, meta.SemiColonToken) + addMeta(caseList, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4084,9 +4084,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(caseList, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(caseList, yyDollar[3].token.Meta, meta.EndswitchToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4103,10 +4103,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - 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) + addMeta(caseList, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(caseList, yyDollar[2].token.Meta, meta.SemiColonToken) + addMeta(caseList, yyDollar[4].token.Meta, meta.EndswitchToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4129,8 +4129,8 @@ yydefault: _case.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) // save comments - _case.AddComments(yyDollar[2].token.Comments, comment.CaseToken) - _case.AddComments(yyDollar[4].token.Comments, comment.CaseSeparatorToken) + addMeta(_case, yyDollar[2].token.Meta, meta.CaseToken) + addMeta(_case, yyDollar[4].token.Meta, meta.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4145,8 +4145,8 @@ yydefault: _default.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[4].list)) // save comments - _default.AddComments(yyDollar[2].token.Comments, comment.DefaultToken) - _default.AddComments(yyDollar[3].token.Comments, comment.CaseSeparatorToken) + addMeta(_default, yyDollar[2].token.Meta, meta.DefaultToken) + addMeta(_default, yyDollar[3].token.Meta, meta.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4185,9 +4185,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EndwhileToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4210,7 +4210,7 @@ yydefault: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[4].node)) // save comments - _elseIf.AddComments(yyDollar[2].token.Comments, comment.ElseifToken) + addMeta(_elseIf, yyDollar[2].token.Meta, meta.ElseifToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4235,8 +4235,8 @@ yydefault: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) // save comments - _elseIf.AddComments(yyDollar[2].token.Comments, comment.ElseifToken) - _elseIf.AddComments(yyDollar[4].token.Comments, comment.ColonToken) + addMeta(_elseIf, yyDollar[2].token.Meta, meta.ElseifToken) + addMeta(_elseIf, yyDollar[4].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4258,7 +4258,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ElseToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ElseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4282,8 +4282,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ElseToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ElseToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4318,7 +4318,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4345,12 +4345,12 @@ yydefault: // save comments if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EllipsisToken) } - variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) + addMeta(variable, yyDollar[4].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4377,13 +4377,13 @@ yydefault: // save comments if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EllipsisToken) } - variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) - yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.EqualToken) + addMeta(variable, yyDollar[4].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4405,7 +4405,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4419,7 +4419,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CallableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4441,8 +4441,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4456,8 +4456,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4473,8 +4473,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4493,7 +4493,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4529,7 +4529,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4543,7 +4543,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EllipsisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4554,7 +4554,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4578,7 +4578,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4592,7 +4592,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4606,9 +4606,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4627,8 +4627,8 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) - variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(variable, yyDollar[3].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4647,9 +4647,9 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) // save comments - 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) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(variable, yyDollar[3].token.Meta, meta.VariableToken) + addMeta(staticVar, yyDollar[4].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4668,7 +4668,7 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4687,8 +4687,8 @@ yydefault: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) - staticVar.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(staticVar, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4718,7 +4718,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4732,7 +4732,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4760,13 +4760,13 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.FunctionToken) if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AmpersandToken) } - 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) + addMeta(name, yyDollar[4].token.Meta, meta.IdentifierToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4787,7 +4787,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4806,7 +4806,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4819,7 +4819,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4832,8 +4832,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4876,7 +4876,7 @@ yydefault: yyVAL.node = yyDollar[1].node // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4887,7 +4887,7 @@ yydefault: yyVAL.node = yyDollar[1].node // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4901,7 +4901,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, yyDollar[3].list)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InsteadofToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4920,7 +4920,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4936,7 +4936,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - name.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) + addMeta(name, yyDollar[1].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4960,8 +4960,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) - target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, yyDollar[3].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4977,8 +4977,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[4].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[4].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4992,7 +4992,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5022,7 +5022,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5036,8 +5036,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5060,7 +5060,7 @@ yydefault: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - modifier.AddComments(yyDollar[1].token.Comments, comment.VarToken) + addMeta(modifier, yyDollar[1].token.Meta, meta.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5106,7 +5106,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PublicToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5120,7 +5120,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ProtectedToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5134,7 +5134,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrivateToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5148,7 +5148,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5162,7 +5162,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5176,7 +5176,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinalToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5195,8 +5195,8 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) - variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(variable, yyDollar[3].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5215,9 +5215,9 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) // save comments - 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) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(variable, yyDollar[3].token.Meta, meta.VariableToken) + addMeta(property, yyDollar[4].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5236,7 +5236,7 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5255,8 +5255,8 @@ yydefault: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) - property.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(property, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5276,9 +5276,9 @@ yydefault: yyDollar[1].node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - 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) + addMeta(lastNode(constList.Consts), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(name, yyDollar[3].token.Meta, meta.IdentifierToken) + addMeta(constant, yyDollar[4].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5296,9 +5296,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ConstToken) + addMeta(name, yyDollar[2].token.Meta, meta.IdentifierToken) + addMeta(constant, yyDollar[3].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5309,7 +5309,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5344,7 +5344,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5383,8 +5383,8 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(fetch, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(fetch, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5399,8 +5399,8 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[2].node)) // save comments - fetch.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) - fetch.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) + addMeta(fetch, yyDollar[1].token.Meta, meta.OpenSquareBracket) + addMeta(fetch, yyDollar[3].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5458,7 +5458,7 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NewToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5474,10 +5474,10 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) // save comments - 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) + addMeta(list, yyDollar[1].token.Meta, meta.ListToken) + addMeta(list, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(list, yyDollar[4].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5491,7 +5491,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5505,8 +5505,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5532,9 +5532,9 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, _new)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AmpersandToken) + addMeta(_new, yyDollar[4].token.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5548,7 +5548,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CloneToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5562,7 +5562,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5576,7 +5576,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5590,7 +5590,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MulEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5604,7 +5604,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5618,7 +5618,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DivEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5632,7 +5632,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ConcatEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5646,7 +5646,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ModEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5660,7 +5660,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AndEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5674,7 +5674,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5688,7 +5688,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.XorEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5702,7 +5702,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5716,7 +5716,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5730,7 +5730,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IncToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5744,7 +5744,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5758,7 +5758,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DecToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5772,7 +5772,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DecToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5786,7 +5786,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanOrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5800,7 +5800,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanAndToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5814,7 +5814,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalOrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5828,7 +5828,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalAndToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5842,7 +5842,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalXorToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5856,7 +5856,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5870,7 +5870,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5884,7 +5884,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CaretToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5898,7 +5898,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DotToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5912,7 +5912,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5926,7 +5926,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5940,7 +5940,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsteriskToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5954,7 +5954,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5968,7 +5968,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlashToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5982,7 +5982,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PercentToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5996,7 +5996,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6010,7 +6010,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6024,7 +6024,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PlusToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6038,7 +6038,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6052,7 +6052,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExclamationMarkToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6066,7 +6066,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TildeToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6080,7 +6080,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsIdenticalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6094,7 +6094,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotIdenticalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6108,7 +6108,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6122,7 +6122,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6136,7 +6136,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LessToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6150,7 +6150,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsSmallerOrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6164,7 +6164,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.GreaterToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6178,7 +6178,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsGreaterOrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6192,7 +6192,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InstanceofToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6238,8 +6238,8 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6253,8 +6253,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.QuestionMarkToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6268,8 +6268,8 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.QuestionMarkToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6291,7 +6291,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IntCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6305,7 +6305,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6319,7 +6319,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6333,7 +6333,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6347,7 +6347,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ObjectCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6361,7 +6361,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BoolCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6375,7 +6375,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UnsetCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6405,17 +6405,13 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExitToken) - - if yyDollar[2].node != nil { - yylex.(*Parser).comments.AddFromChildNode(yyVAL.node, yyDollar[2].node) - } + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ExitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 297: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4063 + //line php5/php5.y:4059 { yyVAL.node = expr.NewErrorSuppress(yyDollar[2].node) @@ -6423,13 +6419,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AtToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 298: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4075 + //line php5/php5.y:4071 { yyVAL.node = yyDollar[1].node @@ -6437,7 +6433,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4081 + //line php5/php5.y:4077 { yyVAL.node = yyDollar[1].node @@ -6445,7 +6441,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4087 + //line php5/php5.y:4083 { yyVAL.node = yyDollar[1].node @@ -6453,7 +6449,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4093 + //line php5/php5.y:4089 { yyVAL.node = expr.NewShellExec(yyDollar[2].list) @@ -6461,14 +6457,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BackquoteToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.BackquoteToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.BackquoteToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 302: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4106 + //line php5/php5.y:4102 { yyVAL.node = expr.NewPrint(yyDollar[2].node) @@ -6476,13 +6472,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrintToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 303: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4118 + //line php5/php5.y:4114 { yyVAL.node = expr.NewYield(nil, nil) @@ -6490,13 +6486,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 304: yyDollar = yyS[yypt-9 : yypt+1] - //line php5/php5.y:4130 + //line php5/php5.y:4126 { yyVAL.node = expr.NewClosure(yyDollar[4].list, yyDollar[6].ClosureUse, nil, yyDollar[8].list, false, yyDollar[2].token != nil, "") @@ -6504,20 +6500,20 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[9].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FunctionToken) if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } - 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) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[9].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 305: yyDollar = yyS[yypt-10 : yypt+1] - //line php5/php5.y:4149 + //line php5/php5.y:4145 { yyVAL.node = expr.NewClosure(yyDollar[5].list, yyDollar[7].ClosureUse, nil, yyDollar[9].list, true, yyDollar[3].token != nil, "") @@ -6525,21 +6521,21 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[10].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.FunctionToken) if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AmpersandToken) } - 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) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[10].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 306: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4172 + //line php5/php5.y:4168 { yyVAL.node = expr.NewYield(nil, yyDollar[2].node) @@ -6547,13 +6543,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 307: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4184 + //line php5/php5.y:4180 { yyVAL.node = expr.NewYield(nil, yyDollar[2].node) @@ -6561,13 +6557,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 308: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4196 + //line php5/php5.y:4192 { yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) @@ -6575,14 +6571,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.DoubleArrowToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 309: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4209 + //line php5/php5.y:4205 { yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) @@ -6590,14 +6586,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.DoubleArrowToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 310: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4225 + //line php5/php5.y:4221 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -6605,14 +6601,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 311: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4238 + //line php5/php5.y:4234 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -6620,14 +6616,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 312: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4251 + //line php5/php5.y:4247 { str := scalar.NewString(yyDollar[1].token.Value) yyVAL.node = expr.NewArrayDimFetch(str, yyDollar[3].node) @@ -6637,14 +6633,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(str, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 313: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4266 + //line php5/php5.y:4262 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -6652,14 +6648,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 314: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4282 + //line php5/php5.y:4278 { yyVAL.node = expr.NewArray(yyDollar[3].list) @@ -6667,15 +6663,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ArrayToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 315: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4296 + //line php5/php5.y:4292 { yyVAL.node = expr.NewShortArray(yyDollar[2].list) @@ -6683,20 +6679,20 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 316: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4312 + //line php5/php5.y:4308 { yyVAL.token = yyDollar[1].token } case 317: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4319 + //line php5/php5.y:4315 { yyVAL.ClosureUse = nil @@ -6704,7 +6700,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4325 + //line php5/php5.y:4321 { yyVAL.ClosureUse = expr.NewClosureUse(yyDollar[3].list) @@ -6714,7 +6710,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4336 + //line php5/php5.y:4332 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[3].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6725,14 +6721,14 @@ yydefault: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) - variable.AddComments(yyDollar[3].token.Comments, comment.VariableToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(variable, yyDollar[3].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 320: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4352 + //line php5/php5.y:4348 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[4].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6745,15 +6741,15 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[3].token, yyDollar[4].token)) // save comments - 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) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(reference, yyDollar[3].token.Meta, meta.VariableToken) + addMeta(variable, yyDollar[4].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 321: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4371 + //line php5/php5.y:4367 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6764,13 +6760,13 @@ yydefault: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 322: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4386 + //line php5/php5.y:4382 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[2].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6783,14 +6779,14 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - reference.AddComments(yyDollar[1].token.Comments, comment.VariableToken) - variable.AddComments(yyDollar[2].token.Comments, comment.VariableToken) + addMeta(reference, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(variable, yyDollar[2].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 323: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4407 + //line php5/php5.y:4403 { name := name.NewName(yyDollar[1].list) yyVAL.node = expr.NewFunctionCall(name, yyDollar[2].node.(*node.ArgumentList)) @@ -6803,7 +6799,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4418 + //line php5/php5.y:4414 { funcName := name.NewRelative(yyDollar[3].list) yyVAL.node = expr.NewFunctionCall(funcName, yyDollar[4].node.(*node.ArgumentList)) @@ -6813,14 +6809,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, yyDollar[4].node)) // save comments - funcName.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - funcName.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + addMeta(funcName, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(funcName, yyDollar[2].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 325: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4433 + //line php5/php5.y:4429 { funcName := name.NewFullyQualified(yyDollar[2].list) yyVAL.node = expr.NewFunctionCall(funcName, yyDollar[3].node.(*node.ArgumentList)) @@ -6830,13 +6826,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, yyDollar[3].node)) // save comments - funcName.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(funcName, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 326: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4447 + //line php5/php5.y:4443 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6844,13 +6840,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 327: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4459 + //line php5/php5.y:4455 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6858,13 +6854,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 328: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4471 + //line php5/php5.y:4467 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6872,13 +6868,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 329: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4483 + //line php5/php5.y:4479 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6886,13 +6882,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 330: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4495 + //line php5/php5.y:4491 { yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].node.(*node.ArgumentList)) @@ -6903,7 +6899,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4507 + //line php5/php5.y:4503 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -6911,13 +6907,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 332: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4519 + //line php5/php5.y:4515 { yyVAL.node = name.NewName(yyDollar[1].list) @@ -6928,7 +6924,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4528 + //line php5/php5.y:4524 { yyVAL.node = name.NewRelative(yyDollar[3].list) @@ -6936,14 +6932,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 334: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4541 + //line php5/php5.y:4537 { yyVAL.node = name.NewFullyQualified(yyDollar[2].list) @@ -6951,13 +6947,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 335: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4556 + //line php5/php5.y:4552 { yyVAL.node = name.NewName(yyDollar[1].list) @@ -6968,7 +6964,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4565 + //line php5/php5.y:4561 { yyVAL.node = name.NewRelative(yyDollar[3].list) @@ -6976,14 +6972,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 337: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4578 + //line php5/php5.y:4574 { yyVAL.node = name.NewFullyQualified(yyDollar[2].list) @@ -6991,13 +6987,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 338: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4593 + //line php5/php5.y:4589 { yyVAL.node = yyDollar[1].node @@ -7005,7 +7001,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4599 + //line php5/php5.y:4595 { yyVAL.node = yyDollar[1].node @@ -7013,12 +7009,12 @@ yydefault: } case 340: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4608 + //line php5/php5.y:4604 { yyVAL.node = yyDollar[1].node // save comments - yyDollar[3].list[0].AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) + addMeta(yyDollar[3].list[0], yyDollar[2].token.Meta, meta.ObjectOperatorToken) for _, n := range yyDollar[3].list { switch nn := n.(type) { @@ -7052,7 +7048,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4645 + //line php5/php5.y:4641 { yyVAL.node = yyDollar[1].node @@ -7060,7 +7056,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4655 + //line php5/php5.y:4651 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -7068,7 +7064,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4661 + //line php5/php5.y:4657 { yyVAL.list = []node.Node{} @@ -7076,18 +7072,18 @@ yydefault: } case 344: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4671 + //line php5/php5.y:4667 { yyVAL.list = yyDollar[2].list // save comments - yyDollar[2].list[0].AddComments(yyDollar[1].token.Comments, comment.ObjectOperatorToken) + addMeta(yyDollar[2].list[0], yyDollar[1].token.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 345: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4683 + //line php5/php5.y:4679 { yyVAL.node = nil @@ -7095,7 +7091,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4689 + //line php5/php5.y:4685 { yyVAL.node = expr.NewExit(nil) @@ -7103,14 +7099,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 347: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4702 + //line php5/php5.y:4698 { yyVAL.node = expr.NewExit(yyDollar[1].node) @@ -7121,7 +7117,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4714 + //line php5/php5.y:4710 { yyVAL.list = []node.Node{} @@ -7129,7 +7125,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4720 + //line php5/php5.y:4716 { yyVAL.list = []node.Node{scalar.NewEncapsedStringPart(yyDollar[1].token.Value)} @@ -7137,7 +7133,7 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4726 + //line php5/php5.y:4722 { yyVAL.list = yyDollar[1].list @@ -7145,7 +7141,7 @@ yydefault: } case 351: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:4735 + //line php5/php5.y:4731 { yyVAL.node = nil @@ -7153,7 +7149,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4741 + //line php5/php5.y:4737 { yyVAL.node = yyDollar[1].node @@ -7161,7 +7157,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4750 + //line php5/php5.y:4746 { yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) @@ -7169,13 +7165,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LnumberToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 354: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4762 + //line php5/php5.y:4758 { yyVAL.node = scalar.NewDnumber(yyDollar[1].token.Value) @@ -7183,13 +7179,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DnumberToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 355: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4774 + //line php5/php5.y:4770 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) @@ -7197,13 +7193,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstantEncapsedStringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 356: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4786 + //line php5/php5.y:4782 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7211,13 +7207,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LineToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 357: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4798 + //line php5/php5.y:4794 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7225,13 +7221,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FileToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 358: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4810 + //line php5/php5.y:4806 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7239,13 +7235,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DirToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 359: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4822 + //line php5/php5.y:4818 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7253,13 +7249,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TraitCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 360: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4834 + //line php5/php5.y:4830 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7267,13 +7263,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MethodCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 361: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4846 + //line php5/php5.y:4842 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7281,13 +7277,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FuncCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 362: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4858 + //line php5/php5.y:4854 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7295,13 +7291,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 363: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4870 + //line php5/php5.y:4866 { encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, []node.Node{encapsed}) @@ -7311,13 +7307,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 364: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4884 + //line php5/php5.y:4880 { yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, nil) @@ -7325,13 +7321,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 365: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4899 + //line php5/php5.y:4895 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -7341,14 +7337,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) - target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, yyDollar[3].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 366: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4917 + //line php5/php5.y:4913 { yyVAL.node = yyDollar[1].node @@ -7356,7 +7352,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4926 + //line php5/php5.y:4922 { yyVAL.node = yyDollar[1].node @@ -7364,7 +7360,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4932 + //line php5/php5.y:4928 { yyVAL.node = yyDollar[1].node @@ -7372,7 +7368,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:4938 + //line php5/php5.y:4934 { name := name.NewName(yyDollar[1].list) yyVAL.node = expr.NewConstFetch(name) @@ -7385,7 +7381,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4949 + //line php5/php5.y:4945 { name := name.NewRelative(yyDollar[3].list) yyVAL.node = expr.NewConstFetch(name) @@ -7395,14 +7391,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 371: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:4964 + //line php5/php5.y:4960 { name := name.NewFullyQualified(yyDollar[2].list) yyVAL.node = expr.NewConstFetch(name) @@ -7412,13 +7408,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 372: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:4978 + //line php5/php5.y:4974 { yyVAL.node = expr.NewArray(yyDollar[3].list) @@ -7426,15 +7422,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ArrayToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 373: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:4992 + //line php5/php5.y:4988 { yyVAL.node = expr.NewShortArray(yyDollar[2].list) @@ -7442,14 +7438,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 374: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5005 + //line php5/php5.y:5001 { yyVAL.node = yyDollar[1].node @@ -7457,7 +7453,7 @@ yydefault: } case 375: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5011 + //line php5/php5.y:5007 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -7465,13 +7461,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 376: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5023 + //line php5/php5.y:5019 { yyVAL.node = yyDollar[1].node @@ -7479,7 +7475,7 @@ yydefault: } case 377: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5032 + //line php5/php5.y:5028 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -7487,14 +7483,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 378: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5045 + //line php5/php5.y:5041 { yyVAL.node = binary.NewPlus(yyDollar[1].node, yyDollar[3].node) @@ -7502,13 +7498,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 379: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5057 + //line php5/php5.y:5053 { yyVAL.node = binary.NewMinus(yyDollar[1].node, yyDollar[3].node) @@ -7516,13 +7512,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 380: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5069 + //line php5/php5.y:5065 { yyVAL.node = binary.NewMul(yyDollar[1].node, yyDollar[3].node) @@ -7530,13 +7526,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsteriskToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 381: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5081 + //line php5/php5.y:5077 { yyVAL.node = binary.NewPow(yyDollar[1].node, yyDollar[3].node) @@ -7544,13 +7540,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 382: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5093 + //line php5/php5.y:5089 { yyVAL.node = binary.NewDiv(yyDollar[1].node, yyDollar[3].node) @@ -7558,13 +7554,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlashToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 383: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5105 + //line php5/php5.y:5101 { yyVAL.node = binary.NewMod(yyDollar[1].node, yyDollar[3].node) @@ -7572,13 +7568,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PercentToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 384: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5117 + //line php5/php5.y:5113 { yyVAL.node = expr.NewBooleanNot(yyDollar[2].node) @@ -7586,13 +7582,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExclamationMarkToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 385: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5129 + //line php5/php5.y:5125 { yyVAL.node = expr.NewBitwiseNot(yyDollar[2].node) @@ -7600,13 +7596,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TildeToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 386: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5141 + //line php5/php5.y:5137 { yyVAL.node = binary.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) @@ -7614,13 +7610,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 387: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5153 + //line php5/php5.y:5149 { yyVAL.node = binary.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) @@ -7628,13 +7624,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 388: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5165 + //line php5/php5.y:5161 { yyVAL.node = binary.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) @@ -7642,13 +7638,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CaretToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 389: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5177 + //line php5/php5.y:5173 { yyVAL.node = binary.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) @@ -7656,13 +7652,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 390: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5189 + //line php5/php5.y:5185 { yyVAL.node = binary.NewShiftRight(yyDollar[1].node, yyDollar[3].node) @@ -7670,13 +7666,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 391: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5201 + //line php5/php5.y:5197 { yyVAL.node = binary.NewConcat(yyDollar[1].node, yyDollar[3].node) @@ -7684,13 +7680,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DotToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 392: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5213 + //line php5/php5.y:5209 { yyVAL.node = binary.NewLogicalXor(yyDollar[1].node, yyDollar[3].node) @@ -7698,13 +7694,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalXorToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 393: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5225 + //line php5/php5.y:5221 { yyVAL.node = binary.NewLogicalAnd(yyDollar[1].node, yyDollar[3].node) @@ -7712,13 +7708,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalAndToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 394: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5237 + //line php5/php5.y:5233 { yyVAL.node = binary.NewLogicalOr(yyDollar[1].node, yyDollar[3].node) @@ -7726,13 +7722,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalOrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 395: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5249 + //line php5/php5.y:5245 { yyVAL.node = binary.NewBooleanAnd(yyDollar[1].node, yyDollar[3].node) @@ -7740,13 +7736,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanAndToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 396: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5261 + //line php5/php5.y:5257 { yyVAL.node = binary.NewBooleanOr(yyDollar[1].node, yyDollar[3].node) @@ -7754,13 +7750,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanOrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 397: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5273 + //line php5/php5.y:5269 { yyVAL.node = binary.NewIdentical(yyDollar[1].node, yyDollar[3].node) @@ -7768,13 +7764,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsIdenticalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 398: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5285 + //line php5/php5.y:5281 { yyVAL.node = binary.NewNotIdentical(yyDollar[1].node, yyDollar[3].node) @@ -7782,13 +7778,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotIdenticalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 399: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5297 + //line php5/php5.y:5293 { yyVAL.node = binary.NewEqual(yyDollar[1].node, yyDollar[3].node) @@ -7796,13 +7792,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 400: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5309 + //line php5/php5.y:5305 { yyVAL.node = binary.NewNotEqual(yyDollar[1].node, yyDollar[3].node) @@ -7810,13 +7806,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 401: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5321 + //line php5/php5.y:5317 { yyVAL.node = binary.NewSmaller(yyDollar[1].node, yyDollar[3].node) @@ -7824,13 +7820,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LessToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 402: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5333 + //line php5/php5.y:5329 { yyVAL.node = binary.NewGreater(yyDollar[1].node, yyDollar[3].node) @@ -7838,13 +7834,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.GreaterToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 403: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5345 + //line php5/php5.y:5341 { yyVAL.node = binary.NewSmallerOrEqual(yyDollar[1].node, yyDollar[3].node) @@ -7852,13 +7848,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsSmallerOrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 404: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5357 + //line php5/php5.y:5353 { yyVAL.node = binary.NewGreaterOrEqual(yyDollar[1].node, yyDollar[3].node) @@ -7866,13 +7862,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsGreaterOrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 405: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5369 + //line php5/php5.y:5365 { yyVAL.node = expr.NewTernary(yyDollar[1].node, nil, yyDollar[4].node) @@ -7880,14 +7876,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.QuestionMarkToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 406: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:5382 + //line php5/php5.y:5378 { yyVAL.node = expr.NewTernary(yyDollar[1].node, yyDollar[3].node, yyDollar[5].node) @@ -7895,14 +7891,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.QuestionMarkToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 407: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5395 + //line php5/php5.y:5391 { yyVAL.node = expr.NewUnaryPlus(yyDollar[2].node) @@ -7910,13 +7906,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PlusToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 408: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5407 + //line php5/php5.y:5403 { yyVAL.node = expr.NewUnaryMinus(yyDollar[2].node) @@ -7924,25 +7920,25 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 409: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5419 + //line php5/php5.y:5415 { yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 410: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5432 + //line php5/php5.y:5428 { yyVAL.node = yyDollar[1].node @@ -7950,7 +7946,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5438 + //line php5/php5.y:5434 { name := name.NewName(yyDollar[1].list) yyVAL.node = expr.NewConstFetch(name) @@ -7963,7 +7959,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5449 + //line php5/php5.y:5445 { name := name.NewRelative(yyDollar[3].list) yyVAL.node = expr.NewConstFetch(name) @@ -7971,14 +7967,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 413: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5462 + //line php5/php5.y:5458 { name := name.NewFullyQualified(yyDollar[2].list) yyVAL.node = expr.NewConstFetch(name) @@ -7988,13 +7984,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 414: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5479 + //line php5/php5.y:5475 { name := node.NewIdentifier(yyDollar[1].token.Value) yyVAL.node = expr.NewVariable(name) @@ -8004,13 +8000,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - name.AddComments(yyDollar[1].token.Comments, comment.StringVarnameToken) + addMeta(name, yyDollar[1].token.Meta, meta.StringVarnameToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 415: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5493 + //line php5/php5.y:5489 { yyVAL.node = yyDollar[1].node @@ -8018,7 +8014,7 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5499 + //line php5/php5.y:5495 { yyVAL.node = yyDollar[1].node @@ -8026,7 +8022,7 @@ yydefault: } case 417: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5505 + //line php5/php5.y:5501 { yyVAL.node = yyDollar[1].node @@ -8034,7 +8030,7 @@ yydefault: } case 418: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5511 + //line php5/php5.y:5507 { yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) @@ -8042,13 +8038,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleQuoteToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 419: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5523 + //line php5/php5.y:5519 { yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, yyDollar[2].list) @@ -8056,13 +8052,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 420: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5535 + //line php5/php5.y:5531 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -8070,13 +8066,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 421: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5550 + //line php5/php5.y:5546 { yyVAL.list = nil @@ -8084,32 +8080,32 @@ yydefault: } case 422: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5556 + //line php5/php5.y:5552 { yyVAL.list = yyDollar[1].list // save comments if yyDollar[2].token != nil { - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 423: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5570 + //line php5/php5.y:5566 { yyVAL.token = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5574 + //line php5/php5.y:5570 { yyVAL.token = yyDollar[1].token } case 425: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:5581 + //line php5/php5.y:5577 { arrayItem := expr.NewArrayItem(yyDollar[3].node, yyDollar[5].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8118,14 +8114,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[5].node)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) - arrayItem.AddComments(yyDollar[4].token.Comments, comment.DoubleArrowToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(arrayItem, yyDollar[4].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 426: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5595 + //line php5/php5.y:5591 { arrayItem := expr.NewArrayItem(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8134,13 +8130,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 427: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5608 + //line php5/php5.y:5604 { arrayItem := expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node) yyVAL.list = []node.Node{arrayItem} @@ -8149,13 +8145,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - arrayItem.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) + addMeta(arrayItem, yyDollar[2].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 428: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5621 + //line php5/php5.y:5617 { arrayItem := expr.NewArrayItem(nil, yyDollar[1].node) yyVAL.list = []node.Node{arrayItem} @@ -8167,7 +8163,7 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5634 + //line php5/php5.y:5630 { yyVAL.node = yyDollar[1].node @@ -8175,7 +8171,7 @@ yydefault: } case 430: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5640 + //line php5/php5.y:5636 { yyVAL.node = yyDollar[1].node @@ -8183,7 +8179,7 @@ yydefault: } case 431: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5649 + //line php5/php5.y:5645 { yyVAL.node = yyDollar[2].node @@ -8191,7 +8187,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5655 + //line php5/php5.y:5651 { yyVAL.node = yyDollar[2].node @@ -8199,7 +8195,7 @@ yydefault: } case 433: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5665 + //line php5/php5.y:5661 { yyVAL.node = yyDollar[1].node @@ -8207,7 +8203,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5675 + //line php5/php5.y:5671 { yyVAL.node = yyDollar[1].node @@ -8215,7 +8211,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5684 + //line php5/php5.y:5680 { yyVAL.node = yyDollar[1].node @@ -8223,7 +8219,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:5693 + //line php5/php5.y:5689 { yyVAL.node = yyDollar[1].node @@ -8233,7 +8229,7 @@ yydefault: } // save comments - yyDollar[3].list[0].AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) + addMeta(yyDollar[3].list[0], yyDollar[2].token.Meta, meta.ObjectOperatorToken) for _, n := range yyDollar[3].list { switch nn := n.(type) { @@ -8277,7 +8273,7 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5745 + //line php5/php5.y:5741 { yyVAL.node = yyDollar[1].node @@ -8285,7 +8281,7 @@ yydefault: } case 438: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5754 + //line php5/php5.y:5750 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -8293,7 +8289,7 @@ yydefault: } case 439: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5760 + //line php5/php5.y:5756 { yyVAL.list = []node.Node{} @@ -8301,7 +8297,7 @@ yydefault: } case 440: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5770 + //line php5/php5.y:5766 { if yyDollar[3].list != nil { yyDollar[3].list[0].(*expr.MethodCall).Method = yyDollar[2].list[len(yyDollar[2].list)-1].(*expr.PropertyFetch).Property @@ -8311,13 +8307,13 @@ yydefault: yyVAL.list = yyDollar[2].list // save comments - yyDollar[2].list[0].AddComments(yyDollar[1].token.Comments, comment.ObjectOperatorToken) + addMeta(yyDollar[2].list[0], yyDollar[1].token.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 441: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5787 + //line php5/php5.y:5783 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, fetch) @@ -8326,14 +8322,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(fetch, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(fetch, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 442: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5801 + //line php5/php5.y:5797 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = []node.Node{yyDollar[1].node, fetch} @@ -8342,14 +8338,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(fetch, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(fetch, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 443: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5818 + //line php5/php5.y:5814 { yyVAL.node = expr.NewMethodCall(nil, nil, yyDollar[1].node.(*node.ArgumentList)) @@ -8360,7 +8356,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5830 + //line php5/php5.y:5826 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -8368,7 +8364,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5836 + //line php5/php5.y:5832 { yyVAL.list = yyDollar[1].list @@ -8376,7 +8372,7 @@ yydefault: } case 446: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:5842 + //line php5/php5.y:5838 { yyVAL.list = nil @@ -8384,7 +8380,7 @@ yydefault: } case 447: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5851 + //line php5/php5.y:5847 { yyVAL.node = yyDollar[1].node @@ -8392,7 +8388,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5857 + //line php5/php5.y:5853 { yyDollar[1].simpleIndirectReference.last.SetVarName(yyDollar[2].node) @@ -8406,7 +8402,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5872 + //line php5/php5.y:5868 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -8414,13 +8410,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 450: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:5884 + //line php5/php5.y:5880 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -8428,13 +8424,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 451: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5899 + //line php5/php5.y:5895 { yyVAL.node = yyDollar[1].node @@ -8442,7 +8438,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5908 + //line php5/php5.y:5904 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8450,14 +8446,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 453: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5921 + //line php5/php5.y:5917 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8465,14 +8461,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 454: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5937 + //line php5/php5.y:5933 { yyVAL.node = yyDollar[1].node @@ -8480,7 +8476,7 @@ yydefault: } case 455: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5943 + //line php5/php5.y:5939 { yyVAL.node = yyDollar[1].node @@ -8488,7 +8484,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5949 + //line php5/php5.y:5945 { yyVAL.node = yyDollar[1].node @@ -8496,7 +8492,7 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5959 + //line php5/php5.y:5955 { yyVAL.node = yyDollar[1].node @@ -8504,7 +8500,7 @@ yydefault: } case 458: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:5965 + //line php5/php5.y:5961 { yyDollar[1].simpleIndirectReference.last.SetVarName(yyDollar[2].node) @@ -8518,7 +8514,7 @@ yydefault: } case 459: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:5977 + //line php5/php5.y:5973 { yyVAL.node = yyDollar[1].node @@ -8526,7 +8522,7 @@ yydefault: } case 460: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5986 + //line php5/php5.y:5982 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8534,14 +8530,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 461: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:5999 + //line php5/php5.y:5995 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -8549,14 +8545,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 462: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6012 + //line php5/php5.y:6008 { yyVAL.node = yyDollar[1].node @@ -8564,7 +8560,7 @@ yydefault: } case 463: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6022 + //line php5/php5.y:6018 { name := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(name) @@ -8574,13 +8570,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 464: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6036 + //line php5/php5.y:6032 { yyVAL.node = expr.NewVariable(yyDollar[3].node) @@ -8588,15 +8584,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 465: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:6053 + //line php5/php5.y:6049 { yyVAL.node = nil @@ -8604,7 +8600,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6059 + //line php5/php5.y:6055 { yyVAL.node = yyDollar[1].node @@ -8612,7 +8608,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6069 + //line php5/php5.y:6065 { yyVAL.list = yyDollar[1].list @@ -8620,7 +8616,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6075 + //line php5/php5.y:6071 { fetch := expr.NewPropertyFetch(nil, yyDollar[1].node) yyVAL.list = []node.Node{fetch} @@ -8632,7 +8628,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6088 + //line php5/php5.y:6084 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, fetch) @@ -8641,14 +8637,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - fetch.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - fetch.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(fetch, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(fetch, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 470: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6102 + //line php5/php5.y:6098 { fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, fetch) @@ -8657,14 +8653,14 @@ yydefault: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - fetch.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) - fetch.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) + addMeta(fetch, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(fetch, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 471: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6116 + //line php5/php5.y:6112 { fetch := expr.NewPropertyFetch(nil, yyDollar[1].node) yyVAL.list = []node.Node{fetch} @@ -8676,7 +8672,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6129 + //line php5/php5.y:6125 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -8684,13 +8680,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 473: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6141 + //line php5/php5.y:6137 { yyVAL.node = yyDollar[2].node @@ -8698,14 +8694,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 474: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6157 + //line php5/php5.y:6153 { n := expr.NewVariable(nil) yyVAL.simpleIndirectReference = simpleIndirectReference{[]*expr.Variable{n}, n} @@ -8714,13 +8710,13 @@ yydefault: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - n.AddComments(yyDollar[1].token.Comments, comment.DollarToken) + addMeta(n, yyDollar[1].token.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 475: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6170 + //line php5/php5.y:6166 { n := expr.NewVariable(nil) @@ -8733,13 +8729,13 @@ yydefault: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[2].token)) // save comments - n.AddComments(yyDollar[2].token.Comments, comment.DollarToken) + addMeta(n, yyDollar[2].token.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 476: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6190 + //line php5/php5.y:6186 { if len(yyDollar[1].list) == 0 { yyDollar[1].list = []node.Node{expr.NewArrayItem(nil, nil)} @@ -8748,15 +8744,13 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - // if lastNode($1) != nil { - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) - // } + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 477: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6205 + //line php5/php5.y:6199 { if yyDollar[1].node.(*expr.ArrayItem).Key == nil && yyDollar[1].node.(*expr.ArrayItem).Val == nil { yyVAL.list = []node.Node{} @@ -8768,7 +8762,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6219 + //line php5/php5.y:6213 { yyVAL.node = expr.NewArrayItem(nil, yyDollar[1].node) @@ -8779,7 +8773,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6228 + //line php5/php5.y:6222 { item := expr.NewList(yyDollar[3].list) yyVAL.node = expr.NewArrayItem(nil, item) @@ -8789,15 +8783,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(item)) // save comments - item.AddComments(yyDollar[1].token.Comments, comment.ListToken) - item.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) - item.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) + addMeta(item, yyDollar[1].token.Meta, meta.ListToken) + addMeta(item, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(item, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 480: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:6244 + //line php5/php5.y:6238 { yyVAL.node = expr.NewArrayItem(nil, nil) @@ -8805,7 +8799,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:6254 + //line php5/php5.y:6248 { yyVAL.list = []node.Node{} @@ -8813,7 +8807,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6260 + //line php5/php5.y:6254 { yyVAL.list = yyDollar[1].list @@ -8823,14 +8817,14 @@ yydefault: // save comments if yyDollar[2].token != nil { - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 483: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:6278 + //line php5/php5.y:6272 { arrayItem := expr.NewArrayItem(yyDollar[3].node, yyDollar[5].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8839,14 +8833,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[5].node)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) - arrayItem.AddComments(yyDollar[4].token.Comments, comment.DoubleArrowToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(arrayItem, yyDollar[4].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 484: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6292 + //line php5/php5.y:6286 { arrayItem := expr.NewArrayItem(nil, yyDollar[3].node) yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8855,13 +8849,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(yyDollar[3].node)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 485: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6305 + //line php5/php5.y:6299 { arrayItem := expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node) yyVAL.list = []node.Node{arrayItem} @@ -8870,13 +8864,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - arrayItem.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) + addMeta(arrayItem, yyDollar[2].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 486: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6318 + //line php5/php5.y:6312 { arrayItem := expr.NewArrayItem(nil, yyDollar[1].node) yyVAL.list = []node.Node{arrayItem} @@ -8888,7 +8882,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:6328 + //line php5/php5.y:6322 { reference := expr.NewReference(yyDollar[6].node) arrayItem := expr.NewArrayItem(yyDollar[3].node, reference) @@ -8899,15 +8893,15 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[6].node)) // save comments - 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) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(arrayItem, yyDollar[4].token.Meta, meta.DoubleArrowToken) + addMeta(reference, yyDollar[5].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 488: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6345 + //line php5/php5.y:6339 { reference := expr.NewReference(yyDollar[4].node) arrayItem := expr.NewArrayItem(nil, reference) @@ -8918,14 +8912,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[4].node)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) - reference.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) + addMeta(reference, yyDollar[3].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 489: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6361 + //line php5/php5.y:6355 { reference := expr.NewReference(yyDollar[4].node) arrayItem := expr.NewArrayItem(yyDollar[1].node, reference) @@ -8936,14 +8930,14 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - arrayItem.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) - reference.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(arrayItem, yyDollar[2].token.Meta, meta.DoubleArrowToken) + addMeta(reference, yyDollar[3].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 490: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6377 + //line php5/php5.y:6371 { reference := expr.NewReference(yyDollar[2].node) arrayItem := expr.NewArrayItem(nil, reference) @@ -8954,13 +8948,13 @@ yydefault: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - reference.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) + addMeta(reference, yyDollar[1].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 491: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6395 + //line php5/php5.y:6389 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -8968,7 +8962,7 @@ yydefault: } case 492: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6401 + //line php5/php5.y:6395 { encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) yyVAL.list = append(yyDollar[1].list, encapsed) @@ -8977,13 +8971,13 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[2].token)) // save comments - encapsed.AddComments(yyDollar[2].token.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, yyDollar[2].token.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 493: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6414 + //line php5/php5.y:6408 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -8991,7 +8985,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6420 + //line php5/php5.y:6414 { encapsed := scalar.NewEncapsedStringPart(yyDollar[1].token.Value) yyVAL.list = []node.Node{encapsed, yyDollar[2].node} @@ -9000,13 +8994,13 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - encapsed.AddComments(yyDollar[1].token.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, yyDollar[1].token.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 495: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6436 + //line php5/php5.y:6430 { name := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(name) @@ -9016,13 +9010,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 496: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6450 + //line php5/php5.y:6444 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -9034,15 +9028,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 497: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6468 + //line php5/php5.y:6462 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -9056,15 +9050,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - 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) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ObjectOperatorToken) + addMeta(fetch, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 498: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6488 + //line php5/php5.y:6482 { yyVAL.node = expr.NewVariable(yyDollar[2].node) @@ -9072,14 +9066,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 499: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6501 + //line php5/php5.y:6495 { name := node.NewIdentifier(yyDollar[2].token.Value) yyVAL.node = expr.NewVariable(name) @@ -9089,15 +9083,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(name, yyDollar[2].token.Meta, meta.StringVarnameToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 500: yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:6517 + //line php5/php5.y:6511 { identifier := node.NewIdentifier(yyDollar[2].token.Value) variable := expr.NewVariable(identifier) @@ -9109,17 +9103,17 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(variable, yyDollar[2].token.Meta, meta.StringVarnameToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 501: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6537 + //line php5/php5.y:6531 { yyVAL.node = yyDollar[2].node @@ -9127,7 +9121,7 @@ yydefault: } case 502: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6546 + //line php5/php5.y:6540 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) @@ -9135,13 +9129,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 503: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6558 + //line php5/php5.y:6552 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(yyDollar[1].token.Value); err == nil { @@ -9154,13 +9148,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NumStringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 504: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6575 + //line php5/php5.y:6569 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(identifier) @@ -9170,13 +9164,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 505: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6592 + //line php5/php5.y:6586 { yyVAL.node = expr.NewIsset(yyDollar[3].list) @@ -9184,15 +9178,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IssetToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 506: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6606 + //line php5/php5.y:6600 { yyVAL.node = expr.NewEmpty(yyDollar[3].node) @@ -9200,15 +9194,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EmptyToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 507: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6620 + //line php5/php5.y:6614 { yyVAL.node = expr.NewEmpty(yyDollar[3].node) @@ -9216,15 +9210,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EmptyToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 508: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6634 + //line php5/php5.y:6628 { yyVAL.node = expr.NewInclude(yyDollar[2].node) @@ -9232,13 +9226,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 509: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6646 + //line php5/php5.y:6640 { yyVAL.node = expr.NewIncludeOnce(yyDollar[2].node) @@ -9246,13 +9240,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeOnceToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 510: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:6658 + //line php5/php5.y:6652 { yyVAL.node = expr.NewEval(yyDollar[3].node) @@ -9260,15 +9254,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EvalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 511: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6672 + //line php5/php5.y:6666 { yyVAL.node = expr.NewRequire(yyDollar[2].node) @@ -9276,13 +9270,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 512: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:6684 + //line php5/php5.y:6678 { yyVAL.node = expr.NewRequireOnce(yyDollar[2].node) @@ -9290,13 +9284,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireOnceToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 513: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6699 + //line php5/php5.y:6693 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -9304,18 +9298,18 @@ yydefault: } case 514: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6705 + //line php5/php5.y:6699 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 515: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6717 + //line php5/php5.y:6711 { yyVAL.node = yyDollar[1].node @@ -9323,7 +9317,7 @@ yydefault: } case 516: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:6723 + //line php5/php5.y:6717 { yyVAL.node = yyDollar[1].node @@ -9331,7 +9325,7 @@ yydefault: } case 517: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6732 + //line php5/php5.y:6726 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9341,13 +9335,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 518: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6746 + //line php5/php5.y:6740 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9357,13 +9351,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 519: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6763 + //line php5/php5.y:6757 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9373,13 +9367,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 520: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:6780 + //line php5/php5.y:6774 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -9389,7 +9383,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/php5/php5.y b/php5/php5.y index ac1ef60..fa5bc7e 100644 --- a/php5/php5.y +++ b/php5/php5.y @@ -5,7 +5,7 @@ import ( "strings" "strconv" - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/scanner" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/scalar" @@ -313,7 +313,7 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - namePart.AddComments($1.Comments, comment.StringToken) + addMeta(namePart, $1.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -326,8 +326,8 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - lastNode($1).AddComments($2.Comments, comment.NsSeparatorToken) - namePart.AddComments($3.Comments, comment.StringToken) + addMeta(lastNode($1), $2.Meta, meta.NsSeparatorToken) + addMeta(namePart, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -367,10 +367,10 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.HaltCompilerToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.HaltCompilerToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -384,8 +384,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -399,9 +399,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($5.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $3.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $5.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -413,9 +413,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -427,8 +427,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -442,9 +442,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - useType.AddComments($2.Comments, comment.UseToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta(useType, $2.Meta, meta.UseToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -458,9 +458,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - useType.AddComments($2.Comments, comment.UseToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta(useType, $2.Meta, meta.UseToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -472,7 +472,7 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -484,7 +484,7 @@ use_declarations: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -520,8 +520,8 @@ use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($3.Comments, comment.StringToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -535,7 +535,7 @@ use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition($2)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -551,9 +551,9 @@ use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($2, $4)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) - $$.AddComments($3.Comments, comment.AsToken) - $$.AddComments($4.Comments, comment.StringToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) + addMeta($$, $3.Meta, meta.AsToken) + addMeta($$, $4.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -565,7 +565,7 @@ use_function_declarations: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -601,8 +601,8 @@ use_function_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($3.Comments, comment.StringToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -616,7 +616,7 @@ use_function_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition($2)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -632,9 +632,9 @@ use_function_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($2, $4)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) - $$.AddComments($3.Comments, comment.AsToken) - $$.AddComments($4.Comments, comment.StringToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) + addMeta($$, $3.Meta, meta.AsToken) + addMeta($$, $4.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -646,7 +646,7 @@ use_const_declarations: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -682,8 +682,8 @@ use_const_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($3.Comments, comment.StringToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -697,7 +697,7 @@ use_const_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListPosition($2)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -713,9 +713,9 @@ use_const_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($2, $4)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) - $$.AddComments($3.Comments, comment.AsToken) - $$.AddComments($4.Comments, comment.StringToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) + addMeta($$, $3.Meta, meta.AsToken) + addMeta($$, $4.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -736,9 +736,9 @@ constant_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition($1, constList.Consts)) // save comments - lastNode(constList.Consts).AddComments($2.Comments, comment.CommaToken) - name.AddComments($3.Comments, comment.StringToken) - constant.AddComments($4.Comments, comment.EqualToken) + addMeta(lastNode(constList.Consts), $2.Meta, meta.CommaToken) + addMeta(name, $3.Meta, meta.StringToken) + addMeta(constant, $4.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -755,9 +755,9 @@ constant_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, constList)) // save comments - $$.AddComments($1.Comments, comment.ConstToken) - name.AddComments($2.Comments, comment.StringToken) - constant.AddComments($3.Comments, comment.EqualToken) + addMeta($$, $1.Meta, meta.ConstToken) + addMeta(name, $2.Meta, meta.StringToken) + addMeta(constant, $3.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -815,10 +815,10 @@ inner_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.HaltCompilerToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.HaltCompilerToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -842,8 +842,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - label.AddComments($1.Comments, comment.StringToken) - $$.AddComments($2.Comments, comment.ColonToken) + addMeta(label, $1.Meta, meta.StringToken) + addMeta($$, $2.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -858,8 +858,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -877,7 +877,7 @@ unticked_statement: } // save comments - $$.AddComments($1.Comments, comment.IfToken) + addMeta($$, $1.Meta, meta.IfToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -891,10 +891,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - $$.AddComments($1.Comments, comment.IfToken) - $$.AddComments($3.Comments, comment.ColonToken) - $$.AddComments($7.Comments, comment.EndifToken) - $$.AddComments($8.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.IfToken) + addMeta($$, $3.Meta, meta.ColonToken) + addMeta($$, $7.Meta, meta.EndifToken) + addMeta($$, $8.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -913,7 +913,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.WhileToken) + addMeta($$, $1.Meta, meta.WhileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -925,9 +925,9 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.DoToken) - $$.AddComments($3.Comments, comment.WhileToken) - $$.AddComments($5.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.DoToken) + addMeta($$, $3.Meta, meta.WhileToken) + addMeta($$, $5.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -950,11 +950,11 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $9)) // save comments - $$.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) + addMeta($$, $1.Meta, meta.ForToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.ForInitSemicolonToken) + addMeta($$, $6.Meta, meta.ForCondSemicolonToken) + addMeta($$, $8.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -975,7 +975,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.SwitchToken) + addMeta($$, $1.Meta, meta.SwitchToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -987,8 +987,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.BreakToken) - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.BreakToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1000,8 +1000,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.BreakToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.BreakToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1013,8 +1013,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ContinueToken) - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ContinueToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1026,8 +1026,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ContinueToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ContinueToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1039,8 +1039,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ReturnToken) - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ReturnToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1052,8 +1052,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ReturnToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ReturnToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1065,8 +1065,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ReturnToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ReturnToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1078,7 +1078,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1090,8 +1090,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.GlobalToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.GlobalToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1103,8 +1103,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.StaticToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1116,8 +1116,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.EchoToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.EchoToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1129,7 +1129,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.InlineHTMLToken) + addMeta($$, $1.Meta, meta.InlineHTMLToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1141,7 +1141,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1153,10 +1153,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.UnsetToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) - $$.AddComments($5.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UnsetToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) + addMeta($$, $5.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1190,10 +1190,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $8)) // save comments - $$.AddComments($1.Comments, comment.ForeachToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.AsToken) - $$.AddComments($7.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ForeachToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.AsToken) + addMeta($$, $7.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1227,10 +1227,10 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $8)) // save comments - $$.AddComments($1.Comments, comment.ForeachToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.AsToken) - $$.AddComments($7.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ForeachToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.AsToken) + addMeta($$, $7.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1242,9 +1242,9 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.DeclareToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.DeclareToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1256,7 +1256,7 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1272,9 +1272,9 @@ unticked_statement: } // save comments - $$.AddComments($1.Comments, comment.TryToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.TryToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1286,8 +1286,8 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ThrowToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ThrowToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1301,9 +1301,9 @@ unticked_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.GotoToken) - label.AddComments($2.Comments, comment.StringToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.GotoToken) + addMeta(label, $2.Meta, meta.StringToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1329,12 +1329,12 @@ catch_statement: catch.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - 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) + addMeta(catch, $1.Meta, meta.CatchToken) + addMeta(catch, $2.Meta, meta.OpenParenthesisToken) + addMeta(variable, $4.Meta, meta.StringToken) + addMeta(catch, $5.Meta, meta.CloseParenthesisToken) + addMeta(catch, $6.Meta, meta.OpenCurlyBracesToken) + addMeta(catch, $8.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1355,9 +1355,9 @@ finally_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.FinallyToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.FinallyToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1406,12 +1406,12 @@ additional_catch: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - $$.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) + addMeta($$, $1.Meta, meta.CatchToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta(variable, $4.Meta, meta.StringToken) + addMeta($$, $5.Meta, meta.CloseParenthesisToken) + addMeta($$, $6.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $8.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1429,7 +1429,7 @@ unset_variables: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1495,15 +1495,15 @@ unticked_function_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $9)) // save comments - $$.AddComments($1.Comments, comment.FunctionToken) + addMeta($$, $1.Meta, meta.FunctionToken) if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } - 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) + addMeta(name, $3.Meta, meta.StringToken) + addMeta($$, $4.Meta, meta.OpenParenthesisToken) + addMeta($$, $6.Meta, meta.CloseParenthesisToken) + addMeta($$, $7.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $9.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1532,9 +1532,9 @@ unticked_class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $7)) // save comments - name.AddComments($2.Comments, comment.StringToken) - $$.AddComments($5.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) + addMeta(name, $2.Meta, meta.StringToken) + addMeta($$, $5.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $7.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1548,9 +1548,9 @@ unticked_class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - name.AddComments($2.Comments, comment.StringToken) - $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) + addMeta(name, $2.Meta, meta.StringToken) + addMeta($$, $4.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $6.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1566,7 +1566,7 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ClassToken) + addMeta($$, $1.Meta, meta.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1580,8 +1580,8 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - classModifier.AddComments($1.Comments, comment.AbstractToken) - $$.AddComments($2.Comments, comment.ClassToken) + addMeta(classModifier, $1.Meta, meta.AbstractToken) + addMeta($$, $2.Meta, meta.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1593,7 +1593,7 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.TraitToken) + addMeta($$, $1.Meta, meta.TraitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1607,8 +1607,8 @@ class_entry_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - classModifier.AddComments($1.Comments, comment.FinalToken) - $$.AddComments($2.Comments, comment.ClassToken) + addMeta(classModifier, $1.Meta, meta.FinalToken) + addMeta($$, $2.Meta, meta.ClassToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1629,7 +1629,7 @@ extends_from: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ExtendsToken) + addMeta($$, $1.Meta, meta.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1657,7 +1657,7 @@ interface_extends_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ExtendsToken) + addMeta($$, $1.Meta, meta.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1678,7 +1678,7 @@ implements_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ImplementsToken) + addMeta($$, $1.Meta, meta.ImplementsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1696,7 +1696,7 @@ interface_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1714,7 +1714,7 @@ foreach_optional_arg: $$ = $2 // save comments - $$.AddComments($1.Comments, comment.DoubleArrowToken) + addMeta($$, $1.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1735,7 +1735,7 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.AmpersandToken) + addMeta($$, $1.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1747,9 +1747,9 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ListToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ListToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1775,9 +1775,9 @@ for_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EndforToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EndforToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1803,9 +1803,9 @@ foreach_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EndforeachToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EndforeachToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1827,9 +1827,9 @@ declare_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EnddeclareToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EnddeclareToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1848,8 +1848,8 @@ declare_list: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - name.AddComments($1.Comments, comment.StringToken) - constant.AddComments($2.Comments, comment.EqualToken) + addMeta(name, $1.Meta, meta.StringToken) + addMeta(constant, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1864,9 +1864,9 @@ declare_list: constant.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $5)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - name.AddComments($3.Comments, comment.StringToken) - constant.AddComments($4.Comments, comment.EqualToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(name, $3.Meta, meta.StringToken) + addMeta(constant, $4.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1884,8 +1884,8 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, $1.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1899,9 +1899,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments($2.Comments, comment.SemiColonToken) - caseList.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, $1.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, $2.Meta, meta.SemiColonToken) + addMeta(caseList, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1915,9 +1915,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - caseList.AddComments($1.Comments, comment.ColonToken) - caseList.AddComments($3.Comments, comment.EndswitchToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta(caseList, $1.Meta, meta.ColonToken) + addMeta(caseList, $3.Meta, meta.EndswitchToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1932,10 +1932,10 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - caseList.AddComments($1.Comments, comment.ColonToken) - caseList.AddComments($2.Comments, comment.SemiColonToken) - caseList.AddComments($4.Comments, comment.EndswitchToken) - $$.AddComments($5.Comments, comment.SemiColonToken) + addMeta(caseList, $1.Meta, meta.ColonToken) + addMeta(caseList, $2.Meta, meta.SemiColonToken) + addMeta(caseList, $4.Meta, meta.EndswitchToken) + addMeta($$, $5.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1958,8 +1958,8 @@ case_list: _case.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $5)) // save comments - _case.AddComments($2.Comments, comment.CaseToken) - _case.AddComments($4.Comments, comment.CaseSeparatorToken) + addMeta(_case, $2.Meta, meta.CaseToken) + addMeta(_case, $4.Meta, meta.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1972,8 +1972,8 @@ case_list: _default.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $4)) // save comments - _default.AddComments($2.Comments, comment.DefaultToken) - _default.AddComments($3.Comments, comment.CaseSeparatorToken) + addMeta(_default, $2.Meta, meta.DefaultToken) + addMeta(_default, $3.Meta, meta.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2012,9 +2012,9 @@ while_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EndwhileToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EndwhileToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2038,7 +2038,7 @@ elseif_list: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($2, $4)) // save comments - _elseIf.AddComments($2.Comments, comment.ElseifToken) + addMeta(_elseIf, $2.Meta, meta.ElseifToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2063,8 +2063,8 @@ new_elseif_list: _elseIf.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $5)) // save comments - _elseIf.AddComments($2.Comments, comment.ElseifToken) - _elseIf.AddComments($4.Comments, comment.ColonToken) + addMeta(_elseIf, $2.Meta, meta.ElseifToken) + addMeta(_elseIf, $4.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2086,7 +2086,7 @@ else_single: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ElseToken) + addMeta($$, $1.Meta, meta.ElseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2110,8 +2110,8 @@ new_else_single: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ElseToken) - $$.AddComments($2.Comments, comment.ColonToken) + addMeta($$, $1.Meta, meta.ElseToken) + addMeta($$, $2.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2145,7 +2145,7 @@ non_empty_parameter_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2173,12 +2173,12 @@ parameter: // save comments if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } if $3 != nil { - $$.AddComments($3.Comments, comment.EllipsisToken) + addMeta($$, $3.Meta, meta.EllipsisToken) } - variable.AddComments($4.Comments, comment.VariableToken) + addMeta(variable, $4.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2203,13 +2203,13 @@ parameter: // save comments if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } if $3 != nil { - $$.AddComments($3.Comments, comment.EllipsisToken) + addMeta($$, $3.Meta, meta.EllipsisToken) } - variable.AddComments($4.Comments, comment.VariableToken) - $$.AddComments($5.Comments, comment.EqualToken) + addMeta(variable, $4.Meta, meta.VariableToken) + addMeta($$, $5.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2231,7 +2231,7 @@ optional_class_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ArrayToken) + addMeta($$, $1.Meta, meta.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2243,7 +2243,7 @@ optional_class_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.CallableToken) + addMeta($$, $1.Meta, meta.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2265,8 +2265,8 @@ function_call_parameter_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($2.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $2.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2278,8 +2278,8 @@ function_call_parameter_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2293,8 +2293,8 @@ function_call_parameter_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2313,7 +2313,7 @@ non_empty_function_call_parameter_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2346,7 +2346,7 @@ function_call_parameter: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($2)) // save comments - $$.AddComments($1.Comments, comment.AmpersandToken) + addMeta($$, $1.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2358,7 +2358,7 @@ function_call_parameter: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.EllipsisToken) + addMeta($$, $1.Meta, meta.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2370,7 +2370,7 @@ global_var_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2394,7 +2394,7 @@ global_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2406,7 +2406,7 @@ global_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.DollarToken) + addMeta($$, $1.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2418,9 +2418,9 @@ global_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.DollarToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.DollarToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2441,8 +2441,8 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - variable.AddComments($3.Comments, comment.VariableToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(variable, $3.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2459,9 +2459,9 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $5)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - variable.AddComments($3.Comments, comment.VariableToken) - staticVar.AddComments($4.Comments, comment.EqualToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(variable, $3.Meta, meta.VariableToken) + addMeta(staticVar, $4.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2478,7 +2478,7 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) + addMeta(variable, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2495,8 +2495,8 @@ static_var_list: staticVar.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - staticVar.AddComments($2.Comments, comment.EqualToken) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta(staticVar, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2528,7 +2528,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2540,7 +2540,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2564,13 +2564,13 @@ class_statement: } // save comments - $$.AddComments($2.Comments, comment.FunctionToken) + addMeta($$, $2.Meta, meta.FunctionToken) if $3 != nil { - $$.AddComments($3.Comments, comment.AmpersandToken) + addMeta($$, $3.Meta, meta.AmpersandToken) } - name.AddComments($4.Comments, comment.IdentifierToken) - $$.AddComments($5.Comments, comment.OpenParenthesisToken) - $$.AddComments($7.Comments, comment.CloseParenthesisToken) + addMeta(name, $4.Meta, meta.IdentifierToken) + addMeta($$, $5.Meta, meta.OpenParenthesisToken) + addMeta($$, $7.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2592,7 +2592,7 @@ trait_use_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.UseToken) + addMeta($$, $1.Meta, meta.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2610,7 +2610,7 @@ trait_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2624,7 +2624,7 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2636,8 +2636,8 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2679,7 +2679,7 @@ trait_adaptation_statement: $$ = $1; // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2688,7 +2688,7 @@ trait_adaptation_statement: $$ = $1; // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2703,7 +2703,7 @@ trait_precedence: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.InsteadofToken) + addMeta($$, $2.Meta, meta.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2721,7 +2721,7 @@ trait_reference_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2738,7 +2738,7 @@ trait_method_reference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - name.AddComments($1.Comments, comment.IdentifierToken) + addMeta(name, $1.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2761,8 +2761,8 @@ trait_method_reference_fully_qualified: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) - target.AddComments($3.Comments, comment.IdentifierToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, $3.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2779,8 +2779,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($4.Comments, comment.IdentifierToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $4.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2792,7 +2792,7 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) + addMeta($$, $2.Meta, meta.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2822,7 +2822,7 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2834,8 +2834,8 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2857,7 +2857,7 @@ variable_modifiers: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - modifier.AddComments($1.Comments, comment.VarToken) + addMeta(modifier, $1.Meta, meta.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2902,7 +2902,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.PublicToken) + addMeta($$, $1.Meta, meta.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2914,7 +2914,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ProtectedToken) + addMeta($$, $1.Meta, meta.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2926,7 +2926,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.PrivateToken) + addMeta($$, $1.Meta, meta.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2938,7 +2938,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) + addMeta($$, $1.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2950,7 +2950,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.AbstractToken) + addMeta($$, $1.Meta, meta.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2962,7 +2962,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FinalToken) + addMeta($$, $1.Meta, meta.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2982,8 +2982,8 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - variable.AddComments($3.Comments, comment.VariableToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(variable, $3.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3000,9 +3000,9 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $5)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - variable.AddComments($3.Comments, comment.VariableToken) - property.AddComments($4.Comments, comment.EqualToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(variable, $3.Meta, meta.VariableToken) + addMeta(property, $4.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3019,7 +3019,7 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) + addMeta(variable, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3036,8 +3036,8 @@ class_variable_declaration: property.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - property.AddComments($2.Comments, comment.EqualToken) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta(property, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3058,9 +3058,9 @@ class_constant_declaration: $1.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - lastNode(constList.Consts).AddComments($2.Comments, comment.CommaToken) - name.AddComments($3.Comments, comment.IdentifierToken) - constant.AddComments($4.Comments, comment.EqualToken) + addMeta(lastNode(constList.Consts), $2.Meta, meta.CommaToken) + addMeta(name, $3.Meta, meta.IdentifierToken) + addMeta(constant, $4.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3076,9 +3076,9 @@ class_constant_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ConstToken) - name.AddComments($2.Comments, comment.IdentifierToken) - constant.AddComments($3.Comments, comment.EqualToken) + addMeta($$, $1.Meta, meta.ConstToken) + addMeta(name, $2.Meta, meta.IdentifierToken) + addMeta(constant, $3.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3090,7 +3090,7 @@ echo_expr_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3124,7 +3124,7 @@ non_empty_for_expr: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3161,8 +3161,8 @@ chaining_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - fetch.AddComments($2.Comments, comment.OpenSquareBracket) - fetch.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta(fetch, $2.Meta, meta.OpenSquareBracket) + addMeta(fetch, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3175,8 +3175,8 @@ chaining_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($2)) // save comments - fetch.AddComments($1.Comments, comment.OpenSquareBracket) - fetch.AddComments($3.Comments, comment.CloseSquareBracket) + addMeta(fetch, $1.Meta, meta.OpenSquareBracket) + addMeta(fetch, $3.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3231,7 +3231,7 @@ new_expr: } // save comments - $$.AddComments($1.Comments, comment.NewToken) + addMeta($$, $1.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3248,10 +3248,10 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $6)) // save comments - list.AddComments($1.Comments, comment.ListToken) - list.AddComments($2.Comments, comment.OpenParenthesisToken) - list.AddComments($4.Comments, comment.CloseParenthesisToken) - $$.AddComments($5.Comments, comment.EqualToken) + addMeta(list, $1.Meta, meta.ListToken) + addMeta(list, $2.Meta, meta.OpenParenthesisToken) + addMeta(list, $4.Meta, meta.CloseParenthesisToken) + addMeta($$, $5.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3263,7 +3263,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.EqualToken) + addMeta($$, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3275,8 +3275,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.EqualToken) - $$.AddComments($3.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.EqualToken) + addMeta($$, $3.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3300,9 +3300,9 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, _new)) // save comments - $$.AddComments($2.Comments, comment.EqualToken) - $$.AddComments($3.Comments, comment.AmpersandToken) - _new.AddComments($4.Comments, comment.NewToken) + addMeta($$, $2.Meta, meta.EqualToken) + addMeta($$, $3.Meta, meta.AmpersandToken) + addMeta(_new, $4.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3314,7 +3314,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.CloneToken) + addMeta($$, $1.Meta, meta.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3326,7 +3326,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PlusEqualToken) + addMeta($$, $2.Meta, meta.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3338,7 +3338,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.MinusEqualToken) + addMeta($$, $2.Meta, meta.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3350,7 +3350,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.MulEqualToken) + addMeta($$, $2.Meta, meta.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3362,7 +3362,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PowEqualToken) + addMeta($$, $2.Meta, meta.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3374,7 +3374,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.DivEqualToken) + addMeta($$, $2.Meta, meta.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3386,7 +3386,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.ConcatEqualToken) + addMeta($$, $2.Meta, meta.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3398,7 +3398,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.ModEqualToken) + addMeta($$, $2.Meta, meta.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3410,7 +3410,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AndEqualToken) + addMeta($$, $2.Meta, meta.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3422,7 +3422,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.OrEqualToken) + addMeta($$, $2.Meta, meta.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3434,7 +3434,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.XorEqualToken) + addMeta($$, $2.Meta, meta.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3446,7 +3446,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlEqualToken) + addMeta($$, $2.Meta, meta.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3458,7 +3458,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SrEqualToken) + addMeta($$, $2.Meta, meta.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3470,7 +3470,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.IncToken) + addMeta($$, $2.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3482,7 +3482,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IncToken) + addMeta($$, $1.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3494,7 +3494,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.DecToken) + addMeta($$, $2.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3506,7 +3506,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.DecToken) + addMeta($$, $1.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3518,7 +3518,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.BooleanOrToken) + addMeta($$, $2.Meta, meta.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3530,7 +3530,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.BooleanAndToken) + addMeta($$, $2.Meta, meta.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3542,7 +3542,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalOrToken) + addMeta($$, $2.Meta, meta.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3554,7 +3554,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalAndToken) + addMeta($$, $2.Meta, meta.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3566,7 +3566,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalXorToken) + addMeta($$, $2.Meta, meta.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3578,7 +3578,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.VerticalBarToken) + addMeta($$, $2.Meta, meta.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3590,7 +3590,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3602,7 +3602,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.CaretToken) + addMeta($$, $2.Meta, meta.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3614,7 +3614,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.DotToken) + addMeta($$, $2.Meta, meta.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3626,7 +3626,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PlusToken) + addMeta($$, $2.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3638,7 +3638,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.MinusToken) + addMeta($$, $2.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3650,7 +3650,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsteriskToken) + addMeta($$, $2.Meta, meta.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3662,7 +3662,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PowToken) + addMeta($$, $2.Meta, meta.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3674,7 +3674,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlashToken) + addMeta($$, $2.Meta, meta.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3686,7 +3686,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PercentToken) + addMeta($$, $2.Meta, meta.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3698,7 +3698,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlToken) + addMeta($$, $2.Meta, meta.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3710,7 +3710,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SrToken) + addMeta($$, $2.Meta, meta.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3722,7 +3722,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.PlusToken) + addMeta($$, $1.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3734,7 +3734,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.MinusToken) + addMeta($$, $1.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3746,7 +3746,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ExclamationMarkToken) + addMeta($$, $1.Meta, meta.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3758,7 +3758,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.TildeToken) + addMeta($$, $1.Meta, meta.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3770,7 +3770,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsIdenticalToken) + addMeta($$, $2.Meta, meta.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3782,7 +3782,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsNotIdenticalToken) + addMeta($$, $2.Meta, meta.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3794,7 +3794,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsEqualToken) + addMeta($$, $2.Meta, meta.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3806,7 +3806,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsNotEqualToken) + addMeta($$, $2.Meta, meta.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3818,7 +3818,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LessToken) + addMeta($$, $2.Meta, meta.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3830,7 +3830,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsSmallerOrEqualToken) + addMeta($$, $2.Meta, meta.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3842,7 +3842,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.GreaterToken) + addMeta($$, $2.Meta, meta.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3854,7 +3854,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsGreaterOrEqualToken) + addMeta($$, $2.Meta, meta.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3866,7 +3866,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.InstanceofToken) + addMeta($$, $2.Meta, meta.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3906,8 +3906,8 @@ expr_without_variable: } // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3919,8 +3919,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - $$.AddComments($2.Comments, comment.QuestionMarkToken) - $$.AddComments($4.Comments, comment.ColonToken) + addMeta($$, $2.Meta, meta.QuestionMarkToken) + addMeta($$, $4.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3932,8 +3932,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.QuestionMarkToken) - $$.AddComments($3.Comments, comment.ColonToken) + addMeta($$, $2.Meta, meta.QuestionMarkToken) + addMeta($$, $3.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3951,7 +3951,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IntCastToken) + addMeta($$, $1.Meta, meta.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3963,7 +3963,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.DoubleCastToken) + addMeta($$, $1.Meta, meta.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3975,7 +3975,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.StringCastToken) + addMeta($$, $1.Meta, meta.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3987,7 +3987,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ArrayCastToken) + addMeta($$, $1.Meta, meta.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3999,7 +3999,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ObjectCastToken) + addMeta($$, $1.Meta, meta.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4011,7 +4011,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.BoolCastToken) + addMeta($$, $1.Meta, meta.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4023,7 +4023,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.UnsetCastToken) + addMeta($$, $1.Meta, meta.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4051,11 +4051,7 @@ expr_without_variable: } // save comments - $$.AddComments($1.Comments, comment.ExitToken) - - if $2 != nil { - yylex.(*Parser).comments.AddFromChildNode($$, $2) - } + addMeta($$, $1.Meta, meta.ExitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4067,7 +4063,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.AtToken) + addMeta($$, $1.Meta, meta.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4097,8 +4093,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.BackquoteToken) - $$.AddComments($3.Comments, comment.BackquoteToken) + addMeta($$, $1.Meta, meta.BackquoteToken) + addMeta($$, $3.Meta, meta.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4110,7 +4106,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.PrintToken) + addMeta($$, $1.Meta, meta.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4122,7 +4118,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) + addMeta($$, $1.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4134,14 +4130,14 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $9)) // save comments - $$.AddComments($1.Comments, comment.FunctionToken) + addMeta($$, $1.Meta, meta.FunctionToken) if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } - $$.AddComments($3.Comments, comment.OpenParenthesisToken) - $$.AddComments($5.Comments, comment.CloseParenthesisToken) - $$.AddComments($7.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($9.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $3.Meta, meta.OpenParenthesisToken) + addMeta($$, $5.Meta, meta.CloseParenthesisToken) + addMeta($$, $7.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $9.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4153,15 +4149,15 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $10)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) - $$.AddComments($2.Comments, comment.FunctionToken) + addMeta($$, $1.Meta, meta.StaticToken) + addMeta($$, $2.Meta, meta.FunctionToken) if $3 != nil { - $$.AddComments($3.Comments, comment.AmpersandToken) + addMeta($$, $3.Meta, meta.AmpersandToken) } - $$.AddComments($4.Comments, comment.OpenParenthesisToken) - $$.AddComments($6.Comments, comment.CloseParenthesisToken) - $$.AddComments($8.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($10.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $4.Meta, meta.OpenParenthesisToken) + addMeta($$, $6.Meta, meta.CloseParenthesisToken) + addMeta($$, $8.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $10.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4176,7 +4172,7 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) + addMeta($$, $1.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4188,7 +4184,7 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) + addMeta($$, $1.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4200,8 +4196,8 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) - $$.AddComments($3.Comments, comment.DoubleArrowToken) + addMeta($$, $1.Meta, meta.YieldToken) + addMeta($$, $3.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4213,8 +4209,8 @@ yield_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) - $$.AddComments($3.Comments, comment.DoubleArrowToken) + addMeta($$, $1.Meta, meta.YieldToken) + addMeta($$, $3.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4229,8 +4225,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4242,8 +4238,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4257,8 +4253,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(str, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4270,8 +4266,8 @@ combined_scalar_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4286,9 +4282,9 @@ combined_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ArrayToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ArrayToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4300,8 +4296,8 @@ combined_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenSquareBracket) - $$.AddComments($3.Comments, comment.CloseSquareBracket) + addMeta($$, $1.Meta, meta.OpenSquareBracket) + addMeta($$, $3.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4343,8 +4339,8 @@ lexical_var_list: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - variable.AddComments($3.Comments, comment.VariableToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(variable, $3.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4361,9 +4357,9 @@ lexical_var_list: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($3, $4)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - reference.AddComments($3.Comments, comment.VariableToken) - variable.AddComments($4.Comments, comment.VariableToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(reference, $3.Meta, meta.VariableToken) + addMeta(variable, $4.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4378,7 +4374,7 @@ lexical_var_list: variable.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) + addMeta(variable, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4395,8 +4391,8 @@ lexical_var_list: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - reference.AddComments($1.Comments, comment.VariableToken) - variable.AddComments($2.Comments, comment.VariableToken) + addMeta(reference, $1.Meta, meta.VariableToken) + addMeta(variable, $2.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4424,8 +4420,8 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, $4)) // save comments - funcName.AddComments($1.Comments, comment.NamespaceToken) - funcName.AddComments($2.Comments, comment.NsSeparatorToken) + addMeta(funcName, $1.Meta, meta.NamespaceToken) + addMeta(funcName, $2.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4439,7 +4435,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(funcName, $3)) // save comments - funcName.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta(funcName, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4451,7 +4447,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4463,7 +4459,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4475,7 +4471,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4487,7 +4483,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4511,7 +4507,7 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) + addMeta($$, $1.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4532,8 +4528,8 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($2.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $2.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4545,7 +4541,7 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4569,8 +4565,8 @@ fully_qualified_class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($2.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $2.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4582,7 +4578,7 @@ fully_qualified_class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4609,7 +4605,7 @@ dynamic_class_name_reference: $$ = $1 // save comments - $3[0].AddComments($2.Comments, comment.ObjectOperatorToken) + addMeta($3[0], $2.Meta, meta.ObjectOperatorToken) for _, n := range($3) { switch nn := n.(type) { @@ -4672,7 +4668,7 @@ dynamic_class_name_variable_property: $$ = $2 // save comments - $2[0].AddComments($1.Comments, comment.ObjectOperatorToken) + addMeta($2[0], $1.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4693,8 +4689,8 @@ exit_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($2.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $2.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4754,7 +4750,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.LnumberToken) + addMeta($$, $1.Meta, meta.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4766,7 +4762,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.DnumberToken) + addMeta($$, $1.Meta, meta.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4778,7 +4774,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ConstantEncapsedStringToken) + addMeta($$, $1.Meta, meta.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4790,7 +4786,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.LineToken) + addMeta($$, $1.Meta, meta.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4802,7 +4798,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FileToken) + addMeta($$, $1.Meta, meta.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4814,7 +4810,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.DirToken) + addMeta($$, $1.Meta, meta.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4826,7 +4822,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.TraitCToken) + addMeta($$, $1.Meta, meta.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4838,7 +4834,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.MethodCToken) + addMeta($$, $1.Meta, meta.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4850,7 +4846,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FuncCToken) + addMeta($$, $1.Meta, meta.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4862,7 +4858,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.NsCToken) + addMeta($$, $1.Meta, meta.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4876,7 +4872,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.StartHeredocToken) + addMeta($$, $1.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4888,7 +4884,7 @@ common_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.StartHeredocToken) + addMeta($$, $1.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4905,8 +4901,8 @@ static_class_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) - target.AddComments($3.Comments, comment.IdentifierToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, $3.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4955,8 +4951,8 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($2.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $2.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4970,7 +4966,7 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4982,9 +4978,9 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ArrayToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ArrayToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4996,8 +4992,8 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenSquareBracket) - $$.AddComments($3.Comments, comment.CloseSquareBracket) + addMeta($$, $1.Meta, meta.OpenSquareBracket) + addMeta($$, $3.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5015,7 +5011,7 @@ static_scalar_value: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ClassCToken) + addMeta($$, $1.Meta, meta.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5036,8 +5032,8 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5049,7 +5045,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PlusToken) + addMeta($$, $2.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5061,7 +5057,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.MinusToken) + addMeta($$, $2.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5073,7 +5069,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsteriskToken) + addMeta($$, $2.Meta, meta.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5085,7 +5081,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PowToken) + addMeta($$, $2.Meta, meta.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5097,7 +5093,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlashToken) + addMeta($$, $2.Meta, meta.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5109,7 +5105,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PercentToken) + addMeta($$, $2.Meta, meta.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5121,7 +5117,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ExclamationMarkToken) + addMeta($$, $1.Meta, meta.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5133,7 +5129,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.TildeToken) + addMeta($$, $1.Meta, meta.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5145,7 +5141,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.VerticalBarToken) + addMeta($$, $2.Meta, meta.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5157,7 +5153,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5169,7 +5165,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.CaretToken) + addMeta($$, $2.Meta, meta.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5181,7 +5177,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlToken) + addMeta($$, $2.Meta, meta.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5193,7 +5189,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SrToken) + addMeta($$, $2.Meta, meta.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5205,7 +5201,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.DotToken) + addMeta($$, $2.Meta, meta.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5217,7 +5213,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalXorToken) + addMeta($$, $2.Meta, meta.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5229,7 +5225,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalAndToken) + addMeta($$, $2.Meta, meta.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5241,7 +5237,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalOrToken) + addMeta($$, $2.Meta, meta.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5253,7 +5249,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.BooleanAndToken) + addMeta($$, $2.Meta, meta.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5265,7 +5261,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.BooleanOrToken) + addMeta($$, $2.Meta, meta.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5277,7 +5273,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsIdenticalToken) + addMeta($$, $2.Meta, meta.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5289,7 +5285,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsNotIdenticalToken) + addMeta($$, $2.Meta, meta.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5301,7 +5297,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsEqualToken) + addMeta($$, $2.Meta, meta.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5313,7 +5309,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsNotEqualToken) + addMeta($$, $2.Meta, meta.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5325,7 +5321,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LessToken) + addMeta($$, $2.Meta, meta.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5337,7 +5333,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.GreaterToken) + addMeta($$, $2.Meta, meta.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5349,7 +5345,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsSmallerOrEqualToken) + addMeta($$, $2.Meta, meta.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5361,7 +5357,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsGreaterOrEqualToken) + addMeta($$, $2.Meta, meta.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5373,8 +5369,8 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.QuestionMarkToken) - $$.AddComments($3.Comments, comment.ColonToken) + addMeta($$, $2.Meta, meta.QuestionMarkToken) + addMeta($$, $3.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5386,8 +5382,8 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - $$.AddComments($2.Comments, comment.QuestionMarkToken) - $$.AddComments($4.Comments, comment.ColonToken) + addMeta($$, $2.Meta, meta.QuestionMarkToken) + addMeta($$, $4.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5399,7 +5395,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.PlusToken) + addMeta($$, $1.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5411,7 +5407,7 @@ static_operation: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.MinusToken) + addMeta($$, $1.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5420,8 +5416,8 @@ static_operation: $$ = $2 // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5453,8 +5449,8 @@ general_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($2.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $2.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5468,7 +5464,7 @@ general_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(name)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5485,7 +5481,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - name.AddComments($1.Comments, comment.StringVarnameToken) + addMeta(name, $1.Meta, meta.StringVarnameToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5515,7 +5511,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.DoubleQuoteToken) + addMeta($$, $1.Meta, meta.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5527,7 +5523,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.StartHeredocToken) + addMeta($$, $1.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5539,7 +5535,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ClassCToken) + addMeta($$, $1.Meta, meta.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5558,7 +5554,7 @@ static_array_pair_list: // save comments if $2 != nil { - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -5586,8 +5582,8 @@ non_empty_static_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($3, $5)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - arrayItem.AddComments($4.Comments, comment.DoubleArrowToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(arrayItem, $4.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5600,7 +5596,7 @@ non_empty_static_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5613,7 +5609,7 @@ non_empty_static_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - arrayItem.AddComments($2.Comments, comment.DoubleArrowToken) + addMeta(arrayItem, $2.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5699,7 +5695,7 @@ variable: } // save comments - $3[0].AddComments($2.Comments, comment.ObjectOperatorToken) + addMeta($3[0], $2.Meta, meta.ObjectOperatorToken) for _, n := range($3) { switch nn := n.(type) { @@ -5776,7 +5772,7 @@ variable_property: $$ = $2 // save comments - $2[0].AddComments($1.Comments, comment.ObjectOperatorToken) + addMeta($2[0], $1.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5792,8 +5788,8 @@ array_method_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - fetch.AddComments($2.Comments, comment.OpenSquareBracket) - fetch.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta(fetch, $2.Meta, meta.OpenSquareBracket) + addMeta(fetch, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5806,8 +5802,8 @@ array_method_dereference: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - fetch.AddComments($2.Comments, comment.OpenSquareBracket) - fetch.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta(fetch, $2.Meta, meta.OpenSquareBracket) + addMeta(fetch, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5876,7 +5872,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5888,7 +5884,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5912,8 +5908,8 @@ array_function_dereference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5925,8 +5921,8 @@ array_function_dereference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5990,8 +5986,8 @@ reference_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6003,8 +5999,8 @@ reference_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6028,7 +6024,7 @@ compound_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6040,9 +6036,9 @@ compound_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.DollarToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.DollarToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6093,8 +6089,8 @@ object_dim_list: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - fetch.AddComments($2.Comments, comment.OpenSquareBracket) - fetch.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta(fetch, $2.Meta, meta.OpenSquareBracket) + addMeta(fetch, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6107,8 +6103,8 @@ object_dim_list: fetch.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - fetch.AddComments($2.Comments, comment.OpenCurlyBracesToken) - fetch.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta(fetch, $2.Meta, meta.OpenCurlyBracesToken) + addMeta(fetch, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6133,7 +6129,7 @@ variable_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StringToken) + addMeta($$, $1.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6145,8 +6141,8 @@ variable_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6162,7 +6158,7 @@ simple_indirect_reference: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - n.AddComments($1.Comments, comment.DollarToken) + addMeta(n, $1.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6179,7 +6175,7 @@ simple_indirect_reference: n.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($2)) // save comments - n.AddComments($2.Comments, comment.DollarToken) + addMeta(n, $2.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6195,7 +6191,7 @@ assignment_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6232,9 +6228,9 @@ assignment_list_element: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition(item)) // save comments - item.AddComments($1.Comments, comment.ListToken) - item.AddComments($2.Comments, comment.OpenParenthesisToken) - item.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta(item, $1.Meta, meta.ListToken) + addMeta(item, $2.Meta, meta.OpenParenthesisToken) + addMeta(item, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6264,7 +6260,7 @@ array_pair_list: // save comments if $2 != nil { - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -6281,8 +6277,8 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($3, $5)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - arrayItem.AddComments($4.Comments, comment.DoubleArrowToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(arrayItem, $4.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6295,7 +6291,7 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodePosition($3)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6308,7 +6304,7 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - arrayItem.AddComments($2.Comments, comment.DoubleArrowToken) + addMeta(arrayItem, $2.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6333,9 +6329,9 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($3, $6)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - arrayItem.AddComments($4.Comments, comment.DoubleArrowToken) - reference.AddComments($5.Comments, comment.AmpersandToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(arrayItem, $4.Meta, meta.DoubleArrowToken) + addMeta(reference, $5.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6350,8 +6346,8 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $4)) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) - reference.AddComments($3.Comments, comment.AmpersandToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) + addMeta(reference, $3.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6366,8 +6362,8 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - arrayItem.AddComments($2.Comments, comment.DoubleArrowToken) - reference.AddComments($3.Comments, comment.AmpersandToken) + addMeta(arrayItem, $2.Meta, meta.DoubleArrowToken) + addMeta(reference, $3.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6382,7 +6378,7 @@ non_empty_array_pair_list: arrayItem.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - reference.AddComments($1.Comments, comment.AmpersandToken) + addMeta(reference, $1.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6404,7 +6400,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($2)) // save comments - encapsed.AddComments($2.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, $2.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6423,7 +6419,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - encapsed.AddComments($1.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, $1.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6440,7 +6436,7 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6456,9 +6452,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6476,9 +6472,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - $$.AddComments($2.Comments, comment.ObjectOperatorToken) - fetch.AddComments($3.Comments, comment.StringToken) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta($$, $2.Meta, meta.ObjectOperatorToken) + addMeta(fetch, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6490,8 +6486,8 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.DollarOpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6505,9 +6501,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) - name.AddComments($2.Comments, comment.StringVarnameToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(name, $2.Meta, meta.StringVarnameToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6523,11 +6519,11 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - $$.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) + addMeta($$, $1.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(variable, $2.Meta, meta.StringVarnameToken) + addMeta($$, $3.Meta, meta.OpenSquareBracket) + addMeta($$, $5.Meta, meta.CloseSquareBracket) + addMeta($$, $6.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6548,7 +6544,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StringToken) + addMeta($$, $1.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6565,7 +6561,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.NumStringToken) + addMeta($$, $1.Meta, meta.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6579,7 +6575,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6594,9 +6590,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.IssetToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.IssetToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6608,9 +6604,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.EmptyToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.EmptyToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6622,9 +6618,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.EmptyToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.EmptyToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6636,7 +6632,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IncludeToken) + addMeta($$, $1.Meta, meta.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6648,7 +6644,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IncludeOnceToken) + addMeta($$, $1.Meta, meta.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6660,9 +6656,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.EvalToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.EvalToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6674,7 +6670,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.RequireToken) + addMeta($$, $1.Meta, meta.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6686,7 +6682,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.RequireOnceToken) + addMeta($$, $1.Meta, meta.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6704,7 +6700,7 @@ isset_variables: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6736,7 +6732,7 @@ class_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6750,7 +6746,7 @@ class_constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6767,7 +6763,7 @@ static_class_name_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6784,7 +6780,7 @@ class_name_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/php5/php5_test.go b/php5/php5_test.go index 9320288..829022a 100644 --- a/php5/php5_test.go +++ b/php5/php5_test.go @@ -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, IsReference: false, + Variadic: 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, 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", }, @@ -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, 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", }, @@ -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, + ByRef: false, Variadic: 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, }, + ByRef: true, Variadic: 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,38 +1160,39 @@ 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", }, @@ -1199,18 +1200,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, }, + ReturnsRef: false, PhpDocComment: "", - ReturnsRef: false, MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 211, - EndPos: 213, + EndLine: 10, + StartPos: 211, + EndPos: 213, }, Value: "foo", }, @@ -1218,9 +1219,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", }, @@ -1229,26 +1230,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", }, @@ -1257,16 +1258,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", }, @@ -1274,24 +1275,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", }, @@ -1302,26 +1303,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", }, @@ -1330,16 +1331,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", }, @@ -1349,11 +1350,12 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 10, - EndLine: 10, - StartPos: 244, - EndPos: 245, + EndLine: 10, + StartPos: 244, + EndPos: 245, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -1361,44 +1363,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", }, @@ -1407,16 +1409,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", }, @@ -1424,24 +1426,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", }, @@ -1452,26 +1454,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", }, @@ -1480,66 +1482,67 @@ 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, + Static: true, PhpDocComment: "", + ReturnsRef: false, 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", }, @@ -1548,16 +1551,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", }, @@ -1565,24 +1568,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", }, @@ -1593,26 +1596,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", }, @@ -1621,38 +1624,39 @@ 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", }, @@ -1660,16 +1664,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", }, @@ -1677,16 +1681,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.", }, @@ -1694,16 +1698,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", }, @@ -1711,16 +1715,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", }, @@ -1728,16 +1732,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", }, @@ -1745,16 +1749,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", }, @@ -1762,16 +1766,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__", }, @@ -1779,16 +1783,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__", }, @@ -1796,16 +1800,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__", }, @@ -1813,16 +1817,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__", }, @@ -1830,16 +1834,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__", }, @@ -1847,16 +1851,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__", }, @@ -1864,16 +1868,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__", }, @@ -1881,16 +1885,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__", }, @@ -1898,40 +1902,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", }, @@ -1942,47 +1946,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", }, @@ -1990,9 +1994,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", }, @@ -2003,47 +2007,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", }, @@ -2051,9 +2055,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", }, @@ -2064,47 +2068,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", }, @@ -2112,9 +2116,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", }, @@ -2125,47 +2129,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", }, @@ -2173,16 +2177,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", }, @@ -2194,31 +2198,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", }, @@ -2226,25 +2230,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", }, @@ -2255,47 +2259,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", }, @@ -2303,9 +2307,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", }, @@ -2313,9 +2317,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: "()", }, @@ -2325,40 +2329,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", }, @@ -2369,47 +2373,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", }, @@ -2417,9 +2421,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", }, @@ -2430,47 +2434,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", }, @@ -2478,18 +2482,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, }, }, }, @@ -2499,23 +2503,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", }, @@ -2523,33 +2527,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -2557,33 +2562,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -2591,11 +2597,12 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -2603,23 +2610,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", }, @@ -2627,50 +2634,52 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -2678,33 +2687,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -2712,33 +2722,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -2746,62 +2757,64 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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, }, }, }, @@ -2810,40 +2823,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", }, @@ -2854,40 +2867,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", }, @@ -2898,17 +2911,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", }, @@ -2916,34 +2929,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", }, @@ -2951,26 +2964,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", }, @@ -2982,17 +2995,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", }, @@ -3000,29 +3013,30 @@ 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, + EndLine: 59, + StartPos: 1217, + EndPos: 1218, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -3030,17 +3044,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", }, @@ -3048,18 +3062,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", }, @@ -3067,18 +3081,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", }, @@ -3086,11 +3100,12 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 60, - EndLine: 60, - StartPos: 1265, - EndPos: 1266, + EndLine: 60, + StartPos: 1265, + EndPos: 1266, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -3098,17 +3113,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", }, @@ -3116,18 +3131,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", }, @@ -3135,18 +3150,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", }, @@ -3154,28 +3169,29 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1312, - EndPos: 1313, + EndLine: 61, + StartPos: 1312, + EndPos: 1313, + }, + Stmts: []node.Node{ }, - 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", }, @@ -3183,9 +3199,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", }, @@ -3193,11 +3209,12 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 61, - EndLine: 61, - StartPos: 1340, - EndPos: 1341, + EndLine: 61, + StartPos: 1340, + EndPos: 1341, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -3205,17 +3222,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", }, @@ -3223,9 +3240,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", }, @@ -3234,18 +3251,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", }, @@ -3253,18 +3270,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", }, @@ -3272,9 +3289,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, }, }, }, @@ -3283,17 +3300,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", }, @@ -3301,9 +3318,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", }, @@ -3311,46 +3328,47 @@ 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", }, @@ -3358,9 +3376,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", }, @@ -3368,25 +3386,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", }, @@ -3394,22 +3412,23 @@ 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", }, @@ -3417,9 +3436,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", }, @@ -3427,25 +3446,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", }, @@ -3454,17 +3473,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", }, @@ -3472,39 +3491,40 @@ 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", }, @@ -3512,26 +3532,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", }, @@ -3541,33 +3561,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, }, }, }, @@ -3576,40 +3596,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", }, @@ -3620,40 +3640,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", }, @@ -3664,34 +3684,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", }, @@ -3700,43 +3720,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", }, @@ -3744,26 +3764,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", }, @@ -3772,44 +3792,45 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 72, - EndLine: 72, - StartPos: 1679, - EndPos: 1680, + EndLine: 72, + StartPos: 1679, + EndPos: 1680, + }, + Stmts: []node.Node{ }, - 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", }, @@ -3818,35 +3839,37 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1700, - EndPos: 1712, + EndLine: 73, + StartPos: 1700, + EndPos: 1712, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 74, + StartPos: 1719, + EndPos: 1720, + }, + Stmts: []node.Node{ }, - 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", }, @@ -3854,24 +3877,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", }, @@ -3879,9 +3902,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", }, @@ -3890,24 +3913,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", }, @@ -3917,31 +3940,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", }, @@ -3949,9 +3972,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", }, @@ -3961,23 +3984,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", }, @@ -3985,9 +4008,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", }, @@ -3997,23 +4020,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", }, @@ -4022,23 +4045,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", }, @@ -4048,41 +4071,42 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 77, - EndLine: 77, - StartPos: 1793, - EndPos: 1794, + EndLine: 77, + StartPos: 1793, + EndPos: 1794, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4090,9 +4114,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", }, @@ -4102,23 +4126,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", }, @@ -4128,33 +4152,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4162,16 +4187,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", }, @@ -4179,42 +4204,44 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 79, - EndLine: 79, - StartPos: 1850, - EndPos: 1851, + EndLine: 79, + StartPos: 1850, + EndPos: 1851, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 80, + StartPos: 1864, + EndPos: 1865, + }, + Items: []node.Node{ }, - 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", }, @@ -4222,33 +4249,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 80, - EndLine: 80, - StartPos: 1874, - EndPos: 1875, + EndLine: 80, + StartPos: 1874, + EndPos: 1875, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4256,16 +4284,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", }, @@ -4273,33 +4301,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4307,16 +4336,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", }, @@ -4324,16 +4353,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", }, @@ -4341,42 +4370,44 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 82, - EndLine: 82, - StartPos: 1939, - EndPos: 1940, + EndLine: 82, + StartPos: 1939, + EndPos: 1940, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 83, + StartPos: 1953, + EndPos: 1954, + }, + Items: []node.Node{ }, - 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", }, @@ -4384,16 +4415,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", }, @@ -4401,33 +4432,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 83, - EndLine: 83, - StartPos: 1969, - EndPos: 1970, + EndLine: 83, + StartPos: 1969, + EndPos: 1970, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4435,16 +4467,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", }, @@ -4452,23 +4484,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", }, @@ -4477,33 +4509,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 84, - EndLine: 84, - StartPos: 2000, - EndPos: 2001, + EndLine: 84, + StartPos: 2000, + EndPos: 2001, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4511,16 +4544,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", }, @@ -4528,31 +4561,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", }, @@ -4563,48 +4596,50 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 85, - EndLine: 85, - StartPos: 2036, - EndPos: 2037, + EndLine: 85, + StartPos: 2036, + EndPos: 2037, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4612,70 +4647,72 @@ 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, PhpDocComment: "", + ReturnsRef: false, 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", }, @@ -4686,18 +4723,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, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2170, - EndPos: 2172, + EndLine: 95, + StartPos: 2170, + EndPos: 2172, }, Value: "foo", }, @@ -4705,34 +4742,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", }, @@ -4741,34 +4778,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", }, @@ -4779,9 +4816,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, }, }, }, @@ -4789,18 +4826,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", }, @@ -4808,16 +4845,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", }, @@ -4827,44 +4864,45 @@ 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", }, @@ -4872,16 +4910,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", }, @@ -4889,23 +4927,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", }, @@ -4914,31 +4952,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", }, @@ -4947,9 +4985,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, }, }, }, @@ -4959,16 +4997,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", }, @@ -4976,16 +5014,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", }, @@ -4993,31 +5031,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", }, @@ -5025,33 +5063,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 102, - EndLine: 102, - StartPos: 2337, - EndPos: 2338, + EndLine: 102, + StartPos: 2337, + EndPos: 2338, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5059,33 +5098,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2350, - EndPos: 2351, + EndLine: 103, + StartPos: 2350, + EndPos: 2351, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5093,11 +5133,12 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 103, - EndLine: 103, - StartPos: 2365, - EndPos: 2366, + EndLine: 103, + StartPos: 2365, + EndPos: 2366, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -5105,23 +5146,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", }, @@ -5129,50 +5170,52 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 104, - EndLine: 104, - StartPos: 2378, - EndPos: 2379, + EndLine: 104, + StartPos: 2378, + EndPos: 2379, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 104, + StartPos: 2386, + EndPos: 2387, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5180,33 +5223,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2399, - EndPos: 2400, + EndLine: 105, + StartPos: 2399, + EndPos: 2400, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5214,33 +5258,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2414, - EndPos: 2415, + EndLine: 105, + StartPos: 2414, + EndPos: 2415, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5248,52 +5293,54 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 105, - EndLine: 105, - StartPos: 2429, - EndPos: 2430, + EndLine: 105, + StartPos: 2429, + EndPos: 2430, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 105, + StartPos: 2437, + EndPos: 2438, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5301,33 +5348,34 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2450, - EndPos: 2451, + EndLine: 106, + StartPos: 2450, + EndPos: 2451, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5335,41 +5383,42 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2465, - EndPos: 2466, + EndLine: 106, + StartPos: 2465, + EndPos: 2466, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5377,27 +5426,29 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 106, - EndLine: 106, - StartPos: 2481, - EndPos: 2482, + EndLine: 106, + StartPos: 2481, + EndPos: 2482, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 106, + StartPos: 2489, + EndPos: 2490, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -5406,78 +5457,79 @@ 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", }, @@ -5485,47 +5537,48 @@ 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", }, @@ -5534,17 +5587,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", }, @@ -5552,29 +5605,30 @@ 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", }, @@ -5584,63 +5638,65 @@ 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, + EndLine: 113, + StartPos: 2640, + EndPos: 2651, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5648,17 +5704,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", }, @@ -5667,24 +5723,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", }, @@ -5697,17 +5753,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", }, @@ -5715,26 +5771,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", }, @@ -5743,24 +5799,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", }, @@ -5769,24 +5825,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", }, @@ -5794,9 +5850,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", }, @@ -5808,17 +5864,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", }, @@ -5826,26 +5882,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", }, @@ -5854,24 +5910,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", }, @@ -5879,9 +5935,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", }, @@ -5889,24 +5945,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", }, @@ -5919,31 +5975,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", }, @@ -5952,23 +6008,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", }, @@ -5976,9 +6032,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", }, @@ -5988,31 +6044,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", }, @@ -6020,9 +6076,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", }, @@ -6030,23 +6086,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", }, @@ -6057,71 +6113,74 @@ 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, + EndLine: -1, + StartPos: 2827, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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{ + }, }, }, }, @@ -6129,62 +6188,64 @@ 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{ + }, }, }, }, @@ -6192,40 +6253,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", }, @@ -6233,9 +6294,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, }, }, }, @@ -6243,16 +6304,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", }, @@ -6260,9 +6321,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, }, }, }, @@ -6273,40 +6334,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", }, @@ -6314,9 +6375,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, }, }, }, @@ -6324,16 +6385,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", }, @@ -6341,9 +6402,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, }, }, }, @@ -6354,23 +6415,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", }, @@ -6379,36 +6440,37 @@ 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", }, @@ -6416,25 +6478,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", }, @@ -6447,17 +6509,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", }, @@ -6465,25 +6527,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", }, @@ -6492,17 +6554,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", }, @@ -6512,9 +6574,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, }, }, }, @@ -6523,17 +6585,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", }, @@ -6541,25 +6603,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", }, @@ -6568,17 +6630,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", }, @@ -6588,31 +6650,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", }, @@ -6620,9 +6682,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", }, @@ -6635,17 +6697,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", }, @@ -6653,25 +6715,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", }, @@ -6680,17 +6742,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", }, @@ -6700,31 +6762,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", }, @@ -6732,18 +6794,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", }, @@ -6756,17 +6818,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", }, @@ -6774,25 +6836,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", }, @@ -6801,17 +6863,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", }, @@ -6821,39 +6883,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", }, @@ -6862,9 +6924,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", }, @@ -6873,17 +6935,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", }, @@ -6892,17 +6954,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", }, @@ -6913,31 +6975,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", }, @@ -6946,9 +7008,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", }, @@ -6956,9 +7018,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", }, @@ -6971,44 +7033,47 @@ func TestPhp5(t *testing.T) { &stmt.Try{ Position: &position.Position{ StartLine: 148, - EndLine: -1, - StartPos: 3296, - EndPos: -1, + EndLine: -1, + StartPos: 3296, + EndPos: -1, + }, + Stmts: []node.Node{ + }, + Catches: []node.Node{ }, - Stmts: []node.Node{}, - Catches: []node.Node{}, }, &stmt.Try{ Position: &position.Position{ StartLine: 149, - EndLine: 149, - StartPos: 3305, - EndPos: 3334, + EndLine: 149, + StartPos: 3305, + EndPos: 3334, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7018,55 +7083,57 @@ 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, + EndLine: 150, + StartPos: 3338, + EndPos: 3398, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7076,44 +7143,45 @@ 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", }, @@ -7123,55 +7191,57 @@ 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, + EndLine: 151, + StartPos: 3402, + EndPos: 3505, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7181,44 +7251,45 @@ 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", }, @@ -7228,44 +7299,45 @@ 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", }, @@ -7275,55 +7347,57 @@ 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, + EndLine: 152, + StartPos: 3509, + EndPos: 3549, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7333,54 +7407,56 @@ 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, + EndLine: 152, + StartPos: 3540, + EndPos: 3549, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7388,16 +7464,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", }, @@ -7407,32 +7483,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", }, @@ -7444,32 +7520,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", }, @@ -7481,32 +7557,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", }, @@ -7515,9 +7591,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", }, @@ -7527,32 +7603,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", }, @@ -7562,24 +7638,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", }, @@ -7591,32 +7667,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", }, @@ -7626,24 +7702,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", }, @@ -7652,9 +7728,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", }, @@ -7664,16 +7740,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", }, @@ -7681,24 +7757,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", }, @@ -7708,24 +7784,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", }, @@ -7737,16 +7813,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", }, @@ -7754,24 +7830,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", }, @@ -7780,9 +7856,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", }, @@ -7790,24 +7866,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", }, @@ -7816,9 +7892,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", }, @@ -7828,16 +7904,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", }, @@ -7845,24 +7921,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", }, @@ -7872,24 +7948,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", }, @@ -7901,16 +7977,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", }, @@ -7918,24 +7994,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", }, @@ -7944,9 +8020,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", }, @@ -7954,24 +8030,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", }, @@ -7980,9 +8056,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", }, @@ -7992,30 +8068,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", }, @@ -8023,9 +8099,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", }, @@ -8034,37 +8110,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", }, @@ -8072,9 +8148,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", }, @@ -8082,9 +8158,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", }, @@ -8093,48 +8169,49 @@ 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, + EndLine: 168, + StartPos: 3801, + EndPos: 3807, + }, + Items: []node.Node{ }, - 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", }, @@ -8145,40 +8222,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", }, @@ -8186,91 +8263,92 @@ 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", }, }, }, }, - &expr.ArrayItem{}, + &expr.ArrayItem{ + }, }, }, }, &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", }, @@ -8283,45 +8361,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", }, @@ -8331,25 +8409,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", }, @@ -8357,16 +8435,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", }, @@ -8374,39 +8452,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", }, @@ -8419,30 +8497,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", }, @@ -8452,30 +8530,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", }, @@ -8485,31 +8563,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", }, @@ -8518,9 +8596,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", }, @@ -8529,30 +8607,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", }, @@ -8562,30 +8640,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", }, @@ -8595,63 +8673,64 @@ 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, + ReturnsRef: false, + Static: false, PhpDocComment: "", 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", }, @@ -8660,25 +8739,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", }, @@ -8688,24 +8767,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", }, @@ -8713,23 +8792,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", }, @@ -8737,49 +8816,50 @@ 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", }, @@ -8788,25 +8868,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, + ByRef: false, Variadic: 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", }, @@ -8816,31 +8896,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", }, @@ -8849,73 +8929,75 @@ 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", }, @@ -8926,31 +9008,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", }, @@ -8961,31 +9043,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", }, @@ -8996,30 +9078,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", }, @@ -9029,38 +9111,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", }, @@ -9072,30 +9154,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", }, @@ -9105,30 +9187,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", }, @@ -9138,46 +9220,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: 4148, + 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", }, @@ -9187,46 +9269,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: 4168, + 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", }, @@ -9236,31 +9318,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", }, @@ -9269,9 +9351,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, }, }, }, @@ -9279,31 +9361,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", }, @@ -9312,33 +9394,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", }, @@ -9351,31 +9433,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", }, @@ -9384,28 +9466,29 @@ 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, + EndLine: 197, + StartPos: 4209, + EndPos: 4210, + }, + Items: []node.Node{ }, - Items: []node.Node{}, }, }, }, @@ -9415,30 +9498,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", }, @@ -9446,40 +9529,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, + Variadic: false, IsReference: 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", }, @@ -9493,30 +9576,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", }, @@ -9526,30 +9609,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", }, @@ -9559,30 +9642,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", }, @@ -9592,30 +9675,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", }, @@ -9625,30 +9708,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", }, @@ -9658,30 +9741,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", }, @@ -9691,30 +9774,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", }, @@ -9724,30 +9807,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", }, @@ -9757,30 +9840,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", }, @@ -9788,17 +9871,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", }, @@ -9809,30 +9892,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", }, @@ -9840,17 +9923,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", }, @@ -9861,30 +9944,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", }, @@ -9892,17 +9975,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", }, @@ -9913,31 +9996,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", }, @@ -9945,16 +10028,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", }, @@ -9965,39 +10048,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", }, @@ -10010,39 +10093,40 @@ 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, + EndLine: 216, + StartPos: 4441, + EndPos: 4446, + }, + Items: []node.Node{ }, - 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", }, @@ -10052,45 +10136,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", }, @@ -10099,23 +10183,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", }, @@ -10126,16 +10210,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", }, @@ -10145,52 +10229,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", }, @@ -10202,16 +10286,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", }, @@ -10221,60 +10305,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", }, @@ -10288,16 +10372,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", }, @@ -10307,30 +10391,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", }, @@ -10338,18 +10422,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, }, }, }, @@ -10357,31 +10441,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", }, @@ -10392,31 +10476,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", }, @@ -10425,9 +10509,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, }, }, }, @@ -10435,31 +10519,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", }, @@ -10468,9 +10552,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, }, }, }, @@ -10478,30 +10562,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", }, @@ -10511,30 +10595,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", }, @@ -10542,9 +10626,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", }, @@ -10553,37 +10637,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", }, @@ -10591,9 +10675,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", }, @@ -10601,9 +10685,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", }, @@ -10612,58 +10696,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", }, @@ -10671,9 +10755,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", }, @@ -10681,9 +10765,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", }, @@ -10691,27 +10775,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", }, @@ -10719,9 +10803,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", }, @@ -10730,44 +10814,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", }, @@ -10775,27 +10859,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", }, @@ -10803,9 +10887,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", }, @@ -10814,40 +10898,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", }, @@ -10858,16 +10942,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{ @@ -10879,65 +10963,67 @@ 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, + EndLine: 232, + StartPos: 4691, + EndPos: 4692, + }, + Parts: []node.Node{ }, - 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, + EndLine: 233, + StartPos: 4697, + EndPos: 4698, + }, + Items: []node.Node{ }, - 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", }, @@ -10948,40 +11034,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", }, @@ -10989,68 +11075,69 @@ 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", }, }, }, }, - &expr.ArrayItem{}, + &expr.ArrayItem{ + }, }, }, }, &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", }, @@ -11059,18 +11146,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, }, }, }, @@ -11078,31 +11165,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", }, @@ -11111,18 +11198,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, }, }, }, @@ -11130,31 +11217,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", }, @@ -11163,18 +11250,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, }, }, }, @@ -11182,31 +11269,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", }, @@ -11215,16 +11302,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", }, @@ -11232,9 +11319,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, }, }, }, @@ -11242,30 +11329,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", }, @@ -11273,16 +11360,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", }, @@ -11290,9 +11377,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, }, }, }, @@ -11300,31 +11387,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", }, @@ -11333,16 +11420,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", }, @@ -11352,31 +11439,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", }, @@ -11385,16 +11472,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", }, @@ -11404,31 +11491,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", }, @@ -11437,16 +11524,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", }, @@ -11456,30 +11543,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", }, @@ -11487,16 +11574,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", }, @@ -11504,16 +11591,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", }, @@ -11523,30 +11610,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", }, @@ -11554,16 +11641,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", }, @@ -11573,30 +11660,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", }, @@ -11604,23 +11691,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", }, @@ -11628,16 +11715,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", }, @@ -11645,16 +11732,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", }, @@ -11663,16 +11750,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", }, @@ -11682,37 +11769,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", }, @@ -11720,16 +11807,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", }, @@ -11737,16 +11824,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", }, @@ -11755,16 +11842,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", }, @@ -11772,16 +11859,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", }, @@ -11791,30 +11878,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", }, @@ -11824,30 +11911,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", }, @@ -11857,30 +11944,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", }, @@ -11890,37 +11977,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", }, @@ -11931,46 +12018,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", }, @@ -11980,30 +12067,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", }, @@ -12011,16 +12098,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", }, @@ -12030,38 +12117,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", }, @@ -12070,9 +12157,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", }, @@ -12082,30 +12169,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", }, @@ -12113,24 +12200,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", }, @@ -12139,9 +12226,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", }, @@ -12151,30 +12238,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", }, @@ -12184,30 +12271,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", }, @@ -12217,30 +12304,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", }, @@ -12250,30 +12337,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", }, @@ -12283,30 +12370,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", }, @@ -12316,30 +12403,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", }, @@ -12349,30 +12436,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", }, @@ -12382,30 +12469,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", }, @@ -12415,30 +12502,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", }, @@ -12448,30 +12535,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", }, @@ -12481,30 +12568,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", }, @@ -12512,16 +12599,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", }, @@ -12531,30 +12618,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", }, @@ -12562,16 +12649,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", }, @@ -12581,30 +12668,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", }, @@ -12612,16 +12699,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", }, @@ -12631,30 +12718,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", }, @@ -12662,16 +12749,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", }, @@ -12681,30 +12768,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", }, @@ -12712,16 +12799,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", }, @@ -12731,30 +12818,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", }, @@ -12762,16 +12849,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", }, @@ -12781,30 +12868,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", }, @@ -12812,16 +12899,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", }, @@ -12831,30 +12918,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", }, @@ -12862,16 +12949,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", }, @@ -12881,30 +12968,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", }, @@ -12912,16 +12999,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", }, @@ -12931,30 +13018,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", }, @@ -12962,16 +13049,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", }, @@ -12981,30 +13068,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", }, @@ -13012,16 +13099,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", }, @@ -13031,30 +13118,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", }, @@ -13062,16 +13149,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", }, @@ -13081,30 +13168,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", }, @@ -13112,16 +13199,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", }, @@ -13131,30 +13218,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", }, @@ -13162,16 +13249,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", }, @@ -13181,30 +13268,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", }, @@ -13212,16 +13299,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", }, @@ -13231,30 +13318,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", }, @@ -13262,16 +13349,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", }, @@ -13281,30 +13368,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", }, @@ -13312,16 +13399,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", }, @@ -13331,30 +13418,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", }, @@ -13362,16 +13449,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", }, @@ -13381,30 +13468,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", }, @@ -13412,16 +13499,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", }, @@ -13431,30 +13518,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", }, @@ -13462,16 +13549,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", }, @@ -13481,30 +13568,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", }, @@ -13512,16 +13599,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", }, @@ -13531,30 +13618,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", }, @@ -13562,16 +13649,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", }, @@ -13581,30 +13668,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", }, @@ -13612,16 +13699,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", }, @@ -13631,30 +13718,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", }, @@ -13662,16 +13749,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", }, @@ -13681,30 +13768,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", }, @@ -13712,16 +13799,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", }, @@ -13731,30 +13818,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", }, @@ -13762,16 +13849,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", }, @@ -13781,30 +13868,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", }, @@ -13812,24 +13899,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", }, @@ -13841,30 +13928,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", }, @@ -13872,24 +13959,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", }, @@ -13898,33 +13985,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", }, @@ -13938,30 +14025,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", }, @@ -13969,16 +14056,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", }, @@ -13988,30 +14075,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", }, @@ -14019,16 +14106,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", }, @@ -14038,30 +14125,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", }, @@ -14069,16 +14156,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", }, @@ -14088,30 +14175,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", }, @@ -14119,16 +14206,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", }, @@ -14138,30 +14225,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", }, @@ -14169,16 +14256,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", }, @@ -14188,30 +14275,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", }, @@ -14219,16 +14306,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", }, @@ -14238,30 +14325,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", }, @@ -14269,16 +14356,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", }, @@ -14288,30 +14375,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", }, @@ -14319,16 +14406,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", }, @@ -14338,30 +14425,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", }, @@ -14369,16 +14456,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", }, @@ -14388,30 +14475,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", }, @@ -14419,16 +14506,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", }, @@ -14438,30 +14525,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", }, @@ -14469,16 +14556,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", }, @@ -14488,30 +14575,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", }, @@ -14519,16 +14606,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", }, @@ -14538,30 +14625,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", }, @@ -14569,16 +14656,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", }, @@ -14588,31 +14675,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", }, @@ -14621,9 +14708,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, }, }, }, @@ -14631,45 +14718,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", }, @@ -14678,36 +14765,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", }, @@ -14716,45 +14803,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", }, @@ -14763,18 +14850,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", }, @@ -14782,9 +14869,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", }, @@ -14793,45 +14880,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", }, @@ -14840,18 +14927,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", }, @@ -14859,18 +14946,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, }, }, }, @@ -14878,60 +14965,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", }, @@ -14944,9 +15031,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", }, @@ -14954,9 +15041,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", }, @@ -14965,32 +15052,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", }, @@ -14999,38 +15086,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", }, @@ -15040,9 +15127,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", }, @@ -15051,32 +15138,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", }, @@ -15085,30 +15172,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", }, @@ -15118,37 +15205,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", }, @@ -15156,16 +15243,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", }, @@ -15176,44 +15263,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", }, @@ -15221,9 +15308,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", }, @@ -15231,9 +15318,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", }, @@ -15243,65 +15330,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", }, @@ -15309,9 +15396,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", }, @@ -15319,23 +15406,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", }, @@ -15343,24 +15430,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", }, @@ -15372,16 +15459,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", }, @@ -15390,9 +15477,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", }, @@ -15400,9 +15487,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", }, @@ -15412,31 +15499,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", }, @@ -15444,31 +15531,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", }, @@ -15478,9 +15565,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", }, @@ -15491,31 +15578,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", }, @@ -15523,16 +15610,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", }, @@ -15543,31 +15630,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", }, @@ -15575,16 +15662,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", }, @@ -15595,31 +15682,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", }, @@ -15627,16 +15714,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", }, @@ -15647,31 +15734,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", }, @@ -15679,16 +15766,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", }, @@ -15699,31 +15786,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", }, @@ -15731,9 +15818,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", }, @@ -15743,31 +15830,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", }, @@ -15775,25 +15862,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", }, @@ -15804,31 +15891,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", }, @@ -15836,34 +15923,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", }, @@ -15874,31 +15961,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", }, @@ -15906,25 +15993,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", }, @@ -15935,31 +16022,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", }, @@ -15967,25 +16054,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", }, @@ -15996,31 +16083,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", }, @@ -16028,25 +16115,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", }, @@ -16057,31 +16144,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", }, @@ -16089,25 +16176,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", }, @@ -16118,31 +16205,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", }, @@ -16150,25 +16237,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", }, @@ -16179,31 +16266,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", }, @@ -16211,25 +16298,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", }, @@ -16240,31 +16327,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", }, @@ -16272,25 +16359,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", }, @@ -16301,31 +16388,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", }, @@ -16333,25 +16420,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", }, @@ -16362,31 +16449,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", }, @@ -16394,25 +16481,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", }, @@ -16423,31 +16510,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", }, @@ -16455,25 +16542,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", }, @@ -16484,31 +16571,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", }, @@ -16516,25 +16603,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", }, @@ -16545,31 +16632,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", }, @@ -16577,25 +16664,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", }, @@ -16606,31 +16693,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", }, @@ -16638,25 +16725,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", }, @@ -16667,31 +16754,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", }, @@ -16699,25 +16786,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", }, @@ -16728,31 +16815,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", }, @@ -16760,25 +16847,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", }, @@ -16789,31 +16876,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", }, @@ -16821,25 +16908,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", }, @@ -16850,31 +16937,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", }, @@ -16882,25 +16969,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", }, @@ -16911,31 +16998,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", }, @@ -16943,25 +17030,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", }, @@ -16972,31 +17059,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", }, @@ -17004,25 +17091,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", }, @@ -17033,31 +17120,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", }, @@ -17065,25 +17152,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", }, @@ -17094,31 +17181,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", }, @@ -17126,25 +17213,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", }, @@ -17155,31 +17242,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", }, @@ -17187,25 +17274,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", }, @@ -17216,31 +17303,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", }, @@ -17248,25 +17335,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", }, @@ -17277,31 +17364,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", }, @@ -17309,25 +17396,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", }, @@ -17338,31 +17425,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", }, @@ -17370,25 +17457,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", }, @@ -17399,31 +17486,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", }, @@ -17431,24 +17518,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", }, @@ -17457,9 +17544,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", }, @@ -17470,31 +17557,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", }, @@ -17502,24 +17589,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", }, @@ -17528,9 +17615,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", }, @@ -17541,31 +17628,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", }, @@ -17573,9 +17660,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__", }, @@ -17585,31 +17672,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", }, @@ -17617,24 +17704,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", }, @@ -17647,31 +17734,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", }, @@ -17679,24 +17766,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", }, @@ -17709,31 +17796,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", }, @@ -17741,24 +17828,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", }, @@ -17771,31 +17858,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", }, @@ -17803,9 +17890,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, }, }, }, @@ -17814,31 +17901,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", }, @@ -17846,33 +17933,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", }, @@ -17880,16 +17967,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", }, @@ -17902,31 +17989,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", }, @@ -17934,31 +18021,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", }, @@ -17966,25 +18053,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", }, @@ -17994,9 +18081,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", }, @@ -18007,23 +18094,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", }, @@ -18031,41 +18118,42 @@ func TestPhp5(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 371, - EndLine: 371, - StartPos: 6873, - EndPos: 6874, + EndLine: 371, + StartPos: 6873, + EndPos: 6874, + }, + Stmts: []node.Node{ }, - 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", }, @@ -18074,23 +18162,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", }, @@ -18101,30 +18189,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", }, @@ -18132,9 +18220,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, }, }, }, @@ -18142,44 +18230,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", }, @@ -18187,18 +18275,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", }, @@ -18206,9 +18294,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", }, @@ -18217,30 +18305,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", }, @@ -18248,16 +18336,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", }, @@ -18267,30 +18355,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", }, @@ -18300,30 +18388,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", }, @@ -18331,16 +18419,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", }, @@ -18348,9 +18436,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, }, }, }, @@ -18358,30 +18446,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", }, @@ -18389,9 +18477,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", }, diff --git a/php7/parser.go b/php7/parser.go index 61cabea..0e24b0f 100644 --- a/php7/parser.go +++ b/php7/parser.go @@ -3,6 +3,8 @@ package php7 import ( "io" + "github.com/z7zmey/php-parser/meta" + "github.com/z7zmey/php-parser/errors" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/parser" @@ -21,7 +23,6 @@ type Parser struct { positionBuilder *parser.PositionBuilder errors []*errors.Error rootNode node.Node - comments parser.Comments } // NewParser creates and returns new Parser @@ -35,7 +36,6 @@ func NewParser(src io.Reader, path string) *Parser { nil, nil, nil, - nil, } } @@ -50,12 +50,15 @@ func (l *Parser) Error(msg string) { l.errors = append(l.errors, errors.NewError(msg, l.currentToken)) } +func (l *Parser) WithMeta() { + l.Lexer.WithMeta = true +} + // Parse the php7 Parser entrypoint func (l *Parser) Parse() int { // init l.errors = nil l.rootNode = nil - l.comments = parser.Comments{} l.positionBuilder = &parser.PositionBuilder{} // parse @@ -78,11 +81,6 @@ func (l *Parser) GetErrors() []*errors.Error { return l.errors } -// GetComments returns comments list -func (l *Parser) GetComments() parser.Comments { - return l.comments -} - // helpers func lastNode(nn []node.Node) node.Node { @@ -100,6 +98,14 @@ func isDollar(r rune) bool { return r == '$' } +func addMeta(n node.Node, mm []meta.Meta, tn meta.TokenName) { + for _, m := range mm { + m.SetTokenName(tn) + } + + n.AddMeta(mm) +} + func (p *Parser) returnTokenToPool(yyDollar []yySymType, yyVAL *yySymType) { for i := 1; i < len(yyDollar); i++ { if yyDollar[i].token != nil { diff --git a/php7/php7.go b/php7/php7.go index 149e7de..5109b8c 100644 --- a/php7/php7.go +++ b/php7/php7.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/expr" "github.com/z7zmey/php-parser/node/expr/assign" @@ -346,7 +346,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line php7/php7.y:5350 +//line php7/php7.y:5345 //line yacctab:1 var yyExca = [...]int{ @@ -2608,7 +2608,7 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - namePart.AddComments(yyDollar[1].token.Comments, comment.StringToken) + addMeta(namePart, yyDollar[1].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2623,8 +2623,8 @@ yydefault: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[3].token)) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) - namePart.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.NsSeparatorToken) + addMeta(namePart, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.HaltCompilerToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NamespaceToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NamespaceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ConstToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2870,7 +2870,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FunctionToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2884,7 +2884,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.OpenCurlyBracesToken) if yyDollar[5].token != nil { - yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CommaToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CommaToken) } - yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenCurlyBracesToken) if yyDollar[6].token != nil { - yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CommaToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CommaToken) } - yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NsSeparatorToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.OpenCurlyBracesToken) if yyDollar[5].token != nil { - yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CommaToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CommaToken) } - yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenCurlyBracesToken) if yyDollar[6].token != nil { - yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.CommaToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CommaToken) } - yyVAL.node.AddComments(yyDollar[7].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2993,7 +2993,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3012,7 +3012,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3031,7 +3031,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3106,7 +3106,7 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsSeparatorToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3117,7 +3117,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.HaltCompilerToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.WhileToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DoToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.WhileToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ForToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.ForInitSemicolonToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.ForCondSemicolonToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SwitchToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BreakToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.BreakToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ContinueToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ContinueToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ReturnToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ReturnToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.GlobalToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.GlobalToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EchoToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EchoToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3439,7 +3439,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.InlineHTMLToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UnsetToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UnsetToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) if yyDollar[4].token != nil { - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CommaToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CommaToken) } - yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) - yyVAL.node.AddComments(yyDollar[6].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ForeachToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.AsToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ForeachToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.AsToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.DoubleArrowToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DeclareToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3558,7 +3558,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3575,9 +3575,9 @@ yydefault: } // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TryToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ThrowToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ThrowToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.GotoToken) + addMeta(label, yyDollar[2].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - label.AddComments(yyDollar[1].token.Comments, comment.StringToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ColonToken) + addMeta(label, yyDollar[1].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.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 - 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) + addMeta(catch, yyDollar[2].token.Meta, meta.CatchToken) + addMeta(catch, yyDollar[3].token.Meta, meta.OpenParenthesisToken) + addMeta(variable, yyDollar[5].token.Meta, meta.StringToken) + addMeta(catch, yyDollar[6].token.Meta, meta.CloseParenthesisToken) + addMeta(catch, yyDollar[7].token.Meta, meta.OpenCurlyBracesToken) + addMeta(catch, yyDollar[9].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3678,7 +3678,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FinallyToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3721,7 +3721,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FunctionToken) if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } - 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) + addMeta(name, yyDollar[3].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[9].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[11].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ClassToken) + addMeta(name, yyDollar[3].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[9].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ClassToken) + addMeta(name, yyDollar[2].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3845,7 +3845,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3859,7 +3859,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinalToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TraitToken) + addMeta(name, yyDollar[2].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.InterfaceToken) + addMeta(name, yyDollar[2].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.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 - yyVAL.ClassExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) + addMeta(yyVAL.ClassExtends, yyDollar[1].token.Meta, meta.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 - yyVAL.InterfaceExtends.AddComments(yyDollar[1].token.Comments, comment.ExtendsToken) + addMeta(yyVAL.InterfaceExtends, yyDollar[1].token.Meta, meta.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 - yyVAL.ClassImplements.AddComments(yyDollar[1].token.Comments, comment.ImplementsToken) + addMeta(yyVAL.ClassImplements, yyDollar[1].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ListToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EndforToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EndforeachToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EnddeclareToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, yyDollar[3].token.Meta, meta.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 - caseList.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) - caseList.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, yyDollar[2].token.Meta, meta.SemiColonToken) + addMeta(caseList, yyDollar[4].token.Meta, meta.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 - 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) + addMeta(caseList, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(caseList, yyDollar[3].token.Meta, meta.EndswitchToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - 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) + addMeta(caseList, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(caseList, yyDollar[2].token.Meta, meta.SemiColonToken) + addMeta(caseList, yyDollar[4].token.Meta, meta.EndswitchToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.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 - _case.AddComments(yyDollar[2].token.Comments, comment.CaseToken) - _case.AddComments(yyDollar[4].token.Comments, comment.CaseSeparatorToken) + addMeta(_case, yyDollar[2].token.Meta, meta.CaseToken) + addMeta(_case, yyDollar[4].token.Meta, meta.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 - _default.AddComments(yyDollar[2].token.Comments, comment.DefaultToken) - _default.AddComments(yyDollar[3].token.Comments, comment.CaseSeparatorToken) + addMeta(_default, yyDollar[2].token.Meta, meta.DefaultToken) + addMeta(_default, yyDollar[3].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EndwhileToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IfToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.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 - _elseIf.AddComments(yyDollar[2].token.Comments, comment.ElseifToken) - _elseIf.AddComments(yyDollar[3].token.Comments, comment.OpenParenthesisToken) - _elseIf.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) + addMeta(_elseIf, yyDollar[2].token.Meta, meta.ElseifToken) + addMeta(_elseIf, yyDollar[3].token.Meta, meta.OpenParenthesisToken) + addMeta(_elseIf, yyDollar[5].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ElseToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.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 - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IfToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.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 - _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) + addMeta(_elseIf, yyDollar[2].token.Meta, meta.ElseifToken) + addMeta(_elseIf, yyDollar[3].token.Meta, meta.OpenParenthesisToken) + addMeta(_elseIf, yyDollar[5].token.Meta, meta.CloseParenthesisToken) + addMeta(_elseIf, yyDollar[6].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EndifToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EndifToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - _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) + addMeta(_else, yyDollar[2].token.Meta, meta.ElseToken) + addMeta(_else, yyDollar[3].token.Meta, meta.ColonToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.EndifToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4420,7 +4420,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4447,12 +4447,12 @@ yydefault: // save comments if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EllipsisToken) } - variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) + addMeta(variable, yyDollar[4].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4479,13 +4479,13 @@ yydefault: // save comments if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.EllipsisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.EllipsisToken) } - variable.AddComments(yyDollar[4].token.Comments, comment.VariableToken) - yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.EqualToken) + addMeta(variable, yyDollar[4].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.QuestionMarkToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.QuestionMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4537,7 +4537,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4551,7 +4551,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CallableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4578,7 +4578,7 @@ yydefault: yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CommaToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CommaToken) } - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4630,7 +4630,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.EllipsisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4666,7 +4666,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4693,7 +4693,7 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4719,7 +4719,7 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(variable, yyDollar[1].token.Meta, meta.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 - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.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 - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ConstToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ConstToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4798,7 +4798,6 @@ yydefault: adaptationList = n default: adaptationList = nil - yylex.(*Parser).comments.AddFromChildNode(yyVAL.node, yyDollar[3].node) } yyVAL.node = stmt.NewTraitUse(yyDollar[2].list, adaptationList) @@ -4807,13 +4806,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UseToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 245: yyDollar = yyS[yypt-10 : yypt+1] - //line php7/php7.y:2420 + //line php7/php7.y:2419 { name := node.NewIdentifier(yyDollar[4].token.Value) yyVAL.node = stmt.NewClassMethod(name, yyDollar[1].list, yyDollar[3].token != nil, yyDollar[7].list, yyDollar[9].node, yyDollar[10].node, yyDollar[5].str) @@ -4827,19 +4826,19 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.FunctionToken) if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AmpersandToken) } - 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) + addMeta(name, yyDollar[4].token.Meta, meta.IdentifierToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 246: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2447 + //line php7/php7.y:2446 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -4847,59 +4846,59 @@ yydefault: } case 247: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2453 + //line php7/php7.y:2452 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 248: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2465 + //line php7/php7.y:2464 { yyVAL.node = stmt.NewNop() yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 249: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:2477 + //line php7/php7.y:2476 { yyVAL.node = stmt.NewTraitAdaptationList(nil) yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 250: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2489 + //line php7/php7.y:2488 { yyVAL.node = stmt.NewTraitAdaptationList(yyDollar[2].list) yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 251: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2504 + //line php7/php7.y:2503 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -4907,7 +4906,7 @@ yydefault: } case 252: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:2510 + //line php7/php7.y:2509 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -4915,29 +4914,29 @@ yydefault: } case 253: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:2519 + //line php7/php7.y:2518 { yyVAL.node = yyDollar[1].node // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 254: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:2528 + //line php7/php7.y:2527 { yyVAL.node = yyDollar[1].node // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 255: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2540 + //line php7/php7.y:2539 { yyVAL.node = stmt.NewTraitUsePrecedence(yyDollar[1].node, yyDollar[3].list) @@ -4945,13 +4944,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, yyDollar[3].list)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InsteadofToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 256: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2555 + //line php7/php7.y:2554 { alias := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, nil, alias) @@ -4961,14 +4960,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 257: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2570 + //line php7/php7.y:2569 { alias := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, nil, alias) @@ -4978,14 +4977,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[3].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 258: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:2585 + //line php7/php7.y:2584 { alias := node.NewIdentifier(yyDollar[4].token.Value) yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, yyDollar[3].node, alias) @@ -4995,14 +4994,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) - alias.AddComments(yyDollar[4].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) + addMeta(alias, yyDollar[4].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 259: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2600 + //line php7/php7.y:2599 { yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, yyDollar[3].node, nil) @@ -5010,13 +5009,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 260: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2615 + //line php7/php7.y:2614 { name := node.NewIdentifier(yyDollar[1].token.Value) yyVAL.node = stmt.NewTraitMethodRef(nil, name) @@ -5026,13 +5025,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - name.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) + addMeta(name, yyDollar[1].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 261: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2629 + //line php7/php7.y:2628 { yyVAL.node = yyDollar[1].node @@ -5040,7 +5039,7 @@ yydefault: } case 262: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2638 + //line php7/php7.y:2637 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = stmt.NewTraitMethodRef(yyDollar[1].node, target) @@ -5050,14 +5049,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) - target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, yyDollar[3].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 263: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2656 + //line php7/php7.y:2655 { yyVAL.node = stmt.NewNop() @@ -5065,13 +5064,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.SemiColonToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 264: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2668 + //line php7/php7.y:2667 { yyVAL.node = stmt.NewStmtList(yyDollar[2].list) @@ -5079,14 +5078,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 265: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2684 + //line php7/php7.y:2683 { yyVAL.list = yyDollar[1].list @@ -5094,7 +5093,7 @@ yydefault: } case 266: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2690 + //line php7/php7.y:2689 { modifier := node.NewIdentifier(yyDollar[1].token.Value) yyVAL.list = []node.Node{modifier} @@ -5103,13 +5102,13 @@ yydefault: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - modifier.AddComments(yyDollar[1].token.Comments, comment.VarToken) + addMeta(modifier, yyDollar[1].token.Meta, meta.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 267: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:2706 + //line php7/php7.y:2705 { yyVAL.list = nil @@ -5117,7 +5116,7 @@ yydefault: } case 268: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2712 + //line php7/php7.y:2711 { yyVAL.list = yyDollar[1].list @@ -5125,7 +5124,7 @@ yydefault: } case 269: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2721 + //line php7/php7.y:2720 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -5133,7 +5132,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:2727 + //line php7/php7.y:2726 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -5141,7 +5140,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2736 + //line php7/php7.y:2735 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -5149,13 +5148,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PublicToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 272: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2748 + //line php7/php7.y:2747 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -5163,13 +5162,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ProtectedToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 273: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2760 + //line php7/php7.y:2759 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -5177,13 +5176,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrivateToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 274: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2772 + //line php7/php7.y:2771 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -5191,13 +5190,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 275: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2784 + //line php7/php7.y:2783 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -5205,13 +5204,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AbstractToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 276: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2796 + //line php7/php7.y:2795 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -5219,24 +5218,24 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FinalToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 277: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2811 + //line php7/php7.y:2810 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 278: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2820 + //line php7/php7.y:2819 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -5244,7 +5243,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:2829 + //line php7/php7.y:2828 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -5256,13 +5255,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 280: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:2845 + //line php7/php7.y:2844 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -5274,25 +5273,25 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - variable.AddComments(yyDollar[1].token.Comments, comment.VariableToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 281: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2865 + //line php7/php7.y:2864 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 282: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2874 + //line php7/php7.y:2873 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -5300,7 +5299,7 @@ yydefault: } case 283: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:2883 + //line php7/php7.y:2882 { name := node.NewIdentifier(yyDollar[1].token.Value) yyVAL.node = stmt.NewConstant(name, yyDollar[3].node, yyDollar[4].str) @@ -5310,14 +5309,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - name.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(name, yyDollar[1].token.Meta, meta.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 284: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:2901 + //line php7/php7.y:2900 { name := node.NewIdentifier(yyDollar[1].token.Value) yyVAL.node = stmt.NewConstant(name, yyDollar[3].node, yyDollar[4].str) @@ -5327,25 +5326,25 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) // save comments - name.AddComments(yyDollar[1].token.Comments, comment.StringToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(name, yyDollar[1].token.Meta, meta.StringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 285: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2919 + //line php7/php7.y:2918 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 286: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2928 + //line php7/php7.y:2927 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -5353,7 +5352,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2937 + //line php7/php7.y:2936 { yyVAL.node = yyDollar[1].node @@ -5361,7 +5360,7 @@ yydefault: } case 288: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:2946 + //line php7/php7.y:2945 { yyVAL.list = nil @@ -5369,7 +5368,7 @@ yydefault: } case 289: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2952 + //line php7/php7.y:2951 { yyVAL.list = yyDollar[1].list @@ -5377,18 +5376,18 @@ yydefault: } case 290: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:2961 + //line php7/php7.y:2960 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 291: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:2970 + //line php7/php7.y:2969 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -5396,7 +5395,7 @@ yydefault: } case 292: yyDollar = yyS[yypt-8 : yypt+1] - //line php7/php7.y:2979 + //line php7/php7.y:2978 { if yyDollar[2].node != nil { yyVAL.node = stmt.NewClass(nil, nil, yyDollar[2].node.(*node.ArgumentList), yyDollar[3].ClassExtends, yyDollar[4].ClassImplements, yyDollar[7].list, yyDollar[5].str) @@ -5408,15 +5407,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ClassToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[8].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 293: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3000 + //line php7/php7.y:2999 { if yyDollar[3].node != nil { yyVAL.node = expr.NewNew(yyDollar[2].node, yyDollar[3].node.(*node.ArgumentList)) @@ -5427,13 +5426,13 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NewToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 294: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3015 + //line php7/php7.y:3014 { yyVAL.node = expr.NewNew(yyDollar[2].node, nil) @@ -5441,13 +5440,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NewToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 295: yyDollar = yyS[yypt-6 : yypt+1] - //line php7/php7.y:3030 + //line php7/php7.y:3029 { list := expr.NewList(yyDollar[3].list) yyVAL.node = assign.NewAssign(list, yyDollar[6].node) @@ -5457,16 +5456,16 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) // save comments - 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) + addMeta(list, yyDollar[1].token.Meta, meta.ListToken) + addMeta(list, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(list, yyDollar[4].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 296: yyDollar = yyS[yypt-5 : yypt+1] - //line php7/php7.y:3047 + //line php7/php7.y:3046 { shortList := expr.NewShortList(yyDollar[2].list) yyVAL.node = assign.NewAssign(shortList, yyDollar[5].node) @@ -5476,15 +5475,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) // save comments - 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) + addMeta(shortList, yyDollar[1].token.Meta, meta.OpenSquareBracket) + addMeta(shortList, yyDollar[3].token.Meta, meta.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 297: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3063 + //line php7/php7.y:3062 { yyVAL.node = assign.NewAssign(yyDollar[1].node, yyDollar[3].node) @@ -5492,13 +5491,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 298: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:3075 + //line php7/php7.y:3074 { yyVAL.node = assign.NewReference(yyDollar[1].node, yyDollar[4].node) @@ -5506,14 +5505,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.EqualToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.EqualToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 299: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3088 + //line php7/php7.y:3087 { yyVAL.node = expr.NewClone(yyDollar[2].node) @@ -5521,13 +5520,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.CloneToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 300: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3100 + //line php7/php7.y:3099 { yyVAL.node = assign.NewPlus(yyDollar[1].node, yyDollar[3].node) @@ -5535,13 +5534,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 301: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3112 + //line php7/php7.y:3111 { yyVAL.node = assign.NewMinus(yyDollar[1].node, yyDollar[3].node) @@ -5549,13 +5548,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 302: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3124 + //line php7/php7.y:3123 { yyVAL.node = assign.NewMul(yyDollar[1].node, yyDollar[3].node) @@ -5563,13 +5562,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MulEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 303: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3136 + //line php7/php7.y:3135 { yyVAL.node = assign.NewPow(yyDollar[1].node, yyDollar[3].node) @@ -5577,13 +5576,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 304: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3148 + //line php7/php7.y:3147 { yyVAL.node = assign.NewDiv(yyDollar[1].node, yyDollar[3].node) @@ -5591,13 +5590,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DivEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 305: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3160 + //line php7/php7.y:3159 { yyVAL.node = assign.NewConcat(yyDollar[1].node, yyDollar[3].node) @@ -5605,13 +5604,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ConcatEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 306: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3172 + //line php7/php7.y:3171 { yyVAL.node = assign.NewMod(yyDollar[1].node, yyDollar[3].node) @@ -5619,13 +5618,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ModEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 307: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3184 + //line php7/php7.y:3183 { yyVAL.node = assign.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) @@ -5633,13 +5632,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AndEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 308: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3196 + //line php7/php7.y:3195 { yyVAL.node = assign.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) @@ -5647,13 +5646,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 309: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3208 + //line php7/php7.y:3207 { yyVAL.node = assign.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) @@ -5661,13 +5660,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.XorEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 310: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3220 + //line php7/php7.y:3219 { yyVAL.node = assign.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) @@ -5675,13 +5674,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 311: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3232 + //line php7/php7.y:3231 { yyVAL.node = assign.NewShiftRight(yyDollar[1].node, yyDollar[3].node) @@ -5689,13 +5688,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 312: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3244 + //line php7/php7.y:3243 { yyVAL.node = expr.NewPostInc(yyDollar[1].node) @@ -5703,13 +5702,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IncToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 313: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3256 + //line php7/php7.y:3255 { yyVAL.node = expr.NewPreInc(yyDollar[2].node) @@ -5717,13 +5716,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 314: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3268 + //line php7/php7.y:3267 { yyVAL.node = expr.NewPostDec(yyDollar[1].node) @@ -5731,13 +5730,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DecToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 315: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3280 + //line php7/php7.y:3279 { yyVAL.node = expr.NewPreDec(yyDollar[2].node) @@ -5745,13 +5744,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DecToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 316: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3292 + //line php7/php7.y:3291 { yyVAL.node = binary.NewBooleanOr(yyDollar[1].node, yyDollar[3].node) @@ -5759,13 +5758,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanOrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 317: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3304 + //line php7/php7.y:3303 { yyVAL.node = binary.NewBooleanAnd(yyDollar[1].node, yyDollar[3].node) @@ -5773,13 +5772,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.BooleanAndToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 318: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3316 + //line php7/php7.y:3315 { yyVAL.node = binary.NewLogicalOr(yyDollar[1].node, yyDollar[3].node) @@ -5787,13 +5786,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalOrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 319: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3328 + //line php7/php7.y:3327 { yyVAL.node = binary.NewLogicalAnd(yyDollar[1].node, yyDollar[3].node) @@ -5801,13 +5800,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalAndToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 320: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3340 + //line php7/php7.y:3339 { yyVAL.node = binary.NewLogicalXor(yyDollar[1].node, yyDollar[3].node) @@ -5815,13 +5814,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LogicalXorToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 321: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3352 + //line php7/php7.y:3351 { yyVAL.node = binary.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) @@ -5829,13 +5828,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.VerticalBarToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 322: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3364 + //line php7/php7.y:3363 { yyVAL.node = binary.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) @@ -5843,13 +5842,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 323: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3376 + //line php7/php7.y:3375 { yyVAL.node = binary.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) @@ -5857,13 +5856,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CaretToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 324: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3388 + //line php7/php7.y:3387 { yyVAL.node = binary.NewConcat(yyDollar[1].node, yyDollar[3].node) @@ -5871,13 +5870,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DotToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 325: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3400 + //line php7/php7.y:3399 { yyVAL.node = binary.NewPlus(yyDollar[1].node, yyDollar[3].node) @@ -5885,13 +5884,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PlusToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 326: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3412 + //line php7/php7.y:3411 { yyVAL.node = binary.NewMinus(yyDollar[1].node, yyDollar[3].node) @@ -5899,13 +5898,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.MinusToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 327: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3424 + //line php7/php7.y:3423 { yyVAL.node = binary.NewMul(yyDollar[1].node, yyDollar[3].node) @@ -5913,13 +5912,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AsteriskToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 328: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3436 + //line php7/php7.y:3435 { yyVAL.node = binary.NewPow(yyDollar[1].node, yyDollar[3].node) @@ -5927,13 +5926,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PowToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 329: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3448 + //line php7/php7.y:3447 { yyVAL.node = binary.NewDiv(yyDollar[1].node, yyDollar[3].node) @@ -5941,13 +5940,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlashToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 330: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3460 + //line php7/php7.y:3459 { yyVAL.node = binary.NewMod(yyDollar[1].node, yyDollar[3].node) @@ -5955,13 +5954,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PercentToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 331: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3472 + //line php7/php7.y:3471 { yyVAL.node = binary.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) @@ -5969,13 +5968,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SlToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 332: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3484 + //line php7/php7.y:3483 { yyVAL.node = binary.NewShiftRight(yyDollar[1].node, yyDollar[3].node) @@ -5983,13 +5982,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SrToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 333: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3496 + //line php7/php7.y:3495 { yyVAL.node = expr.NewUnaryPlus(yyDollar[2].node) @@ -5997,13 +5996,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PlusToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 334: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3508 + //line php7/php7.y:3507 { yyVAL.node = expr.NewUnaryMinus(yyDollar[2].node) @@ -6011,13 +6010,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 335: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3520 + //line php7/php7.y:3519 { yyVAL.node = expr.NewBooleanNot(yyDollar[2].node) @@ -6025,13 +6024,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExclamationMarkToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 336: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3532 + //line php7/php7.y:3531 { yyVAL.node = expr.NewBitwiseNot(yyDollar[2].node) @@ -6039,13 +6038,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TildeToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 337: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3544 + //line php7/php7.y:3543 { yyVAL.node = binary.NewIdentical(yyDollar[1].node, yyDollar[3].node) @@ -6053,13 +6052,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsIdenticalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 338: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3556 + //line php7/php7.y:3555 { yyVAL.node = binary.NewNotIdentical(yyDollar[1].node, yyDollar[3].node) @@ -6067,13 +6066,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotIdenticalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 339: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3568 + //line php7/php7.y:3567 { yyVAL.node = binary.NewEqual(yyDollar[1].node, yyDollar[3].node) @@ -6081,13 +6080,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 340: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3580 + //line php7/php7.y:3579 { yyVAL.node = binary.NewNotEqual(yyDollar[1].node, yyDollar[3].node) @@ -6095,13 +6094,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsNotEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 341: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3592 + //line php7/php7.y:3591 { yyVAL.node = binary.NewSmaller(yyDollar[1].node, yyDollar[3].node) @@ -6109,13 +6108,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.LessToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 342: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3604 + //line php7/php7.y:3603 { yyVAL.node = binary.NewSmallerOrEqual(yyDollar[1].node, yyDollar[3].node) @@ -6123,13 +6122,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsSmallerOrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 343: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3616 + //line php7/php7.y:3615 { yyVAL.node = binary.NewGreater(yyDollar[1].node, yyDollar[3].node) @@ -6137,13 +6136,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.GreaterToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 344: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3628 + //line php7/php7.y:3627 { yyVAL.node = binary.NewGreaterOrEqual(yyDollar[1].node, yyDollar[3].node) @@ -6151,13 +6150,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.IsGreaterOrEqualToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 345: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3640 + //line php7/php7.y:3639 { yyVAL.node = binary.NewSpaceship(yyDollar[1].node, yyDollar[3].node) @@ -6165,13 +6164,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.SpaceshipToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.SpaceshipToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 346: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3652 + //line php7/php7.y:3651 { yyVAL.node = expr.NewInstanceOf(yyDollar[1].node, yyDollar[3].node) @@ -6179,25 +6178,25 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.InstanceofToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 347: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3664 + //line php7/php7.y:3663 { yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 348: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:3674 + //line php7/php7.y:3673 { yyVAL.node = yyDollar[1].node @@ -6205,7 +6204,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-5 : yypt+1] - //line php7/php7.y:3680 + //line php7/php7.y:3679 { yyVAL.node = expr.NewTernary(yyDollar[1].node, yyDollar[3].node, yyDollar[5].node) @@ -6213,14 +6212,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.QuestionMarkToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 350: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:3693 + //line php7/php7.y:3692 { yyVAL.node = expr.NewTernary(yyDollar[1].node, nil, yyDollar[4].node) @@ -6228,14 +6227,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.QuestionMarkToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.ColonToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.QuestionMarkToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 351: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3706 + //line php7/php7.y:3705 { yyVAL.node = binary.NewCoalesce(yyDollar[1].node, yyDollar[3].node) @@ -6243,13 +6242,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.CoalesceToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.CoalesceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 352: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:3718 + //line php7/php7.y:3717 { yyVAL.node = yyDollar[1].node @@ -6257,7 +6256,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3724 + //line php7/php7.y:3723 { yyVAL.node = cast.NewInt(yyDollar[2].node) @@ -6265,13 +6264,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IntCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 354: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3736 + //line php7/php7.y:3735 { yyVAL.node = cast.NewDouble(yyDollar[2].node) @@ -6279,13 +6278,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 355: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3748 + //line php7/php7.y:3747 { yyVAL.node = cast.NewString(yyDollar[2].node) @@ -6293,13 +6292,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 356: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3760 + //line php7/php7.y:3759 { yyVAL.node = cast.NewArray(yyDollar[2].node) @@ -6307,13 +6306,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ArrayCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 357: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3772 + //line php7/php7.y:3771 { yyVAL.node = cast.NewObject(yyDollar[2].node) @@ -6321,13 +6320,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ObjectCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 358: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3784 + //line php7/php7.y:3783 { yyVAL.node = cast.NewBool(yyDollar[2].node) @@ -6335,13 +6334,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BoolCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 359: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3796 + //line php7/php7.y:3795 { yyVAL.node = cast.NewUnset(yyDollar[2].node) @@ -6349,13 +6348,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.UnsetCastToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 360: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3808 + //line php7/php7.y:3807 { if strings.EqualFold(yyDollar[1].token.Value, "die") { yyVAL.node = expr.NewDie(nil) @@ -6377,17 +6376,13 @@ yydefault: } // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ExitToken) - - if yyDollar[2].node != nil { - yylex.(*Parser).comments.AddFromChildNode(yyVAL.node, yyDollar[2].node) - } + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ExitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 361: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3838 + //line php7/php7.y:3833 { yyVAL.node = expr.NewErrorSuppress(yyDollar[2].node) @@ -6395,13 +6390,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AtToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 362: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:3850 + //line php7/php7.y:3845 { yyVAL.node = yyDollar[1].node @@ -6409,7 +6404,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:3856 + //line php7/php7.y:3851 { yyVAL.node = expr.NewShellExec(yyDollar[2].list) @@ -6417,14 +6412,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.BackquoteToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.BackquoteToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.BackquoteToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 364: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3869 + //line php7/php7.y:3864 { yyVAL.node = expr.NewPrint(yyDollar[2].node) @@ -6432,13 +6427,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.PrintToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 365: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:3881 + //line php7/php7.y:3876 { yyVAL.node = expr.NewYield(nil, nil) @@ -6446,13 +6441,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 366: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3893 + //line php7/php7.y:3888 { yyVAL.node = expr.NewYield(nil, yyDollar[2].node) @@ -6460,13 +6455,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 367: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:3905 + //line php7/php7.y:3900 { yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) @@ -6474,14 +6469,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.DoubleArrowToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 368: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:3918 + //line php7/php7.y:3913 { yyVAL.node = expr.NewYieldFrom(yyDollar[2].node) @@ -6489,13 +6484,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.YieldFromToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.YieldFromToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 369: yyDollar = yyS[yypt-11 : yypt+1] - //line php7/php7.y:3930 + //line php7/php7.y:3925 { yyVAL.node = expr.NewClosure(yyDollar[5].list, yyDollar[7].ClosureUse, yyDollar[8].node, yyDollar[10].list, false, yyDollar[2].token != nil, yyDollar[3].str) @@ -6503,20 +6498,20 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[11].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FunctionToken) if yyDollar[2].token != nil { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.AmpersandToken) } - 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) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[9].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[11].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 370: yyDollar = yyS[yypt-12 : yypt+1] - //line php7/php7.y:3949 + //line php7/php7.y:3944 { yyVAL.node = expr.NewClosure(yyDollar[6].list, yyDollar[8].ClosureUse, yyDollar[9].node, yyDollar[11].list, true, yyDollar[3].token != nil, yyDollar[4].str) @@ -6524,21 +6519,21 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[12].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.FunctionToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.FunctionToken) if yyDollar[3].token != nil { - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.AmpersandToken) } - 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) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[7].token.Meta, meta.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[10].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[12].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 371: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:3972 + //line php7/php7.y:3967 { yyVAL.str = yylex.(*Parser).PhpDocComment yylex.(*Parser).PhpDocComment = "" @@ -6547,19 +6542,19 @@ yydefault: } case 372: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:3982 + //line php7/php7.y:3977 { yyVAL.token = nil } case 373: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:3986 + //line php7/php7.y:3981 { yyVAL.token = yyDollar[1].token } case 374: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:3993 + //line php7/php7.y:3988 { yyVAL.ClosureUse = nil @@ -6567,7 +6562,7 @@ yydefault: } case 375: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:3999 + //line php7/php7.y:3994 { yyVAL.ClosureUse = expr.NewClosureUse(yyDollar[3].list) @@ -6575,26 +6570,26 @@ yydefault: yyVAL.ClosureUse.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.ClosureUse, yyDollar[1].token.Meta, meta.UseToken) + addMeta(yyVAL.ClosureUse, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.ClosureUse, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 376: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4016 + //line php7/php7.y:4011 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 377: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4025 + //line php7/php7.y:4020 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -6602,7 +6597,7 @@ yydefault: } case 378: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4034 + //line php7/php7.y:4029 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(identifier) @@ -6612,13 +6607,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 379: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:4048 + //line php7/php7.y:4043 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[2].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -6630,14 +6625,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) - variable.AddComments(yyDollar[2].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.AmpersandToken) + addMeta(variable, yyDollar[2].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 380: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:4068 + //line php7/php7.y:4063 { yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].node.(*node.ArgumentList)) @@ -6648,7 +6643,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4077 + //line php7/php7.y:4072 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6656,13 +6651,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 382: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4089 + //line php7/php7.y:4084 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -6670,13 +6665,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 383: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:4101 + //line php7/php7.y:4096 { yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].node.(*node.ArgumentList)) @@ -6687,7 +6682,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4113 + //line php7/php7.y:4108 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -6695,13 +6690,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StaticToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 385: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4125 + //line php7/php7.y:4120 { yyVAL.node = yyDollar[1].node @@ -6709,7 +6704,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4134 + //line php7/php7.y:4129 { yyVAL.node = yyDollar[1].node @@ -6717,7 +6712,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4140 + //line php7/php7.y:4135 { yyVAL.node = yyDollar[1].node @@ -6725,7 +6720,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:4149 + //line php7/php7.y:4144 { yyVAL.node = nil @@ -6733,7 +6728,7 @@ yydefault: } case 389: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4155 + //line php7/php7.y:4150 { yyVAL.node = expr.NewExit(yyDollar[2].node) @@ -6741,14 +6736,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 390: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:4171 + //line php7/php7.y:4166 { yyVAL.list = []node.Node{} @@ -6756,7 +6751,7 @@ yydefault: } case 391: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4177 + //line php7/php7.y:4172 { yyVAL.list = []node.Node{scalar.NewEncapsedStringPart(yyDollar[1].token.Value)} @@ -6764,7 +6759,7 @@ yydefault: } case 392: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4183 + //line php7/php7.y:4178 { yyVAL.list = yyDollar[1].list @@ -6772,7 +6767,7 @@ yydefault: } case 393: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:4192 + //line php7/php7.y:4187 { yyVAL.node = nil @@ -6780,7 +6775,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4198 + //line php7/php7.y:4193 { yyVAL.node = yyDollar[1].node @@ -6788,7 +6783,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4207 + //line php7/php7.y:4202 { yyVAL.node = expr.NewArray(yyDollar[3].list) @@ -6796,15 +6791,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ArrayToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 396: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4221 + //line php7/php7.y:4216 { yyVAL.node = expr.NewShortArray(yyDollar[2].list) @@ -6812,14 +6807,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 397: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4234 + //line php7/php7.y:4229 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) @@ -6827,13 +6822,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ConstantEncapsedStringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 398: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4249 + //line php7/php7.y:4244 { yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) @@ -6841,13 +6836,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LnumberToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 399: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4261 + //line php7/php7.y:4256 { yyVAL.node = scalar.NewDnumber(yyDollar[1].token.Value) @@ -6855,13 +6850,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DnumberToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 400: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4273 + //line php7/php7.y:4268 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6869,13 +6864,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.LineToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 401: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4285 + //line php7/php7.y:4280 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6883,13 +6878,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FileToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 402: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4297 + //line php7/php7.y:4292 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6897,13 +6892,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DirToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 403: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4309 + //line php7/php7.y:4304 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6911,13 +6906,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.TraitCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 404: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4321 + //line php7/php7.y:4316 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6925,13 +6920,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MethodCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 405: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4333 + //line php7/php7.y:4328 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6939,13 +6934,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.FuncCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 406: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4345 + //line php7/php7.y:4340 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6953,13 +6948,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NsCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 407: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4357 + //line php7/php7.y:4352 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) @@ -6967,13 +6962,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.ClassCToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 408: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4369 + //line php7/php7.y:4364 { encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, []node.Node{encapsed}) @@ -6983,13 +6978,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 409: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:4383 + //line php7/php7.y:4378 { yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, nil) @@ -6997,13 +6992,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 410: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4395 + //line php7/php7.y:4390 { yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) @@ -7011,13 +7006,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DoubleQuoteToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 411: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4407 + //line php7/php7.y:4402 { yyVAL.node = scalar.NewHeredoc(yyDollar[1].token.Value, yyDollar[2].list) @@ -7025,13 +7020,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StartHeredocToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 412: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4419 + //line php7/php7.y:4414 { yyVAL.node = yyDollar[1].node @@ -7039,7 +7034,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4425 + //line php7/php7.y:4420 { yyVAL.node = yyDollar[1].node @@ -7047,7 +7042,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4434 + //line php7/php7.y:4429 { yyVAL.node = expr.NewConstFetch(yyDollar[1].node) @@ -7058,7 +7053,7 @@ yydefault: } case 415: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4443 + //line php7/php7.y:4438 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -7068,14 +7063,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) - target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, yyDollar[3].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 416: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4458 + //line php7/php7.y:4453 { target := node.NewIdentifier(yyDollar[3].token.Value) yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) @@ -7085,14 +7080,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) - target.AddComments(yyDollar[3].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, yyDollar[3].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 417: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4476 + //line php7/php7.y:4471 { yyVAL.node = yyDollar[1].node @@ -7100,7 +7095,7 @@ yydefault: } case 418: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4482 + //line php7/php7.y:4477 { yyVAL.node = yyDollar[1].node @@ -7108,7 +7103,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:4491 + //line php7/php7.y:4486 { yyVAL.node = nil @@ -7116,7 +7111,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4497 + //line php7/php7.y:4492 { yyVAL.node = yyDollar[1].node @@ -7124,7 +7119,7 @@ yydefault: } case 421: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4506 + //line php7/php7.y:4501 { yyVAL.node = yyDollar[1].node @@ -7132,7 +7127,7 @@ yydefault: } case 422: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4515 + //line php7/php7.y:4510 { yyVAL.node = yyDollar[1].node @@ -7140,19 +7135,19 @@ yydefault: } case 423: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4521 + //line php7/php7.y:4516 { yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 424: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4531 + //line php7/php7.y:4526 { yyVAL.node = yyDollar[1].node @@ -7160,7 +7155,7 @@ yydefault: } case 425: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4540 + //line php7/php7.y:4535 { yyVAL.node = yyDollar[1].node @@ -7168,19 +7163,19 @@ yydefault: } case 426: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4546 + //line php7/php7.y:4541 { yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenParenthesisToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 427: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4556 + //line php7/php7.y:4551 { yyVAL.node = yyDollar[1].node @@ -7188,7 +7183,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4565 + //line php7/php7.y:4560 { yyVAL.node = yyDollar[1].node @@ -7196,7 +7191,7 @@ yydefault: } case 429: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4571 + //line php7/php7.y:4566 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -7204,14 +7199,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 430: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4584 + //line php7/php7.y:4579 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -7219,14 +7214,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 431: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4597 + //line php7/php7.y:4592 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -7234,14 +7229,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 432: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4610 + //line php7/php7.y:4605 { yyVAL.node = expr.NewMethodCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*node.ArgumentList)) @@ -7249,13 +7244,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 433: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4622 + //line php7/php7.y:4617 { yyVAL.node = yyDollar[1].node @@ -7263,7 +7258,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4631 + //line php7/php7.y:4626 { yyVAL.node = yyDollar[1].node @@ -7271,7 +7266,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4637 + //line php7/php7.y:4632 { yyVAL.node = yyDollar[1].node @@ -7279,7 +7274,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4643 + //line php7/php7.y:4638 { yyVAL.node = expr.NewPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -7287,13 +7282,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 437: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4658 + //line php7/php7.y:4653 { name := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(name) @@ -7303,13 +7298,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 438: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4672 + //line php7/php7.y:4667 { yyVAL.node = expr.NewVariable(yyDollar[3].node) @@ -7317,15 +7312,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 439: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:4686 + //line php7/php7.y:4681 { yyVAL.node = expr.NewVariable(yyDollar[2].node) @@ -7333,13 +7328,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 440: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4701 + //line php7/php7.y:4696 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -7347,13 +7342,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 441: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4713 + //line php7/php7.y:4708 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -7361,13 +7356,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 442: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4728 + //line php7/php7.y:4723 { yyVAL.node = yyDollar[1].node @@ -7375,7 +7370,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4734 + //line php7/php7.y:4729 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -7383,14 +7378,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenSquareBracket) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 444: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4747 + //line php7/php7.y:4742 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) @@ -7398,14 +7393,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 445: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4760 + //line php7/php7.y:4755 { yyVAL.node = expr.NewPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -7413,13 +7408,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.ObjectOperatorToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 446: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4772 + //line php7/php7.y:4767 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -7427,13 +7422,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 447: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4784 + //line php7/php7.y:4779 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) @@ -7441,13 +7436,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.PaamayimNekudotayimToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 448: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4799 + //line php7/php7.y:4794 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -7455,25 +7450,25 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IdentifierToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 449: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4811 + //line php7/php7.y:4806 { yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 450: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4821 + //line php7/php7.y:4816 { yyVAL.node = yyDollar[1].node @@ -7481,7 +7476,7 @@ yydefault: } case 451: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4830 + //line php7/php7.y:4825 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) @@ -7489,25 +7484,25 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 452: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4842 + //line php7/php7.y:4837 { yyVAL.node = yyDollar[2].node // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.OpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.OpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 453: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4852 + //line php7/php7.y:4847 { yyVAL.node = yyDollar[1].node @@ -7515,7 +7510,7 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4861 + //line php7/php7.y:4856 { yyVAL.list = yyDollar[1].list @@ -7523,7 +7518,7 @@ yydefault: } case 455: yyDollar = yyS[yypt-0 : yypt+1] - //line php7/php7.y:4870 + //line php7/php7.y:4865 { yyVAL.node = expr.NewArrayItem(nil, nil) @@ -7531,7 +7526,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4876 + //line php7/php7.y:4871 { yyVAL.node = yyDollar[1].node @@ -7539,7 +7534,7 @@ yydefault: } case 457: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4885 + //line php7/php7.y:4880 { if len(yyDollar[1].list) == 0 { yyDollar[1].list = []node.Node{expr.NewArrayItem(nil, nil)} @@ -7548,13 +7543,13 @@ yydefault: yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 458: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4898 + //line php7/php7.y:4893 { if yyDollar[1].node.(*expr.ArrayItem).Key == nil && yyDollar[1].node.(*expr.ArrayItem).Val == nil { yyVAL.list = []node.Node{} @@ -7566,7 +7561,7 @@ yydefault: } case 459: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:4911 + //line php7/php7.y:4906 { yyVAL.node = expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node) @@ -7574,13 +7569,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 460: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:4923 + //line php7/php7.y:4918 { yyVAL.node = expr.NewArrayItem(nil, yyDollar[1].node) @@ -7591,7 +7586,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4932 + //line php7/php7.y:4927 { reference := expr.NewReference(yyDollar[4].node) yyVAL.node = expr.NewArrayItem(yyDollar[1].node, reference) @@ -7601,14 +7596,14 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[4].node)) // save comments - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.DoubleArrowToken) - reference.AddComments(yyDollar[3].token.Comments, comment.AmpersandToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DoubleArrowToken) + addMeta(reference, yyDollar[3].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 462: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:4947 + //line php7/php7.y:4942 { reference := expr.NewReference(yyDollar[2].node) yyVAL.node = expr.NewArrayItem(nil, reference) @@ -7618,13 +7613,13 @@ yydefault: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - reference.AddComments(yyDollar[1].token.Comments, comment.AmpersandToken) + addMeta(reference, yyDollar[1].token.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 463: yyDollar = yyS[yypt-6 : yypt+1] - //line php7/php7.y:4961 + //line php7/php7.y:4956 { // TODO: Cannot use list() as standalone expression list := expr.NewList(yyDollar[5].list) @@ -7635,16 +7630,16 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[6].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.DoubleArrowToken) + addMeta(list, yyDollar[3].token.Meta, meta.ListToken) + addMeta(list, yyDollar[4].token.Meta, meta.OpenParenthesisToken) + addMeta(list, yyDollar[6].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 464: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:4979 + //line php7/php7.y:4974 { // TODO: Cannot use list() as standalone expression list := expr.NewList(yyDollar[3].list) @@ -7655,15 +7650,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - list.AddComments(yyDollar[1].token.Comments, comment.ListToken) - list.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) - list.AddComments(yyDollar[4].token.Comments, comment.CloseParenthesisToken) + addMeta(list, yyDollar[1].token.Meta, meta.ListToken) + addMeta(list, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(list, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 465: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:4999 + //line php7/php7.y:4994 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -7671,7 +7666,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:5005 + //line php7/php7.y:5000 { encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) yyVAL.list = append(yyDollar[1].list, encapsed) @@ -7680,13 +7675,13 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[2].token)) // save comments - encapsed.AddComments(yyDollar[2].token.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, yyDollar[2].token.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 467: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:5018 + //line php7/php7.y:5013 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -7694,7 +7689,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:5024 + //line php7/php7.y:5019 { encapsed := scalar.NewEncapsedStringPart(yyDollar[1].token.Value) yyVAL.list = []node.Node{encapsed, yyDollar[2].node} @@ -7703,13 +7698,13 @@ yydefault: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - encapsed.AddComments(yyDollar[1].token.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, yyDollar[1].token.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 469: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:5040 + //line php7/php7.y:5035 { name := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(name) @@ -7719,13 +7714,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 470: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:5054 + //line php7/php7.y:5049 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -7737,15 +7732,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 471: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:5072 + //line php7/php7.y:5067 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) variable := expr.NewVariable(identifier) @@ -7759,15 +7754,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - 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) + addMeta(variable, yyDollar[1].token.Meta, meta.VariableToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.ObjectOperatorToken) + addMeta(fetch, yyDollar[3].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 472: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:5092 + //line php7/php7.y:5087 { yyVAL.node = expr.NewVariable(yyDollar[2].node) @@ -7775,14 +7770,14 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.DollarOpenCurlyBracesToken) - yyVAL.node.AddComments(yyDollar[3].token.Comments, comment.CloseCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 473: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:5105 + //line php7/php7.y:5100 { name := node.NewIdentifier(yyDollar[2].token.Value) yyVAL.node = expr.NewVariable(name) @@ -7792,15 +7787,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(name, yyDollar[2].token.Meta, meta.StringVarnameToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 474: yyDollar = yyS[yypt-6 : yypt+1] - //line php7/php7.y:5121 + //line php7/php7.y:5116 { identifier := node.NewIdentifier(yyDollar[2].token.Value) variable := expr.NewVariable(identifier) @@ -7812,17 +7807,17 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(variable, yyDollar[2].token.Meta, meta.StringVarnameToken) + addMeta(yyVAL.node, yyDollar[3].token.Meta, meta.OpenSquareBracket) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CloseSquareBracket) + addMeta(yyVAL.node, yyDollar[6].token.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 475: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:5141 + //line php7/php7.y:5136 { yyVAL.node = yyDollar[2].node @@ -7830,7 +7825,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:5150 + //line php7/php7.y:5145 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) @@ -7838,13 +7833,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.StringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 477: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:5162 + //line php7/php7.y:5157 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(yyDollar[1].token.Value); err == nil { @@ -7857,13 +7852,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.NumStringToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 478: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:5179 + //line php7/php7.y:5174 { var lnumber *scalar.Lnumber // TODO: add option to handle 64 bit integer @@ -7885,18 +7880,18 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.MinusToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.MinusToken) if isInt { - lnumber.AddComments(yyDollar[2].token.Comments, comment.NumStringToken) + addMeta(lnumber, yyDollar[2].token.Meta, meta.NumStringToken) } else { - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.NumStringToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.NumStringToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 479: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:5210 + //line php7/php7.y:5205 { identifier := node.NewIdentifier(strings.TrimLeftFunc(yyDollar[1].token.Value, isDollar)) yyVAL.node = expr.NewVariable(identifier) @@ -7906,13 +7901,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition(yyDollar[1].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.VariableToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 480: yyDollar = yyS[yypt-5 : yypt+1] - //line php7/php7.y:5227 + //line php7/php7.y:5222 { yyVAL.node = expr.NewIsset(yyDollar[3].list) @@ -7920,18 +7915,18 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IssetToken) - yyVAL.node.AddComments(yyDollar[2].token.Comments, comment.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IssetToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) if yyDollar[4].token != nil { - yyVAL.node.AddComments(yyDollar[4].token.Comments, comment.CommaToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CommaToken) } - yyVAL.node.AddComments(yyDollar[5].token.Comments, comment.CloseParenthesisToken) + addMeta(yyVAL.node, yyDollar[5].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 481: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:5244 + //line php7/php7.y:5239 { yyVAL.node = expr.NewEmpty(yyDollar[3].node) @@ -7939,15 +7934,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EmptyToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 482: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:5258 + //line php7/php7.y:5253 { yyVAL.node = expr.NewInclude(yyDollar[2].node) @@ -7955,13 +7950,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 483: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:5270 + //line php7/php7.y:5265 { yyVAL.node = expr.NewIncludeOnce(yyDollar[2].node) @@ -7969,13 +7964,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.IncludeOnceToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 484: yyDollar = yyS[yypt-4 : yypt+1] - //line php7/php7.y:5282 + //line php7/php7.y:5277 { yyVAL.node = expr.NewEval(yyDollar[3].node) @@ -7983,15 +7978,15 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) // save comments - 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) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.EvalToken) + addMeta(yyVAL.node, yyDollar[2].token.Meta, meta.OpenParenthesisToken) + addMeta(yyVAL.node, yyDollar[4].token.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 485: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:5296 + //line php7/php7.y:5291 { yyVAL.node = expr.NewRequire(yyDollar[2].node) @@ -7999,13 +7994,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 486: yyDollar = yyS[yypt-2 : yypt+1] - //line php7/php7.y:5308 + //line php7/php7.y:5303 { yyVAL.node = expr.NewRequireOnce(yyDollar[2].node) @@ -8013,13 +8008,13 @@ yydefault: yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) // save comments - yyVAL.node.AddComments(yyDollar[1].token.Comments, comment.RequireOnceToken) + addMeta(yyVAL.node, yyDollar[1].token.Meta, meta.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 487: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:5323 + //line php7/php7.y:5318 { yyVAL.list = []node.Node{yyDollar[1].node} @@ -8027,18 +8022,18 @@ yydefault: } case 488: yyDollar = yyS[yypt-3 : yypt+1] - //line php7/php7.y:5329 + //line php7/php7.y:5324 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) // save comments - lastNode(yyDollar[1].list).AddComments(yyDollar[2].token.Comments, comment.CommaToken) + addMeta(lastNode(yyDollar[1].list), yyDollar[2].token.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 489: yyDollar = yyS[yypt-1 : yypt+1] - //line php7/php7.y:5341 + //line php7/php7.y:5336 { yyVAL.node = yyDollar[1].node diff --git a/php7/php7.y b/php7/php7.y index 3d50c00..bc6c4bd 100644 --- a/php7/php7.y +++ b/php7/php7.y @@ -5,7 +5,7 @@ import ( "strings" "strconv" - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/scanner" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/scalar" @@ -363,7 +363,7 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - namePart.AddComments($1.Comments, comment.StringToken) + addMeta(namePart, $1.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -376,8 +376,8 @@ namespace_name: namePart.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($3)) // save comments - lastNode($1).AddComments($2.Comments, comment.NsSeparatorToken) - namePart.AddComments($3.Comments, comment.StringToken) + addMeta(lastNode($1), $2.Meta, meta.NsSeparatorToken) + addMeta(namePart, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -401,8 +401,8 @@ name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($2.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $2.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -414,7 +414,7 @@ name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -466,10 +466,10 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.HaltCompilerToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.HaltCompilerToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -483,8 +483,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -498,9 +498,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($5.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $3.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $5.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -512,9 +512,9 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.NamespaceToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.NamespaceToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -526,8 +526,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -539,8 +539,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -552,8 +552,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -565,8 +565,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -578,8 +578,8 @@ top_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ConstToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ConstToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -594,7 +594,7 @@ use_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FunctionToken) + addMeta($$, $1.Meta, meta.FunctionToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -606,7 +606,7 @@ use_type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ConstToken) + addMeta($$, $1.Meta, meta.ConstToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -623,12 +623,12 @@ group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $6)) // save comments - $$.AddComments($2.Comments, comment.NsSeparatorToken) - $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) + addMeta($$, $2.Meta, meta.NsSeparatorToken) + addMeta($$, $3.Meta, meta.OpenCurlyBracesToken) if $5 != nil { - $$.AddComments($5.Comments, comment.CommaToken) + addMeta($$, $5.Meta, meta.CommaToken) } - $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $6.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -642,13 +642,13 @@ group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) - $$.AddComments($3.Comments, comment.NsSeparatorToken) - $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) + addMeta($$, $3.Meta, meta.NsSeparatorToken) + addMeta($$, $4.Meta, meta.OpenCurlyBracesToken) if $6 != nil { - $$.AddComments($6.Comments, comment.CommaToken) + addMeta($$, $6.Meta, meta.CommaToken) } - $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $7.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -665,12 +665,12 @@ mixed_group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $6)) // save comments - $$.AddComments($2.Comments, comment.NsSeparatorToken) - $$.AddComments($3.Comments, comment.OpenCurlyBracesToken) + addMeta($$, $2.Meta, meta.NsSeparatorToken) + addMeta($$, $3.Meta, meta.OpenCurlyBracesToken) if $5 != nil { - $$.AddComments($5.Comments, comment.CommaToken) + addMeta($$, $5.Meta, meta.CommaToken) } - $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $6.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -684,13 +684,13 @@ mixed_group_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) - $$.AddComments($3.Comments, comment.NsSeparatorToken) - $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) + addMeta($$, $3.Meta, meta.NsSeparatorToken) + addMeta($$, $4.Meta, meta.OpenCurlyBracesToken) if $6 != nil { - $$.AddComments($6.Comments, comment.CommaToken) + addMeta($$, $6.Meta, meta.CommaToken) } - $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $7.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -713,7 +713,7 @@ inline_use_declarations: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -731,7 +731,7 @@ unprefixed_use_declarations: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -749,7 +749,7 @@ use_declarations: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -800,8 +800,8 @@ unprefixed_use_declaration: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($3.Comments, comment.StringToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -819,7 +819,7 @@ use_declaration: $$ = $2; // save comments - $$.AddComments($1.Comments, comment.NsSeparatorToken) + addMeta($$, $1.Meta, meta.NsSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -831,7 +831,7 @@ const_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -906,10 +906,10 @@ inner_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.HaltCompilerToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.HaltCompilerToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -923,8 +923,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -955,9 +955,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.WhileToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.WhileToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -969,11 +969,11 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - $$.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) + addMeta($$, $1.Meta, meta.DoToken) + addMeta($$, $3.Meta, meta.WhileToken) + addMeta($$, $4.Meta, meta.OpenParenthesisToken) + addMeta($$, $6.Meta, meta.CloseParenthesisToken) + addMeta($$, $7.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -996,11 +996,11 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $9)) // save comments - $$.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) + addMeta($$, $1.Meta, meta.ForToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.ForInitSemicolonToken) + addMeta($$, $6.Meta, meta.ForCondSemicolonToken) + addMeta($$, $8.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1021,9 +1021,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.SwitchToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.SwitchToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1035,8 +1035,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.BreakToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.BreakToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1048,8 +1048,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ContinueToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ContinueToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1061,8 +1061,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ReturnToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ReturnToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1074,8 +1074,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.GlobalToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.GlobalToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1087,8 +1087,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.StaticToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1100,8 +1100,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.EchoToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.EchoToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1113,7 +1113,7 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.InlineHTMLToken) + addMeta($$, $1.Meta, meta.InlineHTMLToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1125,7 +1125,7 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1137,13 +1137,13 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - $$.AddComments($1.Comments, comment.UnsetToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) + addMeta($$, $1.Meta, meta.UnsetToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) if $4 != nil { - $$.AddComments($4.Comments, comment.CommaToken) + addMeta($$, $4.Meta, meta.CommaToken) } - $$.AddComments($5.Comments, comment.CloseParenthesisToken) - $$.AddComments($6.Comments, comment.SemiColonToken) + addMeta($$, $5.Meta, meta.CloseParenthesisToken) + addMeta($$, $6.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1164,10 +1164,10 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $7)) // save comments - $$.AddComments($1.Comments, comment.ForeachToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.AsToken) - $$.AddComments($6.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ForeachToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.AsToken) + addMeta($$, $6.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1190,11 +1190,11 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $9)) // save comments - $$.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) + addMeta($$, $1.Meta, meta.ForeachToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.AsToken) + addMeta($$, $6.Meta, meta.DoubleArrowToken) + addMeta($$, $8.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1206,9 +1206,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.DeclareToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.DeclareToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1220,7 +1220,7 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1235,9 +1235,9 @@ statement: } // save comments - $$.AddComments($1.Comments, comment.TryToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.TryToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1249,8 +1249,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.ThrowToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ThrowToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1264,9 +1264,9 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.GotoToken) - label.AddComments($2.Comments, comment.StringToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.GotoToken) + addMeta(label, $2.Meta, meta.StringToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1280,8 +1280,8 @@ statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - label.AddComments($1.Comments, comment.StringToken) - $$.AddComments($2.Comments, comment.ColonToken) + addMeta(label, $1.Meta, meta.StringToken) + addMeta($$, $2.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1306,12 +1306,12 @@ catch_list: catch.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($2, $9)) // save comments - 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) + addMeta(catch, $2.Meta, meta.CatchToken) + addMeta(catch, $3.Meta, meta.OpenParenthesisToken) + addMeta(variable, $5.Meta, meta.StringToken) + addMeta(catch, $6.Meta, meta.CloseParenthesisToken) + addMeta(catch, $7.Meta, meta.OpenCurlyBracesToken) + addMeta(catch, $9.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1328,7 +1328,7 @@ catch_name_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.VerticalBarToken) + addMeta(lastNode($1), $2.Meta, meta.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1349,9 +1349,9 @@ finally_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.FinallyToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.FinallyToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1369,7 +1369,7 @@ unset_variables: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1396,15 +1396,15 @@ function_declaration_statement: // save comments - $$.AddComments($1.Comments, comment.FunctionToken) + addMeta($$, $1.Meta, meta.FunctionToken) if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } - 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) + addMeta(name, $3.Meta, meta.StringToken) + addMeta($$, $5.Meta, meta.OpenParenthesisToken) + addMeta($$, $7.Meta, meta.CloseParenthesisToken) + addMeta($$, $9.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $11.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1443,10 +1443,10 @@ class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewOptionalListTokensPosition($1, $2, $9)) // save comments - $$.AddComments($2.Comments, comment.ClassToken) - name.AddComments($3.Comments, comment.StringToken) - $$.AddComments($7.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($9.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $2.Meta, meta.ClassToken) + addMeta(name, $3.Meta, meta.StringToken) + addMeta($$, $7.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $9.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1460,10 +1460,10 @@ class_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - $$.AddComments($1.Comments, comment.ClassToken) - name.AddComments($2.Comments, comment.StringToken) - $$.AddComments($6.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($8.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.ClassToken) + addMeta(name, $2.Meta, meta.StringToken) + addMeta($$, $6.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $8.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1493,7 +1493,7 @@ class_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.AbstractToken) + addMeta($$, $1.Meta, meta.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1505,7 +1505,7 @@ class_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FinalToken) + addMeta($$, $1.Meta, meta.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1522,10 +1522,10 @@ trait_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - $$.AddComments($1.Comments, comment.TraitToken) - name.AddComments($2.Comments, comment.StringToken) - $$.AddComments($4.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($6.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.TraitToken) + addMeta(name, $2.Meta, meta.StringToken) + addMeta($$, $4.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $6.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1542,10 +1542,10 @@ interface_declaration_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $7)) // save comments - $$.AddComments($1.Comments, comment.InterfaceToken) - name.AddComments($2.Comments, comment.StringToken) - $$.AddComments($5.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($7.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.InterfaceToken) + addMeta(name, $2.Meta, meta.StringToken) + addMeta($$, $5.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $7.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1566,7 +1566,7 @@ extends_from: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ExtendsToken) + addMeta($$, $1.Meta, meta.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1587,7 +1587,7 @@ interface_extends_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ExtendsToken) + addMeta($$, $1.Meta, meta.ExtendsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1608,7 +1608,7 @@ implements_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ImplementsToken) + addMeta($$, $1.Meta, meta.ImplementsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1629,7 +1629,7 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.AmpersandToken) + addMeta($$, $1.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1641,9 +1641,9 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ListToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ListToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1655,8 +1655,8 @@ foreach_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenSquareBracket) - $$.AddComments($3.Comments, comment.CloseSquareBracket) + addMeta($$, $1.Meta, meta.OpenSquareBracket) + addMeta($$, $3.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1682,9 +1682,9 @@ for_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EndforToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EndforToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1710,9 +1710,9 @@ foreach_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EndforeachToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EndforeachToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1733,9 +1733,9 @@ declare_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EnddeclareToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EnddeclareToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1752,8 +1752,8 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, $1.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1767,9 +1767,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - caseList.AddComments($1.Comments, comment.OpenCurlyBracesToken) - caseList.AddComments($2.Comments, comment.SemiColonToken) - caseList.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta(caseList, $1.Meta, meta.OpenCurlyBracesToken) + addMeta(caseList, $2.Meta, meta.SemiColonToken) + addMeta(caseList, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1783,9 +1783,9 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - caseList.AddComments($1.Comments, comment.ColonToken) - caseList.AddComments($3.Comments, comment.EndswitchToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta(caseList, $1.Meta, meta.ColonToken) + addMeta(caseList, $3.Meta, meta.EndswitchToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1800,10 +1800,10 @@ switch_case_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - caseList.AddComments($1.Comments, comment.ColonToken) - caseList.AddComments($2.Comments, comment.SemiColonToken) - caseList.AddComments($4.Comments, comment.EndswitchToken) - $$.AddComments($5.Comments, comment.SemiColonToken) + addMeta(caseList, $1.Meta, meta.ColonToken) + addMeta(caseList, $2.Meta, meta.SemiColonToken) + addMeta(caseList, $4.Meta, meta.EndswitchToken) + addMeta($$, $5.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1825,8 +1825,8 @@ case_list: _case.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $5)) // save comments - _case.AddComments($2.Comments, comment.CaseToken) - _case.AddComments($4.Comments, comment.CaseSeparatorToken) + addMeta(_case, $2.Meta, meta.CaseToken) + addMeta(_case, $4.Meta, meta.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1839,8 +1839,8 @@ case_list: _default.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($2, $4)) // save comments - _default.AddComments($2.Comments, comment.DefaultToken) - _default.AddComments($3.Comments, comment.CaseSeparatorToken) + addMeta(_default, $2.Meta, meta.DefaultToken) + addMeta(_default, $3.Meta, meta.CaseSeparatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1877,9 +1877,9 @@ while_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ColonToken) - $$.AddComments($3.Comments, comment.EndwhileToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.ColonToken) + addMeta($$, $3.Meta, meta.EndwhileToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1894,9 +1894,9 @@ if_stmt_without_else: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.IfToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.IfToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1910,9 +1910,9 @@ if_stmt_without_else: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $6)) // save comments - _elseIf.AddComments($2.Comments, comment.ElseifToken) - _elseIf.AddComments($3.Comments, comment.OpenParenthesisToken) - _elseIf.AddComments($5.Comments, comment.CloseParenthesisToken) + addMeta(_elseIf, $2.Meta, meta.ElseifToken) + addMeta(_elseIf, $3.Meta, meta.OpenParenthesisToken) + addMeta(_elseIf, $5.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1935,7 +1935,7 @@ if_stmt: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.ElseToken) + addMeta($$, $2.Meta, meta.ElseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1952,10 +1952,10 @@ alt_if_stmt_without_else: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodeListPosition($1, $6)) // save comments - $$.AddComments($1.Comments, comment.IfToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) - $$.AddComments($5.Comments, comment.ColonToken) + addMeta($$, $1.Meta, meta.IfToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) + addMeta($$, $5.Meta, meta.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 - _elseIf.AddComments($2.Comments, comment.ElseifToken) - _elseIf.AddComments($3.Comments, comment.OpenParenthesisToken) - _elseIf.AddComments($5.Comments, comment.CloseParenthesisToken) - _elseIf.AddComments($6.Comments, comment.ColonToken) + addMeta(_elseIf, $2.Meta, meta.ElseifToken) + addMeta(_elseIf, $3.Meta, meta.OpenParenthesisToken) + addMeta(_elseIf, $5.Meta, meta.CloseParenthesisToken) + addMeta(_elseIf, $6.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1988,8 +1988,8 @@ alt_if_stmt: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.EndifToken) - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.EndifToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2005,10 +2005,10 @@ alt_if_stmt: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $6)) // save comments - _else.AddComments($2.Comments, comment.ElseToken) - _else.AddComments($3.Comments, comment.ColonToken) - $$.AddComments($5.Comments, comment.EndifToken) - $$.AddComments($6.Comments, comment.SemiColonToken) + addMeta(_else, $2.Meta, meta.ElseToken) + addMeta(_else, $3.Meta, meta.ColonToken) + addMeta($$, $5.Meta, meta.EndifToken) + addMeta($$, $6.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2041,7 +2041,7 @@ non_empty_parameter_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2069,12 +2069,12 @@ parameter: // save comments if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } if $3 != nil { - $$.AddComments($3.Comments, comment.EllipsisToken) + addMeta($$, $3.Meta, meta.EllipsisToken) } - variable.AddComments($4.Comments, comment.VariableToken) + addMeta(variable, $4.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2099,13 +2099,13 @@ parameter: // save comments if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } if $3 != nil { - $$.AddComments($3.Comments, comment.EllipsisToken) + addMeta($$, $3.Meta, meta.EllipsisToken) } - variable.AddComments($4.Comments, comment.VariableToken) - $$.AddComments($5.Comments, comment.EqualToken) + addMeta(variable, $4.Meta, meta.VariableToken) + addMeta($$, $5.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2141,7 +2141,7 @@ type_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.QuestionMarkToken) + addMeta($$, $1.Meta, meta.QuestionMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2156,7 +2156,7 @@ type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ArrayToken) + addMeta($$, $1.Meta, meta.ArrayToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2168,7 +2168,7 @@ type: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.CallableToken) + addMeta($$, $1.Meta, meta.CallableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2192,7 +2192,7 @@ return_type: $$ = $2; // save comments - $$.AddComments($1.Comments, comment.ColonToken) + addMeta($$, $1.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2207,8 +2207,8 @@ argument_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($2.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $2.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2220,11 +2220,11 @@ argument_list: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) if $3 != nil { - $$.AddComments($3.Comments, comment.CommaToken) + addMeta($$, $3.Meta, meta.CommaToken) } - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2242,7 +2242,7 @@ non_empty_argument_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2266,7 +2266,7 @@ argument: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.EllipsisToken) + addMeta($$, $1.Meta, meta.EllipsisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2278,7 +2278,7 @@ global_var_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2305,7 +2305,7 @@ static_var_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2330,7 +2330,7 @@ static_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) + addMeta(variable, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2346,8 +2346,8 @@ static_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - $$.AddComments($2.Comments, comment.EqualToken) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta($$, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2377,7 +2377,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeListTokenPosition($1, $3)) // save comments - $$.AddComments($3.Comments, comment.SemiColonToken) + addMeta($$, $3.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2389,8 +2389,8 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewOptionalListTokensPosition($1, $2, $4)) // save comments - $$.AddComments($2.Comments, comment.ConstToken) - $$.AddComments($4.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.ConstToken) + addMeta($$, $4.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2403,7 +2403,6 @@ class_statement: adaptationList = n default: adaptationList = nil - yylex.(*Parser).comments.AddFromChildNode($$, $3) } $$ = stmt.NewTraitUse($2, adaptationList) @@ -2412,7 +2411,7 @@ class_statement: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.UseToken) + addMeta($$, $1.Meta, meta.UseToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2430,13 +2429,13 @@ class_statement: } // save comments - $$.AddComments($2.Comments, comment.FunctionToken) + addMeta($$, $2.Meta, meta.FunctionToken) if $3 != nil { - $$.AddComments($3.Comments, comment.AmpersandToken) + addMeta($$, $3.Meta, meta.AmpersandToken) } - name.AddComments($4.Comments, comment.IdentifierToken) - $$.AddComments($6.Comments, comment.OpenParenthesisToken) - $$.AddComments($8.Comments, comment.CloseParenthesisToken) + addMeta(name, $4.Meta, meta.IdentifierToken) + addMeta($$, $6.Meta, meta.OpenParenthesisToken) + addMeta($$, $8.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2454,7 +2453,7 @@ name_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2468,7 +2467,7 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2480,8 +2479,8 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($2.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $2.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2492,8 +2491,8 @@ trait_adaptations: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2520,7 +2519,7 @@ trait_adaptation: $$ = $1; // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2529,7 +2528,7 @@ trait_adaptation: $$ = $1; // save comments - $$.AddComments($2.Comments, comment.SemiColonToken) + addMeta($$, $2.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2544,7 +2543,7 @@ trait_precedence: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeNodeListPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.InsteadofToken) + addMeta($$, $2.Meta, meta.InsteadofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2561,8 +2560,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($3.Comments, comment.StringToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2576,8 +2575,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($3.Comments, comment.StringToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2591,8 +2590,8 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.AsToken) - alias.AddComments($4.Comments, comment.IdentifierToken) + addMeta($$, $2.Meta, meta.AsToken) + addMeta(alias, $4.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2604,7 +2603,7 @@ trait_alias: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsToken) + addMeta($$, $2.Meta, meta.AsToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2621,7 +2620,7 @@ trait_method_reference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - name.AddComments($1.Comments, comment.IdentifierToken) + addMeta(name, $1.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2644,8 +2643,8 @@ absolute_trait_method_reference: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) - target.AddComments($3.Comments, comment.IdentifierToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, $3.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2660,7 +2659,7 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.SemiColonToken) + addMeta($$, $1.Meta, meta.SemiColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2672,8 +2671,8 @@ method_body: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2695,7 +2694,7 @@ variable_modifiers: modifier.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - modifier.AddComments($1.Comments, comment.VarToken) + addMeta(modifier, $1.Meta, meta.VarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2740,7 +2739,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.PublicToken) + addMeta($$, $1.Meta, meta.PublicToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2752,7 +2751,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ProtectedToken) + addMeta($$, $1.Meta, meta.ProtectedToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2764,7 +2763,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.PrivateToken) + addMeta($$, $1.Meta, meta.PrivateToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2776,7 +2775,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) + addMeta($$, $1.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2788,7 +2787,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.AbstractToken) + addMeta($$, $1.Meta, meta.AbstractToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2800,7 +2799,7 @@ member_modifier: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FinalToken) + addMeta($$, $1.Meta, meta.FinalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2812,7 +2811,7 @@ property_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2837,7 +2836,7 @@ property: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) + addMeta(variable, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2853,8 +2852,8 @@ property: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - $$.AddComments($2.Comments, comment.EqualToken) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta($$, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2866,7 +2865,7 @@ class_const_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2889,8 +2888,8 @@ class_const_decl: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - name.AddComments($1.Comments, comment.IdentifierToken) - $$.AddComments($2.Comments, comment.EqualToken) + addMeta(name, $1.Meta, meta.IdentifierToken) + addMeta($$, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2907,8 +2906,8 @@ const_decl: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3)) // save comments - name.AddComments($1.Comments, comment.StringToken) - $$.AddComments($2.Comments, comment.EqualToken) + addMeta(name, $1.Meta, meta.StringToken) + addMeta($$, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2920,7 +2919,7 @@ echo_expr_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2962,7 +2961,7 @@ non_empty_for_exprs: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2987,9 +2986,9 @@ anonymous_class: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $8)) // save comments - $$.AddComments($1.Comments, comment.ClassToken) - $$.AddComments($6.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($8.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.ClassToken) + addMeta($$, $6.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $8.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3007,7 +3006,7 @@ new_expr: } // save comments - $$.AddComments($1.Comments, comment.NewToken) + addMeta($$, $1.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3019,7 +3018,7 @@ new_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.NewToken) + addMeta($$, $1.Meta, meta.NewToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3036,10 +3035,10 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $6)) // save comments - list.AddComments($1.Comments, comment.ListToken) - list.AddComments($2.Comments, comment.OpenParenthesisToken) - list.AddComments($4.Comments, comment.CloseParenthesisToken) - $$.AddComments($5.Comments, comment.EqualToken) + addMeta(list, $1.Meta, meta.ListToken) + addMeta(list, $2.Meta, meta.OpenParenthesisToken) + addMeta(list, $4.Meta, meta.CloseParenthesisToken) + addMeta($$, $5.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3053,9 +3052,9 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $5)) // save comments - shortList.AddComments($1.Comments, comment.OpenSquareBracket) - shortList.AddComments($3.Comments, comment.CloseSquareBracket) - $$.AddComments($4.Comments, comment.EqualToken) + addMeta(shortList, $1.Meta, meta.OpenSquareBracket) + addMeta(shortList, $3.Meta, meta.CloseSquareBracket) + addMeta($$, $4.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3067,7 +3066,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.EqualToken) + addMeta($$, $2.Meta, meta.EqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3079,8 +3078,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.EqualToken) - $$.AddComments($3.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.EqualToken) + addMeta($$, $3.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3092,7 +3091,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.CloneToken) + addMeta($$, $1.Meta, meta.CloneToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3104,7 +3103,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PlusEqualToken) + addMeta($$, $2.Meta, meta.PlusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3116,7 +3115,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.MinusEqualToken) + addMeta($$, $2.Meta, meta.MinusEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3128,7 +3127,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.MulEqualToken) + addMeta($$, $2.Meta, meta.MulEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3140,7 +3139,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PowEqualToken) + addMeta($$, $2.Meta, meta.PowEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3152,7 +3151,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.DivEqualToken) + addMeta($$, $2.Meta, meta.DivEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3164,7 +3163,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.ConcatEqualToken) + addMeta($$, $2.Meta, meta.ConcatEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3176,7 +3175,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.ModEqualToken) + addMeta($$, $2.Meta, meta.ModEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3188,7 +3187,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AndEqualToken) + addMeta($$, $2.Meta, meta.AndEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3200,7 +3199,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.OrEqualToken) + addMeta($$, $2.Meta, meta.OrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3212,7 +3211,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.XorEqualToken) + addMeta($$, $2.Meta, meta.XorEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3224,7 +3223,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlEqualToken) + addMeta($$, $2.Meta, meta.SlEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3236,7 +3235,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SrEqualToken) + addMeta($$, $2.Meta, meta.SrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3248,7 +3247,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.IncToken) + addMeta($$, $2.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3260,7 +3259,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IncToken) + addMeta($$, $1.Meta, meta.IncToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3272,7 +3271,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $2)) // save comments - $$.AddComments($2.Comments, comment.DecToken) + addMeta($$, $2.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3284,7 +3283,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.DecToken) + addMeta($$, $1.Meta, meta.DecToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3296,7 +3295,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.BooleanOrToken) + addMeta($$, $2.Meta, meta.BooleanOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3308,7 +3307,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.BooleanAndToken) + addMeta($$, $2.Meta, meta.BooleanAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3320,7 +3319,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalOrToken) + addMeta($$, $2.Meta, meta.LogicalOrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3332,7 +3331,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalAndToken) + addMeta($$, $2.Meta, meta.LogicalAndToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3344,7 +3343,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LogicalXorToken) + addMeta($$, $2.Meta, meta.LogicalXorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3356,7 +3355,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.VerticalBarToken) + addMeta($$, $2.Meta, meta.VerticalBarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3368,7 +3367,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3380,7 +3379,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.CaretToken) + addMeta($$, $2.Meta, meta.CaretToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3392,7 +3391,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.DotToken) + addMeta($$, $2.Meta, meta.DotToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3404,7 +3403,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PlusToken) + addMeta($$, $2.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3416,7 +3415,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.MinusToken) + addMeta($$, $2.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3428,7 +3427,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.AsteriskToken) + addMeta($$, $2.Meta, meta.AsteriskToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3440,7 +3439,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PowToken) + addMeta($$, $2.Meta, meta.PowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3452,7 +3451,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlashToken) + addMeta($$, $2.Meta, meta.SlashToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3464,7 +3463,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PercentToken) + addMeta($$, $2.Meta, meta.PercentToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3476,7 +3475,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SlToken) + addMeta($$, $2.Meta, meta.SlToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3488,7 +3487,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SrToken) + addMeta($$, $2.Meta, meta.SrToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3500,7 +3499,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.PlusToken) + addMeta($$, $1.Meta, meta.PlusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3512,7 +3511,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.MinusToken) + addMeta($$, $1.Meta, meta.MinusToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3524,7 +3523,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ExclamationMarkToken) + addMeta($$, $1.Meta, meta.ExclamationMarkToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3536,7 +3535,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.TildeToken) + addMeta($$, $1.Meta, meta.TildeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3548,7 +3547,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsIdenticalToken) + addMeta($$, $2.Meta, meta.IsIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3560,7 +3559,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsNotIdenticalToken) + addMeta($$, $2.Meta, meta.IsNotIdenticalToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3572,7 +3571,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsEqualToken) + addMeta($$, $2.Meta, meta.IsEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3584,7 +3583,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsNotEqualToken) + addMeta($$, $2.Meta, meta.IsNotEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3596,7 +3595,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.LessToken) + addMeta($$, $2.Meta, meta.LessToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3608,7 +3607,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsSmallerOrEqualToken) + addMeta($$, $2.Meta, meta.IsSmallerOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3620,7 +3619,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.GreaterToken) + addMeta($$, $2.Meta, meta.GreaterToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3632,7 +3631,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.IsGreaterOrEqualToken) + addMeta($$, $2.Meta, meta.IsGreaterOrEqualToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3644,7 +3643,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.SpaceshipToken) + addMeta($$, $2.Meta, meta.SpaceshipToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3656,7 +3655,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.InstanceofToken) + addMeta($$, $2.Meta, meta.InstanceofToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3665,8 +3664,8 @@ expr_without_variable: $$ = $2; // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3684,8 +3683,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $5)) // save comments - $$.AddComments($2.Comments, comment.QuestionMarkToken) - $$.AddComments($4.Comments, comment.ColonToken) + addMeta($$, $2.Meta, meta.QuestionMarkToken) + addMeta($$, $4.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3697,8 +3696,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.QuestionMarkToken) - $$.AddComments($3.Comments, comment.ColonToken) + addMeta($$, $2.Meta, meta.QuestionMarkToken) + addMeta($$, $3.Meta, meta.ColonToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3710,7 +3709,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.CoalesceToken) + addMeta($$, $2.Meta, meta.CoalesceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3728,7 +3727,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IntCastToken) + addMeta($$, $1.Meta, meta.IntCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3740,7 +3739,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.DoubleCastToken) + addMeta($$, $1.Meta, meta.DoubleCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3752,7 +3751,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.StringCastToken) + addMeta($$, $1.Meta, meta.StringCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3764,7 +3763,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ArrayCastToken) + addMeta($$, $1.Meta, meta.ArrayCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3776,7 +3775,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.ObjectCastToken) + addMeta($$, $1.Meta, meta.ObjectCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3788,7 +3787,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.BoolCastToken) + addMeta($$, $1.Meta, meta.BoolCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3800,7 +3799,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.UnsetCastToken) + addMeta($$, $1.Meta, meta.UnsetCastToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3826,11 +3825,7 @@ expr_without_variable: } // save comments - $$.AddComments($1.Comments, comment.ExitToken) - - if $2 != nil { - yylex.(*Parser).comments.AddFromChildNode($$, $2) - } + addMeta($$, $1.Meta, meta.ExitToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3842,7 +3837,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.AtToken) + addMeta($$, $1.Meta, meta.AtToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3860,8 +3855,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.BackquoteToken) - $$.AddComments($3.Comments, comment.BackquoteToken) + addMeta($$, $1.Meta, meta.BackquoteToken) + addMeta($$, $3.Meta, meta.BackquoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3873,7 +3868,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.PrintToken) + addMeta($$, $1.Meta, meta.PrintToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3885,7 +3880,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) + addMeta($$, $1.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3897,7 +3892,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) + addMeta($$, $1.Meta, meta.YieldToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3909,8 +3904,8 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.YieldToken) - $$.AddComments($3.Comments, comment.DoubleArrowToken) + addMeta($$, $1.Meta, meta.YieldToken) + addMeta($$, $3.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3922,7 +3917,7 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.YieldFromToken) + addMeta($$, $1.Meta, meta.YieldFromToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3934,14 +3929,14 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $11)) // save comments - $$.AddComments($1.Comments, comment.FunctionToken) + addMeta($$, $1.Meta, meta.FunctionToken) if $2 != nil { - $$.AddComments($2.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.AmpersandToken) } - $$.AddComments($4.Comments, comment.OpenParenthesisToken) - $$.AddComments($6.Comments, comment.CloseParenthesisToken) - $$.AddComments($9.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($11.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $4.Meta, meta.OpenParenthesisToken) + addMeta($$, $6.Meta, meta.CloseParenthesisToken) + addMeta($$, $9.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $11.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3953,15 +3948,15 @@ expr_without_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $12)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) - $$.AddComments($2.Comments, comment.FunctionToken) + addMeta($$, $1.Meta, meta.StaticToken) + addMeta($$, $2.Meta, meta.FunctionToken) if $3 != nil { - $$.AddComments($3.Comments, comment.AmpersandToken) + addMeta($$, $3.Meta, meta.AmpersandToken) } - $$.AddComments($5.Comments, comment.OpenParenthesisToken) - $$.AddComments($7.Comments, comment.CloseParenthesisToken) - $$.AddComments($10.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($12.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $5.Meta, meta.OpenParenthesisToken) + addMeta($$, $7.Meta, meta.CloseParenthesisToken) + addMeta($$, $10.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $12.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4003,9 +3998,9 @@ lexical_vars: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.UseToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.UseToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4017,7 +4012,7 @@ lexical_var_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4040,7 +4035,7 @@ lexical_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4056,8 +4051,8 @@ lexical_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.AmpersandToken) - variable.AddComments($2.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.AmpersandToken) + addMeta(variable, $2.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4081,7 +4076,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4093,7 +4088,7 @@ function_call: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4117,7 +4112,7 @@ class_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StaticToken) + addMeta($$, $1.Meta, meta.StaticToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4159,8 +4154,8 @@ exit_expr: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4211,9 +4206,9 @@ dereferencable_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.ArrayToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.ArrayToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4225,8 +4220,8 @@ dereferencable_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.OpenSquareBracket) - $$.AddComments($3.Comments, comment.CloseSquareBracket) + addMeta($$, $1.Meta, meta.OpenSquareBracket) + addMeta($$, $3.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4238,7 +4233,7 @@ dereferencable_scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ConstantEncapsedStringToken) + addMeta($$, $1.Meta, meta.ConstantEncapsedStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4253,7 +4248,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.LnumberToken) + addMeta($$, $1.Meta, meta.LnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4265,7 +4260,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.DnumberToken) + addMeta($$, $1.Meta, meta.DnumberToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4277,7 +4272,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.LineToken) + addMeta($$, $1.Meta, meta.LineToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4289,7 +4284,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FileToken) + addMeta($$, $1.Meta, meta.FileToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4301,7 +4296,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.DirToken) + addMeta($$, $1.Meta, meta.DirToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4313,7 +4308,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.TraitCToken) + addMeta($$, $1.Meta, meta.TraitCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4325,7 +4320,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.MethodCToken) + addMeta($$, $1.Meta, meta.MethodCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4337,7 +4332,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.FuncCToken) + addMeta($$, $1.Meta, meta.FuncCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4349,7 +4344,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.NsCToken) + addMeta($$, $1.Meta, meta.NsCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4361,7 +4356,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.ClassCToken) + addMeta($$, $1.Meta, meta.ClassCToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4375,7 +4370,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.StartHeredocToken) + addMeta($$, $1.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4387,7 +4382,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.StartHeredocToken) + addMeta($$, $1.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4399,7 +4394,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.DoubleQuoteToken) + addMeta($$, $1.Meta, meta.DoubleQuoteToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4411,7 +4406,7 @@ scalar: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.StartHeredocToken) + addMeta($$, $1.Meta, meta.StartHeredocToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4449,8 +4444,8 @@ constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) - target.AddComments($3.Comments, comment.IdentifierToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, $3.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4464,8 +4459,8 @@ constant: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) - target.AddComments($3.Comments, comment.IdentifierToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) + addMeta(target, $3.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4522,8 +4517,8 @@ dereferencable: $$ = $2; // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4547,8 +4542,8 @@ callable_expr: $$ = $2; // save comments - $$.AddComments($1.Comments, comment.OpenParenthesisToken) - $$.AddComments($3.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.OpenParenthesisToken) + addMeta($$, $3.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4575,8 +4570,8 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4588,8 +4583,8 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4601,8 +4596,8 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4614,7 +4609,7 @@ callable_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.ObjectOperatorToken) + addMeta($$, $2.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4647,7 +4642,7 @@ variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.ObjectOperatorToken) + addMeta($$, $2.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4664,7 +4659,7 @@ simple_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4676,9 +4671,9 @@ simple_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.DollarToken) - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.DollarToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4690,7 +4685,7 @@ simple_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.DollarToken) + addMeta($$, $1.Meta, meta.DollarToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4705,7 +4700,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4717,7 +4712,7 @@ static_member: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4738,8 +4733,8 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4751,8 +4746,8 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $4)) // save comments - $$.AddComments($2.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($4.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $2.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $4.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4764,7 +4759,7 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.ObjectOperatorToken) + addMeta($$, $2.Meta, meta.ObjectOperatorToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4776,7 +4771,7 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4788,7 +4783,7 @@ new_variable: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.PaamayimNekudotayimToken) + addMeta($$, $2.Meta, meta.PaamayimNekudotayimToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4803,7 +4798,7 @@ member_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.IdentifierToken) + addMeta($$, $1.Meta, meta.IdentifierToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4812,8 +4807,8 @@ member_name: $$ = $2; // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4834,7 +4829,7 @@ property_name: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StringToken) + addMeta($$, $1.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4843,8 +4838,8 @@ property_name: $$ = $2; // save comments - $$.AddComments($1.Comments, comment.OpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.OpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4890,7 +4885,7 @@ non_empty_array_pair_list: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4915,7 +4910,7 @@ array_pair: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodesPosition($1, $3)) // save comments - $$.AddComments($2.Comments, comment.DoubleArrowToken) + addMeta($$, $2.Meta, meta.DoubleArrowToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4938,8 +4933,8 @@ array_pair: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($3, $4)) // save comments - $$.AddComments($2.Comments, comment.DoubleArrowToken) - reference.AddComments($3.Comments, comment.AmpersandToken) + addMeta($$, $2.Meta, meta.DoubleArrowToken) + addMeta(reference, $3.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4953,7 +4948,7 @@ array_pair: reference.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - reference.AddComments($1.Comments, comment.AmpersandToken) + addMeta(reference, $1.Meta, meta.AmpersandToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4968,10 +4963,10 @@ array_pair: $$.SetPosition(yylex.(*Parser).positionBuilder.NewNodeTokenPosition($1, $6)) // save comments - $$.AddComments($2.Comments, comment.DoubleArrowToken) - list.AddComments($3.Comments, comment.ListToken) - list.AddComments($4.Comments, comment.OpenParenthesisToken) - list.AddComments($6.Comments, comment.CloseParenthesisToken) + addMeta($$, $2.Meta, meta.DoubleArrowToken) + addMeta(list, $3.Meta, meta.ListToken) + addMeta(list, $4.Meta, meta.OpenParenthesisToken) + addMeta(list, $6.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4986,9 +4981,9 @@ array_pair: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - list.AddComments($1.Comments, comment.ListToken) - list.AddComments($2.Comments, comment.OpenParenthesisToken) - list.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta(list, $1.Meta, meta.ListToken) + addMeta(list, $2.Meta, meta.OpenParenthesisToken) + addMeta(list, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5010,7 +5005,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($2)) // save comments - encapsed.AddComments($2.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, $2.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5029,7 +5024,7 @@ encaps_list: encapsed.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - encapsed.AddComments($1.Comments, comment.EncapsedAndWhitespaceToken) + addMeta(encapsed, $1.Meta, meta.EncapsedAndWhitespaceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5046,7 +5041,7 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5062,9 +5057,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - $$.AddComments($2.Comments, comment.OpenSquareBracket) - $$.AddComments($4.Comments, comment.CloseSquareBracket) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta($$, $2.Meta, meta.OpenSquareBracket) + addMeta($$, $4.Meta, meta.CloseSquareBracket) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5082,9 +5077,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - variable.AddComments($1.Comments, comment.VariableToken) - $$.AddComments($2.Comments, comment.ObjectOperatorToken) - fetch.AddComments($3.Comments, comment.StringToken) + addMeta(variable, $1.Meta, meta.VariableToken) + addMeta($$, $2.Meta, meta.ObjectOperatorToken) + addMeta(fetch, $3.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5096,8 +5091,8 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.DollarOpenCurlyBracesToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5111,9 +5106,9 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3)) // save comments - $$.AddComments($1.Comments, comment.DollarOpenCurlyBracesToken) - name.AddComments($2.Comments, comment.StringVarnameToken) - $$.AddComments($3.Comments, comment.CloseCurlyBracesToken) + addMeta($$, $1.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(name, $2.Meta, meta.StringVarnameToken) + addMeta($$, $3.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5129,11 +5124,11 @@ encaps_var: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $6)) // save comments - $$.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) + addMeta($$, $1.Meta, meta.DollarOpenCurlyBracesToken) + addMeta(variable, $2.Meta, meta.StringVarnameToken) + addMeta($$, $3.Meta, meta.OpenSquareBracket) + addMeta($$, $5.Meta, meta.CloseSquareBracket) + addMeta($$, $6.Meta, meta.CloseCurlyBracesToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5154,7 +5149,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.StringToken) + addMeta($$, $1.Meta, meta.StringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5171,7 +5166,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.NumStringToken) + addMeta($$, $1.Meta, meta.NumStringToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5197,11 +5192,11 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.MinusToken) + addMeta($$, $1.Meta, meta.MinusToken) if isInt { - lnumber.AddComments($2.Comments, comment.NumStringToken) + addMeta(lnumber, $2.Meta, meta.NumStringToken) } else { - $$.AddComments($2.Comments, comment.NumStringToken) + addMeta($$, $2.Meta, meta.NumStringToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -5216,7 +5211,7 @@ encaps_var_offset: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenPosition($1)) // save comments - $$.AddComments($1.Comments, comment.VariableToken) + addMeta($$, $1.Meta, meta.VariableToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5231,12 +5226,12 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $5)) // save comments - $$.AddComments($1.Comments, comment.IssetToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) + addMeta($$, $1.Meta, meta.IssetToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) if $4 != nil { - $$.AddComments($4.Comments, comment.CommaToken) + addMeta($$, $4.Meta, meta.CommaToken) } - $$.AddComments($5.Comments, comment.CloseParenthesisToken) + addMeta($$, $5.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5248,9 +5243,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.EmptyToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.EmptyToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5262,7 +5257,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IncludeToken) + addMeta($$, $1.Meta, meta.IncludeToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5274,7 +5269,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.IncludeOnceToken) + addMeta($$, $1.Meta, meta.IncludeOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5286,9 +5281,9 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4)) // save comments - $$.AddComments($1.Comments, comment.EvalToken) - $$.AddComments($2.Comments, comment.OpenParenthesisToken) - $$.AddComments($4.Comments, comment.CloseParenthesisToken) + addMeta($$, $1.Meta, meta.EvalToken) + addMeta($$, $2.Meta, meta.OpenParenthesisToken) + addMeta($$, $4.Meta, meta.CloseParenthesisToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5300,7 +5295,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.RequireToken) + addMeta($$, $1.Meta, meta.RequireToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5312,7 +5307,7 @@ internal_functions_in_yacc: $$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $2)) // save comments - $$.AddComments($1.Comments, comment.RequireOnceToken) + addMeta($$, $1.Meta, meta.RequireOnceToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5330,7 +5325,7 @@ isset_variables: $$ = append($1, $3) // save comments - lastNode($1).AddComments($2.Comments, comment.CommaToken) + addMeta(lastNode($1), $2.Meta, meta.CommaToken) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/php7/php7_test.go b/php7/php7_test.go index 8028ec9..a5ab734 100644 --- a/php7/php7_test.go +++ b/php7/php7_test.go @@ -6,7 +6,6 @@ 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" @@ -385,39 +384,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", }, @@ -426,33 +425,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", }, @@ -461,25 +460,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", }, @@ -492,30 +491,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", }, @@ -523,33 +522,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", }, @@ -558,25 +557,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", }, @@ -589,30 +588,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", }, @@ -620,42 +619,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, IsReference: false, + Variadic: 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", }, @@ -664,25 +663,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", }, @@ -695,31 +694,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", }, @@ -728,42 +727,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", }, @@ -772,25 +771,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", }, @@ -803,30 +802,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", }, @@ -834,42 +833,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, + 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", }, @@ -878,25 +877,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", }, @@ -909,31 +908,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", }, @@ -942,33 +941,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", }, @@ -977,25 +976,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", }, @@ -1008,67 +1007,55 @@ 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, - }, - Comments: []*comment.Comment{ - { - Position: &position.Position{ - StartLine: 8, - EndLine: 8, - StartPos: 136, - EndPos: 157, - }, - Value: "/** anonymous class */", - TokenName: 'O', - }, + EndLine: 9, + StartPos: 161, + EndPos: 184, }, 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", }, @@ -1077,25 +1064,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", }, @@ -1103,63 +1090,65 @@ 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", }, @@ -1169,37 +1158,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", }, @@ -1207,9 +1196,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", }, @@ -1219,37 +1208,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", }, @@ -1257,16 +1246,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", }, @@ -1277,37 +1266,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", }, @@ -1315,9 +1304,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", }, @@ -1327,37 +1316,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", }, @@ -1365,16 +1354,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", }, @@ -1385,46 +1374,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", }, @@ -1435,18 +1424,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, + ReturnsRef: false, PhpDocComment: "", FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 18, - EndLine: 18, - StartPos: 315, - EndPos: 317, + EndLine: 18, + StartPos: 315, + EndPos: 317, }, Value: "foo", }, @@ -1454,33 +1443,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", }, @@ -1490,16 +1479,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", }, @@ -1507,24 +1496,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", }, @@ -1535,26 +1524,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", }, @@ -1563,38 +1552,39 @@ 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", }, @@ -1602,18 +1592,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, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 381, - EndPos: 383, + EndLine: 19, + StartPos: 381, + EndPos: 383, }, Value: "foo", }, @@ -1621,9 +1611,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", }, @@ -1632,33 +1622,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", }, @@ -1668,16 +1658,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", }, @@ -1685,24 +1675,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", }, @@ -1713,26 +1703,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", }, @@ -1741,16 +1731,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", }, @@ -1760,11 +1750,12 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 19, - EndLine: 19, - StartPos: 415, - EndPos: 416, + EndLine: 19, + StartPos: 415, + EndPos: 416, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -1772,51 +1763,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, + ReturnsRef: false, + Static: false, PhpDocComment: "", - 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", }, @@ -1826,16 +1817,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", }, @@ -1843,24 +1834,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", }, @@ -1871,26 +1862,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", }, @@ -1899,73 +1890,74 @@ 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, + ReturnsRef: false, + Static: true, PhpDocComment: "", - 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", }, @@ -1975,16 +1967,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", }, @@ -1992,24 +1984,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", }, @@ -2020,26 +2012,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, Variadic: true, + ByRef: 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", }, @@ -2048,38 +2040,39 @@ 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", }, @@ -2087,16 +2080,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", }, @@ -2104,16 +2097,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.", }, @@ -2121,16 +2114,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", }, @@ -2138,16 +2131,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", }, @@ -2155,16 +2148,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", }, @@ -2172,16 +2165,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", }, @@ -2189,16 +2182,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__", }, @@ -2206,16 +2199,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__", }, @@ -2223,16 +2216,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__", }, @@ -2240,16 +2233,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__", }, @@ -2257,16 +2250,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__", }, @@ -2274,16 +2267,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__", }, @@ -2291,16 +2284,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__", }, @@ -2308,16 +2301,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__", }, @@ -2325,40 +2318,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", }, @@ -2369,47 +2362,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", }, @@ -2417,9 +2410,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", }, @@ -2430,47 +2423,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", }, @@ -2478,16 +2471,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", }, @@ -2499,47 +2492,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", }, @@ -2547,9 +2540,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", }, @@ -2560,47 +2553,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", }, @@ -2608,9 +2601,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", }, @@ -2621,47 +2614,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", }, @@ -2669,9 +2662,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", }, @@ -2682,47 +2675,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", }, @@ -2730,16 +2723,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", }, @@ -2751,31 +2744,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", }, @@ -2783,25 +2776,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", }, @@ -2812,47 +2805,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", }, @@ -2860,9 +2853,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", }, @@ -2870,9 +2863,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: "()", }, @@ -2882,40 +2875,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", }, @@ -2926,47 +2919,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", }, @@ -2974,9 +2967,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", }, @@ -2987,47 +2980,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", }, @@ -3039,47 +3032,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", }, @@ -3087,18 +3080,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, }, }, }, @@ -3108,23 +3101,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", }, @@ -3132,33 +3125,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -3166,33 +3160,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -3200,11 +3195,12 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -3212,23 +3208,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", }, @@ -3236,50 +3232,52 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -3287,33 +3285,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -3321,33 +3320,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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,62 +3355,64 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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, }, }, }, @@ -3419,40 +3421,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", }, @@ -3463,40 +3465,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", }, @@ -3507,17 +3509,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", }, @@ -3525,17 +3527,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", }, @@ -3544,26 +3546,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", }, @@ -3571,26 +3573,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", }, @@ -3602,17 +3604,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", }, @@ -3620,34 +3622,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", }, @@ -3655,26 +3657,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", }, @@ -3686,17 +3688,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", }, @@ -3704,29 +3706,30 @@ 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, + EndLine: 72, + StartPos: 1531, + EndPos: 1532, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -3734,17 +3737,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", }, @@ -3752,18 +3755,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, }, PhpDocComment: "", - ReturnsRef: true, + ReturnsRef: true, MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1573, - EndPos: 1575, + EndLine: 73, + StartPos: 1573, + EndPos: 1575, }, Value: "bar", }, @@ -3771,18 +3774,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", }, @@ -3790,11 +3793,12 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 73, - EndLine: 73, - StartPos: 1579, - EndPos: 1580, + EndLine: 73, + StartPos: 1579, + EndPos: 1580, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -3802,17 +3806,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", }, @@ -3820,18 +3824,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", }, @@ -3839,18 +3843,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", }, @@ -3858,17 +3862,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", }, @@ -3877,11 +3881,12 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 74, - EndLine: 74, - StartPos: 1633, - EndPos: 1634, + EndLine: 74, + StartPos: 1633, + EndPos: 1634, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -3889,17 +3894,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", }, @@ -3907,29 +3912,30 @@ 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", }, @@ -3937,9 +3943,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", }, @@ -3947,46 +3953,47 @@ 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", }, @@ -3994,9 +4001,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", }, @@ -4004,25 +4011,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", }, @@ -4030,22 +4037,23 @@ 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", }, @@ -4053,9 +4061,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", }, @@ -4063,25 +4071,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", }, @@ -4090,17 +4098,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", }, @@ -4108,59 +4116,60 @@ 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", }, @@ -4170,25 +4179,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", }, @@ -4197,17 +4206,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", }, @@ -4215,41 +4224,42 @@ 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", }, @@ -4257,26 +4267,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", }, @@ -4286,33 +4296,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, }, }, }, @@ -4321,40 +4331,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", }, @@ -4365,40 +4375,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", }, @@ -4409,34 +4419,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", }, @@ -4445,43 +4455,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", }, @@ -4490,44 +4500,45 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 86, - EndLine: 86, - StartPos: 1975, - EndPos: 1976, + EndLine: 86, + StartPos: 1975, + EndPos: 1976, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4536,35 +4547,37 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 87, - EndLine: 87, - StartPos: 1996, - EndPos: 2008, + EndLine: 87, + StartPos: 1996, + EndPos: 2008, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 88, + StartPos: 2015, + EndPos: 2016, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4572,24 +4585,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", }, @@ -4597,9 +4610,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", }, @@ -4608,24 +4621,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", }, @@ -4635,31 +4648,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", }, @@ -4667,9 +4680,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", }, @@ -4679,23 +4692,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", }, @@ -4703,9 +4716,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", }, @@ -4715,23 +4728,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", }, @@ -4740,23 +4753,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", }, @@ -4766,41 +4779,42 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 91, - EndLine: 91, - StartPos: 2089, - EndPos: 2090, + EndLine: 91, + StartPos: 2089, + EndPos: 2090, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4808,9 +4822,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", }, @@ -4820,23 +4834,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", }, @@ -4845,23 +4859,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", }, @@ -4871,33 +4885,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4905,16 +4920,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", }, @@ -4922,33 +4937,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 93, - EndLine: 93, - StartPos: 2152, - EndPos: 2153, + EndLine: 93, + StartPos: 2152, + EndPos: 2153, + }, + Stmts: []node.Node{ }, - 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", }, @@ -4956,16 +4972,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", }, @@ -4973,33 +4989,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: -1, - EndLine: -1, - StartPos: -1, - EndPos: -1, + EndLine: -1, + StartPos: -1, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5007,16 +5024,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", }, @@ -5024,16 +5041,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", }, @@ -5041,33 +5058,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 95, - EndLine: 95, - StartPos: 2217, - EndPos: 2218, + EndLine: 95, + StartPos: 2217, + EndPos: 2218, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5075,16 +5093,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", }, @@ -5092,23 +5110,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", }, @@ -5117,33 +5135,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 96, - EndLine: 96, - StartPos: 2248, - EndPos: 2249, + EndLine: 96, + StartPos: 2248, + EndPos: 2249, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5151,16 +5170,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", }, @@ -5168,31 +5187,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", }, @@ -5203,33 +5222,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 97, - EndLine: 97, - StartPos: 2284, - EndPos: 2285, + EndLine: 97, + StartPos: 2284, + EndPos: 2285, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5237,16 +5257,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", }, @@ -5254,31 +5274,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", }, @@ -5289,48 +5309,50 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 98, - EndLine: 98, - StartPos: 2316, - EndPos: 2317, + EndLine: 98, + StartPos: 2316, + EndPos: 2317, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5338,9 +5360,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, }, }, }, @@ -5348,18 +5370,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", }, @@ -5367,16 +5389,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", }, @@ -5386,63 +5408,64 @@ 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", }, @@ -5450,16 +5473,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", }, @@ -5469,16 +5492,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", }, @@ -5486,16 +5509,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", }, @@ -5503,31 +5526,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", }, @@ -5535,33 +5558,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 107, - EndLine: 107, - StartPos: 2487, - EndPos: 2488, + EndLine: 107, + StartPos: 2487, + EndPos: 2488, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5569,33 +5593,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2500, - EndPos: 2501, + EndLine: 108, + StartPos: 2500, + EndPos: 2501, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5603,11 +5628,12 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 108, - EndLine: 108, - StartPos: 2515, - EndPos: 2516, + EndLine: 108, + StartPos: 2515, + EndPos: 2516, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -5615,23 +5641,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", }, @@ -5639,50 +5665,52 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 109, - EndLine: 109, - StartPos: 2528, - EndPos: 2529, + EndLine: 109, + StartPos: 2528, + EndPos: 2529, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 109, + StartPos: 2536, + EndPos: 2537, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5690,33 +5718,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2549, - EndPos: 2550, + EndLine: 110, + StartPos: 2549, + EndPos: 2550, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5724,33 +5753,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2564, - EndPos: 2565, + EndLine: 110, + StartPos: 2564, + EndPos: 2565, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5758,52 +5788,54 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 110, - EndLine: 110, - StartPos: 2579, - EndPos: 2580, + EndLine: 110, + StartPos: 2579, + EndPos: 2580, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 110, + StartPos: 2587, + EndPos: 2588, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5811,33 +5843,34 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2600, - EndPos: 2601, + EndLine: 111, + StartPos: 2600, + EndPos: 2601, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5845,41 +5878,42 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2615, - EndPos: 2616, + EndLine: 111, + StartPos: 2615, + EndPos: 2616, + }, + Stmts: []node.Node{ }, - 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", }, @@ -5887,27 +5921,29 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 111, - EndLine: 111, - StartPos: 2631, - EndPos: 2632, + EndLine: 111, + StartPos: 2631, + EndPos: 2632, + }, + Stmts: []node.Node{ }, - 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, + EndLine: 111, + StartPos: 2639, + EndPos: 2640, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -5916,78 +5952,79 @@ 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", }, @@ -5995,47 +6032,48 @@ 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", }, @@ -6044,17 +6082,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", }, @@ -6062,29 +6100,30 @@ 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", }, @@ -6094,54 +6133,56 @@ 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, + EndLine: 118, + StartPos: 2786, + EndPos: 2797, + }, + Stmts: []node.Node{ }, - 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", }, @@ -6149,17 +6190,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", }, @@ -6168,24 +6209,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", }, @@ -6198,17 +6239,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", }, @@ -6216,26 +6257,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", }, @@ -6244,24 +6285,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", }, @@ -6270,24 +6311,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", }, @@ -6295,9 +6336,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", }, @@ -6309,31 +6350,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", }, @@ -6342,23 +6383,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", }, @@ -6366,9 +6407,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", }, @@ -6378,71 +6419,74 @@ 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, + EndLine: -1, + StartPos: 2912, + EndPos: -1, + }, + Stmts: []node.Node{ }, - 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{ + }, }, }, }, @@ -6450,62 +6494,64 @@ 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{ + }, }, }, }, @@ -6513,40 +6559,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", }, @@ -6554,9 +6600,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, }, }, }, @@ -6564,16 +6610,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", }, @@ -6581,9 +6627,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, }, }, }, @@ -6594,40 +6640,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", }, @@ -6635,9 +6681,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, }, }, }, @@ -6645,16 +6691,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", }, @@ -6662,9 +6708,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, }, }, }, @@ -6675,23 +6721,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", }, @@ -6700,36 +6746,37 @@ 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", }, @@ -6737,25 +6784,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", }, @@ -6768,17 +6815,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", }, @@ -6786,25 +6833,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", }, @@ -6813,17 +6860,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", }, @@ -6833,9 +6880,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, }, }, }, @@ -6844,17 +6891,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", }, @@ -6862,25 +6909,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", }, @@ -6889,17 +6936,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", }, @@ -6909,31 +6956,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", }, @@ -6941,9 +6988,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", }, @@ -6956,17 +7003,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", }, @@ -6974,25 +7021,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", }, @@ -7001,17 +7048,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", }, @@ -7021,31 +7068,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", }, @@ -7053,9 +7100,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", }, @@ -7068,17 +7115,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", }, @@ -7086,25 +7133,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", }, @@ -7113,17 +7160,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", }, @@ -7133,31 +7180,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", }, @@ -7165,18 +7212,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", }, @@ -7189,17 +7236,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", }, @@ -7207,25 +7254,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", }, @@ -7234,17 +7281,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", }, @@ -7254,39 +7301,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", }, @@ -7295,9 +7342,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", }, @@ -7306,17 +7353,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", }, @@ -7325,17 +7372,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", }, @@ -7346,31 +7393,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", }, @@ -7379,9 +7426,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", }, @@ -7389,9 +7436,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", }, @@ -7404,44 +7451,47 @@ func TestPhp7(t *testing.T) { &stmt.Try{ Position: &position.Position{ StartLine: 154, - EndLine: -1, - StartPos: 3432, - EndPos: -1, + EndLine: -1, + StartPos: 3432, + EndPos: -1, + }, + Stmts: []node.Node{ + }, + Catches: []node.Node{ }, - Stmts: []node.Node{}, - Catches: []node.Node{}, }, &stmt.Try{ Position: &position.Position{ StartLine: 155, - EndLine: 155, - StartPos: 3441, - EndPos: 3470, + EndLine: 155, + StartPos: 3441, + EndPos: 3470, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7451,55 +7501,57 @@ 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, + EndLine: 156, + StartPos: 3474, + EndPos: 3520, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7508,17 +7560,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", }, @@ -7528,55 +7580,57 @@ 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, + EndLine: 157, + StartPos: 3524, + EndPos: 3584, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7586,44 +7640,45 @@ 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", }, @@ -7633,55 +7688,57 @@ 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, + EndLine: 158, + StartPos: 3588, + EndPos: 3628, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7691,54 +7748,56 @@ 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, + EndLine: 158, + StartPos: 3619, + EndPos: 3628, + }, + Stmts: []node.Node{ }, - 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", }, @@ -7746,16 +7805,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", }, @@ -7765,32 +7824,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", }, @@ -7802,32 +7861,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", }, @@ -7839,32 +7898,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", }, @@ -7873,9 +7932,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", }, @@ -7885,32 +7944,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", }, @@ -7920,24 +7979,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", }, @@ -7949,32 +8008,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", }, @@ -7984,24 +8043,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", }, @@ -8010,9 +8069,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", }, @@ -8022,16 +8081,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", }, @@ -8039,24 +8098,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", }, @@ -8066,24 +8125,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", }, @@ -8095,16 +8154,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", }, @@ -8112,24 +8171,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", }, @@ -8138,9 +8197,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", }, @@ -8148,24 +8207,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", }, @@ -8174,9 +8233,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", }, @@ -8186,16 +8245,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", }, @@ -8203,24 +8262,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", }, @@ -8230,24 +8289,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", }, @@ -8259,16 +8318,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", }, @@ -8276,24 +8335,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", }, @@ -8302,9 +8361,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", }, @@ -8312,24 +8371,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", }, @@ -8338,9 +8397,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", }, @@ -8350,24 +8409,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", }, @@ -8377,24 +8436,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", }, @@ -8404,24 +8463,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", }, @@ -8433,24 +8492,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", }, @@ -8460,24 +8519,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", }, @@ -8487,24 +8546,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", }, @@ -8513,9 +8572,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", }, @@ -8525,33 +8584,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", }, @@ -8561,24 +8620,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", }, @@ -8588,24 +8647,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", }, @@ -8617,33 +8676,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", }, @@ -8653,24 +8712,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", }, @@ -8680,24 +8739,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", }, @@ -8709,24 +8768,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", }, @@ -8736,33 +8795,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", }, @@ -8772,33 +8831,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", }, @@ -8810,30 +8869,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", }, @@ -8841,9 +8900,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", }, @@ -8852,37 +8911,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", }, @@ -8890,9 +8949,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", }, @@ -8900,9 +8959,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", }, @@ -8911,48 +8970,49 @@ 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, + EndLine: 180, + StartPos: 4032, + EndPos: 4038, + }, + Items: []node.Node{ }, - 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", }, @@ -8963,40 +9023,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", }, @@ -9004,67 +9064,68 @@ 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", }, }, }, }, - &expr.ArrayItem{}, + &expr.ArrayItem{ + }, }, }, }, &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", }, @@ -9074,30 +9135,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", }, @@ -9107,31 +9168,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", }, @@ -9140,9 +9201,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", }, @@ -9151,30 +9212,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", }, @@ -9182,9 +9243,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", }, @@ -9193,30 +9254,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", }, @@ -9226,30 +9287,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", }, @@ -9259,63 +9320,64 @@ 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, PhpDocComment: "", - ReturnsRef: false, + ReturnsRef: false, + Static: 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", }, @@ -9324,25 +9386,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, + ByRef: false, Variadic: 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", }, @@ -9352,24 +9414,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", }, @@ -9377,23 +9439,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", }, @@ -9401,76 +9463,78 @@ 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, }, - Static: false, + ReturnsRef: 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", }, @@ -9481,31 +9545,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", }, @@ -9516,31 +9580,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", }, @@ -9551,30 +9615,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", }, @@ -9584,30 +9648,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", }, @@ -9617,30 +9681,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", }, @@ -9650,46 +9714,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", }, @@ -9699,46 +9763,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", }, @@ -9748,31 +9812,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", }, @@ -9781,9 +9845,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, }, }, }, @@ -9791,31 +9855,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", }, @@ -9824,9 +9888,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, }, }, }, @@ -9834,31 +9898,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", }, @@ -9867,9 +9931,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, }, }, }, @@ -9877,30 +9941,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", }, @@ -9908,9 +9972,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, }, }, }, @@ -9918,30 +9982,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", }, @@ -9951,30 +10015,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", }, @@ -9984,30 +10048,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", }, @@ -10017,30 +10081,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", }, @@ -10050,30 +10114,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", }, @@ -10083,30 +10147,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", }, @@ -10116,30 +10180,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", }, @@ -10149,30 +10213,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", }, @@ -10182,30 +10246,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", }, @@ -10213,17 +10277,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", }, @@ -10234,30 +10298,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", }, @@ -10265,17 +10329,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", }, @@ -10286,30 +10350,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", }, @@ -10317,17 +10381,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", }, @@ -10338,31 +10402,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", }, @@ -10370,16 +10434,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", }, @@ -10390,45 +10454,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", }, @@ -10439,16 +10503,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", }, @@ -10458,52 +10522,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", }, @@ -10515,16 +10579,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", }, @@ -10534,60 +10598,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", }, @@ -10601,16 +10665,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", }, @@ -10620,30 +10684,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", }, @@ -10651,18 +10715,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, }, }, }, @@ -10670,31 +10734,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", }, @@ -10703,9 +10767,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, }, }, }, @@ -10713,31 +10777,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", }, @@ -10746,9 +10810,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, }, }, }, @@ -10756,31 +10820,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", }, @@ -10789,9 +10853,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, }, }, }, @@ -10799,55 +10863,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", }, @@ -10856,25 +10920,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", }, @@ -10882,37 +10946,38 @@ 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", }, @@ -10922,30 +10987,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", }, @@ -10953,9 +11018,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", }, @@ -10964,40 +11029,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", }, @@ -11008,16 +11073,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{ @@ -11029,65 +11094,67 @@ 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, + EndLine: 237, + StartPos: 4757, + EndPos: 4758, + }, + Parts: []node.Node{ }, - 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, + EndLine: 238, + StartPos: 4763, + EndPos: 4764, + }, + Items: []node.Node{ }, - 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", }, @@ -11098,40 +11165,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", }, @@ -11139,82 +11206,83 @@ 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", }, }, }, }, - &expr.ArrayItem{}, + &expr.ArrayItem{ + }, }, }, }, &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", }, @@ -11225,16 +11293,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", }, @@ -11244,52 +11312,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", }, @@ -11301,16 +11369,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", }, @@ -11320,60 +11388,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", }, @@ -11387,16 +11455,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", }, @@ -11406,31 +11474,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", }, @@ -11439,18 +11507,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, }, }, }, @@ -11458,31 +11526,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", }, @@ -11491,18 +11559,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, }, }, }, @@ -11510,31 +11578,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", }, @@ -11543,18 +11611,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, }, }, }, @@ -11562,31 +11630,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", }, @@ -11595,16 +11663,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", }, @@ -11614,30 +11682,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", }, @@ -11645,16 +11713,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", }, @@ -11664,31 +11732,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", }, @@ -11697,16 +11765,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", }, @@ -11716,31 +11784,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", }, @@ -11749,16 +11817,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", }, @@ -11768,30 +11836,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", }, @@ -11799,16 +11867,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", }, @@ -11816,16 +11884,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", }, @@ -11835,30 +11903,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", }, @@ -11866,16 +11934,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", }, @@ -11885,30 +11953,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", }, @@ -11916,23 +11984,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", }, @@ -11940,16 +12008,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", }, @@ -11957,16 +12025,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", }, @@ -11975,16 +12043,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", }, @@ -11994,37 +12062,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", }, @@ -12032,16 +12100,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", }, @@ -12049,16 +12117,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", }, @@ -12067,16 +12135,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", }, @@ -12084,16 +12152,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", }, @@ -12103,30 +12171,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", }, @@ -12136,30 +12204,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", }, @@ -12169,30 +12237,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", }, @@ -12202,46 +12270,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", }, @@ -12251,30 +12319,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", }, @@ -12282,16 +12350,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", }, @@ -12301,30 +12369,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", }, @@ -12334,30 +12402,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", }, @@ -12367,30 +12435,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", }, @@ -12400,30 +12468,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", }, @@ -12433,30 +12501,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", }, @@ -12466,30 +12534,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", }, @@ -12499,30 +12567,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", }, @@ -12532,30 +12600,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", }, @@ -12565,30 +12633,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", }, @@ -12598,30 +12666,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", }, @@ -12631,30 +12699,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", }, @@ -12664,30 +12732,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", }, @@ -12695,16 +12763,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", }, @@ -12714,30 +12782,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", }, @@ -12745,16 +12813,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", }, @@ -12764,30 +12832,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", }, @@ -12795,16 +12863,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", }, @@ -12814,30 +12882,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", }, @@ -12845,16 +12913,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", }, @@ -12864,30 +12932,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", }, @@ -12895,16 +12963,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", }, @@ -12914,30 +12982,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", }, @@ -12945,16 +13013,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", }, @@ -12964,30 +13032,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", }, @@ -12995,16 +13063,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", }, @@ -13014,30 +13082,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", }, @@ -13045,16 +13113,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", }, @@ -13064,30 +13132,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", }, @@ -13095,16 +13163,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", }, @@ -13114,30 +13182,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", }, @@ -13145,16 +13213,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", }, @@ -13164,30 +13232,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", }, @@ -13195,16 +13263,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", }, @@ -13214,30 +13282,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", }, @@ -13245,16 +13313,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", }, @@ -13264,30 +13332,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", }, @@ -13295,16 +13363,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", }, @@ -13314,30 +13382,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", }, @@ -13345,16 +13413,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", }, @@ -13364,30 +13432,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", }, @@ -13395,16 +13463,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", }, @@ -13414,30 +13482,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", }, @@ -13445,16 +13513,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", }, @@ -13464,30 +13532,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", }, @@ -13495,16 +13563,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", }, @@ -13514,30 +13582,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", }, @@ -13545,16 +13613,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", }, @@ -13564,30 +13632,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", }, @@ -13595,16 +13663,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", }, @@ -13614,30 +13682,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", }, @@ -13645,16 +13713,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", }, @@ -13664,30 +13732,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", }, @@ -13695,16 +13763,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", }, @@ -13714,30 +13782,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", }, @@ -13745,16 +13813,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", }, @@ -13764,30 +13832,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", }, @@ -13795,16 +13863,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", }, @@ -13814,30 +13882,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", }, @@ -13845,16 +13913,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", }, @@ -13864,30 +13932,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", }, @@ -13895,16 +13963,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", }, @@ -13914,30 +13982,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", }, @@ -13945,16 +14013,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", }, @@ -13964,30 +14032,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", }, @@ -13995,16 +14063,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", }, @@ -14014,30 +14082,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", }, @@ -14045,16 +14113,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", }, @@ -14064,30 +14132,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", }, @@ -14095,16 +14163,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", }, @@ -14114,30 +14182,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", }, @@ -14145,16 +14213,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", }, @@ -14164,30 +14232,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", }, @@ -14195,16 +14263,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", }, @@ -14214,30 +14282,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", }, @@ -14245,16 +14313,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", }, @@ -14264,30 +14332,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", }, @@ -14295,16 +14363,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", }, @@ -14314,30 +14382,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", }, @@ -14345,16 +14413,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", }, @@ -14364,30 +14432,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", }, @@ -14395,16 +14463,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", }, @@ -14414,30 +14482,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", }, @@ -14445,16 +14513,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", }, @@ -14464,30 +14532,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", }, @@ -14495,16 +14563,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", }, @@ -14514,30 +14582,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", }, @@ -14545,16 +14613,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", }, @@ -14564,30 +14632,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", }, @@ -14595,16 +14663,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", }, @@ -14614,30 +14682,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", }, @@ -14645,16 +14713,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", }, @@ -14664,30 +14732,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", }, @@ -14695,16 +14763,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", }, @@ -14714,17 +14782,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", }, @@ -14732,18 +14800,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, PhpDocComment: "", + ReturnsRef: false, MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5770, - EndPos: 5774, + EndLine: 318, + StartPos: 5770, + EndPos: 5774, }, Value: "class", }, @@ -14751,9 +14819,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", }, @@ -14761,11 +14829,12 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 318, - EndLine: 318, - StartPos: 5778, - EndPos: 5779, + EndLine: 318, + StartPos: 5778, + EndPos: 5779, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -14773,40 +14842,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", }, @@ -14815,9 +14884,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, }, }, }, @@ -14825,18 +14894,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", }, @@ -14844,25 +14913,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", }, @@ -14871,25 +14940,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", }, @@ -14900,105 +14969,109 @@ 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, + ReturnsRef: false, PhpDocComment: "", 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, PhpDocComment: "", + ReturnsRef: false, FunctionName: &node.Identifier{ Position: &position.Position{ StartLine: 329, - EndLine: 329, - StartPos: 5942, - EndPos: 5944, + EndLine: 329, + StartPos: 5942, + EndPos: 5944, }, Value: "foo", }, @@ -15006,25 +15079,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", }, @@ -15032,9 +15105,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", }, @@ -15042,25 +15115,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", }, @@ -15068,9 +15141,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", }, @@ -15078,25 +15151,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", }, @@ -15104,31 +15177,32 @@ 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", }, @@ -15136,34 +15210,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", }, @@ -15172,56 +15246,57 @@ 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", }, @@ -15229,18 +15304,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", }, @@ -15249,18 +15324,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, + ReturnsRef: false, PhpDocComment: "", MethodName: &node.Identifier{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6082, - EndPos: 6084, + EndLine: 331, + StartPos: 6082, + EndPos: 6084, }, Value: "bar", }, @@ -15268,27 +15343,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", }, @@ -15296,27 +15371,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", }, @@ -15324,18 +15399,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", }, @@ -15343,11 +15418,12 @@ func TestPhp7(t *testing.T) { Stmt: &stmt.StmtList{ Position: &position.Position{ StartLine: 331, - EndLine: 331, - StartPos: 6118, - EndPos: 6119, + EndLine: 331, + StartPos: 6118, + EndPos: 6119, + }, + Stmts: []node.Node{ }, - Stmts: []node.Node{}, }, }, }, @@ -15355,38 +15431,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", }, @@ -15396,9 +15472,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", }, @@ -15407,38 +15483,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", }, @@ -15448,9 +15524,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, }, }, }, @@ -15458,52 +15534,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", }, @@ -15514,9 +15590,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", }, @@ -15524,9 +15600,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, }, }, }, @@ -15534,45 +15610,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", }, @@ -15582,9 +15658,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", }, @@ -15592,9 +15668,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, }, }, }, @@ -15602,32 +15678,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, }, }, }, @@ -15635,45 +15711,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", }, @@ -15683,16 +15759,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", }, @@ -15701,9 +15777,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, }, }, }, @@ -15711,38 +15787,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", }, @@ -15751,9 +15827,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, }, }, }, @@ -15762,31 +15838,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", }, @@ -15795,16 +15871,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", }, @@ -15812,9 +15888,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, }, }, }, @@ -15822,31 +15898,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", }, @@ -15855,23 +15931,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", }, @@ -15879,9 +15955,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", }, @@ -15889,9 +15965,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, }, }, }, @@ -15899,30 +15975,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", }, @@ -15930,16 +16006,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", }, @@ -15949,30 +16025,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", }, @@ -15980,23 +16056,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", }, @@ -16004,9 +16080,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", }, @@ -16016,54 +16092,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", }, @@ -16073,47 +16149,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", }, diff --git a/scanner/lexer.go b/scanner/lexer.go index 49a052f..d16103c 100644 --- a/scanner/lexer.go +++ b/scanner/lexer.go @@ -12,7 +12,7 @@ import ( "github.com/z7zmey/php-parser/position" "github.com/cznic/golex/lex" - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" ) // Allocate Character classes anywhere in [0x80, 0xFF]. @@ -441,10 +441,11 @@ type Lexer struct { *lex.Lexer StateStack []int PhpDocComment string - Comments []*comment.Comment + Meta []meta.Meta heredocLabel string tokenBytesBuf *bytes.Buffer TokenPool sync.Pool + WithMeta bool } // Rune2Class returns the rune integer id @@ -477,7 +478,7 @@ func NewLexer(src io.Reader, fName string) *Lexer { Lexer: lx, StateStack: []int{0}, PhpDocComment: "", - Comments: nil, + Meta: nil, heredocLabel: "", tokenBytesBuf: &bytes.Buffer{}, TokenPool: sync.Pool{ @@ -530,7 +531,7 @@ func (l *Lexer) createToken(chars []lex.Char) *Token { lastChar := chars[len(chars)-1] token := l.TokenPool.Get().(*Token) - token.Comments = l.Comments + token.Meta = l.Meta token.Value = l.tokenString(chars) token.StartLine = l.File.Line(firstChar.Pos()) @@ -541,7 +542,11 @@ func (l *Lexer) createToken(chars []lex.Char) *Token { return token } -func (l *Lexer) addComment(chars []lex.Char) { +func (l *Lexer) addComments(chars []lex.Char) { + if !l.WithMeta { + return + } + firstChar := chars[0] lastChar := chars[len(chars)-1] @@ -552,8 +557,27 @@ func (l *Lexer) addComment(chars []lex.Char) { int(lastChar.Pos()), ) - c := comment.NewComment(l.tokenString(chars), pos) - l.Comments = append(l.Comments, c) + c := meta.NewComment(l.tokenString(chars), pos) + l.Meta = append(l.Meta, c) +} + +func (l *Lexer) addWhiteSpace(chars []lex.Char) { + if !l.WithMeta { + return + } + + firstChar := chars[0] + lastChar := chars[len(chars)-1] + + pos := position.NewPosition( + l.File.Line(firstChar.Pos()), + l.File.Line(lastChar.Pos()), + int(firstChar.Pos()), + int(lastChar.Pos()), + ) + + c := meta.NewWhiteSpace(l.tokenString(chars), pos) + l.Meta = append(l.Meta, c) } func (l *Lexer) tokenString(chars []lex.Char) string { diff --git a/scanner/scanner.go b/scanner/scanner.go index 96b28aa..ba58094 100644 --- a/scanner/scanner.go +++ b/scanner/scanner.go @@ -32,7 +32,7 @@ func isValidFirstVarNameRune(r rune) bool { } func (l *Lexer) Lex(lval Lval) int { - l.Comments = nil + l.Meta = nil c := l.Enter() yystate0: @@ -7556,6 +7556,7 @@ yyrule2: // . yyrule3: // \<\?php([ \t]|{NEW_LINE}) { l.begin(PHP) + l.ungetChars(len(l.Token()) - 5) goto yystate0 } yyrule4: // \<\? @@ -7571,8 +7572,10 @@ yyrule5: // \<\?= goto yystate0 } yyrule6: // [ \t\n\r]+ - - goto yystate0 + { + l.addWhiteSpace(l.Token()) + goto yystate0 + } yyrule7: // [;][ \t\n\r]*\?\>{NEW_LINE}? { l.begin(INITIAL) @@ -8367,7 +8370,7 @@ yyrule126: // (#|[/][/]) } break } - l.addComment(tb) + l.addComments(tb) goto yystate0 } yyrule127: // ([/][*])|([/][*][*]) @@ -8391,9 +8394,9 @@ yyrule127: // ([/][*])|([/][*][*]) } if is_doc_comment { l.PhpDocComment = string(l.TokenBytes(nil)) - l.addComment(l.Token()) + l.addComments(l.Token()) } else { - l.addComment(l.Token()) + l.addComments(l.Token()) } goto yystate0 } diff --git a/scanner/scanner.l b/scanner/scanner.l index 6e4f95f..cfa3dda 100644 --- a/scanner/scanner.l +++ b/scanner/scanner.l @@ -31,7 +31,7 @@ func isValidFirstVarNameRune(r rune) bool { } func (l *Lexer) Lex(lval Lval) int { - l.Comments = nil + l.Meta = nil c := l.Enter() %} @@ -84,11 +84,11 @@ NEW_LINE (\r|\n|\r\n) lval.Token(l.createToken(tb)) return T_INLINE_HTML -\<\?php([ \t]|{NEW_LINE}) l.begin(PHP); +\<\?php([ \t]|{NEW_LINE}) l.begin(PHP);l.ungetChars(len(l.Token())-5) \<\? l.begin(PHP); \<\?= l.begin(PHP);lval.Token(l.createToken(l.Token())); return T_ECHO; -[ \t\n\r]+ +[ \t\n\r]+ l.addWhiteSpace(l.Token()) [;][ \t\n\r]*\?\>{NEW_LINE}? l.begin(INITIAL);lval.Token(l.createToken(l.Token())); return Rune2Class(';'); \?\>{NEW_LINE}? l.begin(INITIAL);lval.Token(l.createToken(l.Token())); return Rune2Class(';'); @@ -284,7 +284,7 @@ NEW_LINE (\r|\n|\r\n) break; } - l.addComment(tb) + l.addComments(tb) ([/][*])|([/][*][*]) tb := l.Token() @@ -309,9 +309,9 @@ NEW_LINE (\r|\n|\r\n) if is_doc_comment { l.PhpDocComment = string(l.TokenBytes(nil)) - l.addComment(l.Token()) + l.addComments(l.Token()) } else { - l.addComment(l.Token()) + l.addComments(l.Token()) } {OPERATORS} lval.Token(l.createToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) diff --git a/scanner/scanner_test.go b/scanner/scanner_test.go index 5d8129b..9f52559 100644 --- a/scanner/scanner_test.go +++ b/scanner/scanner_test.go @@ -7,7 +7,7 @@ import ( "github.com/z7zmey/php-parser/position" - "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/scanner" @@ -415,6 +415,7 @@ func TestTokens(t *testing.T) { } lexer := scanner.NewLexer(bytes.NewBufferString(src), "test.php") + lexer.WithMeta = true lv := &lval{} actual := []int{} @@ -503,6 +504,7 @@ func TestTeplateStringTokens(t *testing.T) { } lexer := scanner.NewLexer(bytes.NewBufferString(src), "test.php") + lexer.WithMeta = true lv := &lval{} actual := []int{} @@ -588,6 +590,7 @@ func TestBackquoteStringTokens(t *testing.T) { } lexer := scanner.NewLexer(bytes.NewBufferString(src), "test.php") + lexer.WithMeta = true lv := &lval{} actual := []int{} @@ -681,6 +684,7 @@ CAT; } lexer := scanner.NewLexer(bytes.NewBufferString(src), "test.php") + lexer.WithMeta = true lv := &lval{} actual := []int{} @@ -754,6 +758,7 @@ CAT } lexer := scanner.NewLexer(bytes.NewBufferString(src), "test.php") + lexer.WithMeta = true lv := &lval{} actual := []int{} @@ -786,6 +791,7 @@ func TestInlineHtmlNopTokens(t *testing.T) { } lexer := scanner.NewLexer(bytes.NewBufferString(src), "test.php") + lexer.WithMeta = true lv := &lval{} actual := []int{} @@ -876,16 +882,18 @@ func TestSlashAfterVariable(t *testing.T) { func TestCommentEnd(t *testing.T) { src := ` test` - expected := []*comment.Comment{ - comment.NewComment("//test", position.NewPosition(2, 2, 8, 13)), + expected := []meta.Meta{ + meta.NewWhiteSpace("\n\t", position.NewPosition(1, 2, 6, 7)), + meta.NewComment("//test", position.NewPosition(2, 2, 8, 13)), } lexer := scanner.NewLexer(bytes.NewBufferString(src), "test.php") + lexer.WithMeta = true lv := &lval{} lexer.Lex(lv) - actual := lexer.Comments + actual := lexer.Meta assertEqual(t, expected, actual) } @@ -963,16 +981,18 @@ func TestInlineComment(t *testing.T) { src := ` 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 mm := n.GetMeta(); len(mm) > 0 { + fmt.Fprintf(d.Writer, "%v\"Meta\":\n", d.Indent+" ") + for _, m := range mm { + fmt.Fprintf(d.Writer, "%v%q before %q\n", d.Indent+" ", m, meta.TokenNames[m.GetTokenName()]) } } diff --git a/visitor/dumper_test.go b/visitor/dumper_test.go index f319dce..1c2d9e0 100644 --- a/visitor/dumper_test.go +++ b/visitor/dumper_test.go @@ -1,4 +1,3 @@ -// Package visitor contains walker.visitor implementations package visitor_test import ( @@ -23,6 +22,7 @@ func ExampleDumper() { }` php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php") + php7parser.WithMeta() php7parser.Parse() nodes := php7parser.GetRootNode() @@ -32,7 +32,6 @@ func ExampleDumper() { dumper := &visitor.Dumper{ Writer: os.Stdout, Indent: "| ", - Comments: php7parser.GetComments(), NsResolver: nsResolver, } nodes.Walk(dumper) @@ -43,38 +42,58 @@ func ExampleDumper() { // | "Stmts": // | [*stmt.Namespace] // | "Position": Pos{Line: 3-11 Pos: 10-143} + // | "Meta": + // | "\n\n\t\t" before "NamespaceToken" + // | " " before "OpenCurlyBracesToken" + // | "\n\t\t" before "CloseCurlyBracesToken" // | "NamespaceName": // | [*name.Name] // | "Position": Pos{Line: 3-3 Pos: 20-22} // | "Parts": // | [*name.NamePart] // | "Position": Pos{Line: 3-3 Pos: 20-22} + // | "Meta": + // | " " before "StringToken" // | "Value": "Foo" // | "Stmts": // | [*stmt.Class] // | "Position": Pos{Line: 4-10 Pos: 29-139} // | "NamespacedName": "Foo\\Bar" + // | "Meta": + // | "\n\t\t\t" before "ClassToken" + // | " " before "OpenCurlyBracesToken" + // | "\n\t\t\t" before "CloseCurlyBracesToken" // | "PhpDocComment": "" // | "ClassName": // | [*node.Identifier] // | "Position": Pos{Line: 4-4 Pos: 35-37} + // | "Meta": + // | " " before "StringToken" // | "Value": "Bar" // | "Stmts": // | [*stmt.ClassMethod] // | "Position": Pos{Line: 5-9 Pos: 45-134} + // | "Meta": + // | " " before "FunctionToken" // | "ReturnsRef": false // | "PhpDocComment": "" // | "MethodName": // | [*node.Identifier] // | "Position": Pos{Line: 5-5 Pos: 61-72} + // | "Meta": + // | " " before "IdentifierToken" // | "Value": "FunctionName" // | "Modifiers": // | [*node.Identifier] // | "Position": Pos{Line: 5-5 Pos: 45-50} + // | "Meta": + // | "\n\t\t\t\t" before "PublicToken" // | "Value": "public" // | "Params": // | [*node.Parameter] // | "Position": Pos{Line: 5-5 Pos: 74-89} + // | "Meta": + // | " " before "EqualToken" // | "Variadic": false // | "ByRef": false // | "VariableType": @@ -88,6 +107,8 @@ func ExampleDumper() { // | "Variable": // | [*expr.Variable] // | "Position": Pos{Line: 5-5 Pos: 79-82} + // | "Meta": + // | " " before "VariableToken" // | "VarName": // | [*node.Identifier] // | "Position": Pos{Line: 5-5 Pos: 79-82} @@ -102,18 +123,25 @@ func ExampleDumper() { // | "Parts": // | [*name.NamePart] // | "Position": Pos{Line: 5-5 Pos: 86-89} + // | "Meta": + // | " " before "StringToken" // | "Value": "null" // | "Stmt": // | [*stmt.StmtList] // | "Position": Pos{Line: 6-9 Pos: 96-134} + // | "Meta": + // | "\n\t\t\t\t" before "OpenCurlyBracesToken" + // | "\n\t\t\t\t" before "CloseCurlyBracesToken" // | "Stmts": // | [*stmt.Expression] // | "Position": Pos{Line: 8-8 Pos: 124-128} // | "Expr": // | [*expr.Variable] // | "Position": Pos{Line: 8-8 Pos: 124-127} - // | "Comments": + // | "Meta": + // | "\n\t\t\t\t\t" before "VariableToken" // | "// some comment\n" before "VariableToken" + // | "\n\t\t\t\t\t" before "VariableToken" // | "VarName": // | [*node.Identifier] // | "Position": Pos{Line: 8-8 Pos: 124-127} diff --git a/visitor/go_dumper.go b/visitor/go_dumper.go index 97ba85a..9aa39f0 100644 --- a/visitor/go_dumper.go +++ b/visitor/go_dumper.go @@ -7,6 +7,8 @@ import ( "reflect" "strings" + "github.com/z7zmey/php-parser/meta" + "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/walker" @@ -59,34 +61,39 @@ func (d *GoDumper) EnterNode(w walker.Walkable) bool { fmt.Fprint(d.Writer, "},\n") } - if cc := n.GetComments(); len(cc) > 0 { + if mm := n.GetMeta(); len(mm) > 0 { printIndent(d.Writer, d.depth) - fmt.Fprint(d.Writer, "Comments: []*comment.Comment{\n") + fmt.Fprint(d.Writer, "Meta: []meta.Meta{\n") d.depth++ - for _, c := range cc { + for _, m := range mm { printIndent(d.Writer, d.depth) - fmt.Fprint(d.Writer, "&comment.Comment{\n") + switch m.(type) { + case *meta.Comment: + fmt.Fprint(d.Writer, "&meta.Comment{\n") + case *meta.WhiteSpace: + fmt.Fprint(d.Writer, "&meta.WhiteSpace{\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) + fmt.Fprintf(d.Writer, "StartLine: %d,\n", m.GetPosition().StartLine) printIndent(d.Writer, d.depth) - fmt.Fprintf(d.Writer, "EndLine: %d,\n", c.Position.EndLine) + fmt.Fprintf(d.Writer, "EndLine: %d,\n", m.GetPosition().EndLine) printIndent(d.Writer, d.depth) - fmt.Fprintf(d.Writer, "StartPos: %d,\n", c.Position.StartPos) + fmt.Fprintf(d.Writer, "StartPos: %d,\n", m.GetPosition().StartPos) printIndent(d.Writer, d.depth) - fmt.Fprintf(d.Writer, "EndPos: %d,\n", c.Position.EndPos) + fmt.Fprintf(d.Writer, "EndPos: %d,\n", m.GetPosition().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) + fmt.Fprintf(d.Writer, "Value: %q,\n", m.String()) printIndent(d.Writer, d.depth) - fmt.Fprintf(d.Writer, "TokenName: %q,\n", c.TokenName) + fmt.Fprintf(d.Writer, "TokenName: %d,\n", m.GetTokenName()) d.depth-- printIndent(d.Writer, d.depth) diff --git a/visitor/go_dumper_test.go b/visitor/go_dumper_test.go index 154ca73..ef0fb63 100644 --- a/visitor/go_dumper_test.go +++ b/visitor/go_dumper_test.go @@ -1,4 +1,3 @@ -//Package visitor contains walker.visitor implementations package visitor_test import ( @@ -23,6 +22,7 @@ func ExampleGoDumper() { }` php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php") + php7parser.WithMeta() php7parser.Parse() nodes := php7parser.GetRootNode() @@ -50,6 +50,38 @@ func ExampleGoDumper() { // StartPos: 10, // EndPos: 142, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 1, + // EndLine: 3, + // StartPos: 6, + // EndPos: 9, + // }, + // Value: "\n\n\t\t", + // TokenName: 67, + // }, + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 3, + // EndLine: 3, + // StartPos: 23, + // EndPos: 23, + // }, + // Value: " ", + // TokenName: 133, + // }, + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 10, + // EndLine: 11, + // StartPos: 139, + // EndPos: 141, + // }, + // Value: "\n\t\t", + // TokenName: 134, + // }, + // }, // NamespaceName: &name.Name{ // Position: &position.Position{ // StartLine: 3, @@ -65,6 +97,18 @@ func ExampleGoDumper() { // StartPos: 20, // EndPos: 22, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 3, + // EndLine: 3, + // StartPos: 19, + // EndPos: 19, + // }, + // Value: " ", + // TokenName: 7, + // }, + // }, // Value: "Foo", // }, // }, @@ -77,6 +121,38 @@ func ExampleGoDumper() { // StartPos: 29, // EndPos: 138, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 3, + // EndLine: 4, + // StartPos: 25, + // EndPos: 28, + // }, + // Value: "\n\t\t\t", + // TokenName: 48, + // }, + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 4, + // EndLine: 4, + // StartPos: 38, + // EndPos: 38, + // }, + // Value: " ", + // TokenName: 133, + // }, + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 9, + // EndLine: 10, + // StartPos: 134, + // EndPos: 137, + // }, + // Value: "\n\t\t\t", + // TokenName: 134, + // }, + // }, // PhpDocComment: "", // ClassName: &node.Identifier{ // Position: &position.Position{ @@ -85,6 +161,18 @@ func ExampleGoDumper() { // StartPos: 35, // EndPos: 37, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 4, + // EndLine: 4, + // StartPos: 34, + // EndPos: 34, + // }, + // Value: " ", + // TokenName: 7, + // }, + // }, // Value: "Bar", // }, // Stmts: []node.Node{ @@ -95,6 +183,18 @@ func ExampleGoDumper() { // StartPos: 45, // EndPos: 133, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 5, + // EndLine: 5, + // StartPos: 51, + // EndPos: 51, + // }, + // Value: " ", + // TokenName: 34, + // }, + // }, // ReturnsRef: false, // PhpDocComment: "", // MethodName: &node.Identifier{ @@ -104,6 +204,18 @@ func ExampleGoDumper() { // StartPos: 61, // EndPos: 72, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 5, + // EndLine: 5, + // StartPos: 60, + // EndPos: 60, + // }, + // Value: " ", + // TokenName: 129, + // }, + // }, // Value: "FunctionName", // }, // Modifiers: []node.Node{ @@ -114,6 +226,18 @@ func ExampleGoDumper() { // StartPos: 45, // EndPos: 50, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 4, + // EndLine: 5, + // StartPos: 40, + // EndPos: 44, + // }, + // Value: "\n\t\t\t\t", + // TokenName: 91, + // }, + // }, // Value: "public", // }, // }, @@ -125,6 +249,18 @@ func ExampleGoDumper() { // StartPos: 74, // EndPos: 89, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 5, + // EndLine: 5, + // StartPos: 83, + // EndPos: 83, + // }, + // Value: " ", + // TokenName: 151, + // }, + // }, // Variadic: false, // ByRef: false, // VariableType: &name.Name{ @@ -153,6 +289,18 @@ func ExampleGoDumper() { // StartPos: 79, // EndPos: 82, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 5, + // EndLine: 5, + // StartPos: 78, + // EndPos: 78, + // }, + // Value: " ", + // TokenName: 9, + // }, + // }, // VarName: &node.Identifier{ // Position: &position.Position{ // StartLine: 5, @@ -185,6 +333,18 @@ func ExampleGoDumper() { // StartPos: 86, // EndPos: 89, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 5, + // EndLine: 5, + // StartPos: 85, + // EndPos: 85, + // }, + // Value: " ", + // TokenName: 7, + // }, + // }, // Value: "null", // }, // }, @@ -199,6 +359,28 @@ func ExampleGoDumper() { // StartPos: 96, // EndPos: 133, // }, + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 5, + // EndLine: 6, + // StartPos: 91, + // EndPos: 95, + // }, + // Value: "\n\t\t\t\t", + // TokenName: 133, + // }, + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 8, + // EndLine: 9, + // StartPos: 128, + // EndPos: 132, + // }, + // Value: "\n\t\t\t\t", + // TokenName: 134, + // }, + // }, // Stmts: []node.Node{ // &stmt.Expression{ // Position: &position.Position{ @@ -214,8 +396,18 @@ func ExampleGoDumper() { // StartPos: 123, // EndPos: 126, // }, - // Comments: []*comment.Comment{ - // &comment.Comment{ + // Meta: []meta.Meta{ + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 6, + // EndLine: 7, + // StartPos: 97, + // EndPos: 102, + // }, + // Value: "\n\t\t\t\t\t", + // TokenName: 9, + // }, + // &meta.Comment{ // Position: &position.Position{ // StartLine: 7, // EndLine: 7, @@ -223,7 +415,17 @@ func ExampleGoDumper() { // EndPos: 117, // }, // Value: "//some comment\n", - // TokenName: '\t', + // TokenName: 9, + // }, + // &meta.WhiteSpace{ + // Position: &position.Position{ + // StartLine: 7, + // EndLine: 8, + // StartPos: 117, + // EndPos: 122, + // }, + // Value: "\n\t\t\t\t\t", + // TokenName: 9, // }, // }, // VarName: &node.Identifier{ diff --git a/visitor/json_dumper.go b/visitor/json_dumper.go index dfc2c0f..f0e1934 100644 --- a/visitor/json_dumper.go +++ b/visitor/json_dumper.go @@ -5,16 +5,17 @@ import ( "fmt" "io" "reflect" + "sort" + + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" - "github.com/z7zmey/php-parser/parser" "github.com/z7zmey/php-parser/walker" ) type JsonDumper struct { Writer io.Writer - Comments parser.Comments NsResolver *NamespaceResolver } @@ -42,14 +43,19 @@ func (d *JsonDumper) EnterNode(w walker.Walkable) bool { } } - if c := n.GetComments(); len(c) > 0 { - fmt.Fprintf(d.Writer, ",%q:[", "comments") + if mm := n.GetMeta(); len(mm) > 0 { + fmt.Fprintf(d.Writer, ",%q:[", "meta") - for k, cc := range c { - if k == 0 { - fmt.Fprintf(d.Writer, "%q", cc) - } else { - fmt.Fprintf(d.Writer, ",%q", cc) + for k, m := range mm { + if k != 0 { + fmt.Fprint(d.Writer, ",") + } + + switch m.(type) { + case *meta.Comment: + fmt.Fprintf(d.Writer, "{%q:%q,%q:%q,%q:%q}", "type", "*meta.Comment", "value", m.String(), "tokenName", meta.TokenNames[m.GetTokenName()]) + case *meta.WhiteSpace: + fmt.Fprintf(d.Writer, "{%q:%q,%q:%q,%q:%q}", "type", "*meta.WhiteSpace", "value", m.String(), "tokenName", meta.TokenNames[m.GetTokenName()]) } } @@ -57,12 +63,20 @@ func (d *JsonDumper) EnterNode(w walker.Walkable) bool { } if a := n.Attributes(); len(a) > 0 { - for key, attr := range a { + var attributes []string + for key := range n.Attributes() { + attributes = append(attributes, key) + } + + sort.Strings(attributes) + + for _, attributeName := range attributes { + attr := a[attributeName] switch attr.(type) { case string: - fmt.Fprintf(d.Writer, ",\"%s\":%q", key, attr) + fmt.Fprintf(d.Writer, ",\"%s\":%q", attributeName, attr) default: - fmt.Fprintf(d.Writer, ",\"%s\":%v", key, attr) + fmt.Fprintf(d.Writer, ",\"%s\":%v", attributeName, attr) } } } diff --git a/visitor/json_dumper_test.go b/visitor/json_dumper_test.go index 5539668..b99f8ac 100644 --- a/visitor/json_dumper_test.go +++ b/visitor/json_dumper_test.go @@ -1,4 +1,3 @@ -//Package visitor contains walker.visitor implementations package visitor_test import ( @@ -24,6 +23,7 @@ func ExampleJsonDumper() { }` php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php") + php7parser.WithMeta() php7parser.Parse() nodes := php7parser.GetRootNode() @@ -32,11 +32,10 @@ func ExampleJsonDumper() { dumper := &visitor.JsonDumper{ Writer: os.Stdout, - Comments: php7parser.GetComments(), NsResolver: nsResolver, } nodes.Walk(dumper) - // Unordered output: - // {"type":"*node.Root","position":{"startPos":10,"endPos":166,"startLine":3,"endLine":12},"Stmts":[{"type":"*stmt.Namespace","position":{"startPos":10,"endPos":166,"startLine":3,"endLine":12},"NamespaceName":{"type":"*name.Name","position":{"startPos":20,"endPos":22,"startLine":3,"endLine":3},"Parts":[{"type":"*name.NamePart","position":{"startPos":20,"endPos":22,"startLine":3,"endLine":3},"Value":"Foo"}]},"Stmts":[{"type":"*stmt.Class","position":{"startPos":29,"endPos":162,"startLine":4,"endLine":11},"namespacedName":"Foo\\Bar","PhpDocComment":"","ClassName":{"type":"*node.Identifier","position":{"startPos":35,"endPos":37,"startLine":4,"endLine":4},"Value":"Bar"},"Stmts":[{"type":"*stmt.ClassMethod","position":{"startPos":45,"endPos":157,"startLine":5,"endLine":10},"ReturnsRef":false,"PhpDocComment":"","MethodName":{"type":"*node.Identifier","position":{"startPos":61,"endPos":72,"startLine":5,"endLine":5},"Value":"FunctionName"},"Modifiers":[{"type":"*node.Identifier","position":{"startPos":45,"endPos":50,"startLine":5,"endLine":5},"Value":"public"}],"Params":[{"type":"*node.Parameter","position":{"startPos":74,"endPos":89,"startLine":5,"endLine":5},"ByRef":false,"Variadic":false,"VariableType":{"type":"*name.Name","position":{"startPos":74,"endPos":77,"startLine":5,"endLine":5},"namespacedName":"Foo\\Type","Parts":[{"type":"*name.NamePart","position":{"startPos":74,"endPos":77,"startLine":5,"endLine":5},"Value":"Type"}]},"Variable":{"type":"*expr.Variable","position":{"startPos":79,"endPos":82,"startLine":5,"endLine":5},"VarName":{"type":"*node.Identifier","position":{"startPos":79,"endPos":82,"startLine":5,"endLine":5},"Value":"var"}},"DefaultValue":{"type":"*expr.ConstFetch","position":{"startPos":86,"endPos":89,"startLine":5,"endLine":5},"Constant":{"type":"*name.Name","position":{"startPos":86,"endPos":89,"startLine":5,"endLine":5},"namespacedName":"null","Parts":[{"type":"*name.NamePart","position":{"startPos":86,"endPos":89,"startLine":5,"endLine":5},"Value":"null"}]}}}],"Stmt":{"type":"*stmt.StmtList","position":{"startPos":96,"endPos":157,"startLine":6,"endLine":10},"Stmts":[{"type":"*stmt.Expression","position":{"startPos":147,"endPos":151,"startLine":9,"endLine":9},"Expr":{"type":"*expr.Variable","position":{"startPos":147,"endPos":150,"startLine":9,"endLine":9},"comments":["// some comment\n","// second comment\n"],"VarName":{"type":"*node.Identifier","position":{"startPos":147,"endPos":150,"startLine":9,"endLine":9},"Value":"var"}}}]}}]}]}]} + // Output: + // {"type":"*node.Root","position":{"startPos":10,"endPos":166,"startLine":3,"endLine":12},"Stmts":[{"type":"*stmt.Namespace","position":{"startPos":10,"endPos":166,"startLine":3,"endLine":12},"meta":[{"type":"*meta.WhiteSpace","value":"\n\n\t\t","tokenName":"NamespaceToken"},{"type":"*meta.WhiteSpace","value":" ","tokenName":"OpenCurlyBracesToken"},{"type":"*meta.WhiteSpace","value":"\n\t\t","tokenName":"CloseCurlyBracesToken"}],"NamespaceName":{"type":"*name.Name","position":{"startPos":20,"endPos":22,"startLine":3,"endLine":3},"Parts":[{"type":"*name.NamePart","position":{"startPos":20,"endPos":22,"startLine":3,"endLine":3},"meta":[{"type":"*meta.WhiteSpace","value":" ","tokenName":"StringToken"}],"Value":"Foo"}]},"Stmts":[{"type":"*stmt.Class","position":{"startPos":29,"endPos":162,"startLine":4,"endLine":11},"namespacedName":"Foo\\Bar","meta":[{"type":"*meta.WhiteSpace","value":"\n\t\t\t","tokenName":"ClassToken"},{"type":"*meta.WhiteSpace","value":" ","tokenName":"OpenCurlyBracesToken"},{"type":"*meta.WhiteSpace","value":"\n\t\t\t","tokenName":"CloseCurlyBracesToken"}],"PhpDocComment":"","ClassName":{"type":"*node.Identifier","position":{"startPos":35,"endPos":37,"startLine":4,"endLine":4},"meta":[{"type":"*meta.WhiteSpace","value":" ","tokenName":"StringToken"}],"Value":"Bar"},"Stmts":[{"type":"*stmt.ClassMethod","position":{"startPos":45,"endPos":157,"startLine":5,"endLine":10},"meta":[{"type":"*meta.WhiteSpace","value":" ","tokenName":"FunctionToken"}],"PhpDocComment":"","ReturnsRef":false,"MethodName":{"type":"*node.Identifier","position":{"startPos":61,"endPos":72,"startLine":5,"endLine":5},"meta":[{"type":"*meta.WhiteSpace","value":" ","tokenName":"IdentifierToken"}],"Value":"FunctionName"},"Modifiers":[{"type":"*node.Identifier","position":{"startPos":45,"endPos":50,"startLine":5,"endLine":5},"meta":[{"type":"*meta.WhiteSpace","value":"\n\t\t\t\t","tokenName":"PublicToken"}],"Value":"public"}],"Params":[{"type":"*node.Parameter","position":{"startPos":74,"endPos":89,"startLine":5,"endLine":5},"meta":[{"type":"*meta.WhiteSpace","value":" ","tokenName":"EqualToken"}],"ByRef":false,"Variadic":false,"VariableType":{"type":"*name.Name","position":{"startPos":74,"endPos":77,"startLine":5,"endLine":5},"namespacedName":"Foo\\Type","Parts":[{"type":"*name.NamePart","position":{"startPos":74,"endPos":77,"startLine":5,"endLine":5},"Value":"Type"}]},"Variable":{"type":"*expr.Variable","position":{"startPos":79,"endPos":82,"startLine":5,"endLine":5},"meta":[{"type":"*meta.WhiteSpace","value":" ","tokenName":"VariableToken"}],"VarName":{"type":"*node.Identifier","position":{"startPos":79,"endPos":82,"startLine":5,"endLine":5},"Value":"var"}},"DefaultValue":{"type":"*expr.ConstFetch","position":{"startPos":86,"endPos":89,"startLine":5,"endLine":5},"Constant":{"type":"*name.Name","position":{"startPos":86,"endPos":89,"startLine":5,"endLine":5},"namespacedName":"null","Parts":[{"type":"*name.NamePart","position":{"startPos":86,"endPos":89,"startLine":5,"endLine":5},"meta":[{"type":"*meta.WhiteSpace","value":" ","tokenName":"StringToken"}],"Value":"null"}]}}}],"Stmt":{"type":"*stmt.StmtList","position":{"startPos":96,"endPos":157,"startLine":6,"endLine":10},"meta":[{"type":"*meta.WhiteSpace","value":"\n\t\t\t\t","tokenName":"OpenCurlyBracesToken"},{"type":"*meta.WhiteSpace","value":"\n\t\t\t\t","tokenName":"CloseCurlyBracesToken"}],"Stmts":[{"type":"*stmt.Expression","position":{"startPos":147,"endPos":151,"startLine":9,"endLine":9},"Expr":{"type":"*expr.Variable","position":{"startPos":147,"endPos":150,"startLine":9,"endLine":9},"meta":[{"type":"*meta.WhiteSpace","value":"\n\t\t\t\t\t","tokenName":"VariableToken"},{"type":"*meta.Comment","value":"// some comment\n","tokenName":"VariableToken"},{"type":"*meta.WhiteSpace","value":"\n\t\t\t\t\t","tokenName":"VariableToken"},{"type":"*meta.Comment","value":"// second comment\n","tokenName":"VariableToken"},{"type":"*meta.WhiteSpace","value":"\n\t\t\t\t\t","tokenName":"VariableToken"}],"VarName":{"type":"*node.Identifier","position":{"startPos":147,"endPos":150,"startLine":9,"endLine":9},"Value":"var"}}}]}}]}]}]} } diff --git a/visitor/namespace_resolver_test.go b/visitor/namespace_resolver_test.go index a407c18..6a17b98 100644 --- a/visitor/namespace_resolver_test.go +++ b/visitor/namespace_resolver_test.go @@ -1,4 +1,3 @@ -// Package visitor contains walker.visitor implementations package visitor_test import ( diff --git a/visitor/pretty_json_dumper.go b/visitor/pretty_json_dumper.go index 6a34e16..9b5b04b 100644 --- a/visitor/pretty_json_dumper.go +++ b/visitor/pretty_json_dumper.go @@ -6,18 +6,27 @@ import ( "io" "reflect" + "github.com/z7zmey/php-parser/meta" "github.com/z7zmey/php-parser/node" - "github.com/z7zmey/php-parser/parser" - "github.com/z7zmey/php-parser/walker" ) type PrettyJsonDumper struct { - Writer io.Writer - Comments parser.Comments - NsResolver *NamespaceResolver - depth int - isChildNode bool + Writer io.Writer + NsResolver *NamespaceResolver + depth int + isChildNode bool + isNotFirstNode bool +} + +func NewPrettyJsonDumper(Writer io.Writer, NsResolver *NamespaceResolver) *PrettyJsonDumper { + return &PrettyJsonDumper{ + Writer: Writer, + NsResolver: NsResolver, + depth: 0, + isChildNode: false, + isNotFirstNode: false, + } } func (d *PrettyJsonDumper) printIndent(w io.Writer) { @@ -34,8 +43,12 @@ func (d *PrettyJsonDumper) EnterNode(w walker.Walkable) bool { if d.isChildNode { d.isChildNode = false + } else if d.isNotFirstNode { + fmt.Fprint(d.Writer, ",\n") + d.printIndent(d.Writer) } else { d.printIndent(d.Writer) + d.isNotFirstNode = true } fmt.Fprint(d.Writer, "{\n") @@ -69,20 +82,33 @@ func (d *PrettyJsonDumper) EnterNode(w walker.Walkable) bool { } } - if c := n.GetComments(); len(c) > 0 { + if mm := n.GetMeta(); len(mm) > 0 { fmt.Fprint(d.Writer, ",\n") d.printIndent(d.Writer) - fmt.Fprint(d.Writer, "\"comments\": [\n") + fmt.Fprint(d.Writer, "\"meta\": [\n") d.depth++ - for k, cc := range c { - if k == 0 { - d.printIndent(d.Writer) - fmt.Fprintf(d.Writer, "%q", cc) - } else { + for k, m := range mm { + if k != 0 { fmt.Fprint(d.Writer, ",\n") - d.printIndent(d.Writer) - fmt.Fprintf(d.Writer, "%q", cc) } + + d.printIndent(d.Writer) + fmt.Fprint(d.Writer, "{\n") + d.depth++ + d.printIndent(d.Writer) + switch m.(type) { + case *meta.Comment: + fmt.Fprintf(d.Writer, "%q: %q,\n", "type", "*meta.Comment") + case *meta.WhiteSpace: + fmt.Fprintf(d.Writer, "%q: %q,\n", "type", "*meta.WhiteSpace") + } + d.printIndent(d.Writer) + fmt.Fprintf(d.Writer, "%q: %q,\n", "value", m.String()) + d.printIndent(d.Writer) + fmt.Fprintf(d.Writer, "%q: %q\n", "tokenName", meta.TokenNames[m.GetTokenName()]) + d.depth-- + d.printIndent(d.Writer) + fmt.Fprint(d.Writer, "}") } d.depth-- fmt.Fprint(d.Writer, "\n") @@ -130,6 +156,8 @@ func (d *PrettyJsonDumper) EnterChildList(key string, w walker.Walkable) { d.printIndent(d.Writer) fmt.Fprintf(d.Writer, "%q: [\n", key) d.depth++ + + d.isNotFirstNode = false } func (d *PrettyJsonDumper) LeaveChildList(key string, w walker.Walkable) { diff --git a/visitor/pretty_json_dumper_test.go b/visitor/pretty_json_dumper_test.go index e0d263d..92d753d 100644 --- a/visitor/pretty_json_dumper_test.go +++ b/visitor/pretty_json_dumper_test.go @@ -1,4 +1,3 @@ -//Package visitor contains walker.visitor implementations package visitor_test import ( @@ -21,20 +20,20 @@ func ExamplePrettyJsonDumper() { $var; } } - }` + + function foo() {} + } + ` php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php") + php7parser.WithMeta() php7parser.Parse() nodes := php7parser.GetRootNode() nsResolver := visitor.NewNamespaceResolver() nodes.Walk(nsResolver) - dumper := &visitor.PrettyJsonDumper{ - Writer: os.Stdout, - Comments: php7parser.GetComments(), - NsResolver: nsResolver, - } + dumper := visitor.NewPrettyJsonDumper(os.Stdout, nsResolver) nodes.Walk(dumper) // Unordered output: @@ -42,19 +41,36 @@ func ExamplePrettyJsonDumper() { // "type": "*node.Root", // "position": { // "startPos": 10, - // "endPos": 166, + // "endPos": 188, // "startLine": 3, - // "endLine": 12 + // "endLine": 14 // }, // "Stmts": [ // { // "type": "*stmt.Namespace", // "position": { // "startPos": 10, - // "endPos": 166, + // "endPos": 188, // "startLine": 3, - // "endLine": 12 + // "endLine": 14 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\n\t\t", + // "tokenName": "NamespaceToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "OpenCurlyBracesToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t", + // "tokenName": "CloseCurlyBracesToken" + // } + // ], // "NamespaceName": { // "type": "*name.Name", // "position": { @@ -72,6 +88,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 3, // "endLine": 3 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "StringToken" + // } + // ], // "Value": "Foo" // } // ] @@ -86,6 +109,23 @@ func ExamplePrettyJsonDumper() { // "endLine": 11 // }, // "namespacedName": "Foo\\Bar", + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t", + // "tokenName": "ClassToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "OpenCurlyBracesToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t", + // "tokenName": "CloseCurlyBracesToken" + // } + // ], // "PhpDocComment": "", // "ClassName": { // "type": "*node.Identifier", @@ -95,6 +135,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 4, // "endLine": 4 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "StringToken" + // } + // ], // "Value": "Bar" // }, // "Stmts": [ @@ -106,6 +153,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 5, // "endLine": 10 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "FunctionToken" + // } + // ], // "ReturnsRef": false, // "PhpDocComment": "", // "MethodName": { @@ -116,6 +170,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 5, // "endLine": 5 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "IdentifierToken" + // } + // ], // "Value": "FunctionName" // }, // "Modifiers": [ @@ -127,6 +188,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 5, // "endLine": 5 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t\t", + // "tokenName": "PublicToken" + // } + // ], // "Value": "public" // } // ], @@ -139,6 +207,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 5, // "endLine": 5 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "EqualToken" + // } + // ], // "ByRef": false, // "Variadic": false, // "VariableType": { @@ -171,6 +246,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 5, // "endLine": 5 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "VariableToken" + // } + // ], // "VarName": { // "type": "*node.Identifier", // "position": { @@ -208,6 +290,13 @@ func ExamplePrettyJsonDumper() { // "startLine": 5, // "endLine": 5 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "StringToken" + // } + // ], // "Value": "null" // } // ] @@ -223,6 +312,18 @@ func ExamplePrettyJsonDumper() { // "startLine": 6, // "endLine": 10 // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t\t", + // "tokenName": "OpenCurlyBracesToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t\t", + // "tokenName": "CloseCurlyBracesToken" + // } + // ], // "Stmts": [ // { // "type": "*stmt.Expression", @@ -240,9 +341,32 @@ func ExamplePrettyJsonDumper() { // "startLine": 9, // "endLine": 9 // }, - // "comments": [ - // "// some comment\n", - // "// second comment\n" + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t\t\t", + // "tokenName": "VariableToken" + // }, + // { + // "type": "*meta.Comment", + // "value": "// some comment\n", + // "tokenName": "VariableToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t\t\t", + // "tokenName": "VariableToken" + // }, + // { + // "type": "*meta.Comment", + // "value": "// second comment\n", + // "tokenName": "VariableToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\t\t\t\t\t", + // "tokenName": "VariableToken" + // } // ], // "VarName": { // "type": "*node.Identifier", @@ -260,6 +384,50 @@ func ExamplePrettyJsonDumper() { // } // } // ] + // }, + // { + // "type": "*stmt.Function", + // "position": { + // "startPos": 168, + // "endPos": 184, + // "startLine": 13, + // "endLine": 13 + // }, + // "namespacedName": "Foo\\foo", + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": "\n\n\t\t\t", + // "tokenName": "FunctionToken" + // }, + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "OpenCurlyBracesToken" + // } + // ], + // "ReturnsRef": false, + // "PhpDocComment": "", + // "FunctionName": { + // "type": "*node.Identifier", + // "position": { + // "startPos": 177, + // "endPos": 179, + // "startLine": 13, + // "endLine": 13 + // }, + // "meta": [ + // { + // "type": "*meta.WhiteSpace", + // "value": " ", + // "tokenName": "StringToken" + // } + // ], + // "Value": "foo" + // }, + // "Stmts": [ + // + // ] // } // ] // }