From f3203c0b5f62b39796bd62d9434b9a222035ebbf Mon Sep 17 00:00:00 2001 From: Vadym Slizov Date: Fri, 4 Dec 2020 11:36:12 +0200 Subject: [PATCH] [refactoring] update ast structure of "Parameter", "Class", "FunctionCall", "MethodCall", "New" and "StaticCall" nodes --- internal/php5/php5.go | 1155 ++++++++++++++++----------------- internal/php5/php5.y | 113 ++-- internal/php7/php7.go | 1095 +++++++++++++++---------------- internal/php7/php7.y | 107 +-- pkg/ast/ast.go | 2 - pkg/ast/node.go | 29 +- pkg/ast/traverser/dfs.go | 24 - pkg/ast/visitor/dump.go | 12 - pkg/ast/visitor/null.go | 8 - pkg/printer/pretty_printer.go | 18 - pkg/printer/printer.go | 24 - 11 files changed, 1178 insertions(+), 1409 deletions(-) diff --git a/internal/php5/php5.go b/internal/php5/php5.go index 77d735f..3841713 100644 --- a/internal/php5/php5.go +++ b/internal/php5/php5.go @@ -342,7 +342,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -// line internal/php5/php5.y:6586 +// line internal/php5/php5.y:6557 // line yacctab:1 var yyExca = [...]int{ @@ -2316,7 +2316,7 @@ yydefault: case 1: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:269 +// line internal/php5/php5.y:269 { yylex.(*Parser).rootNode = &ast.Root{ Node: ast.Node{ @@ -2328,7 +2328,7 @@ yydefault: } case 2: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:282 +// line internal/php5/php5.y:282 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -2341,13 +2341,13 @@ yydefault: } case 3: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:293 +// line internal/php5/php5.y:293 { yyVAL.list = []ast.Vertex{} } case 4: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:300 +// line internal/php5/php5.y:300 { yyVAL.list = []ast.Vertex{ &ast.NameNamePart{ @@ -2361,7 +2361,7 @@ yydefault: } case 5: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:312 +// line internal/php5/php5.y:312 { yyVAL.list = append(yyDollar[1].list, &ast.NameNamePart{ Node: ast.Node{ @@ -2374,32 +2374,32 @@ yydefault: } case 6: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:326 +// line internal/php5/php5.y:326 { // error yyVAL.node = nil } case 7: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:331 +// line internal/php5/php5.y:331 { yyVAL.node = yyDollar[1].node } case 8: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:335 +// line internal/php5/php5.y:335 { yyVAL.node = yyDollar[1].node } case 9: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:339 +// line internal/php5/php5.y:339 { yyVAL.node = yyDollar[1].node } case 10: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:343 +// line internal/php5/php5.y:343 { yyVAL.node = &ast.StmtHaltCompiler{ Node: ast.Node{ @@ -2413,7 +2413,7 @@ yydefault: } case 11: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:355 +// line internal/php5/php5.y:355 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2431,7 +2431,7 @@ yydefault: } case 12: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:371 +// line internal/php5/php5.y:371 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2451,7 +2451,7 @@ yydefault: } case 13: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:389 +// line internal/php5/php5.y:389 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2465,7 +2465,7 @@ yydefault: } case 14: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:401 +// line internal/php5/php5.y:401 { yyVAL.node = &ast.StmtUse{ Node: ast.Node{ @@ -2478,7 +2478,7 @@ yydefault: } case 15: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:412 +// line internal/php5/php5.y:412 { yyVAL.node = &ast.StmtUse{ Node: ast.Node{ @@ -2498,7 +2498,7 @@ yydefault: } case 16: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:430 +// line internal/php5/php5.y:430 { yyVAL.node = &ast.StmtUse{ Node: ast.Node{ @@ -2518,7 +2518,7 @@ yydefault: } case 17: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:448 +// line internal/php5/php5.y:448 { yyDollar[1].node.(*ast.StmtConstList).SemiColonTkn = yyDollar[2].token yyDollar[1].node.(*ast.StmtConstList).Node.Position = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token) @@ -2526,7 +2526,7 @@ yydefault: } case 18: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:457 +// line internal/php5/php5.y:457 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2534,13 +2534,13 @@ yydefault: } case 19: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:463 +// line internal/php5/php5.y:463 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 20: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:470 +// line internal/php5/php5.y:470 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2556,7 +2556,7 @@ yydefault: } case 21: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:484 +// line internal/php5/php5.y:484 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2580,7 +2580,7 @@ yydefault: } case 22: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:506 +// line internal/php5/php5.y:506 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2597,7 +2597,7 @@ yydefault: } case 23: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:521 +// line internal/php5/php5.y:521 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2622,7 +2622,7 @@ yydefault: } case 24: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:547 +// line internal/php5/php5.y:547 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2630,13 +2630,13 @@ yydefault: } case 25: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:553 +// line internal/php5/php5.y:553 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 26: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:560 +// line internal/php5/php5.y:560 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2652,7 +2652,7 @@ yydefault: } case 27: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:574 +// line internal/php5/php5.y:574 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2676,7 +2676,7 @@ yydefault: } case 28: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:596 +// line internal/php5/php5.y:596 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2693,7 +2693,7 @@ yydefault: } case 29: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:611 +// line internal/php5/php5.y:611 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2718,7 +2718,7 @@ yydefault: } case 30: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:637 +// line internal/php5/php5.y:637 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2726,13 +2726,13 @@ yydefault: } case 31: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:643 +// line internal/php5/php5.y:643 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 32: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:650 +// line internal/php5/php5.y:650 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2748,7 +2748,7 @@ yydefault: } case 33: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:664 +// line internal/php5/php5.y:664 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2772,7 +2772,7 @@ yydefault: } case 34: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:686 +// line internal/php5/php5.y:686 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2789,7 +2789,7 @@ yydefault: } case 35: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:701 +// line internal/php5/php5.y:701 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -2814,7 +2814,7 @@ yydefault: } case 36: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:727 +// line internal/php5/php5.y:727 { constList := yyDollar[1].node.(*ast.StmtConstList) constList.Node.Position = position.NewNodesPosition(yyDollar[1].node, yyDollar[5].node) @@ -2840,7 +2840,7 @@ yydefault: } case 37: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:751 +// line internal/php5/php5.y:751 { yyVAL.node = &ast.StmtConstList{ Node: ast.Node{ @@ -2869,7 +2869,7 @@ yydefault: } case 38: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:781 +// line internal/php5/php5.y:781 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -2882,38 +2882,38 @@ yydefault: } case 39: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:792 +// line internal/php5/php5.y:792 { yyVAL.list = []ast.Vertex{} } case 40: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:800 +// line internal/php5/php5.y:800 { // error yyVAL.node = nil } case 41: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:805 +// line internal/php5/php5.y:805 { yyVAL.node = yyDollar[1].node } case 42: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:809 +// line internal/php5/php5.y:809 { yyVAL.node = yyDollar[1].node } case 43: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:813 +// line internal/php5/php5.y:813 { yyVAL.node = yyDollar[1].node } case 44: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:817 +// line internal/php5/php5.y:817 { yyVAL.node = &ast.StmtHaltCompiler{ Node: ast.Node{ @@ -2927,13 +2927,13 @@ yydefault: } case 45: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:833 +// line internal/php5/php5.y:833 { yyVAL.node = yyDollar[1].node } case 46: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:837 +// line internal/php5/php5.y:837 { yyVAL.node = &ast.StmtLabel{ Node: ast.Node{ @@ -2951,7 +2951,7 @@ yydefault: } case 47: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:856 +// line internal/php5/php5.y:856 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -2964,7 +2964,7 @@ yydefault: } case 48: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:867 +// line internal/php5/php5.y:867 { pos := position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node) if yyDollar[5].node != nil { @@ -2988,7 +2988,7 @@ yydefault: } case 49: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:889 +// line internal/php5/php5.y:889 { yyVAL.node = &ast.StmtIf{ Node: ast.Node{ @@ -3014,7 +3014,7 @@ yydefault: } case 50: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:913 +// line internal/php5/php5.y:913 { yyDollar[3].node.(*ast.StmtWhile).WhileTkn = yyDollar[1].token yyDollar[3].node.(*ast.StmtWhile).OpenParenthesisTkn = yyDollar[2].node.(*ast.ParserBrackets).OpenBracketTkn @@ -3026,7 +3026,7 @@ yydefault: } case 51: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:923 +// line internal/php5/php5.y:923 { yyVAL.node = &ast.StmtDo{ Node: ast.Node{ @@ -3043,7 +3043,7 @@ yydefault: } case 52: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:938 +// line internal/php5/php5.y:938 { yyDollar[9].node.(*ast.StmtFor).ForTkn = yyDollar[1].token yyDollar[9].node.(*ast.StmtFor).OpenParenthesisTkn = yyDollar[2].token @@ -3059,7 +3059,7 @@ yydefault: } case 53: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:952 +// line internal/php5/php5.y:952 { yyDollar[3].node.(*ast.StmtSwitch).SwitchTkn = yyDollar[1].token yyDollar[3].node.(*ast.StmtSwitch).OpenParenthesisTkn = yyDollar[2].node.(*ast.ParserBrackets).OpenBracketTkn @@ -3071,7 +3071,7 @@ yydefault: } case 54: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:962 +// line internal/php5/php5.y:962 { yyVAL.node = &ast.StmtBreak{ Node: ast.Node{ @@ -3083,7 +3083,7 @@ yydefault: } case 55: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:972 +// line internal/php5/php5.y:972 { yyVAL.node = &ast.StmtBreak{ Node: ast.Node{ @@ -3096,7 +3096,7 @@ yydefault: } case 56: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:983 +// line internal/php5/php5.y:983 { yyVAL.node = &ast.StmtContinue{ Node: ast.Node{ @@ -3108,7 +3108,7 @@ yydefault: } case 57: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:993 +// line internal/php5/php5.y:993 { yyVAL.node = &ast.StmtContinue{ Node: ast.Node{ @@ -3121,7 +3121,7 @@ yydefault: } case 58: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1004 +// line internal/php5/php5.y:1004 { yyVAL.node = &ast.StmtReturn{ Node: ast.Node{ @@ -3133,7 +3133,7 @@ yydefault: } case 59: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1014 +// line internal/php5/php5.y:1014 { yyVAL.node = &ast.StmtReturn{ Node: ast.Node{ @@ -3146,7 +3146,7 @@ yydefault: } case 60: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1025 +// line internal/php5/php5.y:1025 { yyVAL.node = &ast.StmtReturn{ Node: ast.Node{ @@ -3159,7 +3159,7 @@ yydefault: } case 61: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1036 +// line internal/php5/php5.y:1036 { yyVAL.node = &ast.StmtExpression{ Node: ast.Node{ @@ -3171,7 +3171,7 @@ yydefault: } case 62: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1046 +// line internal/php5/php5.y:1046 { yyDollar[2].node.(*ast.StmtGlobal).GlobalTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtGlobal).SemiColonTkn = yyDollar[3].token @@ -3182,7 +3182,7 @@ yydefault: } case 63: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1055 +// line internal/php5/php5.y:1055 { yyDollar[2].node.(*ast.StmtStatic).StaticTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtStatic).SemiColonTkn = yyDollar[3].token @@ -3193,7 +3193,7 @@ yydefault: } case 64: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1064 +// line internal/php5/php5.y:1064 { yyDollar[2].node.(*ast.StmtEcho).EchoTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtEcho).SemiColonTkn = yyDollar[3].token @@ -3203,7 +3203,7 @@ yydefault: } case 65: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1072 +// line internal/php5/php5.y:1072 { yyVAL.node = &ast.StmtInlineHtml{ Node: ast.Node{ @@ -3215,7 +3215,7 @@ yydefault: } case 66: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1082 +// line internal/php5/php5.y:1082 { yyVAL.node = &ast.StmtExpression{ Node: ast.Node{ @@ -3227,7 +3227,7 @@ yydefault: } case 67: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1092 +// line internal/php5/php5.y:1092 { yyDollar[3].node.(*ast.StmtUnset).UnsetTkn = yyDollar[1].token yyDollar[3].node.(*ast.StmtUnset).OpenParenthesisTkn = yyDollar[2].token @@ -3239,7 +3239,7 @@ yydefault: } case 68: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:1102 +// line internal/php5/php5.y:1102 { yyDollar[8].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[8].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3259,7 +3259,7 @@ yydefault: } case 69: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:1120 +// line internal/php5/php5.y:1120 { yyDollar[8].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[8].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3279,7 +3279,7 @@ yydefault: } case 70: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1138 +// line internal/php5/php5.y:1138 { yyDollar[5].node.(*ast.StmtDeclare).DeclareTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtDeclare).OpenParenthesisTkn = yyDollar[2].token @@ -3292,7 +3292,7 @@ yydefault: } case 71: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1149 +// line internal/php5/php5.y:1149 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -3303,7 +3303,7 @@ yydefault: } case 72: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:1158 +// line internal/php5/php5.y:1158 { yyVAL.node = &ast.StmtTry{ TryTkn: yyDollar[1].token, @@ -3322,7 +3322,7 @@ yydefault: } case 73: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1175 +// line internal/php5/php5.y:1175 { yyVAL.node = &ast.StmtThrow{ Node: ast.Node{ @@ -3335,7 +3335,7 @@ yydefault: } case 74: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1186 +// line internal/php5/php5.y:1186 { yyVAL.node = &ast.StmtGoto{ Node: ast.Node{ @@ -3354,13 +3354,13 @@ yydefault: } case 75: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1206 +// line internal/php5/php5.y:1206 { yyVAL.list = []ast.Vertex{} } case 76: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:1210 +// line internal/php5/php5.y:1210 { catch := &ast.StmtCatch{ Node: ast.Node{ @@ -3390,13 +3390,13 @@ yydefault: } case 77: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1241 +// line internal/php5/php5.y:1241 { yyVAL.node = nil } case 78: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1245 +// line internal/php5/php5.y:1245 { yyVAL.node = &ast.StmtFinally{ Node: ast.Node{ @@ -3410,31 +3410,31 @@ yydefault: } case 79: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1260 +// line internal/php5/php5.y:1260 { yyVAL.list = yyDollar[1].list } case 80: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1264 +// line internal/php5/php5.y:1264 { yyVAL.list = []ast.Vertex{} } case 81: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1271 +// line internal/php5/php5.y:1271 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 82: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1275 +// line internal/php5/php5.y:1275 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 83: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:1282 +// line internal/php5/php5.y:1282 { yyVAL.node = &ast.StmtCatch{ Node: ast.Node{ @@ -3463,7 +3463,7 @@ yydefault: } case 84: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1312 +// line internal/php5/php5.y:1312 { yyVAL.node = &ast.StmtUnset{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -3471,7 +3471,7 @@ yydefault: } case 85: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1318 +// line internal/php5/php5.y:1318 { yyDollar[1].node.(*ast.StmtUnset).Vars = append(yyDollar[1].node.(*ast.StmtUnset).Vars, yyDollar[3].node) yyDollar[1].node.(*ast.StmtUnset).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtUnset).SeparatorTkns, yyDollar[2].token) @@ -3480,49 +3480,49 @@ yydefault: } case 86: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1328 +// line internal/php5/php5.y:1328 { yyVAL.node = yyDollar[1].node } case 87: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1335 +// line internal/php5/php5.y:1335 { yyVAL.node = yyDollar[1].node } case 88: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1342 +// line internal/php5/php5.y:1342 { yyVAL.node = yyDollar[1].node } case 89: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1349 +// line internal/php5/php5.y:1349 { yyVAL.token = nil } case 90: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1353 +// line internal/php5/php5.y:1353 { yyVAL.token = yyDollar[1].token } case 91: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1360 +// line internal/php5/php5.y:1360 { yyVAL.token = nil } case 92: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1364 +// line internal/php5/php5.y:1364 { yyVAL.token = yyDollar[1].token } case 93: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:1371 +// line internal/php5/php5.y:1371 { yyVAL.node = &ast.StmtFunction{ Node: ast.Node{ @@ -3547,7 +3547,7 @@ yydefault: } case 94: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php5/php5.y:1397 +// line internal/php5/php5.y:1397 { switch n := yyDollar[1].node.(type) { case *ast.StmtClass: @@ -3584,7 +3584,7 @@ yydefault: } case 95: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:1432 +// line internal/php5/php5.y:1432 { yyVAL.node = &ast.StmtInterface{ Node: ast.Node{ @@ -3606,7 +3606,7 @@ yydefault: } case 96: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1456 +// line internal/php5/php5.y:1456 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -3617,7 +3617,7 @@ yydefault: } case 97: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1465 +// line internal/php5/php5.y:1465 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -3637,7 +3637,7 @@ yydefault: } case 98: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1483 +// line internal/php5/php5.y:1483 { yyVAL.node = &ast.StmtTrait{ Node: ast.Node{ @@ -3648,7 +3648,7 @@ yydefault: } case 99: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1492 +// line internal/php5/php5.y:1492 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -3668,13 +3668,13 @@ yydefault: } case 100: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1513 +// line internal/php5/php5.y:1513 { yyVAL.node = nil } case 101: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1517 +// line internal/php5/php5.y:1517 { yyVAL.node = &ast.StmtClassExtends{ Node: ast.Node{ @@ -3686,19 +3686,19 @@ yydefault: } case 102: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1530 +// line internal/php5/php5.y:1530 { yyVAL.token = yyDollar[1].token } case 103: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1537 +// line internal/php5/php5.y:1537 { yyVAL.node = nil } case 104: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1541 +// line internal/php5/php5.y:1541 { yyVAL.node = &ast.StmtInterfaceExtends{ Node: ast.Node{ @@ -3711,13 +3711,13 @@ yydefault: } case 105: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1555 +// line internal/php5/php5.y:1555 { yyVAL.node = nil } case 106: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1559 +// line internal/php5/php5.y:1559 { yyVAL.node = &ast.StmtClassImplements{ Node: ast.Node{ @@ -3730,7 +3730,7 @@ yydefault: } case 107: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1573 +// line internal/php5/php5.y:1573 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -3738,7 +3738,7 @@ yydefault: } case 108: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1579 +// line internal/php5/php5.y:1579 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -3747,13 +3747,13 @@ yydefault: } case 109: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1589 +// line internal/php5/php5.y:1589 { yyVAL.node = nil } case 110: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1593 +// line internal/php5/php5.y:1593 { yyVAL.node = &ast.StmtForeach{ DoubleArrowTkn: yyDollar[1].token, @@ -3762,13 +3762,13 @@ yydefault: } case 111: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1603 +// line internal/php5/php5.y:1603 { yyVAL.node = yyDollar[1].node } case 112: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1607 +// line internal/php5/php5.y:1607 { yyVAL.node = &ast.ExprReference{ Node: ast.Node{ @@ -3780,7 +3780,7 @@ yydefault: } case 113: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1617 +// line internal/php5/php5.y:1617 { pairList := yyDollar[3].node.(*ast.ParserSeparatedList) fistPair := pairList.Items[0].(*ast.ExprArrayItem) @@ -3802,7 +3802,7 @@ yydefault: } case 114: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1640 +// line internal/php5/php5.y:1640 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3813,7 +3813,7 @@ yydefault: } case 115: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1649 +// line internal/php5/php5.y:1649 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3833,7 +3833,7 @@ yydefault: } case 116: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1670 +// line internal/php5/php5.y:1670 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3844,7 +3844,7 @@ yydefault: } case 117: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1679 +// line internal/php5/php5.y:1679 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3864,7 +3864,7 @@ yydefault: } case 118: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1701 +// line internal/php5/php5.y:1701 { yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ @@ -3875,7 +3875,7 @@ yydefault: } case 119: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1710 +// line internal/php5/php5.y:1710 { yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ @@ -3895,7 +3895,7 @@ yydefault: } case 120: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1732 +// line internal/php5/php5.y:1732 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -3920,7 +3920,7 @@ yydefault: } case 121: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1755 +// line internal/php5/php5.y:1755 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append( @@ -3947,7 +3947,7 @@ yydefault: } case 122: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1784 +// line internal/php5/php5.y:1784 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3960,7 +3960,7 @@ yydefault: } case 123: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1795 +// line internal/php5/php5.y:1795 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3974,7 +3974,7 @@ yydefault: } case 124: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1807 +// line internal/php5/php5.y:1807 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3989,7 +3989,7 @@ yydefault: } case 125: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1820 +// line internal/php5/php5.y:1820 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -4005,13 +4005,13 @@ yydefault: } case 126: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1838 +// line internal/php5/php5.y:1838 { yyVAL.list = nil } case 127: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1842 +// line internal/php5/php5.y:1842 { yyVAL.list = append(yyDollar[1].list, &ast.StmtCase{ Node: ast.Node{ @@ -4025,7 +4025,7 @@ yydefault: } case 128: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1854 +// line internal/php5/php5.y:1854 { yyVAL.list = append(yyDollar[1].list, &ast.StmtDefault{ Node: ast.Node{ @@ -4038,19 +4038,19 @@ yydefault: } case 129: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1869 +// line internal/php5/php5.y:1869 { yyVAL.token = yyDollar[1].token } case 130: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1873 +// line internal/php5/php5.y:1873 { yyVAL.token = yyDollar[1].token } case 131: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1881 +// line internal/php5/php5.y:1881 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4061,7 +4061,7 @@ yydefault: } case 132: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1890 +// line internal/php5/php5.y:1890 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4081,13 +4081,13 @@ yydefault: } case 133: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1913 +// line internal/php5/php5.y:1913 { yyVAL.list = nil } case 134: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1917 +// line internal/php5/php5.y:1917 { yyVAL.list = append(yyDollar[1].list, &ast.StmtElseIf{ Node: ast.Node{ @@ -4102,13 +4102,13 @@ yydefault: } case 135: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1934 +// line internal/php5/php5.y:1934 { yyVAL.list = nil } case 136: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1938 +// line internal/php5/php5.y:1938 { yyVAL.list = append(yyDollar[1].list, &ast.StmtElseIf{ Node: ast.Node{ @@ -4130,13 +4130,13 @@ yydefault: } case 137: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1962 +// line internal/php5/php5.y:1962 { yyVAL.node = nil } case 138: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1966 +// line internal/php5/php5.y:1966 { yyVAL.node = &ast.StmtElse{ Node: ast.Node{ @@ -4148,13 +4148,13 @@ yydefault: } case 139: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1980 +// line internal/php5/php5.y:1980 { yyVAL.node = nil } case 140: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1984 +// line internal/php5/php5.y:1984 { yyVAL.node = &ast.StmtElse{ Node: ast.Node{ @@ -4173,25 +4173,25 @@ yydefault: } case 141: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2005 +// line internal/php5/php5.y:2005 { yyVAL.list = yyDollar[1].list } case 142: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2009 +// line internal/php5/php5.y:2009 { yyVAL.list = nil } case 143: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2016 +// line internal/php5/php5.y:2016 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 144: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2020 +// line internal/php5/php5.y:2020 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4200,42 +4200,8 @@ yydefault: } case 145: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2030 +// line internal/php5/php5.y:2030 { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - IdentifierTkn: yyDollar[4].token, - Value: yyDollar[4].token.Value, - }, - } - - if yyDollar[3].token != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[3].token, yyDollar[4].token), - }, - VariadicTkn: yyDollar[3].token, - Var: variable, - } - } - - if yyDollar[2].token != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[2].token, yyDollar[4].token), - }, - AmpersandTkn: yyDollar[2].token, - Var: variable, - } - } - pos := position.NewTokenPosition(yyDollar[4].token) if yyDollar[1].node != nil { pos = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token) @@ -4249,48 +4215,27 @@ yydefault: Node: ast.Node{ Position: pos, }, - Type: yyDollar[1].node, - Var: variable, + Type: yyDollar[1].node, + AmpersandTkn: yyDollar[2].token, + VariadicTkn: yyDollar[3].token, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + IdentifierTkn: yyDollar[4].token, + Value: yyDollar[4].token.Value, + }, + }, } } case 146: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:2083 +// line internal/php5/php5.y:2062 { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - IdentifierTkn: yyDollar[4].token, - Value: yyDollar[4].token.Value, - }, - } - - if yyDollar[3].token != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[3].token, yyDollar[4].token), - }, - VariadicTkn: yyDollar[3].token, - Var: variable, - } - } - - if yyDollar[2].token != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[2].token, yyDollar[4].token), - }, - AmpersandTkn: yyDollar[2].token, - Var: variable, - } - } - pos := position.NewTokenNodePosition(yyDollar[4].token, yyDollar[6].node) if yyDollar[1].node != nil { pos = position.NewNodesPosition(yyDollar[1].node, yyDollar[6].node) @@ -4305,20 +4250,33 @@ yydefault: Position: pos, }, Type: yyDollar[1].node, - Var: variable, + AmpersandTkn: yyDollar[2].token, + VariadicTkn: yyDollar[3].token, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + IdentifierTkn: yyDollar[4].token, + Value: yyDollar[4].token.Value, + }, + }, EqualTkn: yyDollar[5].token, DefaultValue: yyDollar[6].node, } } case 147: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2142 +// line internal/php5/php5.y:2100 { yyVAL.node = nil } case 148: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2146 +// line internal/php5/php5.y:2104 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4330,7 +4288,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2156 +// line internal/php5/php5.y:2114 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4342,13 +4300,13 @@ yydefault: } case 150: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2166 +// line internal/php5/php5.y:2124 { yyVAL.node = yyDollar[1].node } case 151: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2174 +// line internal/php5/php5.y:2132 { yyVAL.node = &ast.ArgumentList{ Node: ast.Node{ @@ -4360,7 +4318,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2184 +// line internal/php5/php5.y:2142 { argumentList := yyDollar[2].node.(*ast.ArgumentList) argumentList.Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[3].token) @@ -4371,7 +4329,7 @@ yydefault: } case 153: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2193 +// line internal/php5/php5.y:2151 { yyVAL.node = &ast.ArgumentList{ Node: ast.Node{ @@ -4391,7 +4349,7 @@ yydefault: } case 154: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2215 +// line internal/php5/php5.y:2173 { yyVAL.node = &ast.ArgumentList{ Arguments: []ast.Vertex{yyDollar[1].node}, @@ -4399,7 +4357,7 @@ yydefault: } case 155: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2221 +// line internal/php5/php5.y:2179 { yyDollar[1].node.(*ast.ArgumentList).SeparatorTkns = append(yyDollar[1].node.(*ast.ArgumentList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ArgumentList).Arguments = append(yyDollar[1].node.(*ast.ArgumentList).Arguments, yyDollar[3].node) @@ -4408,7 +4366,7 @@ yydefault: } case 156: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2231 +// line internal/php5/php5.y:2189 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4419,7 +4377,7 @@ yydefault: } case 157: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2240 +// line internal/php5/php5.y:2198 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4430,7 +4388,7 @@ yydefault: } case 158: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2249 +// line internal/php5/php5.y:2207 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4442,7 +4400,7 @@ yydefault: } case 159: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2259 +// line internal/php5/php5.y:2217 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4454,7 +4412,7 @@ yydefault: } case 160: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2272 +// line internal/php5/php5.y:2230 { yyDollar[1].node.(*ast.StmtGlobal).Vars = append(yyDollar[1].node.(*ast.StmtGlobal).Vars, yyDollar[3].node) yyDollar[1].node.(*ast.StmtGlobal).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtGlobal).SeparatorTkns, yyDollar[2].token) @@ -4463,7 +4421,7 @@ yydefault: } case 161: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2279 +// line internal/php5/php5.y:2237 { yyVAL.node = &ast.StmtGlobal{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4471,7 +4429,7 @@ yydefault: } case 162: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2289 +// line internal/php5/php5.y:2247 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -4488,7 +4446,7 @@ yydefault: } case 163: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2304 +// line internal/php5/php5.y:2262 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -4500,7 +4458,7 @@ yydefault: } case 164: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2314 +// line internal/php5/php5.y:2272 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -4519,7 +4477,7 @@ yydefault: } case 165: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2335 +// line internal/php5/php5.y:2293 { yyDollar[1].node.(*ast.StmtStatic).Vars = append(yyDollar[1].node.(*ast.StmtStatic).Vars, &ast.StmtStaticVar{ Node: ast.Node{ @@ -4544,7 +4502,7 @@ yydefault: } case 166: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2358 +// line internal/php5/php5.y:2316 { yyDollar[1].node.(*ast.StmtStatic).Vars = append(yyDollar[1].node.(*ast.StmtStatic).Vars, &ast.StmtStaticVar{ Node: ast.Node{ @@ -4571,7 +4529,7 @@ yydefault: } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2383 +// line internal/php5/php5.y:2341 { yyVAL.node = &ast.StmtStatic{ Vars: []ast.Vertex{ @@ -4597,7 +4555,7 @@ yydefault: } case 168: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2407 +// line internal/php5/php5.y:2365 { yyVAL.node = &ast.StmtStatic{ Vars: []ast.Vertex{ @@ -4625,19 +4583,19 @@ yydefault: } case 169: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2437 +// line internal/php5/php5.y:2395 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 170: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2441 +// line internal/php5/php5.y:2399 { yyVAL.list = []ast.Vertex{} } case 171: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2449 +// line internal/php5/php5.y:2407 { yyVAL.node = &ast.StmtPropertyList{ Node: ast.Node{ @@ -4651,7 +4609,7 @@ yydefault: } case 172: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2461 +// line internal/php5/php5.y:2419 { yyDollar[1].node.(*ast.StmtClassConstList).SemiColonTkn = yyDollar[2].token yyDollar[1].node.(*ast.StmtClassConstList).Node.Position = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token) @@ -4659,13 +4617,13 @@ yydefault: } case 173: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2467 +// line internal/php5/php5.y:2425 { yyVAL.node = yyDollar[1].node } case 174: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:2471 +// line internal/php5/php5.y:2429 { pos := position.NewTokenNodePosition(yyDollar[2].token, yyDollar[8].node) if yyDollar[1].list != nil { @@ -4694,7 +4652,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2501 +// line internal/php5/php5.y:2459 { yyVAL.node = &ast.StmtTraitUse{ Node: ast.Node{ @@ -4708,7 +4666,7 @@ yydefault: } case 176: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2516 +// line internal/php5/php5.y:2474 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -4716,7 +4674,7 @@ yydefault: } case 177: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2522 +// line internal/php5/php5.y:2480 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -4725,7 +4683,7 @@ yydefault: } case 178: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2532 +// line internal/php5/php5.y:2490 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -4736,7 +4694,7 @@ yydefault: } case 179: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2541 +// line internal/php5/php5.y:2499 { yyVAL.node = &ast.StmtTraitAdaptationList{ Node: ast.Node{ @@ -4749,31 +4707,31 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2555 +// line internal/php5/php5.y:2513 { yyVAL.list = nil } case 181: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2559 +// line internal/php5/php5.y:2517 { yyVAL.list = yyDollar[1].list } case 182: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2566 +// line internal/php5/php5.y:2524 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2570 +// line internal/php5/php5.y:2528 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 184: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2577 +// line internal/php5/php5.y:2535 { yyVAL.node = yyDollar[1].node @@ -4783,7 +4741,7 @@ yydefault: } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2585 +// line internal/php5/php5.y:2543 { yyVAL.node = yyDollar[1].node @@ -4793,7 +4751,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2596 +// line internal/php5/php5.y:2554 { yyVAL.node = &ast.StmtTraitUsePrecedence{ Node: ast.Node{ @@ -4807,7 +4765,7 @@ yydefault: } case 187: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2611 +// line internal/php5/php5.y:2569 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -4815,7 +4773,7 @@ yydefault: } case 188: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2617 +// line internal/php5/php5.y:2575 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -4824,7 +4782,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2627 +// line internal/php5/php5.y:2585 { yyVAL.node = &ast.StmtTraitMethodRef{ Node: ast.Node{ @@ -4841,13 +4799,13 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2642 +// line internal/php5/php5.y:2600 { yyVAL.node = yyDollar[1].node } case 191: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2649 +// line internal/php5/php5.y:2607 { yyVAL.node = &ast.StmtTraitMethodRef{ Node: ast.Node{ @@ -4866,7 +4824,7 @@ yydefault: } case 192: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2669 +// line internal/php5/php5.y:2627 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4886,7 +4844,7 @@ yydefault: } case 193: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2687 +// line internal/php5/php5.y:2645 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4899,19 +4857,19 @@ yydefault: } case 194: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2701 +// line internal/php5/php5.y:2659 { yyVAL.node = nil } case 195: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2705 +// line internal/php5/php5.y:2663 { yyVAL.node = yyDollar[1].node } case 196: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2712 +// line internal/php5/php5.y:2670 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -4922,7 +4880,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2721 +// line internal/php5/php5.y:2679 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -4935,13 +4893,13 @@ yydefault: } case 198: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2735 +// line internal/php5/php5.y:2693 { yyVAL.list = yyDollar[1].list } case 199: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2739 +// line internal/php5/php5.y:2697 { yyVAL.list = []ast.Vertex{ &ast.Identifier{ @@ -4955,31 +4913,31 @@ yydefault: } case 200: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2754 +// line internal/php5/php5.y:2712 { yyVAL.list = nil } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2758 +// line internal/php5/php5.y:2716 { yyVAL.list = yyDollar[1].list } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2765 +// line internal/php5/php5.y:2723 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 203: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2769 +// line internal/php5/php5.y:2727 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 204: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2776 +// line internal/php5/php5.y:2734 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4991,7 +4949,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2786 +// line internal/php5/php5.y:2744 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5003,7 +4961,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2796 +// line internal/php5/php5.y:2754 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5015,7 +4973,7 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2806 +// line internal/php5/php5.y:2764 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5027,7 +4985,7 @@ yydefault: } case 208: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2816 +// line internal/php5/php5.y:2774 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5039,7 +4997,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2826 +// line internal/php5/php5.y:2784 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5051,7 +5009,7 @@ yydefault: } case 210: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2839 +// line internal/php5/php5.y:2797 { item := &ast.StmtProperty{ Node: ast.Node{ @@ -5078,7 +5036,7 @@ yydefault: } case 211: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2864 +// line internal/php5/php5.y:2822 { item := &ast.StmtProperty{ Node: ast.Node{ @@ -5107,7 +5065,7 @@ yydefault: } case 212: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2891 +// line internal/php5/php5.y:2849 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -5134,7 +5092,7 @@ yydefault: } case 213: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2916 +// line internal/php5/php5.y:2874 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -5162,7 +5120,7 @@ yydefault: } case 214: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2945 +// line internal/php5/php5.y:2903 { constList := yyDollar[1].node.(*ast.StmtClassConstList) constList.Node.Position = position.NewNodesPosition(yyDollar[1].node, yyDollar[5].node) @@ -5188,7 +5146,7 @@ yydefault: } case 215: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2969 +// line internal/php5/php5.y:2927 { yyVAL.node = &ast.StmtClassConstList{ Node: ast.Node{ @@ -5217,7 +5175,7 @@ yydefault: } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2999 +// line internal/php5/php5.y:2957 { yyDollar[1].node.(*ast.StmtEcho).Exprs = append(yyDollar[1].node.(*ast.StmtEcho).Exprs, yyDollar[3].node) yyDollar[1].node.(*ast.StmtEcho).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtEcho).SeparatorTkns, yyDollar[2].token) @@ -5226,7 +5184,7 @@ yydefault: } case 217: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3006 +// line internal/php5/php5.y:2964 { yyVAL.node = &ast.StmtEcho{ Exprs: []ast.Vertex{yyDollar[1].node}, @@ -5234,19 +5192,19 @@ yydefault: } case 218: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:3016 +// line internal/php5/php5.y:2974 { yyVAL.list = nil } case 219: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3020 +// line internal/php5/php5.y:2978 { yyVAL.list = yyDollar[1].list } case 220: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3027 +// line internal/php5/php5.y:2985 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5255,25 +5213,25 @@ yydefault: } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3034 +// line internal/php5/php5.y:2992 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3041 +// line internal/php5/php5.y:2999 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3045 +// line internal/php5/php5.y:3003 { yyVAL.list = yyDollar[1].list } case 224: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3052 +// line internal/php5/php5.y:3010 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -5289,7 +5247,7 @@ yydefault: } case 225: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3066 +// line internal/php5/php5.y:3024 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -5305,37 +5263,37 @@ yydefault: } case 226: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3083 +// line internal/php5/php5.y:3041 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 227: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3087 +// line internal/php5/php5.y:3045 { yyVAL.list = yyDollar[1].list } case 228: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3091 +// line internal/php5/php5.y:3049 { yyVAL.list = yyDollar[1].list } case 229: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:3098 +// line internal/php5/php5.y:3056 { yyVAL.list = nil } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3102 +// line internal/php5/php5.y:3060 { yyVAL.list = yyDollar[1].list } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3109 +// line internal/php5/php5.y:3067 { if yyDollar[3].node != nil { yyVAL.node = &ast.ExprNew{ @@ -5346,6 +5304,7 @@ yydefault: Class: yyDollar[2].node, OpenParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[3].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[3].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, } } else { @@ -5359,7 +5318,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:3134 +// line internal/php5/php5.y:3093 { yyVAL.node = &ast.ExprAssign{ Node: ast.Node{ @@ -5381,7 +5340,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3154 +// line internal/php5/php5.y:3113 { yyVAL.node = &ast.ExprAssign{ Node: ast.Node{ @@ -5394,7 +5353,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3165 +// line internal/php5/php5.y:3124 { yyVAL.node = &ast.ExprAssignReference{ Node: ast.Node{ @@ -5408,7 +5367,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:3177 +// line internal/php5/php5.y:3136 { var _new *ast.ExprNew if yyDollar[3].token != nil { @@ -5420,6 +5379,7 @@ yydefault: Class: yyDollar[5].node, OpenParenthesisTkn: yyDollar[6].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[6].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[6].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[6].node.(*ast.ArgumentList).OpenParenthesisTkn, } } else { @@ -5444,7 +5404,7 @@ yydefault: } case 236: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3211 +// line internal/php5/php5.y:3171 { yyVAL.node = &ast.ExprClone{ Node: ast.Node{ @@ -5456,7 +5416,7 @@ yydefault: } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3221 +// line internal/php5/php5.y:3181 { yyVAL.node = &ast.ExprAssignPlus{ Node: ast.Node{ @@ -5469,7 +5429,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3232 +// line internal/php5/php5.y:3192 { yyVAL.node = &ast.ExprAssignMinus{ Node: ast.Node{ @@ -5482,7 +5442,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3243 +// line internal/php5/php5.y:3203 { yyVAL.node = &ast.ExprAssignMul{ Node: ast.Node{ @@ -5495,7 +5455,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3254 +// line internal/php5/php5.y:3214 { yyVAL.node = &ast.ExprAssignPow{ Node: ast.Node{ @@ -5508,7 +5468,7 @@ yydefault: } case 241: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3265 +// line internal/php5/php5.y:3225 { yyVAL.node = &ast.ExprAssignDiv{ Node: ast.Node{ @@ -5521,7 +5481,7 @@ yydefault: } case 242: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3276 +// line internal/php5/php5.y:3236 { yyVAL.node = &ast.ExprAssignConcat{ Node: ast.Node{ @@ -5534,7 +5494,7 @@ yydefault: } case 243: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3287 +// line internal/php5/php5.y:3247 { yyVAL.node = &ast.ExprAssignMod{ Node: ast.Node{ @@ -5547,7 +5507,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3298 +// line internal/php5/php5.y:3258 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ Node: ast.Node{ @@ -5560,7 +5520,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3309 +// line internal/php5/php5.y:3269 { yyVAL.node = &ast.ExprAssignBitwiseOr{ Node: ast.Node{ @@ -5573,7 +5533,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3320 +// line internal/php5/php5.y:3280 { yyVAL.node = &ast.ExprAssignBitwiseXor{ Node: ast.Node{ @@ -5586,7 +5546,7 @@ yydefault: } case 247: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3331 +// line internal/php5/php5.y:3291 { yyVAL.node = &ast.ExprAssignShiftLeft{ Node: ast.Node{ @@ -5599,7 +5559,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3342 +// line internal/php5/php5.y:3302 { yyVAL.node = &ast.ExprAssignShiftRight{ Node: ast.Node{ @@ -5612,7 +5572,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3353 +// line internal/php5/php5.y:3313 { yyVAL.node = &ast.ExprPostInc{ Node: ast.Node{ @@ -5624,7 +5584,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3363 +// line internal/php5/php5.y:3323 { yyVAL.node = &ast.ExprPreInc{ Node: ast.Node{ @@ -5636,7 +5596,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3373 +// line internal/php5/php5.y:3333 { yyVAL.node = &ast.ExprPostDec{ Node: ast.Node{ @@ -5648,7 +5608,7 @@ yydefault: } case 252: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3383 +// line internal/php5/php5.y:3343 { yyVAL.node = &ast.ExprPreDec{ Node: ast.Node{ @@ -5660,7 +5620,7 @@ yydefault: } case 253: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3393 +// line internal/php5/php5.y:3353 { yyVAL.node = &ast.ExprBinaryBooleanOr{ Node: ast.Node{ @@ -5673,7 +5633,7 @@ yydefault: } case 254: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3404 +// line internal/php5/php5.y:3364 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ Node: ast.Node{ @@ -5686,7 +5646,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3415 +// line internal/php5/php5.y:3375 { yyVAL.node = &ast.ExprBinaryLogicalOr{ Node: ast.Node{ @@ -5699,7 +5659,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3426 +// line internal/php5/php5.y:3386 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ Node: ast.Node{ @@ -5712,7 +5672,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3437 +// line internal/php5/php5.y:3397 { yyVAL.node = &ast.ExprBinaryLogicalXor{ Node: ast.Node{ @@ -5725,7 +5685,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3448 +// line internal/php5/php5.y:3408 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ Node: ast.Node{ @@ -5738,7 +5698,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3459 +// line internal/php5/php5.y:3419 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ Node: ast.Node{ @@ -5751,7 +5711,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3470 +// line internal/php5/php5.y:3430 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ Node: ast.Node{ @@ -5764,7 +5724,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3481 +// line internal/php5/php5.y:3441 { yyVAL.node = &ast.ExprBinaryConcat{ Node: ast.Node{ @@ -5777,7 +5737,7 @@ yydefault: } case 262: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3492 +// line internal/php5/php5.y:3452 { yyVAL.node = &ast.ExprBinaryPlus{ Node: ast.Node{ @@ -5790,7 +5750,7 @@ yydefault: } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3503 +// line internal/php5/php5.y:3463 { yyVAL.node = &ast.ExprBinaryMinus{ Node: ast.Node{ @@ -5803,7 +5763,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3514 +// line internal/php5/php5.y:3474 { yyVAL.node = &ast.ExprBinaryMul{ Node: ast.Node{ @@ -5816,7 +5776,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3525 +// line internal/php5/php5.y:3485 { yyVAL.node = &ast.ExprBinaryPow{ Node: ast.Node{ @@ -5829,7 +5789,7 @@ yydefault: } case 266: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3536 +// line internal/php5/php5.y:3496 { yyVAL.node = &ast.ExprBinaryDiv{ Node: ast.Node{ @@ -5842,7 +5802,7 @@ yydefault: } case 267: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3547 +// line internal/php5/php5.y:3507 { yyVAL.node = &ast.ExprBinaryMod{ Node: ast.Node{ @@ -5855,7 +5815,7 @@ yydefault: } case 268: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3558 +// line internal/php5/php5.y:3518 { yyVAL.node = &ast.ExprBinaryShiftLeft{ Node: ast.Node{ @@ -5868,7 +5828,7 @@ yydefault: } case 269: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3569 +// line internal/php5/php5.y:3529 { yyVAL.node = &ast.ExprBinaryShiftRight{ Node: ast.Node{ @@ -5881,7 +5841,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3580 +// line internal/php5/php5.y:3540 { yyVAL.node = &ast.ExprUnaryPlus{ Node: ast.Node{ @@ -5893,7 +5853,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3590 +// line internal/php5/php5.y:3550 { yyVAL.node = &ast.ExprUnaryMinus{ Node: ast.Node{ @@ -5905,7 +5865,7 @@ yydefault: } case 272: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3600 +// line internal/php5/php5.y:3560 { yyVAL.node = &ast.ExprBooleanNot{ Node: ast.Node{ @@ -5917,7 +5877,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3610 +// line internal/php5/php5.y:3570 { yyVAL.node = &ast.ExprBitwiseNot{ Node: ast.Node{ @@ -5929,7 +5889,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3620 +// line internal/php5/php5.y:3580 { yyVAL.node = &ast.ExprBinaryIdentical{ Node: ast.Node{ @@ -5942,7 +5902,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3631 +// line internal/php5/php5.y:3591 { yyVAL.node = &ast.ExprBinaryNotIdentical{ Node: ast.Node{ @@ -5955,7 +5915,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3642 +// line internal/php5/php5.y:3602 { yyVAL.node = &ast.ExprBinaryEqual{ Node: ast.Node{ @@ -5968,7 +5928,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3653 +// line internal/php5/php5.y:3613 { yyVAL.node = &ast.ExprBinaryNotEqual{ Node: ast.Node{ @@ -5982,7 +5942,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3665 +// line internal/php5/php5.y:3625 { yyVAL.node = &ast.ExprBinarySmaller{ Node: ast.Node{ @@ -5995,7 +5955,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3676 +// line internal/php5/php5.y:3636 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ Node: ast.Node{ @@ -6008,7 +5968,7 @@ yydefault: } case 280: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3687 +// line internal/php5/php5.y:3647 { yyVAL.node = &ast.ExprBinaryGreater{ Node: ast.Node{ @@ -6021,7 +5981,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3698 +// line internal/php5/php5.y:3658 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ Node: ast.Node{ @@ -6034,7 +5994,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3709 +// line internal/php5/php5.y:3669 { yyVAL.node = &ast.ExprInstanceOf{ Node: ast.Node{ @@ -6047,19 +6007,19 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3720 +// line internal/php5/php5.y:3680 { yyVAL.node = yyDollar[1].node } case 284: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3724 +// line internal/php5/php5.y:3684 { yyVAL.node = yyDollar[1].node } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3728 +// line internal/php5/php5.y:3688 { yyVAL.node = yyDollar[2].node @@ -6093,7 +6053,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:3760 +// line internal/php5/php5.y:3720 { yyVAL.node = &ast.ExprTernary{ Node: ast.Node{ @@ -6108,7 +6068,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3773 +// line internal/php5/php5.y:3733 { yyVAL.node = &ast.ExprTernary{ Node: ast.Node{ @@ -6122,13 +6082,13 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3785 +// line internal/php5/php5.y:3745 { yyVAL.node = yyDollar[1].node } case 289: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3789 +// line internal/php5/php5.y:3749 { yyVAL.node = &ast.ExprCastInt{ Node: ast.Node{ @@ -6140,7 +6100,7 @@ yydefault: } case 290: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3799 +// line internal/php5/php5.y:3759 { yyVAL.node = &ast.ExprCastDouble{ Node: ast.Node{ @@ -6152,7 +6112,7 @@ yydefault: } case 291: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3809 +// line internal/php5/php5.y:3769 { yyVAL.node = &ast.ExprCastString{ Node: ast.Node{ @@ -6164,7 +6124,7 @@ yydefault: } case 292: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3819 +// line internal/php5/php5.y:3779 { yyVAL.node = &ast.ExprCastArray{ Node: ast.Node{ @@ -6176,7 +6136,7 @@ yydefault: } case 293: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3829 +// line internal/php5/php5.y:3789 { yyVAL.node = &ast.ExprCastObject{ Node: ast.Node{ @@ -6188,7 +6148,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3839 +// line internal/php5/php5.y:3799 { yyVAL.node = &ast.ExprCastBool{ Node: ast.Node{ @@ -6200,7 +6160,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3849 +// line internal/php5/php5.y:3809 { yyVAL.node = &ast.ExprCastUnset{ Node: ast.Node{ @@ -6212,7 +6172,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3859 +// line internal/php5/php5.y:3819 { exit := &ast.ExprExit{ DieTkn: yyDollar[1].token, @@ -6231,7 +6191,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3876 +// line internal/php5/php5.y:3836 { yyVAL.node = &ast.ExprErrorSuppress{ Node: ast.Node{ @@ -6243,25 +6203,25 @@ yydefault: } case 298: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3886 +// line internal/php5/php5.y:3846 { yyVAL.node = yyDollar[1].node } case 299: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3890 +// line internal/php5/php5.y:3850 { yyVAL.node = yyDollar[1].node } case 300: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3894 +// line internal/php5/php5.y:3854 { yyVAL.node = yyDollar[1].node } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3898 +// line internal/php5/php5.y:3858 { yyVAL.node = &ast.ExprShellExec{ Node: ast.Node{ @@ -6274,7 +6234,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3909 +// line internal/php5/php5.y:3869 { yyVAL.node = &ast.ExprPrint{ Node: ast.Node{ @@ -6286,7 +6246,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3919 +// line internal/php5/php5.y:3879 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6297,7 +6257,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:3928 +// line internal/php5/php5.y:3888 { yyVAL.node = &ast.ExprClosure{ Node: ast.Node{ @@ -6316,7 +6276,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php5/php5.y:3945 +// line internal/php5/php5.y:3905 { yyVAL.node = &ast.ExprClosure{ Node: ast.Node{ @@ -6336,7 +6296,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3966 +// line internal/php5/php5.y:3926 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6348,7 +6308,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3976 +// line internal/php5/php5.y:3936 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6360,7 +6320,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3986 +// line internal/php5/php5.y:3946 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6374,7 +6334,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3998 +// line internal/php5/php5.y:3958 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6388,7 +6348,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4013 +// line internal/php5/php5.y:3973 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6402,7 +6362,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4025 +// line internal/php5/php5.y:3985 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6416,7 +6376,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4037 +// line internal/php5/php5.y:3997 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6436,7 +6396,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4055 +// line internal/php5/php5.y:4015 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6450,7 +6410,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4070 +// line internal/php5/php5.y:4030 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6465,7 +6425,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4083 +// line internal/php5/php5.y:4043 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6479,19 +6439,19 @@ yydefault: } case 316: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4098 +// line internal/php5/php5.y:4058 { yyVAL.token = yyDollar[1].token } case 317: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4105 +// line internal/php5/php5.y:4065 { yyVAL.ClosureUse = nil } case 318: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4109 +// line internal/php5/php5.y:4069 { yyVAL.ClosureUse = &ast.ExprClosureUse{ Node: ast.Node{ @@ -6506,7 +6466,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4125 +// line internal/php5/php5.y:4085 { variable := &ast.ExprVariable{ Node: ast.Node{ @@ -6528,7 +6488,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4145 +// line internal/php5/php5.y:4105 { reference := &ast.ExprReference{ Node: ast.Node{ @@ -6556,7 +6516,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4171 +// line internal/php5/php5.y:4131 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -6577,7 +6537,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4190 +// line internal/php5/php5.y:4150 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -6604,7 +6564,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4218 +// line internal/php5/php5.y:4178 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6618,12 +6578,13 @@ yydefault: }, OpenParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[2].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[2].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 324: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4235 +// line internal/php5/php5.y:4196 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6639,12 +6600,13 @@ yydefault: }, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4254 +// line internal/php5/php5.y:4216 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6659,12 +6621,13 @@ yydefault: }, OpenParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[3].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[3].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 326: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4272 +// line internal/php5/php5.y:4235 { yyVAL.node = &ast.ExprStaticCall{ Node: ast.Node{ @@ -6675,12 +6638,13 @@ yydefault: Call: yyDollar[3].node, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 327: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4286 +// line internal/php5/php5.y:4250 { yyVAL.node = &ast.ExprStaticCall{ Node: ast.Node{ @@ -6691,12 +6655,13 @@ yydefault: Call: yyDollar[3].node, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 328: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4300 +// line internal/php5/php5.y:4265 { yyVAL.node = &ast.ExprStaticCall{ Node: ast.Node{ @@ -6707,12 +6672,13 @@ yydefault: Call: yyDollar[3].node, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 329: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4314 +// line internal/php5/php5.y:4280 { yyVAL.node = &ast.ExprStaticCall{ Node: ast.Node{ @@ -6723,12 +6689,13 @@ yydefault: Call: yyDollar[3].node, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 330: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4328 +// line internal/php5/php5.y:4295 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6737,12 +6704,13 @@ yydefault: Function: yyDollar[1].node, OpenParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[2].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[2].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 331: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4343 +// line internal/php5/php5.y:4311 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -6754,7 +6722,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4353 +// line internal/php5/php5.y:4321 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -6765,7 +6733,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4362 +// line internal/php5/php5.y:4330 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -6778,7 +6746,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4373 +// line internal/php5/php5.y:4341 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -6790,7 +6758,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4386 +// line internal/php5/php5.y:4354 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -6801,7 +6769,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4395 +// line internal/php5/php5.y:4363 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -6814,7 +6782,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4406 +// line internal/php5/php5.y:4374 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -6826,19 +6794,19 @@ yydefault: } case 338: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4419 +// line internal/php5/php5.y:4387 { yyVAL.node = yyDollar[1].node } case 339: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4423 +// line internal/php5/php5.y:4391 { yyVAL.node = yyDollar[1].node } case 340: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4430 +// line internal/php5/php5.y:4398 { yyVAL.node = yyDollar[1].node @@ -6879,25 +6847,25 @@ yydefault: } case 341: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4469 +// line internal/php5/php5.y:4437 { yyVAL.node = yyDollar[1].node } case 342: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4477 +// line internal/php5/php5.y:4445 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 343: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4481 +// line internal/php5/php5.y:4449 { yyVAL.list = []ast.Vertex{} } case 344: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4489 +// line internal/php5/php5.y:4457 { yyVAL.list = yyDollar[2].list @@ -6906,13 +6874,13 @@ yydefault: } case 345: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4499 +// line internal/php5/php5.y:4467 { yyVAL.node = nil } case 346: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4503 +// line internal/php5/php5.y:4471 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6928,19 +6896,19 @@ yydefault: } case 347: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4517 +// line internal/php5/php5.y:4485 { yyVAL.node = yyDollar[1].node } case 348: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4524 +// line internal/php5/php5.y:4492 { yyVAL.list = []ast.Vertex{} } case 349: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4528 +// line internal/php5/php5.y:4496 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -6954,25 +6922,25 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4540 +// line internal/php5/php5.y:4508 { yyVAL.list = yyDollar[1].list } case 351: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4547 +// line internal/php5/php5.y:4515 { yyVAL.node = nil } case 352: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4551 +// line internal/php5/php5.y:4519 { yyVAL.node = yyDollar[1].node } case 353: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4558 +// line internal/php5/php5.y:4526 { yyVAL.node = &ast.ScalarLnumber{ Node: ast.Node{ @@ -6984,7 +6952,7 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4568 +// line internal/php5/php5.y:4536 { yyVAL.node = &ast.ScalarDnumber{ Node: ast.Node{ @@ -6996,7 +6964,7 @@ yydefault: } case 355: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4578 +// line internal/php5/php5.y:4546 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -7008,7 +6976,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4588 +// line internal/php5/php5.y:4556 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7020,7 +6988,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4598 +// line internal/php5/php5.y:4566 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7032,7 +7000,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4608 +// line internal/php5/php5.y:4576 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7044,7 +7012,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4618 +// line internal/php5/php5.y:4586 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7056,7 +7024,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4628 +// line internal/php5/php5.y:4596 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7068,7 +7036,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4638 +// line internal/php5/php5.y:4606 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7080,7 +7048,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4648 +// line internal/php5/php5.y:4616 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7092,7 +7060,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4658 +// line internal/php5/php5.y:4626 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -7113,7 +7081,7 @@ yydefault: } case 364: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4677 +// line internal/php5/php5.y:4645 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -7125,7 +7093,7 @@ yydefault: } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4690 +// line internal/php5/php5.y:4658 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -7144,25 +7112,25 @@ yydefault: } case 366: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4710 +// line internal/php5/php5.y:4678 { yyVAL.node = yyDollar[1].node } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4717 +// line internal/php5/php5.y:4685 { yyVAL.node = yyDollar[1].node } case 368: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4721 +// line internal/php5/php5.y:4689 { yyVAL.node = yyDollar[1].node } case 369: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4725 +// line internal/php5/php5.y:4693 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7178,7 +7146,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4739 +// line internal/php5/php5.y:4707 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7196,7 +7164,7 @@ yydefault: } case 371: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4755 +// line internal/php5/php5.y:4723 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7213,7 +7181,7 @@ yydefault: } case 372: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4770 +// line internal/php5/php5.y:4738 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -7228,7 +7196,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4783 +// line internal/php5/php5.y:4751 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -7242,13 +7210,13 @@ yydefault: } case 374: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4795 +// line internal/php5/php5.y:4763 { yyVAL.node = yyDollar[1].node } case 375: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4799 +// line internal/php5/php5.y:4767 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7260,13 +7228,13 @@ yydefault: } case 376: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4809 +// line internal/php5/php5.y:4777 { yyVAL.node = yyDollar[1].node } case 377: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4816 +// line internal/php5/php5.y:4784 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7280,7 +7248,7 @@ yydefault: } case 378: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4828 +// line internal/php5/php5.y:4796 { yyVAL.node = &ast.ExprBinaryPlus{ Node: ast.Node{ @@ -7293,7 +7261,7 @@ yydefault: } case 379: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4839 +// line internal/php5/php5.y:4807 { yyVAL.node = &ast.ExprBinaryMinus{ Node: ast.Node{ @@ -7306,7 +7274,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4850 +// line internal/php5/php5.y:4818 { yyVAL.node = &ast.ExprBinaryMul{ Node: ast.Node{ @@ -7319,7 +7287,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4861 +// line internal/php5/php5.y:4829 { yyVAL.node = &ast.ExprBinaryPow{ Node: ast.Node{ @@ -7332,7 +7300,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4872 +// line internal/php5/php5.y:4840 { yyVAL.node = &ast.ExprBinaryDiv{ Node: ast.Node{ @@ -7345,7 +7313,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4883 +// line internal/php5/php5.y:4851 { yyVAL.node = &ast.ExprBinaryMod{ Node: ast.Node{ @@ -7358,7 +7326,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4894 +// line internal/php5/php5.y:4862 { yyVAL.node = &ast.ExprBooleanNot{ Node: ast.Node{ @@ -7370,7 +7338,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4904 +// line internal/php5/php5.y:4872 { yyVAL.node = &ast.ExprBitwiseNot{ Node: ast.Node{ @@ -7382,7 +7350,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4914 +// line internal/php5/php5.y:4882 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ Node: ast.Node{ @@ -7395,7 +7363,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4925 +// line internal/php5/php5.y:4893 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ Node: ast.Node{ @@ -7408,7 +7376,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4936 +// line internal/php5/php5.y:4904 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ Node: ast.Node{ @@ -7421,7 +7389,7 @@ yydefault: } case 389: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4947 +// line internal/php5/php5.y:4915 { yyVAL.node = &ast.ExprBinaryShiftLeft{ Node: ast.Node{ @@ -7434,7 +7402,7 @@ yydefault: } case 390: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4958 +// line internal/php5/php5.y:4926 { yyVAL.node = &ast.ExprBinaryShiftRight{ Node: ast.Node{ @@ -7447,7 +7415,7 @@ yydefault: } case 391: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4969 +// line internal/php5/php5.y:4937 { yyVAL.node = &ast.ExprBinaryConcat{ Node: ast.Node{ @@ -7460,7 +7428,7 @@ yydefault: } case 392: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4980 +// line internal/php5/php5.y:4948 { yyVAL.node = &ast.ExprBinaryLogicalXor{ Node: ast.Node{ @@ -7473,7 +7441,7 @@ yydefault: } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4991 +// line internal/php5/php5.y:4959 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ Node: ast.Node{ @@ -7486,7 +7454,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5002 +// line internal/php5/php5.y:4970 { yyVAL.node = &ast.ExprBinaryLogicalOr{ Node: ast.Node{ @@ -7499,7 +7467,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5013 +// line internal/php5/php5.y:4981 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ Node: ast.Node{ @@ -7512,7 +7480,7 @@ yydefault: } case 396: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5024 +// line internal/php5/php5.y:4992 { yyVAL.node = &ast.ExprBinaryBooleanOr{ Node: ast.Node{ @@ -7525,7 +7493,7 @@ yydefault: } case 397: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5035 +// line internal/php5/php5.y:5003 { yyVAL.node = &ast.ExprBinaryIdentical{ Node: ast.Node{ @@ -7538,7 +7506,7 @@ yydefault: } case 398: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5046 +// line internal/php5/php5.y:5014 { yyVAL.node = &ast.ExprBinaryNotIdentical{ Node: ast.Node{ @@ -7551,7 +7519,7 @@ yydefault: } case 399: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5057 +// line internal/php5/php5.y:5025 { yyVAL.node = &ast.ExprBinaryEqual{ Node: ast.Node{ @@ -7564,7 +7532,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5068 +// line internal/php5/php5.y:5036 { yyVAL.node = &ast.ExprBinaryNotEqual{ Node: ast.Node{ @@ -7578,7 +7546,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5080 +// line internal/php5/php5.y:5048 { yyVAL.node = &ast.ExprBinarySmaller{ Node: ast.Node{ @@ -7591,7 +7559,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5091 +// line internal/php5/php5.y:5059 { yyVAL.node = &ast.ExprBinaryGreater{ Node: ast.Node{ @@ -7604,7 +7572,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5102 +// line internal/php5/php5.y:5070 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ Node: ast.Node{ @@ -7617,7 +7585,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5113 +// line internal/php5/php5.y:5081 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ Node: ast.Node{ @@ -7630,7 +7598,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5124 +// line internal/php5/php5.y:5092 { yyVAL.node = &ast.ExprTernary{ Node: ast.Node{ @@ -7644,7 +7612,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5136 +// line internal/php5/php5.y:5104 { yyVAL.node = &ast.ExprTernary{ Node: ast.Node{ @@ -7659,7 +7627,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5149 +// line internal/php5/php5.y:5117 { yyVAL.node = &ast.ExprUnaryPlus{ Node: ast.Node{ @@ -7671,7 +7639,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5159 +// line internal/php5/php5.y:5127 { yyVAL.node = &ast.ExprUnaryMinus{ Node: ast.Node{ @@ -7683,7 +7651,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5169 +// line internal/php5/php5.y:5137 { yyVAL.node = yyDollar[2].node @@ -7693,13 +7661,13 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5180 +// line internal/php5/php5.y:5148 { yyVAL.node = yyDollar[1].node } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5184 +// line internal/php5/php5.y:5152 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7715,7 +7683,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5198 +// line internal/php5/php5.y:5166 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7733,7 +7701,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5214 +// line internal/php5/php5.y:5182 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7750,7 +7718,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5232 +// line internal/php5/php5.y:5200 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -7767,25 +7735,25 @@ yydefault: } case 415: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5247 +// line internal/php5/php5.y:5215 { yyVAL.node = yyDollar[1].node } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5251 +// line internal/php5/php5.y:5219 { yyVAL.node = yyDollar[1].node } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5255 +// line internal/php5/php5.y:5223 { yyVAL.node = yyDollar[1].node } case 418: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5259 +// line internal/php5/php5.y:5227 { yyVAL.node = &ast.ScalarEncapsed{ Node: ast.Node{ @@ -7798,7 +7766,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5270 +// line internal/php5/php5.y:5238 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -7811,7 +7779,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5281 +// line internal/php5/php5.y:5249 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7823,13 +7791,13 @@ yydefault: } case 421: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5294 +// line internal/php5/php5.y:5262 { yyVAL.node = &ast.ParserSeparatedList{} } case 422: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5298 +// line internal/php5/php5.y:5266 { if yyDollar[2].token != nil { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) @@ -7840,19 +7808,19 @@ yydefault: } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5310 +// line internal/php5/php5.y:5278 { yyVAL.token = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5314 +// line internal/php5/php5.y:5282 { yyVAL.token = yyDollar[1].token } case 425: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5321 +// line internal/php5/php5.y:5289 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -7870,7 +7838,7 @@ yydefault: } case 426: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5337 +// line internal/php5/php5.y:5305 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -7886,7 +7854,7 @@ yydefault: } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5351 +// line internal/php5/php5.y:5319 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -7903,7 +7871,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5366 +// line internal/php5/php5.y:5334 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -7918,19 +7886,19 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5382 +// line internal/php5/php5.y:5350 { yyVAL.node = yyDollar[1].node } case 430: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5386 +// line internal/php5/php5.y:5354 { yyVAL.node = yyDollar[1].node } case 431: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5393 +// line internal/php5/php5.y:5361 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7947,7 +7915,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5408 +// line internal/php5/php5.y:5376 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7964,25 +7932,25 @@ yydefault: } case 433: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5427 +// line internal/php5/php5.y:5395 { yyVAL.node = yyDollar[1].node } case 434: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5435 +// line internal/php5/php5.y:5403 { yyVAL.node = yyDollar[1].node } case 435: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5442 +// line internal/php5/php5.y:5410 { yyVAL.node = yyDollar[1].node } case 436: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5449 +// line internal/php5/php5.y:5417 { yyVAL.node = yyDollar[1].node @@ -7999,6 +7967,7 @@ yydefault: }, OpenParenthesisTkn: mc.OpenParenthesisTkn, Arguments: mc.Arguments, + SeparatorTkns: mc.SeparatorTkns, CloseParenthesisTkn: mc.OpenParenthesisTkn, }, ) @@ -8060,25 +8029,25 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5525 +// line internal/php5/php5.y:5494 { yyVAL.node = yyDollar[1].node } case 438: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5532 +// line internal/php5/php5.y:5501 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 439: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5536 +// line internal/php5/php5.y:5505 { yyVAL.list = []ast.Vertex{} } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5544 +// line internal/php5/php5.y:5513 { println("FOOFOOFOOFOOFOOFOOFOOFOOFOO") yyDollar[2].list[0].(*ast.ExprPropertyFetch).ObjectOperatorTkn = yyDollar[1].token @@ -8094,6 +8063,7 @@ yydefault: }, OpenParenthesisTkn: mc.OpenParenthesisTkn, Arguments: mc.Arguments, + SeparatorTkns: mc.SeparatorTkns, CloseParenthesisTkn: mc.OpenParenthesisTkn, }, ) @@ -8109,7 +8079,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5575 +// line internal/php5/php5.y:5545 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8125,7 +8095,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5589 +// line internal/php5/php5.y:5559 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8141,7 +8111,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5606 +// line internal/php5/php5.y:5576 { yyVAL.node = &ast.ExprMethodCall{ Node: ast.Node{ @@ -8149,36 +8119,37 @@ yydefault: }, OpenParenthesisTkn: yyDollar[1].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[1].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[1].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[1].node.(*ast.ArgumentList).CloseParenthesisTkn, } } case 444: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5620 +// line internal/php5/php5.y:5591 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 445: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5624 +// line internal/php5/php5.y:5595 { yyVAL.list = yyDollar[1].list } case 446: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5628 +// line internal/php5/php5.y:5599 { yyVAL.list = nil } case 447: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5635 +// line internal/php5/php5.y:5606 { yyVAL.node = yyDollar[1].node } case 448: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5639 +// line internal/php5/php5.y:5610 { for i := len(yyDollar[1].list) - 1; i >= 0; i-- { yyDollar[1].list[i].(*ast.ExprVariable).VarName = yyDollar[2].node @@ -8190,7 +8161,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5652 +// line internal/php5/php5.y:5623 { yyVAL.node = &ast.ExprStaticPropertyFetch{ Node: ast.Node{ @@ -8203,7 +8174,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5663 +// line internal/php5/php5.y:5634 { yyVAL.node = &ast.ExprStaticPropertyFetch{ Node: ast.Node{ @@ -8216,13 +8187,13 @@ yydefault: } case 451: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5677 +// line internal/php5/php5.y:5648 { yyVAL.node = yyDollar[1].node } case 452: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5684 +// line internal/php5/php5.y:5655 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8236,7 +8207,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5696 +// line internal/php5/php5.y:5667 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8250,31 +8221,31 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5711 +// line internal/php5/php5.y:5682 { yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5715 +// line internal/php5/php5.y:5686 { yyVAL.node = yyDollar[1].node } case 456: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5719 +// line internal/php5/php5.y:5690 { yyVAL.node = yyDollar[1].node } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5727 +// line internal/php5/php5.y:5698 { yyVAL.node = yyDollar[1].node } case 458: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5731 +// line internal/php5/php5.y:5702 { for i := len(yyDollar[1].list) - 1; i >= 0; i-- { yyDollar[1].list[i].(*ast.ExprVariable).VarName = yyDollar[2].node @@ -8286,13 +8257,13 @@ yydefault: } case 459: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5741 +// line internal/php5/php5.y:5712 { yyVAL.node = yyDollar[1].node } case 460: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5748 +// line internal/php5/php5.y:5719 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8306,7 +8277,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5760 +// line internal/php5/php5.y:5731 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8320,13 +8291,13 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5772 +// line internal/php5/php5.y:5743 { yyVAL.node = yyDollar[1].node } case 463: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5780 +// line internal/php5/php5.y:5751 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -8343,7 +8314,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5795 +// line internal/php5/php5.y:5766 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -8362,25 +8333,25 @@ yydefault: } case 465: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5815 +// line internal/php5/php5.y:5786 { yyVAL.node = nil } case 466: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5819 +// line internal/php5/php5.y:5790 { yyVAL.node = yyDollar[1].node } case 467: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5827 +// line internal/php5/php5.y:5798 { yyVAL.list = yyDollar[1].list } case 468: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5831 +// line internal/php5/php5.y:5802 { yyVAL.list = []ast.Vertex{ &ast.ExprPropertyFetch{ @@ -8393,7 +8364,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5845 +// line internal/php5/php5.y:5816 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8409,7 +8380,7 @@ yydefault: } case 470: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5859 +// line internal/php5/php5.y:5830 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8425,7 +8396,7 @@ yydefault: } case 471: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5873 +// line internal/php5/php5.y:5844 { yyVAL.list = []ast.Vertex{ &ast.ExprPropertyFetch{ @@ -8438,7 +8409,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5887 +// line internal/php5/php5.y:5858 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -8450,7 +8421,7 @@ yydefault: } case 473: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5897 +// line internal/php5/php5.y:5868 { yyVAL.node = yyDollar[2].node @@ -8463,7 +8434,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5911 +// line internal/php5/php5.y:5882 { yyVAL.list = []ast.Vertex{ &ast.ExprVariable{ @@ -8476,7 +8447,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5922 +// line internal/php5/php5.y:5893 { yyVAL.list = append(yyDollar[1].list, &ast.ExprVariable{ Node: ast.Node{ @@ -8487,7 +8458,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5934 +// line internal/php5/php5.y:5905 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -8496,7 +8467,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5941 +// line internal/php5/php5.y:5912 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -8504,7 +8475,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5951 +// line internal/php5/php5.y:5922 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -8515,7 +8486,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5960 +// line internal/php5/php5.y:5931 { pairList := yyDollar[3].node.(*ast.ParserSeparatedList) fistPair := pairList.Items[0].(*ast.ExprArrayItem) @@ -8542,19 +8513,19 @@ yydefault: } case 480: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5985 +// line internal/php5/php5.y:5956 { yyVAL.node = &ast.ExprArrayItem{} } case 481: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5993 +// line internal/php5/php5.y:5964 { yyVAL.node = &ast.ParserSeparatedList{} } case 482: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5997 +// line internal/php5/php5.y:5968 { if yyDollar[2].token != nil { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) @@ -8565,7 +8536,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:6009 +// line internal/php5/php5.y:5980 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8583,7 +8554,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6025 +// line internal/php5/php5.y:5996 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8599,7 +8570,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6039 +// line internal/php5/php5.y:6010 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8616,7 +8587,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6054 +// line internal/php5/php5.y:6025 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8631,7 +8602,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:6067 +// line internal/php5/php5.y:6038 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8655,7 +8626,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6089 +// line internal/php5/php5.y:6060 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8677,7 +8648,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6109 +// line internal/php5/php5.y:6080 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8700,7 +8671,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6130 +// line internal/php5/php5.y:6101 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8721,13 +8692,13 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6152 +// line internal/php5/php5.y:6123 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 492: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6156 +// line internal/php5/php5.y:6127 { yyVAL.list = append( yyDollar[1].list, @@ -8742,13 +8713,13 @@ yydefault: } case 493: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6169 +// line internal/php5/php5.y:6140 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 494: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6173 +// line internal/php5/php5.y:6144 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -8763,7 +8734,7 @@ yydefault: } case 495: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6189 +// line internal/php5/php5.y:6160 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -8780,7 +8751,7 @@ yydefault: } case 496: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6204 +// line internal/php5/php5.y:6175 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8805,7 +8776,7 @@ yydefault: } case 497: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6227 +// line internal/php5/php5.y:6198 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -8835,7 +8806,7 @@ yydefault: } case 498: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6255 +// line internal/php5/php5.y:6226 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -8853,7 +8824,7 @@ yydefault: } case 499: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6271 +// line internal/php5/php5.y:6242 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -8877,7 +8848,7 @@ yydefault: } case 500: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:6293 +// line internal/php5/php5.y:6264 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -8909,7 +8880,7 @@ yydefault: } case 501: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6323 +// line internal/php5/php5.y:6294 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -8922,7 +8893,7 @@ yydefault: } case 502: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6337 +// line internal/php5/php5.y:6308 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -8934,7 +8905,7 @@ yydefault: } case 503: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6347 +// line internal/php5/php5.y:6318 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -8963,7 +8934,7 @@ yydefault: } case 504: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6374 +// line internal/php5/php5.y:6345 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -8980,7 +8951,7 @@ yydefault: } case 505: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6392 +// line internal/php5/php5.y:6363 { yyVAL.node = &ast.ExprIsset{ Node: ast.Node{ @@ -8995,7 +8966,7 @@ yydefault: } case 506: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6405 +// line internal/php5/php5.y:6376 { yyVAL.node = &ast.ExprEmpty{ Node: ast.Node{ @@ -9009,7 +8980,7 @@ yydefault: } case 507: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6417 +// line internal/php5/php5.y:6388 { yyVAL.node = &ast.ExprEmpty{ Node: ast.Node{ @@ -9023,7 +8994,7 @@ yydefault: } case 508: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6429 +// line internal/php5/php5.y:6400 { yyVAL.node = &ast.ExprInclude{ Node: ast.Node{ @@ -9035,7 +9006,7 @@ yydefault: } case 509: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6439 +// line internal/php5/php5.y:6410 { yyVAL.node = &ast.ExprIncludeOnce{ Node: ast.Node{ @@ -9047,7 +9018,7 @@ yydefault: } case 510: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6449 +// line internal/php5/php5.y:6420 { yyVAL.node = &ast.ExprEval{ Node: ast.Node{ @@ -9061,7 +9032,7 @@ yydefault: } case 511: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6461 +// line internal/php5/php5.y:6432 { yyVAL.node = &ast.ExprRequire{ Node: ast.Node{ @@ -9073,7 +9044,7 @@ yydefault: } case 512: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6471 +// line internal/php5/php5.y:6442 { yyVAL.node = &ast.ExprRequireOnce{ Node: ast.Node{ @@ -9085,7 +9056,7 @@ yydefault: } case 513: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6484 +// line internal/php5/php5.y:6455 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -9093,7 +9064,7 @@ yydefault: } case 514: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6490 +// line internal/php5/php5.y:6461 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -9102,19 +9073,19 @@ yydefault: } case 515: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6500 +// line internal/php5/php5.y:6471 { yyVAL.node = yyDollar[1].node } case 516: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6504 +// line internal/php5/php5.y:6475 { yyVAL.node = yyDollar[1].node } case 517: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6511 +// line internal/php5/php5.y:6482 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -9133,7 +9104,7 @@ yydefault: } case 518: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6528 +// line internal/php5/php5.y:6499 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -9152,7 +9123,7 @@ yydefault: } case 519: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6548 +// line internal/php5/php5.y:6519 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -9171,7 +9142,7 @@ yydefault: } case 520: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6568 +// line internal/php5/php5.y:6539 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ diff --git a/internal/php5/php5.y b/internal/php5/php5.y index d3072b8..5349205 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -2028,40 +2028,6 @@ non_empty_parameter_list: parameter: optional_class_type is_reference is_variadic T_VARIABLE { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - IdentifierTkn: $4, - Value: $4.Value, - }, - } - - if $3 != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition($3, $4), - }, - VariadicTkn: $3, - Var: variable, - } - } - - if $2 != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition($2, $4), - }, - AmpersandTkn: $2, - Var: variable, - } - } - pos := position.NewTokenPosition($4) if $1 != nil { pos = position.NewNodeTokenPosition($1, $4) @@ -2075,46 +2041,25 @@ parameter: Node: ast.Node{ Position: pos, }, - Type: $1, - Var: variable, + Type: $1, + AmpersandTkn: $2, + VariadicTkn: $3, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + IdentifierTkn: $4, + Value: $4.Value, + }, + }, } } | optional_class_type is_reference is_variadic T_VARIABLE '=' expr { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - IdentifierTkn: $4, - Value: $4.Value, - }, - } - - if $3 != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition($3, $4), - }, - VariadicTkn: $3, - Var: variable, - } - } - - if $2 != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition($2, $4), - }, - AmpersandTkn: $2, - Var: variable, - } - } - pos := position.NewTokenNodePosition($4, $6) if $1 != nil { pos = position.NewNodesPosition($1, $6) @@ -2129,7 +2074,20 @@ parameter: Position: pos, }, Type: $1, - Var: variable, + AmpersandTkn: $2, + VariadicTkn: $3, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + IdentifierTkn: $4, + Value: $4.Value, + }, + }, EqualTkn: $5, DefaultValue: $6, } @@ -3116,6 +3074,7 @@ new_expr: Class: $2, OpenParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $3.(*ast.ArgumentList).Arguments, + SeparatorTkns: $3.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, } } else { @@ -3185,6 +3144,7 @@ expr_without_variable: Class: $5, OpenParenthesisTkn: $6.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $6.(*ast.ArgumentList).Arguments, + SeparatorTkns: $6.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $6.(*ast.ArgumentList).OpenParenthesisTkn, } } else { @@ -4228,6 +4188,7 @@ function_call: }, OpenParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $2.(*ast.ArgumentList).Arguments, + SeparatorTkns: $2.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4247,6 +4208,7 @@ function_call: }, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4265,6 +4227,7 @@ function_call: }, OpenParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $3.(*ast.ArgumentList).Arguments, + SeparatorTkns: $3.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4279,6 +4242,7 @@ function_call: Call: $3, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4293,6 +4257,7 @@ function_call: Call: $3, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4307,6 +4272,7 @@ function_call: Call: $3, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4321,6 +4287,7 @@ function_call: Call: $3, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4333,6 +4300,7 @@ function_call: Function: $1, OpenParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $2.(*ast.ArgumentList).Arguments, + SeparatorTkns: $2.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -5462,6 +5430,7 @@ variable: }, OpenParenthesisTkn: mc.OpenParenthesisTkn, Arguments: mc.Arguments, + SeparatorTkns: mc.SeparatorTkns, CloseParenthesisTkn: mc.OpenParenthesisTkn, }, ) @@ -5555,6 +5524,7 @@ variable_property: }, OpenParenthesisTkn: mc.OpenParenthesisTkn, Arguments: mc.Arguments, + SeparatorTkns: mc.SeparatorTkns, CloseParenthesisTkn: mc.OpenParenthesisTkn, }, ) @@ -5610,6 +5580,7 @@ method: }, OpenParenthesisTkn: $1.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $1.(*ast.ArgumentList).Arguments, + SeparatorTkns: $1.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $1.(*ast.ArgumentList).CloseParenthesisTkn, } } diff --git a/internal/php7/php7.go b/internal/php7/php7.go index b85c2a1..ee03b47 100644 --- a/internal/php7/php7.go +++ b/internal/php7/php7.go @@ -343,7 +343,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -// line internal/php7/php7.y:5021 +// line internal/php7/php7.y:4986 // line yacctab:1 var yyExca = [...]int{ @@ -2110,7 +2110,7 @@ yydefault: case 1: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:290 +// line internal/php7/php7.y:290 { yylex.(*Parser).rootNode = &ast.Root{ Node: ast.Node{ @@ -2122,469 +2122,469 @@ yydefault: } case 2: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 3: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 4: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 5: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 6: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 7: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 8: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 9: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 10: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 11: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 12: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 13: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 14: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 15: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 16: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 17: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 18: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 19: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 20: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 21: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 22: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 23: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 24: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 25: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 26: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 27: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 28: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 29: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 30: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 31: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 32: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 33: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 34: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 35: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 36: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 37: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 38: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 39: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 40: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 41: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 42: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 43: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 44: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 45: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 46: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 47: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 48: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 49: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 50: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 51: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 52: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 53: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 54: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 55: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 56: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 57: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 58: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 59: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 60: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 61: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 62: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 63: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 64: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 65: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 66: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 67: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 68: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 69: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 70: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 71: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:316 +// line internal/php7/php7.y:316 { yyVAL.token = yyDollar[1].token } case 72: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:316 +// line internal/php7/php7.y:316 { yyVAL.token = yyDollar[1].token } case 73: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:316 +// line internal/php7/php7.y:316 { yyVAL.token = yyDollar[1].token } case 74: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:316 +// line internal/php7/php7.y:316 { yyVAL.token = yyDollar[1].token } case 75: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:316 +// line internal/php7/php7.y:316 { yyVAL.token = yyDollar[1].token } case 76: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:316 +// line internal/php7/php7.y:316 { yyVAL.token = yyDollar[1].token } case 77: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:321 +// line internal/php7/php7.y:321 { yyVAL.token = yyDollar[1].token } case 78: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:325 +// line internal/php7/php7.y:325 { yyVAL.token = yyDollar[1].token } case 79: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:332 +// line internal/php7/php7.y:332 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -2597,13 +2597,13 @@ yydefault: } case 80: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:343 +// line internal/php7/php7.y:343 { yyVAL.list = []ast.Vertex{} } case 81: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:350 +// line internal/php7/php7.y:350 { yyVAL.list = []ast.Vertex{ &ast.NameNamePart{ @@ -2617,7 +2617,7 @@ yydefault: } case 82: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:362 +// line internal/php7/php7.y:362 { yyVAL.list = append(yyDollar[1].list, &ast.NameNamePart{ Node: ast.Node{ @@ -2630,7 +2630,7 @@ yydefault: } case 83: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:376 +// line internal/php7/php7.y:376 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -2641,7 +2641,7 @@ yydefault: } case 84: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:385 +// line internal/php7/php7.y:385 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -2654,7 +2654,7 @@ yydefault: } case 85: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:396 +// line internal/php7/php7.y:396 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -2666,44 +2666,44 @@ yydefault: } case 86: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:409 +// line internal/php7/php7.y:409 { // error yyVAL.node = nil } case 87: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:414 +// line internal/php7/php7.y:414 { yyVAL.node = yyDollar[1].node } case 88: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:418 +// line internal/php7/php7.y:418 { yyVAL.node = yyDollar[1].node } case 89: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:422 +// line internal/php7/php7.y:422 { yyVAL.node = yyDollar[1].node } case 90: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:426 +// line internal/php7/php7.y:426 { yyVAL.node = yyDollar[1].node } case 91: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:430 +// line internal/php7/php7.y:430 { yyVAL.node = yyDollar[1].node } case 92: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:434 +// line internal/php7/php7.y:434 { yyVAL.node = &ast.StmtHaltCompiler{ Node: ast.Node{ @@ -2717,7 +2717,7 @@ yydefault: } case 93: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:446 +// line internal/php7/php7.y:446 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2735,7 +2735,7 @@ yydefault: } case 94: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:462 +// line internal/php7/php7.y:462 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2755,7 +2755,7 @@ yydefault: } case 95: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:480 +// line internal/php7/php7.y:480 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2769,7 +2769,7 @@ yydefault: } case 96: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:492 +// line internal/php7/php7.y:492 { use := yyDollar[2].node.(*ast.StmtGroupUse) @@ -2781,7 +2781,7 @@ yydefault: } case 97: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:502 +// line internal/php7/php7.y:502 { use := yyDollar[3].node.(*ast.StmtGroupUse) @@ -2794,7 +2794,7 @@ yydefault: } case 98: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:513 +// line internal/php7/php7.y:513 { yyVAL.node = &ast.StmtUse{ Node: ast.Node{ @@ -2807,7 +2807,7 @@ yydefault: } case 99: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:524 +// line internal/php7/php7.y:524 { yyVAL.node = &ast.StmtUse{ Node: ast.Node{ @@ -2821,7 +2821,7 @@ yydefault: } case 100: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:536 +// line internal/php7/php7.y:536 { yyVAL.node = &ast.StmtConstList{ Node: ast.Node{ @@ -2835,7 +2835,7 @@ yydefault: } case 101: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:551 +// line internal/php7/php7.y:551 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -2847,7 +2847,7 @@ yydefault: } case 102: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:561 +// line internal/php7/php7.y:561 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -2859,7 +2859,7 @@ yydefault: } case 103: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:574 +// line internal/php7/php7.y:574 { if len(yyDollar[4].list) > 0 { yyDollar[4].list[len(yyDollar[4].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[5].token @@ -2883,7 +2883,7 @@ yydefault: } case 104: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:596 +// line internal/php7/php7.y:596 { yyDollar[5].list[len(yyDollar[5].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[6].token @@ -2906,7 +2906,7 @@ yydefault: } case 105: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:620 +// line internal/php7/php7.y:620 { yyDollar[4].list[len(yyDollar[4].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[5].token @@ -2928,7 +2928,7 @@ yydefault: } case 106: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:640 +// line internal/php7/php7.y:640 { yyDollar[5].list[len(yyDollar[5].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[6].token @@ -2951,19 +2951,19 @@ yydefault: } case 107: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:664 +// line internal/php7/php7.y:664 { yyVAL.token = nil } case 108: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:668 +// line internal/php7/php7.y:668 { yyVAL.token = yyDollar[1].token } case 109: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:675 +// line internal/php7/php7.y:675 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2971,13 +2971,13 @@ yydefault: } case 110: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:681 +// line internal/php7/php7.y:681 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 111: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:688 +// line internal/php7/php7.y:688 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2985,13 +2985,13 @@ yydefault: } case 112: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:694 +// line internal/php7/php7.y:694 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 113: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:701 +// line internal/php7/php7.y:701 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2999,19 +2999,19 @@ yydefault: } case 114: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:707 +// line internal/php7/php7.y:707 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 115: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:714 +// line internal/php7/php7.y:714 { yyVAL.node = yyDollar[1].node } case 116: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:718 +// line internal/php7/php7.y:718 { decl := yyDollar[2].node.(*ast.StmtUseDeclaration) decl.Type = yyDollar[1].node @@ -3021,7 +3021,7 @@ yydefault: } case 117: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:729 +// line internal/php7/php7.y:729 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -3037,7 +3037,7 @@ yydefault: } case 118: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:743 +// line internal/php7/php7.y:743 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -3061,13 +3061,13 @@ yydefault: } case 119: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:768 +// line internal/php7/php7.y:768 { yyVAL.node = yyDollar[1].node } case 120: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:772 +// line internal/php7/php7.y:772 { decl := yyDollar[2].node.(*ast.StmtUseDeclaration) decl.NsSeparatorTkn = yyDollar[1].token @@ -3077,7 +3077,7 @@ yydefault: } case 121: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:783 +// line internal/php7/php7.y:783 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -3086,7 +3086,7 @@ yydefault: } case 122: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:790 +// line internal/php7/php7.y:790 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -3094,7 +3094,7 @@ yydefault: } case 123: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:799 +// line internal/php7/php7.y:799 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -3107,50 +3107,50 @@ yydefault: } case 124: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:810 +// line internal/php7/php7.y:810 { yyVAL.list = []ast.Vertex{} } case 125: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:817 +// line internal/php7/php7.y:817 { // error yyVAL.node = nil } case 126: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:822 +// line internal/php7/php7.y:822 { yyVAL.node = yyDollar[1].node } case 127: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:826 +// line internal/php7/php7.y:826 { yyVAL.node = yyDollar[1].node } case 128: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:830 +// line internal/php7/php7.y:830 { yyVAL.node = yyDollar[1].node } case 129: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:834 +// line internal/php7/php7.y:834 { yyVAL.node = yyDollar[1].node } case 130: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:838 +// line internal/php7/php7.y:838 { yyVAL.node = yyDollar[1].node } case 131: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:842 +// line internal/php7/php7.y:842 { yyVAL.node = &ast.StmtHaltCompiler{ Node: ast.Node{ @@ -3164,7 +3164,7 @@ yydefault: } case 132: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:856 +// line internal/php7/php7.y:856 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -3177,19 +3177,19 @@ yydefault: } case 133: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:867 +// line internal/php7/php7.y:867 { yyVAL.node = yyDollar[1].node } case 134: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:871 +// line internal/php7/php7.y:871 { yyVAL.node = yyDollar[1].node } case 135: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:875 +// line internal/php7/php7.y:875 { yyDollar[5].node.(*ast.StmtWhile).WhileTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtWhile).OpenParenthesisTkn = yyDollar[2].token @@ -3201,7 +3201,7 @@ yydefault: } case 136: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:885 +// line internal/php7/php7.y:885 { yyVAL.node = &ast.StmtDo{ Node: ast.Node{ @@ -3218,7 +3218,7 @@ yydefault: } case 137: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:900 +// line internal/php7/php7.y:900 { yyDollar[9].node.(*ast.StmtFor).ForTkn = yyDollar[1].token yyDollar[9].node.(*ast.StmtFor).OpenParenthesisTkn = yyDollar[2].token @@ -3234,7 +3234,7 @@ yydefault: } case 138: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:914 +// line internal/php7/php7.y:914 { yyDollar[5].node.(*ast.StmtSwitch).SwitchTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtSwitch).OpenParenthesisTkn = yyDollar[2].token @@ -3246,7 +3246,7 @@ yydefault: } case 139: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:924 +// line internal/php7/php7.y:924 { yyVAL.node = &ast.StmtBreak{ Node: ast.Node{ @@ -3259,7 +3259,7 @@ yydefault: } case 140: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:935 +// line internal/php7/php7.y:935 { yyVAL.node = &ast.StmtContinue{ Node: ast.Node{ @@ -3272,7 +3272,7 @@ yydefault: } case 141: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:946 +// line internal/php7/php7.y:946 { yyVAL.node = &ast.StmtReturn{ Node: ast.Node{ @@ -3285,7 +3285,7 @@ yydefault: } case 142: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:957 +// line internal/php7/php7.y:957 { yyDollar[2].node.(*ast.StmtGlobal).GlobalTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtGlobal).SemiColonTkn = yyDollar[3].token @@ -3295,7 +3295,7 @@ yydefault: } case 143: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:965 +// line internal/php7/php7.y:965 { yyDollar[2].node.(*ast.StmtStatic).StaticTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtStatic).SemiColonTkn = yyDollar[3].token @@ -3305,7 +3305,7 @@ yydefault: } case 144: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:973 +// line internal/php7/php7.y:973 { yyDollar[2].node.(*ast.StmtEcho).EchoTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtEcho).SemiColonTkn = yyDollar[3].token @@ -3315,7 +3315,7 @@ yydefault: } case 145: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:981 +// line internal/php7/php7.y:981 { yyVAL.node = &ast.StmtInlineHtml{ Node: ast.Node{ @@ -3327,7 +3327,7 @@ yydefault: } case 146: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:991 +// line internal/php7/php7.y:991 { yyVAL.node = &ast.StmtExpression{ Node: ast.Node{ @@ -3339,7 +3339,7 @@ yydefault: } case 147: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1001 +// line internal/php7/php7.y:1001 { yyDollar[3].node.(*ast.StmtUnset).UnsetTkn = yyDollar[1].token yyDollar[3].node.(*ast.StmtUnset).OpenParenthesisTkn = yyDollar[2].token @@ -3352,7 +3352,7 @@ yydefault: } case 148: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1012 +// line internal/php7/php7.y:1012 { yyDollar[7].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[7].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3366,7 +3366,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1024 +// line internal/php7/php7.y:1024 { yyDollar[9].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[9].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3382,7 +3382,7 @@ yydefault: } case 150: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1038 +// line internal/php7/php7.y:1038 { yyDollar[5].node.(*ast.StmtDeclare).DeclareTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtDeclare).OpenParenthesisTkn = yyDollar[2].token @@ -3395,7 +3395,7 @@ yydefault: } case 151: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1049 +// line internal/php7/php7.y:1049 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -3406,7 +3406,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1058 +// line internal/php7/php7.y:1058 { yyVAL.node = &ast.StmtTry{ TryTkn: yyDollar[1].token, @@ -3425,7 +3425,7 @@ yydefault: } case 153: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1075 +// line internal/php7/php7.y:1075 { yyVAL.node = &ast.StmtThrow{ Node: ast.Node{ @@ -3438,7 +3438,7 @@ yydefault: } case 154: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1086 +// line internal/php7/php7.y:1086 { yyVAL.node = &ast.StmtGoto{ Node: ast.Node{ @@ -3457,7 +3457,7 @@ yydefault: } case 155: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1103 +// line internal/php7/php7.y:1103 { yyVAL.node = &ast.StmtLabel{ Node: ast.Node{ @@ -3475,13 +3475,13 @@ yydefault: } case 156: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1121 +// line internal/php7/php7.y:1121 { yyVAL.list = []ast.Vertex{} } case 157: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1125 +// line internal/php7/php7.y:1125 { catch := yyDollar[4].node.(*ast.StmtCatch) catch.CatchTkn = yyDollar[2].token @@ -3508,7 +3508,7 @@ yydefault: } case 158: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1152 +// line internal/php7/php7.y:1152 { yyVAL.node = &ast.StmtCatch{ Types: []ast.Vertex{yyDollar[1].node}, @@ -3516,7 +3516,7 @@ yydefault: } case 159: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1158 +// line internal/php7/php7.y:1158 { yyDollar[1].node.(*ast.StmtCatch).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtCatch).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.StmtCatch).Types = append(yyDollar[1].node.(*ast.StmtCatch).Types, yyDollar[3].node) @@ -3525,13 +3525,13 @@ yydefault: } case 160: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1168 +// line internal/php7/php7.y:1168 { yyVAL.node = nil } case 161: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1172 +// line internal/php7/php7.y:1172 { yyVAL.node = &ast.StmtFinally{ Node: ast.Node{ @@ -3545,7 +3545,7 @@ yydefault: } case 162: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1187 +// line internal/php7/php7.y:1187 { yyVAL.node = &ast.StmtUnset{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -3553,7 +3553,7 @@ yydefault: } case 163: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1193 +// line internal/php7/php7.y:1193 { yyDollar[1].node.(*ast.StmtUnset).Vars = append(yyDollar[1].node.(*ast.StmtUnset).Vars, yyDollar[3].node) yyDollar[1].node.(*ast.StmtUnset).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtUnset).SeparatorTkns, yyDollar[2].token) @@ -3562,13 +3562,13 @@ yydefault: } case 164: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1203 +// line internal/php7/php7.y:1203 { yyVAL.node = yyDollar[1].node } case 165: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:1210 +// line internal/php7/php7.y:1210 { yyVAL.node = &ast.StmtFunction{ Node: ast.Node{ @@ -3595,31 +3595,31 @@ yydefault: } case 166: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1238 +// line internal/php7/php7.y:1238 { yyVAL.token = nil } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1242 +// line internal/php7/php7.y:1242 { yyVAL.token = yyDollar[1].token } case 168: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1249 +// line internal/php7/php7.y:1249 { yyVAL.token = nil } case 169: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1253 +// line internal/php7/php7.y:1253 { yyVAL.token = yyDollar[1].token } case 170: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1260 +// line internal/php7/php7.y:1260 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -3643,7 +3643,7 @@ yydefault: } case 171: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:1282 +// line internal/php7/php7.y:1282 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -3666,19 +3666,19 @@ yydefault: } case 172: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1306 +// line internal/php7/php7.y:1306 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 173: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1310 +// line internal/php7/php7.y:1310 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 174: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1317 +// line internal/php7/php7.y:1317 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -3690,7 +3690,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1327 +// line internal/php7/php7.y:1327 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -3702,7 +3702,7 @@ yydefault: } case 176: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1340 +// line internal/php7/php7.y:1340 { yyVAL.node = &ast.StmtTrait{ Node: ast.Node{ @@ -3723,7 +3723,7 @@ yydefault: } case 177: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1362 +// line internal/php7/php7.y:1362 { yyVAL.node = &ast.StmtInterface{ Node: ast.Node{ @@ -3745,13 +3745,13 @@ yydefault: } case 178: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1385 +// line internal/php7/php7.y:1385 { yyVAL.node = nil } case 179: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1389 +// line internal/php7/php7.y:1389 { yyVAL.node = &ast.StmtClassExtends{ Node: ast.Node{ @@ -3763,13 +3763,13 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1402 +// line internal/php7/php7.y:1402 { yyVAL.node = nil } case 181: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1406 +// line internal/php7/php7.y:1406 { yyVAL.node = &ast.StmtInterfaceExtends{ Node: ast.Node{ @@ -3782,13 +3782,13 @@ yydefault: } case 182: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1420 +// line internal/php7/php7.y:1420 { yyVAL.node = nil } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1424 +// line internal/php7/php7.y:1424 { yyVAL.node = &ast.StmtClassImplements{ Node: ast.Node{ @@ -3801,13 +3801,13 @@ yydefault: } case 184: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1438 +// line internal/php7/php7.y:1438 { yyVAL.node = yyDollar[1].node } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1442 +// line internal/php7/php7.y:1442 { yyVAL.node = &ast.ExprReference{ Node: ast.Node{ @@ -3819,7 +3819,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1452 +// line internal/php7/php7.y:1452 { yyVAL.node = &ast.ExprList{ Node: ast.Node{ @@ -3834,7 +3834,7 @@ yydefault: } case 187: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1465 +// line internal/php7/php7.y:1465 { yyVAL.node = &ast.ExprList{ Node: ast.Node{ @@ -3848,7 +3848,7 @@ yydefault: } case 188: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1480 +// line internal/php7/php7.y:1480 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3859,7 +3859,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1489 +// line internal/php7/php7.y:1489 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3879,7 +3879,7 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1510 +// line internal/php7/php7.y:1510 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3890,7 +3890,7 @@ yydefault: } case 191: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1519 +// line internal/php7/php7.y:1519 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3910,7 +3910,7 @@ yydefault: } case 192: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1540 +// line internal/php7/php7.y:1540 { yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ @@ -3921,7 +3921,7 @@ yydefault: } case 193: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1549 +// line internal/php7/php7.y:1549 { yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ @@ -3941,7 +3941,7 @@ yydefault: } case 194: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1570 +// line internal/php7/php7.y:1570 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3954,7 +3954,7 @@ yydefault: } case 195: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1581 +// line internal/php7/php7.y:1581 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3968,7 +3968,7 @@ yydefault: } case 196: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1593 +// line internal/php7/php7.y:1593 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3983,7 +3983,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1606 +// line internal/php7/php7.y:1606 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3999,13 +3999,13 @@ yydefault: } case 198: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1623 +// line internal/php7/php7.y:1623 { yyVAL.list = nil } case 199: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1627 +// line internal/php7/php7.y:1627 { yyVAL.list = append(yyDollar[1].list, &ast.StmtCase{ Node: ast.Node{ @@ -4019,7 +4019,7 @@ yydefault: } case 200: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1639 +// line internal/php7/php7.y:1639 { yyVAL.list = append(yyDollar[1].list, &ast.StmtDefault{ Node: ast.Node{ @@ -4032,19 +4032,19 @@ yydefault: } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1653 +// line internal/php7/php7.y:1653 { yyVAL.token = yyDollar[1].token } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1657 +// line internal/php7/php7.y:1657 { yyVAL.token = yyDollar[1].token } case 203: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1664 +// line internal/php7/php7.y:1664 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4055,7 +4055,7 @@ yydefault: } case 204: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1673 +// line internal/php7/php7.y:1673 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4075,7 +4075,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1694 +// line internal/php7/php7.y:1694 { yyVAL.node = &ast.StmtIf{ Node: ast.Node{ @@ -4090,7 +4090,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1707 +// line internal/php7/php7.y:1707 { yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, &ast.StmtElseIf{ Node: ast.Node{ @@ -4109,13 +4109,13 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1727 +// line internal/php7/php7.y:1727 { yyVAL.node = yyDollar[1].node } case 208: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1731 +// line internal/php7/php7.y:1731 { yyDollar[1].node.(*ast.StmtIf).Else = &ast.StmtElse{ Node: ast.Node{ @@ -4131,7 +4131,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1748 +// line internal/php7/php7.y:1748 { yyVAL.node = &ast.StmtIf{ Node: ast.Node{ @@ -4153,7 +4153,7 @@ yydefault: } case 210: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1768 +// line internal/php7/php7.y:1768 { yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, &ast.StmtElseIf{ Node: ast.Node{ @@ -4177,7 +4177,7 @@ yydefault: } case 211: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1793 +// line internal/php7/php7.y:1793 { yyDollar[1].node.(*ast.StmtIf).EndIfTkn = yyDollar[2].token yyDollar[1].node.(*ast.StmtIf).SemiColonTkn = yyDollar[3].token @@ -4187,7 +4187,7 @@ yydefault: } case 212: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1801 +// line internal/php7/php7.y:1801 { yyDollar[1].node.(*ast.StmtIf).Else = &ast.StmtElse{ Node: ast.Node{ @@ -4211,25 +4211,25 @@ yydefault: } case 213: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1826 +// line internal/php7/php7.y:1826 { yyVAL.list = yyDollar[1].list } case 214: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1830 +// line internal/php7/php7.y:1830 { yyVAL.list = nil } case 215: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1837 +// line internal/php7/php7.y:1837 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1841 +// line internal/php7/php7.y:1841 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4238,42 +4238,8 @@ yydefault: } case 217: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1851 +// line internal/php7/php7.y:1851 { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - IdentifierTkn: yyDollar[4].token, - Value: yyDollar[4].token.Value, - }, - } - - if yyDollar[3].token != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[3].token, yyDollar[4].token), - }, - VariadicTkn: yyDollar[3].token, - Var: variable, - } - } - - if yyDollar[2].token != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[2].token, yyDollar[4].token), - }, - AmpersandTkn: yyDollar[2].token, - Var: variable, - } - } - pos := position.NewTokenPosition(yyDollar[4].token) if yyDollar[1].node != nil { pos = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token) @@ -4287,48 +4253,27 @@ yydefault: Node: ast.Node{ Position: pos, }, - Type: yyDollar[1].node, - Var: variable, + Type: yyDollar[1].node, + AmpersandTkn: yyDollar[2].token, + VariadicTkn: yyDollar[3].token, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + IdentifierTkn: yyDollar[4].token, + Value: yyDollar[4].token.Value, + }, + }, } } case 218: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1904 +// line internal/php7/php7.y:1883 { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[4].token), - }, - IdentifierTkn: yyDollar[4].token, - Value: yyDollar[4].token.Value, - }, - } - - if yyDollar[3].token != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[3].token, yyDollar[4].token), - }, - VariadicTkn: yyDollar[3].token, - Var: variable, - } - } - - if yyDollar[2].token != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition(yyDollar[2].token, yyDollar[4].token), - }, - AmpersandTkn: yyDollar[2].token, - Var: variable, - } - } - pos := position.NewTokenNodePosition(yyDollar[4].token, yyDollar[6].node) if yyDollar[1].node != nil { pos = position.NewNodesPosition(yyDollar[1].node, yyDollar[6].node) @@ -4343,32 +4288,45 @@ yydefault: Position: pos, }, Type: yyDollar[1].node, - Var: variable, + AmpersandTkn: yyDollar[2].token, + VariadicTkn: yyDollar[3].token, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[4].token), + }, + IdentifierTkn: yyDollar[4].token, + Value: yyDollar[4].token.Value, + }, + }, EqualTkn: yyDollar[5].token, DefaultValue: yyDollar[6].node, } } case 219: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1962 +// line internal/php7/php7.y:1920 { yyVAL.node = nil } case 220: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1966 +// line internal/php7/php7.y:1924 { yyVAL.node = yyDollar[1].node } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1973 +// line internal/php7/php7.y:1931 { yyVAL.node = yyDollar[1].node } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1977 +// line internal/php7/php7.y:1935 { yyVAL.node = &ast.Nullable{ Node: ast.Node{ @@ -4380,7 +4338,7 @@ yydefault: } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1990 +// line internal/php7/php7.y:1948 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4392,7 +4350,7 @@ yydefault: } case 224: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2000 +// line internal/php7/php7.y:1958 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4404,19 +4362,19 @@ yydefault: } case 225: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2010 +// line internal/php7/php7.y:1968 { yyVAL.node = yyDollar[1].node } case 226: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2017 +// line internal/php7/php7.y:1975 { yyVAL.node = nil } case 227: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2021 +// line internal/php7/php7.y:1979 { yyVAL.node = &ast.ReturnType{ ColonTkn: yyDollar[1].token, @@ -4425,7 +4383,7 @@ yydefault: } case 228: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2031 +// line internal/php7/php7.y:1989 { yyVAL.node = &ast.ArgumentList{ Node: ast.Node{ @@ -4437,7 +4395,7 @@ yydefault: } case 229: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2041 +// line internal/php7/php7.y:1999 { argumentList := yyDollar[2].node.(*ast.ArgumentList) argumentList.Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token) @@ -4449,7 +4407,7 @@ yydefault: } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2054 +// line internal/php7/php7.y:2012 { yyVAL.node = &ast.ArgumentList{ Arguments: []ast.Vertex{yyDollar[1].node}, @@ -4457,7 +4415,7 @@ yydefault: } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2060 +// line internal/php7/php7.y:2018 { yyDollar[1].node.(*ast.ArgumentList).SeparatorTkns = append(yyDollar[1].node.(*ast.ArgumentList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ArgumentList).Arguments = append(yyDollar[1].node.(*ast.ArgumentList).Arguments, yyDollar[3].node) @@ -4466,7 +4424,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2070 +// line internal/php7/php7.y:2028 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4477,7 +4435,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2079 +// line internal/php7/php7.y:2037 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4489,7 +4447,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2092 +// line internal/php7/php7.y:2050 { yyDollar[1].node.(*ast.StmtGlobal).Vars = append(yyDollar[1].node.(*ast.StmtGlobal).Vars, yyDollar[3].node) yyDollar[1].node.(*ast.StmtGlobal).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtGlobal).SeparatorTkns, yyDollar[2].token) @@ -4498,7 +4456,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2099 +// line internal/php7/php7.y:2057 { yyVAL.node = &ast.StmtGlobal{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4506,13 +4464,13 @@ yydefault: } case 236: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2108 +// line internal/php7/php7.y:2066 { yyVAL.node = yyDollar[1].node } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2115 +// line internal/php7/php7.y:2073 { yyDollar[1].node.(*ast.StmtStatic).Vars = append(yyDollar[1].node.(*ast.StmtStatic).Vars, yyDollar[3].node) yyDollar[1].node.(*ast.StmtStatic).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtStatic).SeparatorTkns, yyDollar[2].token) @@ -4521,7 +4479,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2122 +// line internal/php7/php7.y:2080 { yyVAL.node = &ast.StmtStatic{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4529,7 +4487,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2131 +// line internal/php7/php7.y:2089 { yyVAL.node = &ast.StmtStaticVar{ @@ -4552,7 +4510,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2152 +// line internal/php7/php7.y:2110 { yyVAL.node = &ast.StmtStaticVar{ Node: ast.Node{ @@ -4576,19 +4534,19 @@ yydefault: } case 241: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2177 +// line internal/php7/php7.y:2135 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 242: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2181 +// line internal/php7/php7.y:2139 { yyVAL.list = []ast.Vertex{} } case 243: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2188 +// line internal/php7/php7.y:2146 { yyVAL.node = &ast.StmtPropertyList{ Node: ast.Node{ @@ -4603,7 +4561,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2201 +// line internal/php7/php7.y:2159 { yyVAL.node = &ast.StmtClassConstList{ Node: ast.Node{ @@ -4617,7 +4575,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2213 +// line internal/php7/php7.y:2171 { yyVAL.node = &ast.StmtTraitUse{ Node: ast.Node{ @@ -4631,7 +4589,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php7/php7.y:2225 +// line internal/php7/php7.y:2183 { pos := position.NewTokenNodePosition(yyDollar[2].token, yyDollar[10].node) if yyDollar[1].list != nil { @@ -4662,7 +4620,7 @@ yydefault: } case 247: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2257 +// line internal/php7/php7.y:2215 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -4670,7 +4628,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2263 +// line internal/php7/php7.y:2221 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -4679,7 +4637,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2273 +// line internal/php7/php7.y:2231 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -4690,7 +4648,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2282 +// line internal/php7/php7.y:2240 { yyVAL.node = &ast.StmtTraitAdaptationList{ Node: ast.Node{ @@ -4702,7 +4660,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2292 +// line internal/php7/php7.y:2250 { yyVAL.node = &ast.StmtTraitAdaptationList{ Node: ast.Node{ @@ -4715,19 +4673,19 @@ yydefault: } case 252: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2306 +// line internal/php7/php7.y:2264 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 253: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2310 +// line internal/php7/php7.y:2268 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 254: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2317 +// line internal/php7/php7.y:2275 { yyVAL.node = yyDollar[1].node @@ -4737,7 +4695,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2325 +// line internal/php7/php7.y:2283 { yyVAL.node = yyDollar[1].node @@ -4747,7 +4705,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2336 +// line internal/php7/php7.y:2294 { yyVAL.node = &ast.StmtTraitUsePrecedence{ Node: ast.Node{ @@ -4761,7 +4719,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2351 +// line internal/php7/php7.y:2309 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4780,7 +4738,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2368 +// line internal/php7/php7.y:2326 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4799,7 +4757,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2385 +// line internal/php7/php7.y:2343 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4819,7 +4777,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2403 +// line internal/php7/php7.y:2361 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4832,7 +4790,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2417 +// line internal/php7/php7.y:2375 { yyVAL.node = &ast.StmtTraitMethodRef{ Node: ast.Node{ @@ -4849,13 +4807,13 @@ yydefault: } case 262: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2432 +// line internal/php7/php7.y:2390 { yyVAL.node = yyDollar[1].node } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2439 +// line internal/php7/php7.y:2397 { yyVAL.node = &ast.StmtTraitMethodRef{ Node: ast.Node{ @@ -4874,7 +4832,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2459 +// line internal/php7/php7.y:2417 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -4885,7 +4843,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2468 +// line internal/php7/php7.y:2426 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -4898,13 +4856,13 @@ yydefault: } case 266: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2482 +// line internal/php7/php7.y:2440 { yyVAL.list = yyDollar[1].list } case 267: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2486 +// line internal/php7/php7.y:2444 { yyVAL.list = []ast.Vertex{ &ast.Identifier{ @@ -4918,31 +4876,31 @@ yydefault: } case 268: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2501 +// line internal/php7/php7.y:2459 { yyVAL.list = nil } case 269: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2505 +// line internal/php7/php7.y:2463 { yyVAL.list = yyDollar[1].list } case 270: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2512 +// line internal/php7/php7.y:2470 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2516 +// line internal/php7/php7.y:2474 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 272: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2523 +// line internal/php7/php7.y:2481 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4954,7 +4912,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2533 +// line internal/php7/php7.y:2491 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4966,7 +4924,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2543 +// line internal/php7/php7.y:2501 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4978,7 +4936,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2553 +// line internal/php7/php7.y:2511 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4990,7 +4948,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2563 +// line internal/php7/php7.y:2521 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5002,7 +4960,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2573 +// line internal/php7/php7.y:2531 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5014,7 +4972,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2586 +// line internal/php7/php7.y:2544 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -5023,7 +4981,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2593 +// line internal/php7/php7.y:2551 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -5031,7 +4989,7 @@ yydefault: } case 280: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2602 +// line internal/php7/php7.y:2560 { yyVAL.node = &ast.StmtProperty{ Node: ast.Node{ @@ -5054,7 +5012,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2623 +// line internal/php7/php7.y:2581 { yyVAL.node = &ast.StmtProperty{ Node: ast.Node{ @@ -5078,7 +5036,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2648 +// line internal/php7/php7.y:2606 { lastNode(yyDollar[1].list).(*ast.StmtConstant).CommaTkn = yyDollar[2].token @@ -5086,13 +5044,13 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2654 +// line internal/php7/php7.y:2612 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 284: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2661 +// line internal/php7/php7.y:2619 { yyVAL.node = &ast.StmtConstant{ Node: ast.Node{ @@ -5113,7 +5071,7 @@ yydefault: } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2683 +// line internal/php7/php7.y:2641 { yyVAL.node = &ast.StmtConstant{ Node: ast.Node{ @@ -5134,7 +5092,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2705 +// line internal/php7/php7.y:2663 { yyDollar[1].node.(*ast.StmtEcho).Exprs = append(yyDollar[1].node.(*ast.StmtEcho).Exprs, yyDollar[3].node) yyDollar[1].node.(*ast.StmtEcho).SeparatorTkns = append(yyDollar[1].node.(*ast.StmtEcho).SeparatorTkns, yyDollar[2].token) @@ -5143,7 +5101,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2712 +// line internal/php7/php7.y:2670 { yyVAL.node = &ast.StmtEcho{ Exprs: []ast.Vertex{yyDollar[1].node}, @@ -5151,25 +5109,25 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2721 +// line internal/php7/php7.y:2679 { yyVAL.node = yyDollar[1].node } case 289: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2728 +// line internal/php7/php7.y:2686 { yyVAL.list = nil } case 290: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2732 +// line internal/php7/php7.y:2690 { yyVAL.list = yyDollar[1].list } case 291: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2739 +// line internal/php7/php7.y:2697 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5178,13 +5136,13 @@ yydefault: } case 292: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2746 +// line internal/php7/php7.y:2704 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 293: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:2753 +// line internal/php7/php7.y:2711 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -5193,6 +5151,7 @@ yydefault: ClassTkn: yyDollar[1].token, OpenParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[2].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[2].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, Extends: yyDollar[3].node, Implements: yyDollar[4].node, @@ -5203,7 +5162,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2773 +// line internal/php7/php7.y:2732 { if yyDollar[3].node != nil { yyVAL.node = &ast.ExprNew{ @@ -5214,6 +5173,7 @@ yydefault: Class: yyDollar[2].node, OpenParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[3].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[3].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, } } else { @@ -5228,7 +5188,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2796 +// line internal/php7/php7.y:2756 { yyVAL.node = &ast.ExprNew{ Node: ast.Node{ @@ -5240,7 +5200,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2809 +// line internal/php7/php7.y:2769 { yyVAL.node = &ast.ExprAssign{ Node: ast.Node{ @@ -5262,7 +5222,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:2829 +// line internal/php7/php7.y:2789 { yyVAL.node = &ast.ExprAssign{ Node: ast.Node{ @@ -5283,7 +5243,7 @@ yydefault: } case 298: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2848 +// line internal/php7/php7.y:2808 { yyVAL.node = &ast.ExprAssign{ Node: ast.Node{ @@ -5296,7 +5256,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2859 +// line internal/php7/php7.y:2819 { yyVAL.node = &ast.ExprAssignReference{ Node: ast.Node{ @@ -5310,7 +5270,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2871 +// line internal/php7/php7.y:2831 { yyVAL.node = &ast.ExprClone{ Node: ast.Node{ @@ -5322,7 +5282,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2881 +// line internal/php7/php7.y:2841 { yyVAL.node = &ast.ExprAssignPlus{ Node: ast.Node{ @@ -5335,7 +5295,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2892 +// line internal/php7/php7.y:2852 { yyVAL.node = &ast.ExprAssignMinus{ Node: ast.Node{ @@ -5348,7 +5308,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2903 +// line internal/php7/php7.y:2863 { yyVAL.node = &ast.ExprAssignMul{ Node: ast.Node{ @@ -5361,7 +5321,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2914 +// line internal/php7/php7.y:2874 { yyVAL.node = &ast.ExprAssignPow{ Node: ast.Node{ @@ -5374,7 +5334,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2925 +// line internal/php7/php7.y:2885 { yyVAL.node = &ast.ExprAssignDiv{ Node: ast.Node{ @@ -5387,7 +5347,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2936 +// line internal/php7/php7.y:2896 { yyVAL.node = &ast.ExprAssignConcat{ Node: ast.Node{ @@ -5400,7 +5360,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2947 +// line internal/php7/php7.y:2907 { yyVAL.node = &ast.ExprAssignMod{ Node: ast.Node{ @@ -5413,7 +5373,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2958 +// line internal/php7/php7.y:2918 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ Node: ast.Node{ @@ -5426,7 +5386,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2969 +// line internal/php7/php7.y:2929 { yyVAL.node = &ast.ExprAssignBitwiseOr{ Node: ast.Node{ @@ -5439,7 +5399,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2980 +// line internal/php7/php7.y:2940 { yyVAL.node = &ast.ExprAssignBitwiseXor{ Node: ast.Node{ @@ -5452,7 +5412,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2991 +// line internal/php7/php7.y:2951 { yyVAL.node = &ast.ExprAssignShiftLeft{ Node: ast.Node{ @@ -5465,7 +5425,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3002 +// line internal/php7/php7.y:2962 { yyVAL.node = &ast.ExprAssignShiftRight{ Node: ast.Node{ @@ -5478,7 +5438,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3013 +// line internal/php7/php7.y:2973 { yyVAL.node = &ast.ExprAssignCoalesce{ Node: ast.Node{ @@ -5491,7 +5451,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3024 +// line internal/php7/php7.y:2984 { yyVAL.node = &ast.ExprPostInc{ Node: ast.Node{ @@ -5503,7 +5463,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3034 +// line internal/php7/php7.y:2994 { yyVAL.node = &ast.ExprPreInc{ Node: ast.Node{ @@ -5515,7 +5475,7 @@ yydefault: } case 316: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3044 +// line internal/php7/php7.y:3004 { yyVAL.node = &ast.ExprPostDec{ Node: ast.Node{ @@ -5527,7 +5487,7 @@ yydefault: } case 317: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3054 +// line internal/php7/php7.y:3014 { yyVAL.node = &ast.ExprPreDec{ Node: ast.Node{ @@ -5539,7 +5499,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3064 +// line internal/php7/php7.y:3024 { yyVAL.node = &ast.ExprBinaryBooleanOr{ Node: ast.Node{ @@ -5552,7 +5512,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3075 +// line internal/php7/php7.y:3035 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ Node: ast.Node{ @@ -5565,7 +5525,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3086 +// line internal/php7/php7.y:3046 { yyVAL.node = &ast.ExprBinaryLogicalOr{ Node: ast.Node{ @@ -5578,7 +5538,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3097 +// line internal/php7/php7.y:3057 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ Node: ast.Node{ @@ -5591,7 +5551,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3108 +// line internal/php7/php7.y:3068 { yyVAL.node = &ast.ExprBinaryLogicalXor{ Node: ast.Node{ @@ -5604,7 +5564,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3119 +// line internal/php7/php7.y:3079 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ Node: ast.Node{ @@ -5617,7 +5577,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3130 +// line internal/php7/php7.y:3090 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ Node: ast.Node{ @@ -5630,7 +5590,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3141 +// line internal/php7/php7.y:3101 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ Node: ast.Node{ @@ -5643,7 +5603,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3152 +// line internal/php7/php7.y:3112 { yyVAL.node = &ast.ExprBinaryConcat{ Node: ast.Node{ @@ -5656,7 +5616,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3163 +// line internal/php7/php7.y:3123 { yyVAL.node = &ast.ExprBinaryPlus{ Node: ast.Node{ @@ -5669,7 +5629,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3174 +// line internal/php7/php7.y:3134 { yyVAL.node = &ast.ExprBinaryMinus{ Node: ast.Node{ @@ -5682,7 +5642,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3185 +// line internal/php7/php7.y:3145 { yyVAL.node = &ast.ExprBinaryMul{ Node: ast.Node{ @@ -5695,7 +5655,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3196 +// line internal/php7/php7.y:3156 { yyVAL.node = &ast.ExprBinaryPow{ Node: ast.Node{ @@ -5708,7 +5668,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3207 +// line internal/php7/php7.y:3167 { yyVAL.node = &ast.ExprBinaryDiv{ Node: ast.Node{ @@ -5721,7 +5681,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3218 +// line internal/php7/php7.y:3178 { yyVAL.node = &ast.ExprBinaryMod{ Node: ast.Node{ @@ -5734,7 +5694,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3229 +// line internal/php7/php7.y:3189 { yyVAL.node = &ast.ExprBinaryShiftLeft{ Node: ast.Node{ @@ -5747,7 +5707,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3240 +// line internal/php7/php7.y:3200 { yyVAL.node = &ast.ExprBinaryShiftRight{ Node: ast.Node{ @@ -5760,7 +5720,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3251 +// line internal/php7/php7.y:3211 { yyVAL.node = &ast.ExprUnaryPlus{ Node: ast.Node{ @@ -5772,7 +5732,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3261 +// line internal/php7/php7.y:3221 { yyVAL.node = &ast.ExprUnaryMinus{ Node: ast.Node{ @@ -5784,7 +5744,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3271 +// line internal/php7/php7.y:3231 { yyVAL.node = &ast.ExprBooleanNot{ Node: ast.Node{ @@ -5796,7 +5756,7 @@ yydefault: } case 338: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3281 +// line internal/php7/php7.y:3241 { yyVAL.node = &ast.ExprBitwiseNot{ Node: ast.Node{ @@ -5808,7 +5768,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3291 +// line internal/php7/php7.y:3251 { yyVAL.node = &ast.ExprBinaryIdentical{ Node: ast.Node{ @@ -5821,7 +5781,7 @@ yydefault: } case 340: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3302 +// line internal/php7/php7.y:3262 { yyVAL.node = &ast.ExprBinaryNotIdentical{ Node: ast.Node{ @@ -5834,7 +5794,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3313 +// line internal/php7/php7.y:3273 { yyVAL.node = &ast.ExprBinaryEqual{ Node: ast.Node{ @@ -5847,7 +5807,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3324 +// line internal/php7/php7.y:3284 { yyVAL.node = &ast.ExprBinaryNotEqual{ Node: ast.Node{ @@ -5860,7 +5820,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3335 +// line internal/php7/php7.y:3295 { yyVAL.node = &ast.ExprBinarySmaller{ Node: ast.Node{ @@ -5873,7 +5833,7 @@ yydefault: } case 344: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3346 +// line internal/php7/php7.y:3306 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ Node: ast.Node{ @@ -5886,7 +5846,7 @@ yydefault: } case 345: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3357 +// line internal/php7/php7.y:3317 { yyVAL.node = &ast.ExprBinaryGreater{ Node: ast.Node{ @@ -5899,7 +5859,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3368 +// line internal/php7/php7.y:3328 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ Node: ast.Node{ @@ -5912,7 +5872,7 @@ yydefault: } case 347: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3379 +// line internal/php7/php7.y:3339 { yyVAL.node = &ast.ExprBinarySpaceship{ Node: ast.Node{ @@ -5925,7 +5885,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3390 +// line internal/php7/php7.y:3350 { yyVAL.node = &ast.ExprInstanceOf{ Node: ast.Node{ @@ -5938,7 +5898,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3401 +// line internal/php7/php7.y:3361 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -5955,13 +5915,13 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3416 +// line internal/php7/php7.y:3376 { yyVAL.node = yyDollar[1].node } case 351: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:3420 +// line internal/php7/php7.y:3380 { yyVAL.node = &ast.ExprTernary{ Node: ast.Node{ @@ -5976,7 +5936,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3433 +// line internal/php7/php7.y:3393 { yyVAL.node = &ast.ExprTernary{ Node: ast.Node{ @@ -5990,7 +5950,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3445 +// line internal/php7/php7.y:3405 { yyVAL.node = &ast.ExprBinaryCoalesce{ Node: ast.Node{ @@ -6003,13 +5963,13 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3456 +// line internal/php7/php7.y:3416 { yyVAL.node = yyDollar[1].node } case 355: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3460 +// line internal/php7/php7.y:3420 { yyVAL.node = &ast.ExprCastInt{ Node: ast.Node{ @@ -6021,7 +5981,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3470 +// line internal/php7/php7.y:3430 { yyVAL.node = &ast.ExprCastDouble{ Node: ast.Node{ @@ -6033,7 +5993,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3480 +// line internal/php7/php7.y:3440 { yyVAL.node = &ast.ExprCastString{ Node: ast.Node{ @@ -6045,7 +6005,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3490 +// line internal/php7/php7.y:3450 { yyVAL.node = &ast.ExprCastArray{ Node: ast.Node{ @@ -6057,7 +6017,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3500 +// line internal/php7/php7.y:3460 { yyVAL.node = &ast.ExprCastObject{ Node: ast.Node{ @@ -6069,7 +6029,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3510 +// line internal/php7/php7.y:3470 { yyVAL.node = &ast.ExprCastBool{ Node: ast.Node{ @@ -6081,7 +6041,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3520 +// line internal/php7/php7.y:3480 { yyVAL.node = &ast.ExprCastUnset{ Node: ast.Node{ @@ -6093,7 +6053,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3530 +// line internal/php7/php7.y:3490 { exit := &ast.ExprExit{ DieTkn: yyDollar[1].token, @@ -6112,7 +6072,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3547 +// line internal/php7/php7.y:3507 { yyVAL.node = &ast.ExprErrorSuppress{ Node: ast.Node{ @@ -6124,13 +6084,13 @@ yydefault: } case 364: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3557 +// line internal/php7/php7.y:3517 { yyVAL.node = yyDollar[1].node } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3561 +// line internal/php7/php7.y:3521 { yyVAL.node = &ast.ExprShellExec{ Node: ast.Node{ @@ -6143,7 +6103,7 @@ yydefault: } case 366: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3572 +// line internal/php7/php7.y:3532 { yyVAL.node = &ast.ExprPrint{ Node: ast.Node{ @@ -6155,7 +6115,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3582 +// line internal/php7/php7.y:3542 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6166,7 +6126,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3591 +// line internal/php7/php7.y:3551 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6178,7 +6138,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3601 +// line internal/php7/php7.y:3561 { yyVAL.node = &ast.ExprYield{ Node: ast.Node{ @@ -6192,7 +6152,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3613 +// line internal/php7/php7.y:3573 { yyVAL.node = &ast.ExprYieldFrom{ Node: ast.Node{ @@ -6204,13 +6164,13 @@ yydefault: } case 371: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3623 +// line internal/php7/php7.y:3583 { yyVAL.node = yyDollar[1].node } case 372: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3627 +// line internal/php7/php7.y:3587 { switch n := yyDollar[2].node.(type) { case *ast.ExprClosure: @@ -6225,7 +6185,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:3643 +// line internal/php7/php7.y:3603 { yyVAL.node = &ast.ExprClosure{ Node: ast.Node{ @@ -6246,7 +6206,7 @@ yydefault: } case 374: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:3662 +// line internal/php7/php7.y:3622 { yyVAL.node = &ast.ExprArrowFunction{ Node: ast.Node{ @@ -6265,25 +6225,25 @@ yydefault: } case 376: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3686 +// line internal/php7/php7.y:3646 { yyVAL.token = nil } case 377: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3690 +// line internal/php7/php7.y:3650 { yyVAL.token = yyDollar[1].token } case 378: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3697 +// line internal/php7/php7.y:3657 { yyVAL.ClosureUse = nil } case 379: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3701 +// line internal/php7/php7.y:3661 { yyVAL.ClosureUse = &ast.ExprClosureUse{ Node: ast.Node{ @@ -6298,7 +6258,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3717 +// line internal/php7/php7.y:3677 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -6307,7 +6267,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3724 +// line internal/php7/php7.y:3684 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -6315,7 +6275,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3733 +// line internal/php7/php7.y:3693 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -6332,7 +6292,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3748 +// line internal/php7/php7.y:3708 { yyVAL.node = &ast.ExprReference{ Node: ast.Node{ @@ -6355,7 +6315,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3772 +// line internal/php7/php7.y:3732 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6364,12 +6324,13 @@ yydefault: Function: yyDollar[1].node, OpenParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[2].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[2].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 385: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3784 +// line internal/php7/php7.y:3745 { yyVAL.node = &ast.ExprStaticCall{ Node: ast.Node{ @@ -6380,12 +6341,13 @@ yydefault: Call: yyDollar[3].node, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 386: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3798 +// line internal/php7/php7.y:3760 { yyVAL.node = &ast.ExprStaticCall{ Node: ast.Node{ @@ -6396,12 +6358,13 @@ yydefault: Call: yyDollar[3].node, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 387: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3812 +// line internal/php7/php7.y:3775 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6410,12 +6373,13 @@ yydefault: Function: yyDollar[1].node, OpenParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[2].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[2].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[2].node.(*ast.ArgumentList).OpenParenthesisTkn, } } case 388: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3827 +// line internal/php7/php7.y:3791 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -6427,31 +6391,31 @@ yydefault: } case 389: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3837 +// line internal/php7/php7.y:3801 { yyVAL.node = yyDollar[1].node } case 390: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3844 +// line internal/php7/php7.y:3808 { yyVAL.node = yyDollar[1].node } case 391: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3848 +// line internal/php7/php7.y:3812 { yyVAL.node = yyDollar[1].node } case 392: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3855 +// line internal/php7/php7.y:3819 { yyVAL.node = nil } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3859 +// line internal/php7/php7.y:3823 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6468,13 +6432,13 @@ yydefault: } case 394: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3877 +// line internal/php7/php7.y:3841 { yyVAL.list = []ast.Vertex{} } case 395: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3881 +// line internal/php7/php7.y:3845 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -6488,25 +6452,25 @@ yydefault: } case 396: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3893 +// line internal/php7/php7.y:3857 { yyVAL.list = yyDollar[1].list } case 397: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3900 +// line internal/php7/php7.y:3864 { yyVAL.node = nil } case 398: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3904 +// line internal/php7/php7.y:3868 { yyVAL.node = yyDollar[1].node } case 399: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3911 +// line internal/php7/php7.y:3875 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6521,7 +6485,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3924 +// line internal/php7/php7.y:3888 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6535,7 +6499,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3936 +// line internal/php7/php7.y:3900 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -6547,7 +6511,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3949 +// line internal/php7/php7.y:3913 { yyVAL.node = &ast.ScalarLnumber{ Node: ast.Node{ @@ -6559,7 +6523,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3959 +// line internal/php7/php7.y:3923 { yyVAL.node = &ast.ScalarDnumber{ Node: ast.Node{ @@ -6571,7 +6535,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3969 +// line internal/php7/php7.y:3933 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6583,7 +6547,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3979 +// line internal/php7/php7.y:3943 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6595,7 +6559,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3989 +// line internal/php7/php7.y:3953 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6607,7 +6571,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3999 +// line internal/php7/php7.y:3963 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6619,7 +6583,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4009 +// line internal/php7/php7.y:3973 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6631,7 +6595,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4019 +// line internal/php7/php7.y:3983 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6643,7 +6607,7 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4029 +// line internal/php7/php7.y:3993 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6655,7 +6619,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4039 +// line internal/php7/php7.y:4003 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6667,7 +6631,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4049 +// line internal/php7/php7.y:4013 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -6688,7 +6652,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4068 +// line internal/php7/php7.y:4032 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -6700,7 +6664,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4078 +// line internal/php7/php7.y:4042 { yyVAL.node = &ast.ScalarEncapsed{ Node: ast.Node{ @@ -6713,7 +6677,7 @@ yydefault: } case 415: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4089 +// line internal/php7/php7.y:4053 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -6726,19 +6690,19 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4100 +// line internal/php7/php7.y:4064 { yyVAL.node = yyDollar[1].node } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4104 +// line internal/php7/php7.y:4068 { yyVAL.node = yyDollar[1].node } case 418: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4111 +// line internal/php7/php7.y:4075 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -6749,7 +6713,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4120 +// line internal/php7/php7.y:4084 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -6768,7 +6732,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4137 +// line internal/php7/php7.y:4101 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -6787,43 +6751,43 @@ yydefault: } case 421: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4157 +// line internal/php7/php7.y:4121 { yyVAL.node = yyDollar[1].node } case 422: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4161 +// line internal/php7/php7.y:4125 { yyVAL.node = yyDollar[1].node } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4168 +// line internal/php7/php7.y:4132 { yyVAL.node = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4172 +// line internal/php7/php7.y:4136 { yyVAL.node = yyDollar[1].node } case 425: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4179 +// line internal/php7/php7.y:4143 { yyVAL.node = yyDollar[1].node } case 426: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4186 +// line internal/php7/php7.y:4150 { yyVAL.node = yyDollar[1].node } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4190 +// line internal/php7/php7.y:4154 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6840,19 +6804,19 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4205 +// line internal/php7/php7.y:4169 { yyVAL.node = yyDollar[1].node } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4212 +// line internal/php7/php7.y:4176 { yyVAL.node = yyDollar[1].node } case 430: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4216 +// line internal/php7/php7.y:4180 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6869,19 +6833,19 @@ yydefault: } case 431: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4231 +// line internal/php7/php7.y:4195 { yyVAL.node = yyDollar[1].node } case 432: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4238 +// line internal/php7/php7.y:4202 { yyVAL.node = yyDollar[1].node } case 433: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4242 +// line internal/php7/php7.y:4206 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6895,7 +6859,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4254 +// line internal/php7/php7.y:4218 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6909,7 +6873,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4266 +// line internal/php7/php7.y:4230 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6923,7 +6887,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4278 +// line internal/php7/php7.y:4242 { yyVAL.node = &ast.ExprMethodCall{ Node: ast.Node{ @@ -6934,30 +6898,31 @@ yydefault: Method: yyDollar[3].node, OpenParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: yyDollar[4].node.(*ast.ArgumentList).Arguments, + SeparatorTkns: yyDollar[4].node.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: yyDollar[4].node.(*ast.ArgumentList).CloseParenthesisTkn, } } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4292 +// line internal/php7/php7.y:4257 { yyVAL.node = yyDollar[1].node } case 438: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4299 +// line internal/php7/php7.y:4264 { yyVAL.node = yyDollar[1].node } case 439: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4303 +// line internal/php7/php7.y:4268 { yyVAL.node = yyDollar[1].node } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4307 +// line internal/php7/php7.y:4272 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -6970,7 +6935,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4321 +// line internal/php7/php7.y:4286 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -6987,7 +6952,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4336 +// line internal/php7/php7.y:4301 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -7006,7 +6971,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4353 +// line internal/php7/php7.y:4318 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -7018,7 +6983,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4366 +// line internal/php7/php7.y:4331 { yyVAL.node = &ast.ExprStaticPropertyFetch{ Node: ast.Node{ @@ -7031,7 +6996,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4377 +// line internal/php7/php7.y:4342 { yyVAL.node = &ast.ExprStaticPropertyFetch{ Node: ast.Node{ @@ -7044,13 +7009,13 @@ yydefault: } case 446: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4391 +// line internal/php7/php7.y:4356 { yyVAL.node = yyDollar[1].node } case 447: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4395 +// line internal/php7/php7.y:4360 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7064,7 +7029,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4407 +// line internal/php7/php7.y:4372 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7078,7 +7043,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4419 +// line internal/php7/php7.y:4384 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -7091,7 +7056,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4430 +// line internal/php7/php7.y:4395 { yyVAL.node = &ast.ExprStaticPropertyFetch{ Node: ast.Node{ @@ -7104,7 +7069,7 @@ yydefault: } case 451: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4441 +// line internal/php7/php7.y:4406 { yyVAL.node = &ast.ExprStaticPropertyFetch{ Node: ast.Node{ @@ -7117,7 +7082,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4455 +// line internal/php7/php7.y:4420 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -7129,7 +7094,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4465 +// line internal/php7/php7.y:4430 { yyVAL.node = yyDollar[2].node @@ -7139,13 +7104,13 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4473 +// line internal/php7/php7.y:4438 { yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4480 +// line internal/php7/php7.y:4445 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -7157,7 +7122,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4490 +// line internal/php7/php7.y:4455 { yyVAL.node = yyDollar[2].node @@ -7167,13 +7132,13 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4498 +// line internal/php7/php7.y:4463 { yyVAL.node = yyDollar[1].node } case 458: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4505 +// line internal/php7/php7.y:4470 { pairList := yyDollar[1].node.(*ast.ParserSeparatedList) fistPair := pairList.Items[0].(*ast.ExprArrayItem) @@ -7186,19 +7151,19 @@ yydefault: } case 459: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4519 +// line internal/php7/php7.y:4484 { yyVAL.node = &ast.ExprArrayItem{} } case 460: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4523 +// line internal/php7/php7.y:4488 { yyVAL.node = yyDollar[1].node } case 461: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4530 +// line internal/php7/php7.y:4495 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -7207,7 +7172,7 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4537 +// line internal/php7/php7.y:4502 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -7215,7 +7180,7 @@ yydefault: } case 463: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4546 +// line internal/php7/php7.y:4511 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7228,7 +7193,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4557 +// line internal/php7/php7.y:4522 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7239,7 +7204,7 @@ yydefault: } case 465: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4566 +// line internal/php7/php7.y:4531 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7258,7 +7223,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4583 +// line internal/php7/php7.y:4548 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7275,7 +7240,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4598 +// line internal/php7/php7.y:4563 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7287,7 +7252,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:4608 +// line internal/php7/php7.y:4573 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7309,7 +7274,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4628 +// line internal/php7/php7.y:4593 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7329,13 +7294,13 @@ yydefault: } case 470: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4649 +// line internal/php7/php7.y:4614 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 471: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4653 +// line internal/php7/php7.y:4618 { yyVAL.list = append( yyDollar[1].list, @@ -7350,13 +7315,13 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4666 +// line internal/php7/php7.y:4631 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 473: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4670 +// line internal/php7/php7.y:4635 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -7371,7 +7336,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4686 +// line internal/php7/php7.y:4651 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -7388,7 +7353,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4701 +// line internal/php7/php7.y:4666 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7413,7 +7378,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4724 +// line internal/php7/php7.y:4689 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -7443,7 +7408,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4752 +// line internal/php7/php7.y:4717 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7461,7 +7426,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4768 +// line internal/php7/php7.y:4733 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7485,7 +7450,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:4790 +// line internal/php7/php7.y:4755 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7517,7 +7482,7 @@ yydefault: } case 480: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4820 +// line internal/php7/php7.y:4785 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7530,7 +7495,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4834 +// line internal/php7/php7.y:4799 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -7542,7 +7507,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4844 +// line internal/php7/php7.y:4809 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -7565,7 +7530,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4865 +// line internal/php7/php7.y:4830 { _, err := strconv.Atoi(string(yyDollar[2].token.Value)) isInt := err == nil @@ -7598,7 +7563,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4896 +// line internal/php7/php7.y:4861 { yyVAL.node = &ast.ExprVariable{ Node: ast.Node{ @@ -7615,7 +7580,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:4914 +// line internal/php7/php7.y:4879 { if yyDollar[4].token != nil { yyDollar[3].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[3].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[4].token) @@ -7634,7 +7599,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4931 +// line internal/php7/php7.y:4896 { yyVAL.node = &ast.ExprEmpty{ Node: ast.Node{ @@ -7648,7 +7613,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4943 +// line internal/php7/php7.y:4908 { yyVAL.node = &ast.ExprInclude{ Node: ast.Node{ @@ -7660,7 +7625,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4953 +// line internal/php7/php7.y:4918 { yyVAL.node = &ast.ExprIncludeOnce{ Node: ast.Node{ @@ -7672,7 +7637,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4963 +// line internal/php7/php7.y:4928 { yyVAL.node = &ast.ExprEval{ Node: ast.Node{ @@ -7686,7 +7651,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4975 +// line internal/php7/php7.y:4940 { yyVAL.node = &ast.ExprRequire{ Node: ast.Node{ @@ -7698,7 +7663,7 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4985 +// line internal/php7/php7.y:4950 { yyVAL.node = &ast.ExprRequireOnce{ Node: ast.Node{ @@ -7710,7 +7675,7 @@ yydefault: } case 492: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4998 +// line internal/php7/php7.y:4963 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -7718,7 +7683,7 @@ yydefault: } case 493: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5004 +// line internal/php7/php7.y:4969 { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) yyDollar[1].node.(*ast.ParserSeparatedList).Items = append(yyDollar[1].node.(*ast.ParserSeparatedList).Items, yyDollar[3].node) @@ -7727,7 +7692,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5014 +// line internal/php7/php7.y:4979 { yyVAL.node = yyDollar[1].node } diff --git a/internal/php7/php7.y b/internal/php7/php7.y index e40fa5f..35d271e 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -1849,40 +1849,6 @@ non_empty_parameter_list: parameter: optional_type is_reference is_variadic T_VARIABLE { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - IdentifierTkn: $4, - Value: $4.Value, - }, - } - - if $3 != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition($3, $4), - }, - VariadicTkn: $3, - Var: variable, - } - } - - if $2 != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition($2, $4), - }, - AmpersandTkn: $2, - Var: variable, - } - } - pos := position.NewTokenPosition($4) if $1 != nil { pos = position.NewNodeTokenPosition($1, $4) @@ -1896,46 +1862,25 @@ parameter: Node: ast.Node{ Position: pos, }, - Type: $1, - Var: variable, + Type: $1, + AmpersandTkn: $2, + VariadicTkn: $3, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + IdentifierTkn: $4, + Value: $4.Value, + }, + }, } } | optional_type is_reference is_variadic T_VARIABLE '=' expr { - var variable ast.Vertex - variable = &ast.ExprVariable{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - VarName: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition($4), - }, - IdentifierTkn: $4, - Value: $4.Value, - }, - } - - if $3 != nil { - variable = &ast.Variadic{ - Node: ast.Node{ - Position: position.NewTokensPosition($3, $4), - }, - VariadicTkn: $3, - Var: variable, - } - } - - if $2 != nil { - variable = &ast.Reference{ - Node: ast.Node{ - Position: position.NewTokensPosition($2, $4), - }, - AmpersandTkn: $2, - Var: variable, - } - } - pos := position.NewTokenNodePosition($4, $6) if $1 != nil { pos = position.NewNodesPosition($1, $6) @@ -1950,7 +1895,20 @@ parameter: Position: pos, }, Type: $1, - Var: variable, + AmpersandTkn: $2, + VariadicTkn: $3, + Var: &ast.ExprVariable{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + VarName: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition($4), + }, + IdentifierTkn: $4, + Value: $4.Value, + }, + }, EqualTkn: $5, DefaultValue: $6, } @@ -2758,6 +2716,7 @@ anonymous_class: ClassTkn: $1, OpenParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $2.(*ast.ArgumentList).Arguments, + SeparatorTkns: $2.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, Extends: $3, Implements: $4, @@ -2780,6 +2739,7 @@ new_expr: Class: $2, OpenParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $3.(*ast.ArgumentList).Arguments, + SeparatorTkns: $3.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, } } else { @@ -3777,6 +3737,7 @@ function_call: Function: $1, OpenParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $2.(*ast.ArgumentList).Arguments, + SeparatorTkns: $2.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -3791,6 +3752,7 @@ function_call: Call: $3, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -3805,6 +3767,7 @@ function_call: Call: $3, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -3817,6 +3780,7 @@ function_call: Function: $1, OpenParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $2.(*ast.ArgumentList).Arguments, + SeparatorTkns: $2.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ast.ArgumentList).OpenParenthesisTkn, } } @@ -4285,6 +4249,7 @@ callable_variable: Method: $3, OpenParenthesisTkn: $4.(*ast.ArgumentList).OpenParenthesisTkn, Arguments: $4.(*ast.ArgumentList).Arguments, + SeparatorTkns: $4.(*ast.ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ast.ArgumentList).CloseParenthesisTkn, } } diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go index 526c4e8..b711aaa 100644 --- a/pkg/ast/ast.go +++ b/pkg/ast/ast.go @@ -20,8 +20,6 @@ type Visitor interface { type NodeVisitor interface { Root(n *Root) Nullable(n *Nullable) - Reference(n *Reference) - Variadic(n *Variadic) Parameter(n *Parameter) Identifier(n *Identifier) Argument(n *Argument) diff --git a/pkg/ast/node.go b/pkg/ast/node.go index e3298cb..6283064 100644 --- a/pkg/ast/node.go +++ b/pkg/ast/node.go @@ -42,32 +42,12 @@ func (n *Nullable) Accept(v NodeVisitor) { v.Nullable(n) } -// Reference node -type Reference struct { - Node - AmpersandTkn *token.Token - Var Vertex -} - -func (n *Reference) Accept(v NodeVisitor) { - v.Reference(n) -} - -// Variadic node -type Variadic struct { - Node - VariadicTkn *token.Token - Var Vertex -} - -func (n *Variadic) Accept(v NodeVisitor) { - v.Variadic(n) -} - // Parameter node type Parameter struct { Node Type Vertex + AmpersandTkn *token.Token + VariadicTkn *token.Token Var Vertex EqualTkn *token.Token DefaultValue Vertex @@ -231,6 +211,7 @@ type StmtClass struct { ClassName Vertex OpenParenthesisTkn *token.Token Arguments []Vertex + SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token Extends Vertex Implements Vertex @@ -1131,6 +1112,7 @@ type ExprFunctionCall struct { Function Vertex OpenParenthesisTkn *token.Token Arguments []Vertex + SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } @@ -1208,6 +1190,7 @@ type ExprMethodCall struct { Method Vertex OpenParenthesisTkn *token.Token Arguments []Vertex + SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } @@ -1222,6 +1205,7 @@ type ExprNew struct { Class Vertex OpenParenthesisTkn *token.Token Arguments []Vertex + SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } @@ -1349,6 +1333,7 @@ type ExprStaticCall struct { Call Vertex OpenParenthesisTkn *token.Token Arguments []Vertex + SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } diff --git a/pkg/ast/traverser/dfs.go b/pkg/ast/traverser/dfs.go index 6e3fe74..d9e198e 100644 --- a/pkg/ast/traverser/dfs.go +++ b/pkg/ast/traverser/dfs.go @@ -40,30 +40,6 @@ func (t *DFS) Traverse(n ast.Vertex) { t.Traverse(nn.Expr) t.visitor.Leave("Expr", true) } - case *ast.Reference: - if nn == nil { - return - } - if !t.visitor.EnterNode(nn) { - return - } - if nn.Var != nil { - t.visitor.Enter("Var", true) - t.Traverse(nn.Var) - t.visitor.Leave("Var", true) - } - case *ast.Variadic: - if nn == nil { - return - } - if !t.visitor.EnterNode(nn) { - return - } - if nn.Var != nil { - t.visitor.Enter("Var", true) - t.Traverse(nn.Var) - t.visitor.Leave("Var", true) - } case *ast.Parameter: if nn == nil { return diff --git a/pkg/ast/visitor/dump.go b/pkg/ast/visitor/dump.go index ea0ae75..d6546f3 100644 --- a/pkg/ast/visitor/dump.go +++ b/pkg/ast/visitor/dump.go @@ -203,18 +203,6 @@ func (v *Dump) Nullable(n *ast.Nullable) { v.printNode(n.GetNode()) } -func (v *Dump) Reference(n *ast.Reference) { - v.printIndentIfNotSingle(v.indent - 1) - v.print("&ast.Reference{\n") - v.printNode(n.GetNode()) -} - -func (v *Dump) Variadic(n *ast.Variadic) { - v.printIndentIfNotSingle(v.indent - 1) - v.print("&ast.Variadic{\n") - v.printNode(n.GetNode()) -} - func (v *Dump) Parameter(n *ast.Parameter) { v.printIndent(v.indent - 1) v.print("&ast.Parameter{\n") diff --git a/pkg/ast/visitor/null.go b/pkg/ast/visitor/null.go index ce4f433..92b9b55 100644 --- a/pkg/ast/visitor/null.go +++ b/pkg/ast/visitor/null.go @@ -30,14 +30,6 @@ func (v *Null) Nullable(_ *ast.Nullable) { // do nothing } -func (v *Null) Reference(_ *ast.Reference) { - // do nothing -} - -func (v *Null) Variadic(_ *ast.Variadic) { - // do nothing -} - func (v *Null) Parameter(_ *ast.Parameter) { // do nothing } diff --git a/pkg/printer/pretty_printer.go b/pkg/printer/pretty_printer.go index eae729a..c263d3f 100644 --- a/pkg/printer/pretty_printer.go +++ b/pkg/printer/pretty_printer.go @@ -64,10 +64,6 @@ func (p *PrettyPrinter) printNode(n ast.Vertex) { p.printNodeRoot(n) case *ast.Identifier: p.printNodeIdentifier(n) - case *ast.Reference: - p.printNodeReference(n) - case *ast.Variadic: - p.printNodeVariadic(n) case *ast.Parameter: p.printNodeParameter(n) case *ast.Nullable: @@ -421,20 +417,6 @@ func (p *PrettyPrinter) printNodeIdentifier(n ast.Vertex) { io.WriteString(p.w, v) } -func (p *PrettyPrinter) printNodeReference(n ast.Vertex) { - nn := n.(*ast.Reference) - - io.WriteString(p.w, "&") - p.Print(nn.Var) -} - -func (p *PrettyPrinter) printNodeVariadic(n ast.Vertex) { - nn := n.(*ast.Variadic) - - io.WriteString(p.w, "...") - p.Print(nn.Var) -} - func (p *PrettyPrinter) printNodeParameter(n ast.Vertex) { nn := n.(*ast.Parameter) diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go index 328e0f9..0109652 100644 --- a/pkg/printer/printer.go +++ b/pkg/printer/printer.go @@ -149,10 +149,6 @@ func (p *Printer) printNode(n ast.Vertex) { p.printNodeRoot(n) case *ast.Identifier: p.printNodeIdentifier(n) - case *ast.Reference: - p.printNodeReference(n) - case *ast.Variadic: - p.printNodeVariadic(n) case *ast.Parameter: p.printNodeParameter(n) case *ast.Nullable: @@ -505,26 +501,6 @@ func (p *Printer) printNodeIdentifier(n ast.Vertex) { p.printFreeFloating(nn, token.End) } -func (p *Printer) printNodeReference(n ast.Vertex) { - nn := n.(*ast.Reference) - p.printFreeFloating(nn, token.Start) - - p.write([]byte("&")) - p.Print(nn.Var) - - p.printFreeFloating(nn, token.End) -} - -func (p *Printer) printNodeVariadic(n ast.Vertex) { - nn := n.(*ast.Variadic) - p.printFreeFloating(nn, token.Start) - - p.write([]byte("...")) - p.Print(nn.Var) - - p.printFreeFloating(nn, token.End) -} - func (p *Printer) printNodeParameter(n ast.Vertex) { nn := n.(*ast.Parameter) p.printFreeFloating(nn, token.Start)