From 40b944a272261f750050dda40cdb3275ba0b899e Mon Sep 17 00:00:00 2001 From: Vadym Slizov Date: Fri, 4 Dec 2020 14:38:47 +0200 Subject: [PATCH] [refactoring] update ast structure of "ClassConstList", "Constant", "Use", "GroupUse", "UseDeclaration", "Closure", "Name", "FullyQualified", "Relative" and "NamePart" nodes --- internal/php5/php5.go | Bin 262882 -> 267837 bytes internal/php5/php5.y | 253 +++--- internal/php7/php7.go | Bin 218067 -> 220826 bytes internal/php7/php7.y | 177 ++-- pkg/ast/node.go | 38 +- pkg/ast/visitor/dump.go | 1 - pkg/ast/visitor/filter_parser_nodes.go | 1077 ------------------------ pkg/ast/visitor/filter_tokens.go | 276 ------ pkg/printer/printer.go | 11 - 9 files changed, 271 insertions(+), 1562 deletions(-) delete mode 100644 pkg/ast/visitor/filter_parser_nodes.go delete mode 100644 pkg/ast/visitor/filter_tokens.go diff --git a/internal/php5/php5.go b/internal/php5/php5.go index bff63f66f0d496776932345fd98e5ebfcf1777ac..7f98c4875cbb683aff626e774209541b44786463 100644 GIT binary patch delta 22041 zcmch837AyHwf|RD!!pA*fU*tDG`qkw^zFTo)eTn`7eqt>4Voy*fEzA2VDv>2m(hkf zE(i=RyqE-WfvboJE`%5r6b%tn22rB2I2e5qMfv~Esk+?*VxIZOyzk>)`ktyfb?WS= zs^)`Ril6&^@zPD|$*N>_Q&GIQlg#KvJj|Pjp=*+HBw~007{jP|B$hppyv!t0 ziR_eAZLvdz!G{M|JZ%~g1)1_Hp z(ImiW9-c^oj#QKx9f|UQ6uzS=;7s!RqA5%nWjS~}ERL@fz}(66m~J5_%1C%Eyu4_J z7ojuhZ1E#UW`_^z-i>*X;3*&n3`sFJFn=tHQ8FG3%x=i^XqRF1csviU1UDy{Be868 z{~jhCi#(a?zwGutpxX183Qzz#vCdG8#T&&(hQ9!}t?_KLb)}V1J4S~m?V&Xqv0Z?M zIg8Gq#q(H&@y72s^8r738I0RD$RJ+7=ds@7jp;m#0g3{EB|`eefQHFuu~d4(e(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ue@;N z!*|1p4E`9CoIU#cVKtU;mFPk`P=UK>iF?&JxAuM0EufxOPJv;N+L*t)>d(8^^rq<( z^vOq#top#*7mNhSavjv)6t~l?@zBk|&*`#x2aVjRkX0aRL9%XrDj#Ij?RPpIxKwu+ z!U%sX*pSwKY&Q5Dz)tjav%b6WuV#uUHDjIEMt2O3Mh?;R&qEGq)Q4bAy}E~A#kiLi z{XOhslKF!B?%&Pjf&6LoXK;6Zj5jV=CEu}UCX`Qgodz zv2}QsX^M6(gOC8RH|j)kDO>NIQc@!2Y++H#J9@?(fA`mp3)1$Ym0;gezvO$t#6TQg z#9dfg(txgMSRyCfz{bT9$)|W60V>CZ44_-;m2|K-hI=$Fk!*;YaZ=2;8z%bbD>Q-` zscR&fhP@Dqgz5Xzx&WC@jxL&&m23_0Q0+Q+O*B1-!a<9GFBQmraj+C)$ODQ#J*q@X SwZaHoq4YubDQeuNB>6u!nH&rN diff --git a/internal/php5/php5.y b/internal/php5/php5.y index 2a24915..4027440 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -15,8 +15,6 @@ import ( node ast.Vertex token *token.Token list []ast.Vertex - - ClosureUse *ast.ExprClosureUse } %token T_INCLUDE @@ -219,6 +217,7 @@ import ( %type function interface_entry %type possible_comma %type case_separator +%type is_reference is_variadic %type top_statement use_declaration use_function_declaration use_const_declaration common_scalar %type static_class_constant compound_variable reference_variable class_name variable_class_name @@ -241,12 +240,12 @@ import ( %type method_body trait_reference_list static_array_pair_list non_empty_static_array_pair_list %type foreach_statement for_statement while_statement isset_variables %type foreach_variable foreach_optional_arg for_expr non_empty_for_expr -%type extends_from interface_list trait_list -%type implements_list +%type extends_from interface_list trait_list namespace_name +%type implements_list use_declarations use_function_declarations use_const_declarations %type interface_extends_list -%type lexical_vars +%type lexical_vars -%type top_statement_list namespace_name use_declarations use_function_declarations use_const_declarations +%type top_statement_list %type inner_statement_list encaps_list %type elseif_list new_elseif_list %type case_list catch_statement additional_catches @@ -260,7 +259,6 @@ import ( %type dynamic_class_name_variable_properties variable_properties %type simple_indirect_reference -%type is_reference is_variadic %% @@ -293,26 +291,32 @@ top_statement_list: namespace_name: T_STRING { - $$ = []ast.Vertex{ - &ast.NameNamePart{ - Node: ast.Node{ - Position: position.NewTokenPosition($1), + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{ + &ast.NameNamePart{ + Node: ast.Node{ + Position: position.NewTokenPosition($1), + }, + StringTkn: $1, + Value: $1.Value, }, - StringTkn: $1, - Value: $1.Value, }, } } | namespace_name T_NS_SEPARATOR T_STRING { - $$ = append($1, &ast.NameNamePart{ + part := &ast.NameNamePart{ Node: ast.Node{ - Position: position.NewTokensPosition($2, $3), + Position: position.NewTokenPosition($3), }, - NsSeparatorTkn: $2, StringTkn: $3, Value: $3.Value, - }) + } + + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, part) + + $$ = $1 } ; @@ -355,9 +359,10 @@ top_statement: NsTkn: $1, Name: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, SemiColonTkn: $3, } @@ -371,9 +376,10 @@ top_statement: NsTkn: $1, Name: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, OpenCurlyBracket: $3, Stmts: $4, @@ -399,7 +405,8 @@ top_statement: Position: position.NewTokensPosition($1, $3), }, UseTkn: $1, - UseDeclarations: $2, + UseDeclarations: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, SemiColonTkn: $3, } } @@ -417,7 +424,8 @@ top_statement: IdentifierTkn: $2, Value: $2.Value, }, - UseDeclarations: $3, + UseDeclarations: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, SemiColonTkn: $4, } } @@ -435,7 +443,8 @@ top_statement: IdentifierTkn: $2, Value: $2.Value, }, - UseDeclarations: $3, + UseDeclarations: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, SemiColonTkn: $4, } } @@ -450,13 +459,16 @@ top_statement: use_declarations: use_declarations ',' use_declaration { - $1[len($1)-1].(*ast.StmtUseDeclaration).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | use_declaration { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; @@ -465,13 +477,14 @@ use_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -479,13 +492,14 @@ use_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListTokenPosition($1, $3), + Position: position.NewNodeListTokenPosition($1.(*ast.ParserSeparatedList).Items, $3), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, AsTkn: $2, Alias: &ast.Identifier{ @@ -501,14 +515,15 @@ use_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -521,9 +536,10 @@ use_declaration: NsSeparatorTkn: $1, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, AsTkn: $3, Alias: &ast.Identifier{ @@ -540,13 +556,16 @@ use_declaration: use_function_declarations: use_function_declarations ',' use_function_declaration { - $1[len($1)-1].(*ast.StmtUseDeclaration).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | use_function_declaration { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; @@ -555,13 +574,14 @@ use_function_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -569,13 +589,14 @@ use_function_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListTokenPosition($1, $3), + Position: position.NewNodeListTokenPosition($1.(*ast.ParserSeparatedList).Items, $3), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, AsTkn: $2, Alias: &ast.Identifier{ @@ -591,14 +612,15 @@ use_function_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -611,9 +633,10 @@ use_function_declaration: NsSeparatorTkn: $1, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, AsTkn: $3, Alias: &ast.Identifier{ @@ -630,13 +653,16 @@ use_function_declaration: use_const_declarations: use_const_declarations ',' use_const_declaration { - $1[len($1)-1].(*ast.StmtUseDeclaration).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | use_const_declaration { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; @@ -645,13 +671,14 @@ use_const_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -659,13 +686,14 @@ use_const_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListTokenPosition($1, $3), + Position: position.NewNodeListTokenPosition($1.(*ast.ParserSeparatedList).Items, $3), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, AsTkn: $2, Alias: &ast.Identifier{ @@ -681,14 +709,15 @@ use_const_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -701,9 +730,10 @@ use_const_declaration: NsSeparatorTkn: $1, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, AsTkn: $3, Alias: &ast.Identifier{ @@ -2888,7 +2918,7 @@ class_constant_declaration: { constList := $1.(*ast.StmtClassConstList) constList.Node.Position = position.NewNodesPosition($1, $5) - lastNode($$.(*ast.StmtClassConstList).Consts).(*ast.StmtConstant).CommaTkn = $2 + constList.SeparatorTkns = append(constList.SeparatorTkns, $2) constList.Consts = append(constList.Consts, &ast.StmtConstant{ Node: ast.Node{ Position: position.NewTokenNodePosition($3, $5), @@ -4165,13 +4195,14 @@ function_call: { $$ = &ast.ExprFunctionCall{ Node: ast.Node{ - Position: position.NewNodeListNodePosition($1, $2), + Position: position.NewNodeListNodePosition($1.(*ast.ParserSeparatedList).Items, $2), }, Function: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, OpenParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $2.(*ast.ArgumentList).Arguments, @@ -4187,11 +4218,12 @@ function_call: }, Function: &ast.NameRelative{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, NsTkn: $1, NsSeparatorTkn: $2, - Parts: $3, + Parts: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, }, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, @@ -4207,10 +4239,11 @@ function_call: }, Function: &ast.NameFullyQualified{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, OpenParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $3.(*ast.ArgumentList).Arguments, @@ -4308,30 +4341,33 @@ class_name: { $$ = &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, } } | T_NAMESPACE T_NS_SEPARATOR namespace_name { $$ = &ast.NameRelative{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, NsTkn: $1, NsSeparatorTkn: $2, - Parts: $3, + Parts: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, } } | T_NS_SEPARATOR namespace_name { $$ = &ast.NameFullyQualified{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, } } ; @@ -4341,30 +4377,33 @@ fully_qualified_class_name: { $$ = &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, } } | T_NAMESPACE T_NS_SEPARATOR namespace_name { $$ = &ast.NameRelative{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, NsTkn: $1, NsSeparatorTkn: $2, - Parts: $3, + Parts: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, } } | T_NS_SEPARATOR namespace_name { $$ = &ast.NameFullyQualified{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, } } ; @@ -4670,13 +4709,14 @@ static_scalar_value: { $$ = &ast.ExprConstFetch{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, Const: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -4684,15 +4724,16 @@ static_scalar_value: { $$ = &ast.ExprConstFetch{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, Const: &ast.NameRelative{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, NsTkn: $1, NsSeparatorTkn: $2, - Parts: $3, + Parts: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -4700,14 +4741,15 @@ static_scalar_value: { $$ = &ast.ExprConstFetch{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, Const: &ast.NameFullyQualified{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -5131,13 +5173,14 @@ general_constant: { $$ = &ast.ExprConstFetch{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, Const: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -5145,15 +5188,16 @@ general_constant: { $$ = &ast.ExprConstFetch{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, Const: &ast.NameRelative{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, NsTkn: $1, NsSeparatorTkn: $2, - Parts: $3, + Parts: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -5161,14 +5205,15 @@ general_constant: { $$ = &ast.ExprConstFetch{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, Const: &ast.NameFullyQualified{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, } } diff --git a/internal/php7/php7.go b/internal/php7/php7.go index c592f8c04798e7589fac0f7c8c8baddd64fe49ac..e224ae31333e59f00639df1252ae5449931eeed9 100644 GIT binary patch delta 13859 zcmdU0d3aUTwg2`$8OQ)60!bt!xnUj>xbvU_0UUrT1i|76L2;@GL8t>(31S^utI?}j z;23;Pbz+Ema0bPx3M5FaBL+lU93TkNRuSHBt-Vh|()5qM_s@IZ=RM@Cz4lsbuX*o% zeE-p|cfZ_q)drRPQ1xiY)|cn&M6BWZqxa_*L}Sr1UpyQy^93W3GG8naEz8UZ#Ushu zK>o;Bpv)JIFhV3)=1YXac#Q^u5Dx=49!Zq>0wD|sgRwGSIE1$VP{P2ChXV~e1J^HE z91rt2utOM*g#5t4a3C&3fE?#(j1vN}Fot;)uhFO_8IK4mM&gVT4?)xb=EOrlh%@&H z3my;Q!BRnH$j6N0!9-a<9}r?etRo0Wgc-zxpb!r-OQsNvG-N(=f=Y`s@kDa^v!l|P zd>{}?-urApew_7z2Ucr;JSmoJdiLp3{1ph`5yLw0gWf=1mgwgpe=J%5+|b4NGr_Mw z3V=qy&kMjKGb0cHzIpgrmGTh04i7)i#RF6PEE_+tIQa$qSX{>k^b5kmV;KK!{tNhp zKQBZy52;x@_$BUjODTS-c)bgG9-~x2_ul;rMS06-F#lB*e7YD8jhy zuOmc&9L%lxt>S)`vym{sF&BtpQH%^{0;PDOq5s=K1%al&6VC-%4*hb`JlOji>fbp_ zr!hhJfO@ZYme3ZlL&<^fU6R9#E)U>g`6vJDz29_UCoG3+CkJgjsTZq(lR+R1tN>C8 zXa$o?H&$ia5m`@i&&FaEPj=f>m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#v%^C|8zfh*XJAra-K6)7&_j#0@s|Mlxao~G>*wG0vw#_U$pz$B<;+IH#M_5LG z`avIYA?WOtnah53&Lkk>JS4+{?oz9VvHSq0wEB?#tHXxr>%+I*lMh={B*JCpHn)Is zUmmtx%wT8c&i+}iciFAl!|eWx{zN7cgaHcAL_pL$iX__O7rkCl&hOTu;kQs+B=SYD zh@bzvCEh`l8(}))gRz-%gOW=Vk5~%Idn#!gi-b>)coMji^5bzBGvcTVJfC(Pbq5d7 zo4;d;;M|o>n+lC%6h3YdmL7rDPaM$^T7BH5E}`tl1b@<-n9*C|!4(_Xz2jPRv%%p+X<|jO8Vsx>4EZW$^4i!OmaUJMrNmcot0NyHLdVm%ujUFeNIg^gI@>5HMpxW>|>M6$ztVk2}Ua6w3Z9MPF zg&-FUtbZqO!f`y{LRBs$M;02=K9&c790#1y4Mi^&S%U)}!0}uxjTXBw9835Rvbflg zvYok6h*^g*dlej~%>hdn!Qw90U7m?jPmqp<%^ORNgs3;K1V!!{ck?}dnbC)>6JERN zZ!K-ylsE|Q?Md?vo*6iLIf@LYS8YV79Fpg8y@m~*cB1b(8Rt4^8rcCc4DE8w>dwYCu%WDV)vq{DA!o@z9A(e_I~8QsFu zt_s7t0pN9DJqIi?!Tyl9)Nn~C*Qg>?F3PI;86+gj)|PVOyn~MQHZHLi13cfHY6juaY0aHD zGA%k4FN9HEWzvRT#?_8V8a;1mF(YUfn_%ARs%a#!OO=jA=L~`;nA7?iP2DkZd*|Vf z(T4t>>WFm|hlNylwqf T_INCLUDE @@ -247,9 +244,9 @@ import ( %type callable_expr callable_variable static_member new_variable %type encaps_var encaps_var_offset echo_expr_list catch_name_list name_list %type if_stmt const_list non_empty_argument_list property_list -%type alt_if_stmt lexical_var_list isset_variables -%type if_stmt_without_else -%type class_const_decl +%type alt_if_stmt lexical_var_list isset_variables class_const_list +%type if_stmt_without_else unprefixed_use_declarations inline_use_declarations use_declarations +%type class_const_decl namespace_name %type alt_if_stmt_without_else %type array_pair possible_array_pair %type isset_variable type return_type type_expr @@ -264,17 +261,15 @@ import ( %type extends_from %type implements_list %type interface_extends_list -%type lexical_vars +%type lexical_vars %type member_modifier %type use_type %type foreach_variable -%type encaps_list backticks_expr namespace_name catch_list class_const_list -%type unprefixed_use_declarations inline_use_declarations +%type encaps_list backticks_expr catch_list %type case_list trait_adaptation_list -%type use_declarations %type top_statement_list %type inner_statement_list class_statement_list %type method_modifiers variable_modifiers @@ -342,26 +337,32 @@ top_statement_list: namespace_name: T_STRING { - $$ = []ast.Vertex{ - &ast.NameNamePart{ - Node: ast.Node{ - Position: position.NewTokenPosition($1), + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{ + &ast.NameNamePart{ + Node: ast.Node{ + Position: position.NewTokenPosition($1), + }, + StringTkn: $1, + Value: $1.Value, }, - StringTkn: $1, - Value: $1.Value, }, } } | namespace_name T_NS_SEPARATOR T_STRING { - $$ = append($1, &ast.NameNamePart{ + part := &ast.NameNamePart{ Node: ast.Node{ - Position: position.NewTokensPosition($2, $3), + Position: position.NewTokenPosition($3), }, - NsSeparatorTkn: $2, StringTkn: $3, Value: $3.Value, - }) + } + + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, part) + + $$ = $1 } ; @@ -370,30 +371,33 @@ name: { $$ = &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, } } | T_NAMESPACE T_NS_SEPARATOR namespace_name { $$ = &ast.NameRelative{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $3), + Position: position.NewTokenNodeListPosition($1, $3.(*ast.ParserSeparatedList).Items), }, NsTkn: $1, NsSeparatorTkn: $2, - Parts: $3, + Parts: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, } } | T_NS_SEPARATOR namespace_name { $$ = &ast.NameFullyQualified{ Node: ast.Node{ - Position: position.NewTokenNodeListPosition($1, $2), + Position: position.NewTokenNodeListPosition($1, $2.(*ast.ParserSeparatedList).Items), }, NsSeparatorTkn: $1, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, } } ; @@ -445,9 +449,10 @@ top_statement: NsTkn: $1, Name: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, SemiColonTkn: $3, } @@ -461,9 +466,10 @@ top_statement: NsTkn: $1, Name: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, OpenCurlyBracket: $3, Stmts: $4, @@ -510,7 +516,8 @@ top_statement: Position: position.NewTokensPosition($1, $3), }, UseTkn: $1, - UseDeclarations: $2, + UseDeclarations: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, SemiColonTkn: $3, } } @@ -522,7 +529,8 @@ top_statement: }, UseTkn: $1, Type: $2, - UseDeclarations: $3, + UseDeclarations: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, SemiColonTkn: $4, } } @@ -566,29 +574,29 @@ use_type: group_use_declaration: namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations possible_comma '}' { - if len($4) > 0 { - $4[len($4)-1].(*ast.StmtUseDeclaration).CommaTkn = $5 - } + $4.(*ast.ParserSeparatedList).SeparatorTkns = append($4.(*ast.ParserSeparatedList).SeparatorTkns, $5) $$ = &ast.StmtGroupUse{ Node: ast.Node{ - Position: position.NewNodeListTokenPosition($1, $6), + Position: position.NewNodeListTokenPosition($1.(*ast.ParserSeparatedList).Items, $6), }, Prefix: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $2, OpenCurlyBracketTkn: $3, - UseDeclarations: $4, + UseDeclarations: $4.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $4.(*ast.ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $6, } } | T_NS_SEPARATOR namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations possible_comma '}' { - $5[len($5)-1].(*ast.StmtUseDeclaration).CommaTkn = $6 + $5.(*ast.ParserSeparatedList).SeparatorTkns = append($5.(*ast.ParserSeparatedList).SeparatorTkns, $6) $$ = &ast.StmtGroupUse{ Node: ast.Node{ @@ -597,13 +605,15 @@ group_use_declaration: LeadingNsSeparatorTkn: $1, Prefix: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $3, OpenCurlyBracketTkn: $4, - UseDeclarations: $5, + UseDeclarations: $5.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $5.(*ast.ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $7, } } @@ -612,27 +622,29 @@ group_use_declaration: mixed_group_use_declaration: namespace_name T_NS_SEPARATOR '{' inline_use_declarations possible_comma '}' { - $4[len($4)-1].(*ast.StmtUseDeclaration).CommaTkn = $5 + $4.(*ast.ParserSeparatedList).SeparatorTkns = append($4.(*ast.ParserSeparatedList).SeparatorTkns, $5) $$ = &ast.StmtGroupUse{ Node: ast.Node{ - Position: position.NewNodeListTokenPosition($1, $6), + Position: position.NewNodeListTokenPosition($1.(*ast.ParserSeparatedList).Items, $6), }, Prefix: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $2, OpenCurlyBracketTkn: $3, - UseDeclarations: $4, + UseDeclarations: $4.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $4.(*ast.ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $6, } } | T_NS_SEPARATOR namespace_name T_NS_SEPARATOR '{' inline_use_declarations possible_comma '}' { - $5[len($5)-1].(*ast.StmtUseDeclaration).CommaTkn = $6 + $5.(*ast.ParserSeparatedList).SeparatorTkns = append($5.(*ast.ParserSeparatedList).SeparatorTkns, $6) $$ = &ast.StmtGroupUse{ Node: ast.Node{ @@ -641,13 +653,15 @@ mixed_group_use_declaration: LeadingNsSeparatorTkn: $1, Prefix: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewNodeListPosition($2.(*ast.ParserSeparatedList).Items), }, - Parts: $2, + Parts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $3, OpenCurlyBracketTkn: $4, - UseDeclarations: $5, + UseDeclarations: $5.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $5.(*ast.ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $7, } } @@ -667,39 +681,48 @@ possible_comma: inline_use_declarations: inline_use_declarations ',' inline_use_declaration { - $1[len($1)-1].(*ast.StmtUseDeclaration).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | inline_use_declaration { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; unprefixed_use_declarations: unprefixed_use_declarations ',' unprefixed_use_declaration { - $1[len($1)-1].(*ast.StmtUseDeclaration).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | unprefixed_use_declaration { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; use_declarations: use_declarations ',' use_declaration { - $1[len($1)-1].(*ast.StmtUseDeclaration).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | use_declaration { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; @@ -723,13 +746,14 @@ unprefixed_use_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, } } @@ -737,13 +761,14 @@ unprefixed_use_declaration: { $$ = &ast.StmtUseDeclaration{ Node: ast.Node{ - Position: position.NewNodeListTokenPosition($1, $3), + Position: position.NewNodeListTokenPosition($1.(*ast.ParserSeparatedList).Items, $3), }, Use: &ast.NameName{ Node: ast.Node{ - Position: position.NewNodeListPosition($1), + Position: position.NewNodeListPosition($1.(*ast.ParserSeparatedList).Items), }, - Parts: $1, + Parts: $1.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $1.(*ast.ParserSeparatedList).SeparatorTkns, }, AsTkn: $2, Alias: &ast.Identifier{ @@ -2156,10 +2181,11 @@ class_statement: Node: ast.Node{ Position: position.NewOptionalListTokensPosition($1, $2, $4), }, - Modifiers: $1, - ConstTkn: $2, - Consts: $3, - SemiColonTkn: $4, + Modifiers: $1, + ConstTkn: $2, + Consts: $3.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $3.(*ast.ParserSeparatedList).SeparatorTkns, + SemiColonTkn: $4, } } | T_USE name_list trait_adaptations @@ -2596,13 +2622,16 @@ property: class_const_list: class_const_list ',' class_const_decl { - lastNode($1).(*ast.StmtConstant).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | class_const_decl { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; diff --git a/pkg/ast/node.go b/pkg/ast/node.go index 5a71e3d..b375c45 100644 --- a/pkg/ast/node.go +++ b/pkg/ast/node.go @@ -227,10 +227,11 @@ func (n *StmtClass) Accept(v NodeVisitor) { // StmtClassConstList node type StmtClassConstList struct { Node - Modifiers []Vertex - ConstTkn *token.Token - Consts []Vertex - SemiColonTkn *token.Token + Modifiers []Vertex + ConstTkn *token.Token + Consts []Vertex + SeparatorTkns []*token.Token + SemiColonTkn *token.Token } func (n *StmtClassConstList) Accept(v NodeVisitor) { @@ -299,7 +300,6 @@ type StmtConstant struct { Name Vertex EqualTkn *token.Token Expr Vertex - CommaTkn *token.Token } func (n *StmtConstant) Accept(v NodeVisitor) { @@ -856,6 +856,7 @@ type StmtUse struct { UseTkn *token.Token Type Vertex UseDeclarations []Vertex + SeparatorTkns []*token.Token SemiColonTkn *token.Token } @@ -873,6 +874,7 @@ type StmtGroupUse struct { NsSeparatorTkn *token.Token OpenCurlyBracketTkn *token.Token UseDeclarations []Vertex + SeparatorTkns []*token.Token CloseCurlyBracketTkn *token.Token SemiColonTkn *token.Token } @@ -889,7 +891,6 @@ type StmtUseDeclaration struct { Use Vertex AsTkn *token.Token Alias Vertex - CommaTkn *token.Token } func (n *StmtUseDeclaration) Accept(v NodeVisitor) { @@ -1029,7 +1030,7 @@ type ExprClosure struct { Params []Vertex SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token - ClosureUse *ExprClosureUse + ClosureUse Vertex ColonTkn *token.Token ReturnType Vertex OpenCurlyBracketTkn *token.Token @@ -2017,8 +2018,8 @@ func (n *ExprBinarySpaceship) Accept(v NodeVisitor) { type NameName struct { Node - Parts []Vertex - ListSeparatorTkn *token.Token + Parts []Vertex + SeparatorTkns []*token.Token } func (n *NameName) Accept(v NodeVisitor) { @@ -2027,9 +2028,9 @@ func (n *NameName) Accept(v NodeVisitor) { type NameFullyQualified struct { Node - NsSeparatorTkn *token.Token - Parts []Vertex - ListSeparatorTkn *token.Token + NsSeparatorTkn *token.Token + Parts []Vertex + SeparatorTkns []*token.Token } func (n *NameFullyQualified) Accept(v NodeVisitor) { @@ -2038,10 +2039,10 @@ func (n *NameFullyQualified) Accept(v NodeVisitor) { type NameRelative struct { Node - NsTkn *token.Token - NsSeparatorTkn *token.Token - Parts []Vertex - ListSeparatorTkn *token.Token + NsTkn *token.Token + NsSeparatorTkn *token.Token + Parts []Vertex + SeparatorTkns []*token.Token } func (n *NameRelative) Accept(v NodeVisitor) { @@ -2050,9 +2051,8 @@ func (n *NameRelative) Accept(v NodeVisitor) { type NameNamePart struct { Node - NsSeparatorTkn *token.Token - StringTkn *token.Token - Value []byte + StringTkn *token.Token + Value []byte } func (n *NameNamePart) Accept(v NodeVisitor) { diff --git a/pkg/ast/visitor/dump.go b/pkg/ast/visitor/dump.go index d6546f3..abcf932 100644 --- a/pkg/ast/visitor/dump.go +++ b/pkg/ast/visitor/dump.go @@ -572,7 +572,6 @@ func (v *Dump) StmtUseDeclaration(n *ast.StmtUseDeclaration) { v.printNode(n.GetNode()) v.printToken("NsSeparatorTkn", n.NsSeparatorTkn) v.printToken("AsTkn", n.AsTkn) - v.printToken("CommaTkn", n.CommaTkn) } func (v *Dump) StmtWhile(n *ast.StmtWhile) { diff --git a/pkg/ast/visitor/filter_parser_nodes.go b/pkg/ast/visitor/filter_parser_nodes.go deleted file mode 100644 index 6ccd522..0000000 --- a/pkg/ast/visitor/filter_parser_nodes.go +++ /dev/null @@ -1,1077 +0,0 @@ -package visitor - -import ( - "github.com/z7zmey/php-parser/pkg/ast" -) - -type FilterParserNodes struct { - Null -} - -func (v *FilterParserNodes) EnterNode(n ast.Vertex) bool { - n.Accept(v) - return true -} - -func (v *FilterParserNodes) ExprExit(n *ast.ExprExit) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) StmtContinue(n *ast.StmtContinue) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) StmtBreak(n *ast.StmtBreak) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprClone(n *ast.ExprClone) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprPrint(n *ast.ExprPrint) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) StmtExpression(n *ast.StmtExpression) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) StmtEcho(n *ast.StmtEcho) { - for k, v := range n.Exprs { - for { - if nn, ok := v.(*ast.ParserBrackets); ok { - v = nn.Child - } else { - break - } - } - - n.Exprs[k] = v - } -} - -func (v *FilterParserNodes) ExprIsset(n *ast.ExprIsset) { - for k, v := range n.Vars { - for { - if nn, ok := v.(*ast.ParserBrackets); ok { - v = nn.Child - } else { - break - } - } - - n.Vars[k] = v - } -} - -func (v *FilterParserNodes) StmtReturn(n *ast.StmtReturn) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprYield(n *ast.ExprYield) { - for { - if nn, ok := n.Key.(*ast.ParserBrackets); ok { - n.Key = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Value.(*ast.ParserBrackets); ok { - n.Value = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) Argument(n *ast.Argument) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) StmtThrow(n *ast.StmtThrow) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) StmtCase(n *ast.StmtCase) { - for { - if nn, ok := n.Cond.(*ast.ParserBrackets); ok { - n.Cond = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprVariable(n *ast.ExprVariable) { - for { - if nn, ok := n.VarName.(*ast.ParserBrackets); ok { - n.VarName = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssign(n *ast.ExprAssign) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignBitwiseAnd(n *ast.ExprAssignBitwiseAnd) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignBitwiseOr(n *ast.ExprAssignBitwiseOr) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignBitwiseXor(n *ast.ExprAssignBitwiseXor) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignCoalesce(n *ast.ExprAssignCoalesce) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignConcat(n *ast.ExprAssignConcat) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignDiv(n *ast.ExprAssignDiv) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignMinus(n *ast.ExprAssignMinus) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignMod(n *ast.ExprAssignMod) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignMul(n *ast.ExprAssignMul) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignPlus(n *ast.ExprAssignPlus) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignPow(n *ast.ExprAssignPow) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignShiftLeft(n *ast.ExprAssignShiftLeft) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprAssignShiftRight(n *ast.ExprAssignShiftRight) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} -func (v *FilterParserNodes) ExprBinaryBitwiseAnd(n *ast.ExprBinaryBitwiseAnd) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryBitwiseOr(n *ast.ExprBinaryBitwiseOr) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryBitwiseXor(n *ast.ExprBinaryBitwiseXor) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryBooleanAnd(n *ast.ExprBinaryBooleanAnd) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryBooleanOr(n *ast.ExprBinaryBooleanOr) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryCoalesce(n *ast.ExprBinaryCoalesce) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryConcat(n *ast.ExprBinaryConcat) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryDiv(n *ast.ExprBinaryDiv) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryEqual(n *ast.ExprBinaryEqual) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryGreater(n *ast.ExprBinaryGreater) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryGreaterOrEqual(n *ast.ExprBinaryGreaterOrEqual) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryIdentical(n *ast.ExprBinaryIdentical) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryLogicalAnd(n *ast.ExprBinaryLogicalAnd) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryLogicalOr(n *ast.ExprBinaryLogicalOr) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryLogicalXor(n *ast.ExprBinaryLogicalXor) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryMinus(n *ast.ExprBinaryMinus) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryMod(n *ast.ExprBinaryMod) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryMul(n *ast.ExprBinaryMul) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryNotEqual(n *ast.ExprBinaryNotEqual) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryNotIdentical(n *ast.ExprBinaryNotIdentical) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryPlus(n *ast.ExprBinaryPlus) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryPow(n *ast.ExprBinaryPow) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryShiftLeft(n *ast.ExprBinaryShiftLeft) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinaryShiftRight(n *ast.ExprBinaryShiftRight) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinarySmaller(n *ast.ExprBinarySmaller) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinarySmallerOrEqual(n *ast.ExprBinarySmallerOrEqual) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBinarySpaceship(n *ast.ExprBinarySpaceship) { - for { - if nn, ok := n.Left.(*ast.ParserBrackets); ok { - n.Left = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Right.(*ast.ParserBrackets); ok { - n.Right = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprUnaryMinus(n *ast.ExprUnaryMinus) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprUnaryPlus(n *ast.ExprUnaryPlus) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBooleanNot(n *ast.ExprBooleanNot) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprBitwiseNot(n *ast.ExprBitwiseNot) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprInstanceOf(n *ast.ExprInstanceOf) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprTernary(n *ast.ExprTernary) { - for { - if nn, ok := n.Condition.(*ast.ParserBrackets); ok { - n.Condition = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.IfTrue.(*ast.ParserBrackets); ok { - n.IfTrue = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.IfFalse.(*ast.ParserBrackets); ok { - n.IfFalse = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprCastArray(n *ast.ExprCastArray) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprCastBool(n *ast.ExprCastBool) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprCastDouble(n *ast.ExprCastDouble) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprCastInt(n *ast.ExprCastInt) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprCastObject(n *ast.ExprCastObject) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprCastString(n *ast.ExprCastString) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprCastUnset(n *ast.ExprCastUnset) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprErrorSuppress(n *ast.ExprErrorSuppress) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprArrayDimFetch(n *ast.ExprArrayDimFetch) { - for { - if nn, ok := n.Dim.(*ast.ParserBrackets); ok { - n.Dim = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprArrayItem(n *ast.ExprArrayItem) { - for { - if nn, ok := n.Key.(*ast.ParserBrackets); ok { - n.Key = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Val.(*ast.ParserBrackets); ok { - n.Val = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprEmpty(n *ast.ExprEmpty) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprInclude(n *ast.ExprInclude) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprIncludeOnce(n *ast.ExprIncludeOnce) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprEval(n *ast.ExprEval) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprRequire(n *ast.ExprRequire) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprRequireOnce(n *ast.ExprRequireOnce) { - for { - if nn, ok := n.Expr.(*ast.ParserBrackets); ok { - n.Expr = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprPropertyFetch(n *ast.ExprPropertyFetch) { - for { - if nn, ok := n.Var.(*ast.ParserBrackets); ok { - n.Var = nn.Child - } else { - break - } - } - - for { - if nn, ok := n.Property.(*ast.ParserBrackets); ok { - n.Property = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprFunctionCall(n *ast.ExprFunctionCall) { - for { - if nn, ok := n.Function.(*ast.ParserBrackets); ok { - n.Function = nn.Child - } else { - break - } - } -} - -func (v *FilterParserNodes) ExprStaticCall(n *ast.ExprStaticCall) { - for { - if nn, ok := n.Call.(*ast.ParserBrackets); ok { - n.Call = nn.Child - } else { - break - } - } -} diff --git a/pkg/ast/visitor/filter_tokens.go b/pkg/ast/visitor/filter_tokens.go deleted file mode 100644 index 579bb8d..0000000 --- a/pkg/ast/visitor/filter_tokens.go +++ /dev/null @@ -1,276 +0,0 @@ -package visitor - -import ( - "github.com/z7zmey/php-parser/pkg/ast" -) - -type FilterTokens struct { - Null -} - -func (v *FilterTokens) EnterNode(n ast.Vertex) bool { - n.GetNode().Tokens = nil - n.Accept(v) - return true -} - -func (v *FilterTokens) StmtUse(n *ast.StmtUse) { - n.UseTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtGroupUse(n *ast.StmtGroupUse) { - n.UseTkn = nil - n.LeadingNsSeparatorTkn = nil - n.NsSeparatorTkn = nil - n.OpenCurlyBracketTkn = nil - n.CloseCurlyBracketTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtUseDeclaration(n *ast.StmtUseDeclaration) { - n.NsSeparatorTkn = nil - n.AsTkn = nil - n.CommaTkn = nil -} - -func (v *FilterTokens) NameNamePart(n *ast.NameNamePart) { - n.NsSeparatorTkn = nil - n.StringTkn = nil -} - -func (v *FilterTokens) NameName(n *ast.NameName) { - n.ListSeparatorTkn = nil -} - -func (v *FilterTokens) NameFullyQualified(n *ast.NameFullyQualified) { - n.NsSeparatorTkn = nil - n.ListSeparatorTkn = nil -} - -func (v *FilterTokens) NameRelative(n *ast.NameRelative) { - n.NsTkn = nil - n.NsSeparatorTkn = nil - n.ListSeparatorTkn = nil -} - -func (v *FilterTokens) StmtNamespace(n *ast.StmtNamespace) { - n.NsTkn = nil - n.OpenCurlyBracket = nil - n.CloseCurlyBracket = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtHaltCompiler(n *ast.StmtHaltCompiler) { - n.HaltCompilerTkn = nil - n.OpenParenthesisTkn = nil - n.CloseParenthesisTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtConstList(n *ast.StmtConstList) { - n.ConstTkn = nil - n.SeparatorTkns = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtClassConstList(n *ast.StmtClassConstList) { - n.ConstTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtConstant(n *ast.StmtConstant) { - n.EqualTkn = nil - n.CommaTkn = nil -} - -func (v *FilterTokens) StmtStmtList(n *ast.StmtStmtList) { - n.OpenCurlyBracket = nil - n.CloseCurlyBracket = nil -} - -func (v *FilterTokens) StmtIf(n *ast.StmtIf) { - n.IfTkn = nil - n.OpenParenthesisTkn = nil - n.CloseParenthesisTkn = nil - n.ColonTkn = nil - n.EndIfTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtElseIf(n *ast.StmtElseIf) { - n.ElseIfTkn = nil - n.OpenParenthesisTkn = nil - n.CloseParenthesisTkn = nil - n.ColonTkn = nil -} - -func (v *FilterTokens) StmtElse(n *ast.StmtElse) { - n.ElseTkn = nil - n.ColonTkn = nil -} - -func (v *FilterTokens) ParserBrackets(n *ast.ParserBrackets) { - n.OpenBracketTkn = nil - n.CloseBracketTkn = nil -} - -func (v *FilterTokens) StmtWhile(n *ast.StmtWhile) { - n.WhileTkn = nil - n.OpenParenthesisTkn = nil - n.CloseParenthesisTkn = nil - n.ColonTkn = nil - n.EndWhileTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtDo(n *ast.StmtDo) { - n.DoTkn = nil - n.WhileTkn = nil - n.OpenParenthesisTkn = nil - n.CloseParenthesisTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtFor(n *ast.StmtFor) { - n.ForTkn = nil - n.OpenParenthesisTkn = nil - n.InitSemiColonTkn = nil - n.CondSemiColonTkn = nil - n.CloseParenthesisTkn = nil - n.ColonTkn = nil - n.EndForTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtSwitch(n *ast.StmtSwitch) { - n.SwitchTkn = nil - n.OpenParenthesisTkn = nil - n.CloseParenthesisTkn = nil - n.OpenCurlyBracketTkn = nil - n.CaseSeparatorTkn = nil - n.ColonTkn = nil - n.CloseCurlyBracketTkn = nil - n.EndSwitchTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtCase(n *ast.StmtCase) { - n.CaseTkn = nil - n.CaseSeparatorTkn = nil -} - -func (v *FilterTokens) StmtDefault(n *ast.StmtDefault) { - n.DefaultTkn = nil - n.CaseSeparatorTkn = nil -} - -func (v *FilterTokens) StmtBreak(n *ast.StmtBreak) { - n.BreakTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtContinue(n *ast.StmtContinue) { - n.ContinueTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtReturn(n *ast.StmtReturn) { - n.ReturnTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtGlobal(n *ast.StmtGlobal) { - n.GlobalTkn = nil - n.SeparatorTkns = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtStatic(n *ast.StmtStatic) { - n.StaticTkn = nil - n.SeparatorTkns = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtStaticVar(n *ast.StmtStaticVar) { - n.EqualTkn = nil -} - -func (v *FilterTokens) StmtEcho(n *ast.StmtEcho) { - n.EchoTkn = nil - n.SeparatorTkns = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtInlineHtml(n *ast.StmtInlineHtml) { - n.InlineHtmlTkn = nil -} - -func (v *FilterTokens) StmtUnset(n *ast.StmtUnset) { - n.UnsetTkn = nil - n.OpenParenthesisTkn = nil - n.SeparatorTkns = nil - n.CloseParenthesisTkn = nil - n.SemiColonTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtForeach(n *ast.StmtForeach) { - n.ForeachTkn = nil - n.OpenParenthesisTkn = nil - n.AsTkn = nil - n.DoubleArrowTkn = nil - n.CloseParenthesisTkn = nil - n.ColonTkn = nil - n.EndForeachTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtDeclare(n *ast.StmtDeclare) { - n.DeclareTkn = nil - n.OpenParenthesisTkn = nil - n.SeparatorTkns = nil - n.CloseParenthesisTkn = nil - n.ColonTkn = nil - n.EndDeclareTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtNop(n *ast.StmtNop) { - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtTry(n *ast.StmtTry) { - n.TryTkn = nil - n.OpenCurlyBracket = nil - n.CloseCurlyBracket = nil -} - -func (v *FilterTokens) StmtCatch(n *ast.StmtCatch) { - n.CatchTkn = nil - n.OpenParenthesisTkn = nil - n.SeparatorTkns = nil - n.CloseParenthesisTkn = nil - n.OpenCurlyBracketTkn = nil - n.CloseCurlyBracketTkn = nil -} - -func (v *FilterTokens) StmtFinally(n *ast.StmtFinally) { - n.FinallyTkn = nil - n.OpenCurlyBracketTkn = nil - n.CloseCurlyBracketTkn = nil -} - -func (v *FilterTokens) StmtThrow(n *ast.StmtThrow) { - n.ThrowTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtGoto(n *ast.StmtGoto) { - n.GotoTkn = nil - n.SemiColonTkn = nil -} - -func (v *FilterTokens) StmtLabel(n *ast.StmtLabel) { - n.ColonTkn = nil -} diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go index 0109652..026708e 100644 --- a/pkg/printer/printer.go +++ b/pkg/printer/printer.go @@ -550,7 +550,6 @@ func (p *Printer) printNodeArgument(n ast.Vertex) { // name func (p *Printer) printNameNamePart(n *ast.NameNamePart) { - p.printToken(n.NsSeparatorTkn, "") p.printToken(n.StringTkn, string(n.Value)) } @@ -558,8 +557,6 @@ func (p *Printer) printNameName(n *ast.NameName) { p.printFreeFloating(n, token.Start) p.joinPrintRefactored("\\", n.Parts) - - p.printToken(n.ListSeparatorTkn, "") } func (p *Printer) printNameFullyQualified(n *ast.NameFullyQualified) { @@ -567,8 +564,6 @@ func (p *Printer) printNameFullyQualified(n *ast.NameFullyQualified) { p.printToken(n.NsSeparatorTkn, "\\") p.joinPrintRefactored("\\", n.Parts) - - p.printToken(n.ListSeparatorTkn, "") } func (p *Printer) printNameRelative(n *ast.NameRelative) { @@ -577,8 +572,6 @@ func (p *Printer) printNameRelative(n *ast.NameRelative) { p.printToken(n.NsSeparatorTkn, "\\") p.joinPrintRefactored("\\", n.Parts) - - p.printToken(n.ListSeparatorTkn, "") } // scalar @@ -2099,7 +2092,6 @@ func (p *Printer) printStmtConstant(n *ast.StmtConstant) { p.Print(n.Name) p.printToken(n.EqualTkn, "=") p.Print(n.Expr) - p.printToken(n.CommaTkn, "") } func (p *Printer) printStmtContinue(n *ast.StmtContinue) { @@ -2795,7 +2787,6 @@ func (p *Printer) printStmtUseDeclaration(n *ast.StmtUseDeclaration) { p.Print(n.Use) if n.Alias == nil { - p.printToken(n.CommaTkn, "") return } @@ -2804,8 +2795,6 @@ func (p *Printer) printStmtUseDeclaration(n *ast.StmtUseDeclaration) { p.bufStart = " " p.Print(n.Alias) - - p.printToken(n.CommaTkn, "") } func (p *Printer) printStmtWhile(n *ast.StmtWhile) {