diff --git a/internal/php5/php5.go b/internal/php5/php5.go index 040152d..5cc2459 100644 --- a/internal/php5/php5.go +++ b/internal/php5/php5.go @@ -343,7 +343,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -// line internal/php5/php5.y:6577 +// line internal/php5/php5.y:6598 type simpleIndirectReference struct { all []*ast.ExprVariable @@ -5358,21 +5358,29 @@ yydefault: yyDollar = yyS[yypt-3 : yypt+1] // line internal/php5/php5.y:3125 { - if yyDollar[3].node != nil { - yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, yyDollar[3].node.(*ast.ArgumentList)} - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node) + yyVAL.node = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node), + }, + NewTkn: yyDollar[1].token, + Class: yyDollar[2].node, + OpenParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, + Arguments: yyDollar[3].node.(*ast.ArgumentList).Arguments, + CloseParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, + } } else { - yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, nil} - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node) + yyVAL.node = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node), + }, + Class: yyDollar[2].node, + } } - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) } case 232: yyDollar = yyS[yypt-6 : yypt+1] -// line internal/php5/php5.y:3142 +// line internal/php5/php5.y:3150 { pairList := yyDollar[3].node.(*ast.ParserSeparatedList) fistPair := pairList.Items[0].(*ast.ExprArrayItem) @@ -5405,7 +5413,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3173 +// line internal/php5/php5.y:3181 { yyVAL.node = &ast.ExprAssign{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5418,7 +5426,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:3184 +// line internal/php5/php5.y:3192 { yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, yyDollar[4].node} @@ -5432,15 +5440,30 @@ yydefault: } case 235: yyDollar = yyS[yypt-6 : yypt+1] -// line internal/php5/php5.y:3196 +// line internal/php5/php5.y:3204 { var _new *ast.ExprNew - - if yyDollar[6].node != nil { - _new = &ast.ExprNew{ast.Node{}, yyDollar[5].node, yyDollar[6].node.(*ast.ArgumentList)} + if yyDollar[3].token != nil { + _new = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[4].token, yyDollar[6].node), + }, + NewTkn: yyDollar[4].token, + Class: yyDollar[5].node, + OpenParenthesisTkn: yyDollar[6].node.(*ast.ArgumentList).OpenParenthesisTkn, + Arguments: yyDollar[6].node.(*ast.ArgumentList).Arguments, + CloseParenthesisTkn: yyDollar[6].node.(*ast.ArgumentList).OpenParenthesisTkn, + } } else { - _new = &ast.ExprNew{ast.Node{}, yyDollar[5].node, nil} + _new = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[4].token, yyDollar[5].node), + }, + NewTkn: yyDollar[4].token, + Class: yyDollar[5].node, + } } + yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, _new} // save position @@ -5459,7 +5482,7 @@ yydefault: } case 236: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3221 +// line internal/php5/php5.y:3244 { yyVAL.node = &ast.ExprClone{ Node: ast.Node{ @@ -5471,7 +5494,7 @@ yydefault: } case 237: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3231 +// line internal/php5/php5.y:3254 { yyVAL.node = &ast.ExprAssignPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5483,7 +5506,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3241 +// line internal/php5/php5.y:3264 { yyVAL.node = &ast.ExprAssignMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5496,7 +5519,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3252 +// line internal/php5/php5.y:3275 { yyVAL.node = &ast.ExprAssignMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5509,7 +5532,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3263 +// line internal/php5/php5.y:3286 { yyVAL.node = &ast.ExprAssignPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5522,7 +5545,7 @@ yydefault: } case 241: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3274 +// line internal/php5/php5.y:3297 { yyVAL.node = &ast.ExprAssignDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5535,7 +5558,7 @@ yydefault: } case 242: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3285 +// line internal/php5/php5.y:3308 { yyVAL.node = &ast.ExprAssignConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5548,7 +5571,7 @@ yydefault: } case 243: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3296 +// line internal/php5/php5.y:3319 { yyVAL.node = &ast.ExprAssignMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5561,7 +5584,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3307 +// line internal/php5/php5.y:3330 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5574,7 +5597,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3318 +// line internal/php5/php5.y:3341 { yyVAL.node = &ast.ExprAssignBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5587,7 +5610,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3329 +// line internal/php5/php5.y:3352 { yyVAL.node = &ast.ExprAssignBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5600,7 +5623,7 @@ yydefault: } case 247: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3340 +// line internal/php5/php5.y:3363 { yyVAL.node = &ast.ExprAssignShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5613,7 +5636,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3351 +// line internal/php5/php5.y:3374 { yyVAL.node = &ast.ExprAssignShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5626,57 +5649,55 @@ yydefault: } case 249: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3362 +// line internal/php5/php5.y:3385 { - yyVAL.node = &ast.ExprPostInc{ast.Node{}, yyDollar[1].node} - - // save position - yyVAL.node.GetNode().Position = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token) - - // save comments - yylex.(*Parser).MoveFreeFloating(yyDollar[1].node, yyVAL.node) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.SkippedTokens) + yyVAL.node = &ast.ExprPostInc{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token), + }, + Var: yyDollar[1].node, + IncTkn: yyDollar[2].token, + } } case 250: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3373 +// line internal/php5/php5.y:3395 { - yyVAL.node = &ast.ExprPreInc{ast.Node{}, yyDollar[2].node} - - // save position - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) + yyVAL.node = &ast.ExprPreInc{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node), + }, + IncTkn: yyDollar[1].token, + Var: yyDollar[2].node, + } } case 251: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3383 +// line internal/php5/php5.y:3405 { - yyVAL.node = &ast.ExprPostDec{ast.Node{}, yyDollar[1].node} - - // save position - yyVAL.node.GetNode().Position = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token) - - // save comments - yylex.(*Parser).MoveFreeFloating(yyDollar[1].node, yyVAL.node) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.SkippedTokens) + yyVAL.node = &ast.ExprPostDec{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token), + }, + Var: yyDollar[1].node, + DecTkn: yyDollar[2].token, + } } case 252: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3394 +// line internal/php5/php5.y:3415 { - yyVAL.node = &ast.ExprPreDec{ast.Node{}, yyDollar[2].node} - - // save position - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) + yyVAL.node = &ast.ExprPreDec{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node), + }, + DecTkn: yyDollar[1].token, + Var: yyDollar[2].node, + } } case 253: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3404 +// line internal/php5/php5.y:3425 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5689,7 +5710,7 @@ yydefault: } case 254: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3415 +// line internal/php5/php5.y:3436 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5702,7 +5723,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3426 +// line internal/php5/php5.y:3447 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5715,7 +5736,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3437 +// line internal/php5/php5.y:3458 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5728,7 +5749,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3448 +// line internal/php5/php5.y:3469 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5741,7 +5762,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3459 +// line internal/php5/php5.y:3480 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5754,7 +5775,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3470 +// line internal/php5/php5.y:3491 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5767,7 +5788,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3481 +// line internal/php5/php5.y:3502 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5780,7 +5801,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3492 +// line internal/php5/php5.y:3513 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5792,7 +5813,7 @@ yydefault: } case 262: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3502 +// line internal/php5/php5.y:3523 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5805,7 +5826,7 @@ yydefault: } case 263: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3513 +// line internal/php5/php5.y:3534 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5818,7 +5839,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3524 +// line internal/php5/php5.y:3545 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5831,7 +5852,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3535 +// line internal/php5/php5.y:3556 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5844,7 +5865,7 @@ yydefault: } case 266: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3546 +// line internal/php5/php5.y:3567 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5857,7 +5878,7 @@ yydefault: } case 267: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3557 +// line internal/php5/php5.y:3578 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5870,7 +5891,7 @@ yydefault: } case 268: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3568 +// line internal/php5/php5.y:3589 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5883,7 +5904,7 @@ yydefault: } case 269: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3579 +// line internal/php5/php5.y:3600 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5896,7 +5917,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3590 +// line internal/php5/php5.y:3611 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -5908,7 +5929,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3600 +// line internal/php5/php5.y:3621 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -5920,7 +5941,7 @@ yydefault: } case 272: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3610 +// line internal/php5/php5.y:3631 { yyVAL.node = &ast.ExprBooleanNot{ Node: ast.Node{ @@ -5932,7 +5953,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3620 +// line internal/php5/php5.y:3641 { yyVAL.node = &ast.ExprBitwiseNot{ Node: ast.Node{ @@ -5944,7 +5965,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3630 +// line internal/php5/php5.y:3651 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5957,7 +5978,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3641 +// line internal/php5/php5.y:3662 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5970,7 +5991,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3652 +// line internal/php5/php5.y:3673 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5983,7 +6004,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3663 +// line internal/php5/php5.y:3684 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5997,7 +6018,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3675 +// line internal/php5/php5.y:3696 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6010,7 +6031,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3686 +// line internal/php5/php5.y:3707 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6023,7 +6044,7 @@ yydefault: } case 280: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3697 +// line internal/php5/php5.y:3718 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6036,7 +6057,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3708 +// line internal/php5/php5.y:3729 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6049,7 +6070,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3719 +// line internal/php5/php5.y:3740 { yyVAL.node = &ast.ExprInstanceOf{ Node: ast.Node{ @@ -6062,19 +6083,19 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:3730 +// line internal/php5/php5.y:3751 { yyVAL.node = yyDollar[1].node } case 284: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:3734 +// line internal/php5/php5.y:3755 { yyVAL.node = yyDollar[1].node } case 285: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:3738 +// line internal/php5/php5.y:3759 { yyVAL.node = yyDollar[2].node @@ -6108,7 +6129,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-5 : yypt+1] -// line internal/php5/php5.y:3770 +// line internal/php5/php5.y:3791 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -6122,7 +6143,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:3782 +// line internal/php5/php5.y:3803 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -6136,13 +6157,13 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:3794 +// line internal/php5/php5.y:3815 { yyVAL.node = yyDollar[1].node } case 289: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3798 +// line internal/php5/php5.y:3819 { yyVAL.node = &ast.ExprCastInt{ast.Node{}, yyDollar[2].node} @@ -6155,7 +6176,7 @@ yydefault: } case 290: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3809 +// line internal/php5/php5.y:3830 { yyVAL.node = &ast.ExprCastDouble{ast.Node{}, yyDollar[2].node} @@ -6168,7 +6189,7 @@ yydefault: } case 291: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3820 +// line internal/php5/php5.y:3841 { yyVAL.node = &ast.ExprCastString{ast.Node{}, yyDollar[2].node} @@ -6181,7 +6202,7 @@ yydefault: } case 292: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3831 +// line internal/php5/php5.y:3852 { yyVAL.node = &ast.ExprCastArray{ast.Node{}, yyDollar[2].node} @@ -6194,7 +6215,7 @@ yydefault: } case 293: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3842 +// line internal/php5/php5.y:3863 { yyVAL.node = &ast.ExprCastObject{ast.Node{}, yyDollar[2].node} @@ -6207,7 +6228,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3853 +// line internal/php5/php5.y:3874 { yyVAL.node = &ast.ExprCastBool{ast.Node{}, yyDollar[2].node} @@ -6220,7 +6241,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3864 +// line internal/php5/php5.y:3885 { yyVAL.node = &ast.ExprCastUnset{ast.Node{}, yyDollar[2].node} @@ -6233,7 +6254,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3875 +// line internal/php5/php5.y:3896 { exit := &ast.ExprExit{ DieTkn: yyDollar[1].token, @@ -6252,7 +6273,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3892 +// line internal/php5/php5.y:3913 { yyVAL.node = &ast.ExprErrorSuppress{ Node: ast.Node{ @@ -6264,25 +6285,25 @@ yydefault: } case 298: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:3902 +// line internal/php5/php5.y:3923 { yyVAL.node = yyDollar[1].node } case 299: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:3906 +// line internal/php5/php5.y:3927 { yyVAL.node = yyDollar[1].node } case 300: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:3910 +// line internal/php5/php5.y:3931 { yyVAL.node = yyDollar[1].node } case 301: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:3914 +// line internal/php5/php5.y:3935 { yyVAL.node = &ast.ExprShellExec{ast.Node{}, yyDollar[2].list} @@ -6294,7 +6315,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3924 +// line internal/php5/php5.y:3945 { yyVAL.node = &ast.ExprPrint{ast.Node{}, yyDollar[2].node} @@ -6306,7 +6327,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:3934 +// line internal/php5/php5.y:3955 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, nil} @@ -6318,7 +6339,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-9 : yypt+1] -// line internal/php5/php5.y:3944 +// line internal/php5/php5.y:3965 { yyVAL.node = &ast.ExprClosure{ Node: ast.Node{ @@ -6337,7 +6358,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-10 : yypt+1] -// line internal/php5/php5.y:3961 +// line internal/php5/php5.y:3982 { yyVAL.node = &ast.ExprClosure{ Node: ast.Node{ @@ -6357,7 +6378,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3982 +// line internal/php5/php5.y:4003 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6369,7 +6390,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:3992 +// line internal/php5/php5.y:4013 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6381,7 +6402,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4002 +// line internal/php5/php5.y:4023 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6394,7 +6415,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4013 +// line internal/php5/php5.y:4034 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6407,7 +6428,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4027 +// line internal/php5/php5.y:4048 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6421,7 +6442,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4039 +// line internal/php5/php5.y:4060 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6435,7 +6456,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4051 +// line internal/php5/php5.y:4072 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6455,7 +6476,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4069 +// line internal/php5/php5.y:4090 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6469,7 +6490,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4084 +// line internal/php5/php5.y:4105 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6484,7 +6505,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4097 +// line internal/php5/php5.y:4118 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6498,19 +6519,19 @@ yydefault: } case 316: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4112 +// line internal/php5/php5.y:4133 { yyVAL.token = yyDollar[1].token } case 317: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:4119 +// line internal/php5/php5.y:4140 { yyVAL.ClosureUse = nil } case 318: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4123 +// line internal/php5/php5.y:4144 { yyVAL.ClosureUse = &ast.ExprClosureUse{ Node: ast.Node{ @@ -6525,7 +6546,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4139 +// line internal/php5/php5.y:4160 { variable := &ast.ExprVariable{ Node: ast.Node{ @@ -6547,7 +6568,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4159 +// line internal/php5/php5.y:4180 { reference := &ast.ExprReference{ Node: ast.Node{ @@ -6574,7 +6595,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4184 +// line internal/php5/php5.y:4205 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -6595,7 +6616,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4203 +// line internal/php5/php5.y:4224 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -6621,7 +6642,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4230 +// line internal/php5/php5.y:4251 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6640,7 +6661,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4247 +// line internal/php5/php5.y:4268 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6661,7 +6682,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4266 +// line internal/php5/php5.y:4287 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6681,7 +6702,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4284 +// line internal/php5/php5.y:4305 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6694,7 +6715,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4295 +// line internal/php5/php5.y:4316 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6707,7 +6728,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4306 +// line internal/php5/php5.y:4327 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6720,7 +6741,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4317 +// line internal/php5/php5.y:4338 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6733,7 +6754,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4328 +// line internal/php5/php5.y:4349 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6747,7 +6768,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4343 +// line internal/php5/php5.y:4364 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -6759,7 +6780,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4353 +// line internal/php5/php5.y:4374 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -6770,7 +6791,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4362 +// line internal/php5/php5.y:4383 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -6783,7 +6804,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4373 +// line internal/php5/php5.y:4394 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -6795,7 +6816,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4386 +// line internal/php5/php5.y:4407 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -6806,7 +6827,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4395 +// line internal/php5/php5.y:4416 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -6819,7 +6840,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4406 +// line internal/php5/php5.y:4427 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -6831,19 +6852,19 @@ yydefault: } case 338: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4419 +// line internal/php5/php5.y:4440 { yyVAL.node = yyDollar[1].node } case 339: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4423 +// line internal/php5/php5.y:4444 { yyVAL.node = yyDollar[1].node } case 340: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4430 +// line internal/php5/php5.y:4451 { yyVAL.node = yyDollar[1].node @@ -6884,25 +6905,25 @@ yydefault: } case 341: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4469 +// line internal/php5/php5.y:4490 { yyVAL.node = yyDollar[1].node } case 342: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4477 +// line internal/php5/php5.y:4498 { 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:4502 { yyVAL.list = []ast.Vertex{} } case 344: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4489 +// line internal/php5/php5.y:4510 { yyVAL.list = yyDollar[2].list @@ -6911,13 +6932,13 @@ yydefault: } case 345: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:4499 +// line internal/php5/php5.y:4520 { yyVAL.node = nil } case 346: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4503 +// line internal/php5/php5.y:4524 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6933,19 +6954,19 @@ yydefault: } case 347: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4517 +// line internal/php5/php5.y:4538 { yyVAL.node = yyDollar[1].node } case 348: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:4524 +// line internal/php5/php5.y:4545 { yyVAL.list = []ast.Vertex{} } case 349: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4528 +// line internal/php5/php5.y:4549 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -6959,25 +6980,25 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4540 +// line internal/php5/php5.y:4561 { yyVAL.list = yyDollar[1].list } case 351: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:4547 +// line internal/php5/php5.y:4568 { yyVAL.node = nil } case 352: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4551 +// line internal/php5/php5.y:4572 { yyVAL.node = yyDollar[1].node } case 353: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4558 +// line internal/php5/php5.y:4579 { yyVAL.node = &ast.ScalarLnumber{ Node: ast.Node{ @@ -6989,7 +7010,7 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4568 +// line internal/php5/php5.y:4589 { yyVAL.node = &ast.ScalarDnumber{ Node: ast.Node{ @@ -7001,7 +7022,7 @@ yydefault: } case 355: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4578 +// line internal/php5/php5.y:4599 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -7013,7 +7034,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4588 +// line internal/php5/php5.y:4609 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7025,7 +7046,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4598 +// line internal/php5/php5.y:4619 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7037,7 +7058,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4608 +// line internal/php5/php5.y:4629 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7049,7 +7070,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4618 +// line internal/php5/php5.y:4639 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7061,7 +7082,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4628 +// line internal/php5/php5.y:4649 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7073,7 +7094,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4638 +// line internal/php5/php5.y:4659 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7085,7 +7106,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4648 +// line internal/php5/php5.y:4669 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7097,7 +7118,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4658 +// line internal/php5/php5.y:4679 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -7118,7 +7139,7 @@ yydefault: } case 364: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4677 +// line internal/php5/php5.y:4698 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -7130,7 +7151,7 @@ yydefault: } case 365: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4690 +// line internal/php5/php5.y:4711 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -7149,25 +7170,25 @@ yydefault: } case 366: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4710 +// line internal/php5/php5.y:4731 { yyVAL.node = yyDollar[1].node } case 367: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4717 +// line internal/php5/php5.y:4738 { yyVAL.node = yyDollar[1].node } case 368: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4721 +// line internal/php5/php5.y:4742 { yyVAL.node = yyDollar[1].node } case 369: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4725 +// line internal/php5/php5.y:4746 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7183,7 +7204,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4739 +// line internal/php5/php5.y:4760 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7201,7 +7222,7 @@ yydefault: } case 371: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4755 +// line internal/php5/php5.y:4776 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7218,7 +7239,7 @@ yydefault: } case 372: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4770 +// line internal/php5/php5.y:4791 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -7233,7 +7254,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4783 +// line internal/php5/php5.y:4804 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -7247,13 +7268,13 @@ yydefault: } case 374: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4795 +// line internal/php5/php5.y:4816 { yyVAL.node = yyDollar[1].node } case 375: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4799 +// line internal/php5/php5.y:4820 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7265,13 +7286,13 @@ yydefault: } case 376: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:4809 +// line internal/php5/php5.y:4830 { yyVAL.node = yyDollar[1].node } case 377: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:4816 +// line internal/php5/php5.y:4837 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7285,7 +7306,7 @@ yydefault: } case 378: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4828 +// line internal/php5/php5.y:4849 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7298,7 +7319,7 @@ yydefault: } case 379: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4839 +// line internal/php5/php5.y:4860 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7311,7 +7332,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4850 +// line internal/php5/php5.y:4871 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7324,7 +7345,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4861 +// line internal/php5/php5.y:4882 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7337,7 +7358,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4872 +// line internal/php5/php5.y:4893 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7350,7 +7371,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4883 +// line internal/php5/php5.y:4904 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7363,7 +7384,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4894 +// line internal/php5/php5.y:4915 { yyVAL.node = &ast.ExprBooleanNot{ Node: ast.Node{ @@ -7375,7 +7396,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:4904 +// line internal/php5/php5.y:4925 { yyVAL.node = &ast.ExprBitwiseNot{ Node: ast.Node{ @@ -7387,7 +7408,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4914 +// line internal/php5/php5.y:4935 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7400,7 +7421,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4925 +// line internal/php5/php5.y:4946 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7413,7 +7434,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4936 +// line internal/php5/php5.y:4957 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7426,7 +7447,7 @@ yydefault: } case 389: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4947 +// line internal/php5/php5.y:4968 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7439,7 +7460,7 @@ yydefault: } case 390: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4958 +// line internal/php5/php5.y:4979 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7452,7 +7473,7 @@ yydefault: } case 391: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4969 +// line internal/php5/php5.y:4990 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7465,7 +7486,7 @@ yydefault: } case 392: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4980 +// line internal/php5/php5.y:5001 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7478,7 +7499,7 @@ yydefault: } case 393: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:4991 +// line internal/php5/php5.y:5012 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7491,7 +7512,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5002 +// line internal/php5/php5.y:5023 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7504,7 +7525,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5013 +// line internal/php5/php5.y:5034 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7517,7 +7538,7 @@ yydefault: } case 396: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5024 +// line internal/php5/php5.y:5045 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7530,7 +7551,7 @@ yydefault: } case 397: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5035 +// line internal/php5/php5.y:5056 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7543,7 +7564,7 @@ yydefault: } case 398: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5046 +// line internal/php5/php5.y:5067 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7556,7 +7577,7 @@ yydefault: } case 399: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5057 +// line internal/php5/php5.y:5078 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7569,7 +7590,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5068 +// line internal/php5/php5.y:5089 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7583,7 +7604,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5080 +// line internal/php5/php5.y:5101 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7596,7 +7617,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5091 +// line internal/php5/php5.y:5112 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7609,7 +7630,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5102 +// line internal/php5/php5.y:5123 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7622,7 +7643,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5113 +// line internal/php5/php5.y:5134 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7635,7 +7656,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5124 +// line internal/php5/php5.y:5145 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -7649,7 +7670,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-5 : yypt+1] -// line internal/php5/php5.y:5136 +// line internal/php5/php5.y:5157 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -7663,7 +7684,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5148 +// line internal/php5/php5.y:5169 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -7675,7 +7696,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5158 +// line internal/php5/php5.y:5179 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -7687,7 +7708,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5168 +// line internal/php5/php5.y:5189 { yyVAL.node = yyDollar[2].node @@ -7697,13 +7718,13 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5179 +// line internal/php5/php5.y:5200 { yyVAL.node = yyDollar[1].node } case 411: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5183 +// line internal/php5/php5.y:5204 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7719,7 +7740,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5197 +// line internal/php5/php5.y:5218 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7737,7 +7758,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5213 +// line internal/php5/php5.y:5234 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -7754,7 +7775,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5231 +// line internal/php5/php5.y:5252 { name := &ast.Identifier{ Node: ast.Node{ @@ -7773,25 +7794,25 @@ yydefault: } case 415: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5248 +// line internal/php5/php5.y:5269 { yyVAL.node = yyDollar[1].node } case 416: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5252 +// line internal/php5/php5.y:5273 { yyVAL.node = yyDollar[1].node } case 417: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5256 +// line internal/php5/php5.y:5277 { yyVAL.node = yyDollar[1].node } case 418: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5260 +// line internal/php5/php5.y:5281 { yyVAL.node = &ast.ScalarEncapsed{ Node: ast.Node{ @@ -7804,7 +7825,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5271 +// line internal/php5/php5.y:5292 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -7817,7 +7838,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5282 +// line internal/php5/php5.y:5303 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -7829,13 +7850,13 @@ yydefault: } case 421: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:5295 +// line internal/php5/php5.y:5316 { yyVAL.node = &ast.ParserSeparatedList{} } case 422: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5299 +// line internal/php5/php5.y:5320 { if yyDollar[2].token != nil { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) @@ -7846,19 +7867,19 @@ yydefault: } case 423: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:5311 +// line internal/php5/php5.y:5332 { yyVAL.token = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5315 +// line internal/php5/php5.y:5336 { yyVAL.token = yyDollar[1].token } case 425: yyDollar = yyS[yypt-5 : yypt+1] -// line internal/php5/php5.y:5322 +// line internal/php5/php5.y:5343 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -7876,7 +7897,7 @@ yydefault: } case 426: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5338 +// line internal/php5/php5.y:5359 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -7892,7 +7913,7 @@ yydefault: } case 427: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5352 +// line internal/php5/php5.y:5373 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -7909,7 +7930,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5367 +// line internal/php5/php5.y:5388 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -7924,19 +7945,19 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5383 +// line internal/php5/php5.y:5404 { yyVAL.node = yyDollar[1].node } case 430: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5387 +// line internal/php5/php5.y:5408 { yyVAL.node = yyDollar[1].node } case 431: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5394 +// line internal/php5/php5.y:5415 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7953,7 +7974,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5409 +// line internal/php5/php5.y:5430 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7970,25 +7991,25 @@ yydefault: } case 433: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5428 +// line internal/php5/php5.y:5449 { yyVAL.node = yyDollar[1].node } case 434: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5436 +// line internal/php5/php5.y:5457 { yyVAL.node = yyDollar[1].node } case 435: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5443 +// line internal/php5/php5.y:5464 { yyVAL.node = yyDollar[1].node } case 436: yyDollar = yyS[yypt-5 : yypt+1] -// line internal/php5/php5.y:5450 +// line internal/php5/php5.y:5471 { yyVAL.node = yyDollar[1].node @@ -8066,25 +8087,25 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5526 +// line internal/php5/php5.y:5547 { yyVAL.node = yyDollar[1].node } case 438: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5533 +// line internal/php5/php5.y:5554 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 439: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:5537 +// line internal/php5/php5.y:5558 { yyVAL.list = []ast.Vertex{} } case 440: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5545 +// line internal/php5/php5.y:5566 { println("FOOFOOFOOFOOFOOFOOFOOFOOFOO") yyDollar[2].list[0].(*ast.ExprPropertyFetch).ObjectOperatorTkn = yyDollar[1].token @@ -8115,7 +8136,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5576 +// line internal/php5/php5.y:5597 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8131,7 +8152,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5590 +// line internal/php5/php5.y:5611 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8147,7 +8168,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5607 +// line internal/php5/php5.y:5628 { yyVAL.node = &ast.ExprMethodCall{ Node: ast.Node{ @@ -8160,31 +8181,31 @@ yydefault: } case 444: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5621 +// line internal/php5/php5.y:5642 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 445: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5625 +// line internal/php5/php5.y:5646 { yyVAL.list = yyDollar[1].list } case 446: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:5629 +// line internal/php5/php5.y:5650 { yyVAL.list = nil } case 447: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5636 +// line internal/php5/php5.y:5657 { yyVAL.node = yyDollar[1].node } case 448: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5640 +// line internal/php5/php5.y:5661 { yyDollar[1].simpleIndirectReference.last.VarName = yyDollar[2].node @@ -8196,7 +8217,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5653 +// line internal/php5/php5.y:5674 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8209,7 +8230,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5664 +// line internal/php5/php5.y:5685 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8222,13 +8243,13 @@ yydefault: } case 451: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5678 +// line internal/php5/php5.y:5699 { yyVAL.node = yyDollar[1].node } case 452: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5685 +// line internal/php5/php5.y:5706 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8242,7 +8263,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5697 +// line internal/php5/php5.y:5718 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8256,31 +8277,31 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5712 +// line internal/php5/php5.y:5733 { yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5716 +// line internal/php5/php5.y:5737 { yyVAL.node = yyDollar[1].node } case 456: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5720 +// line internal/php5/php5.y:5741 { yyVAL.node = yyDollar[1].node } case 457: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5728 +// line internal/php5/php5.y:5749 { yyVAL.node = yyDollar[1].node } case 458: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5732 +// line internal/php5/php5.y:5753 { yyDollar[1].simpleIndirectReference.last.VarName = yyDollar[2].node @@ -8292,13 +8313,13 @@ yydefault: } case 459: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5742 +// line internal/php5/php5.y:5763 { yyVAL.node = yyDollar[1].node } case 460: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5749 +// line internal/php5/php5.y:5770 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8312,7 +8333,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5761 +// line internal/php5/php5.y:5782 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8326,13 +8347,13 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5773 +// line internal/php5/php5.y:5794 { yyVAL.node = yyDollar[1].node } case 463: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5781 +// line internal/php5/php5.y:5802 { name := &ast.Identifier{ Node: ast.Node{ @@ -8351,7 +8372,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5798 +// line internal/php5/php5.y:5819 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -8365,25 +8386,25 @@ yydefault: } case 465: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:5813 +// line internal/php5/php5.y:5834 { yyVAL.node = nil } case 466: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5817 +// line internal/php5/php5.y:5838 { yyVAL.node = yyDollar[1].node } case 467: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5825 +// line internal/php5/php5.y:5846 { yyVAL.list = yyDollar[1].list } case 468: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5829 +// line internal/php5/php5.y:5850 { yyVAL.list = []ast.Vertex{ &ast.ExprPropertyFetch{ @@ -8396,7 +8417,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5843 +// line internal/php5/php5.y:5864 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8412,7 +8433,7 @@ yydefault: } case 470: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5857 +// line internal/php5/php5.y:5878 { fetch := &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8428,7 +8449,7 @@ yydefault: } case 471: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5871 +// line internal/php5/php5.y:5892 { yyVAL.list = []ast.Vertex{ &ast.ExprPropertyFetch{ @@ -8441,7 +8462,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5885 +// line internal/php5/php5.y:5906 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -8453,7 +8474,7 @@ yydefault: } case 473: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5895 +// line internal/php5/php5.y:5916 { yyVAL.node = yyDollar[2].node @@ -8466,7 +8487,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5909 +// line internal/php5/php5.y:5930 { n := &ast.ExprVariable{ast.Node{}, nil} yyVAL.simpleIndirectReference = simpleIndirectReference{[]*ast.ExprVariable{n}, n} @@ -8479,7 +8500,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:5920 +// line internal/php5/php5.y:5941 { n := &ast.ExprVariable{ast.Node{}, nil} @@ -8496,7 +8517,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:5938 +// line internal/php5/php5.y:5959 { 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) @@ -8505,7 +8526,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5945 +// line internal/php5/php5.y:5966 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -8513,7 +8534,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:5955 +// line internal/php5/php5.y:5976 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -8524,7 +8545,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:5964 +// line internal/php5/php5.y:5985 { pairList := yyDollar[3].node.(*ast.ParserSeparatedList) fistPair := pairList.Items[0].(*ast.ExprArrayItem) @@ -8551,19 +8572,19 @@ yydefault: } case 480: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:5989 +// line internal/php5/php5.y:6010 { yyVAL.node = &ast.ExprArrayItem{} } case 481: yyDollar = yyS[yypt-0 : yypt+1] -// line internal/php5/php5.y:5997 +// line internal/php5/php5.y:6018 { yyVAL.node = &ast.ParserSeparatedList{} } case 482: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:6001 +// line internal/php5/php5.y:6022 { if yyDollar[2].token != nil { yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[1].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[2].token) @@ -8574,7 +8595,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-5 : yypt+1] -// line internal/php5/php5.y:6013 +// line internal/php5/php5.y:6034 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8592,7 +8613,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6029 +// line internal/php5/php5.y:6050 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8608,7 +8629,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6043 +// line internal/php5/php5.y:6064 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8625,7 +8646,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6058 +// line internal/php5/php5.y:6079 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8640,7 +8661,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-6 : yypt+1] -// line internal/php5/php5.y:6071 +// line internal/php5/php5.y:6092 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8663,7 +8684,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:6092 +// line internal/php5/php5.y:6113 { arrayItem := &ast.ExprArrayItem{ Node: ast.Node{ @@ -8684,7 +8705,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:6111 +// line internal/php5/php5.y:6132 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8706,7 +8727,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:6131 +// line internal/php5/php5.y:6152 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{ @@ -8726,13 +8747,13 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:6152 +// line internal/php5/php5.y:6173 { 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:6177 { yyVAL.list = append( yyDollar[1].list, @@ -8747,13 +8768,13 @@ yydefault: } case 493: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6169 +// line internal/php5/php5.y:6190 { 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:6194 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -8768,7 +8789,7 @@ yydefault: } case 495: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6189 +// line internal/php5/php5.y:6210 { name := &ast.Identifier{ Node: ast.Node{ @@ -8787,7 +8808,7 @@ yydefault: } case 496: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:6206 +// line internal/php5/php5.y:6227 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8812,7 +8833,7 @@ yydefault: } case 497: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6229 +// line internal/php5/php5.y:6250 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -8842,7 +8863,7 @@ yydefault: } case 498: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6257 +// line internal/php5/php5.y:6278 { variable := &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -8857,7 +8878,7 @@ yydefault: } case 499: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6270 +// line internal/php5/php5.y:6291 { name := &ast.Identifier{ Node: ast.Node{ @@ -8879,7 +8900,7 @@ yydefault: } case 500: yyDollar = yyS[yypt-6 : yypt+1] -// line internal/php5/php5.y:6290 +// line internal/php5/php5.y:6311 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -8906,7 +8927,7 @@ yydefault: } case 501: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6315 +// line internal/php5/php5.y:6336 { yyVAL.node = yyDollar[2].node @@ -8916,7 +8937,7 @@ yydefault: } case 502: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6326 +// line internal/php5/php5.y:6347 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -8928,7 +8949,7 @@ yydefault: } case 503: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6336 +// line internal/php5/php5.y:6357 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -8957,7 +8978,7 @@ yydefault: } case 504: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6363 +// line internal/php5/php5.y:6384 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -8976,7 +8997,7 @@ yydefault: } case 505: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:6383 +// line internal/php5/php5.y:6404 { yyVAL.node = &ast.ExprIsset{ Node: ast.Node{ @@ -8991,7 +9012,7 @@ yydefault: } case 506: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:6396 +// line internal/php5/php5.y:6417 { yyVAL.node = &ast.ExprEmpty{ Node: ast.Node{ @@ -9005,7 +9026,7 @@ yydefault: } case 507: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:6408 +// line internal/php5/php5.y:6429 { yyVAL.node = &ast.ExprEmpty{ Node: ast.Node{ @@ -9019,7 +9040,7 @@ yydefault: } case 508: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:6420 +// line internal/php5/php5.y:6441 { yyVAL.node = &ast.ExprInclude{ Node: ast.Node{ @@ -9031,7 +9052,7 @@ yydefault: } case 509: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:6430 +// line internal/php5/php5.y:6451 { yyVAL.node = &ast.ExprIncludeOnce{ Node: ast.Node{ @@ -9043,7 +9064,7 @@ yydefault: } case 510: yyDollar = yyS[yypt-4 : yypt+1] -// line internal/php5/php5.y:6440 +// line internal/php5/php5.y:6461 { yyVAL.node = &ast.ExprEval{ Node: ast.Node{ @@ -9057,7 +9078,7 @@ yydefault: } case 511: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:6452 +// line internal/php5/php5.y:6473 { yyVAL.node = &ast.ExprRequire{ast.Node{}, yyDollar[2].node} @@ -9069,7 +9090,7 @@ yydefault: } case 512: yyDollar = yyS[yypt-2 : yypt+1] -// line internal/php5/php5.y:6462 +// line internal/php5/php5.y:6483 { yyVAL.node = &ast.ExprRequireOnce{ast.Node{}, yyDollar[2].node} @@ -9081,7 +9102,7 @@ yydefault: } case 513: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6475 +// line internal/php5/php5.y:6496 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -9089,7 +9110,7 @@ yydefault: } case 514: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6481 +// line internal/php5/php5.y:6502 { 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) @@ -9098,19 +9119,19 @@ yydefault: } case 515: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6491 +// line internal/php5/php5.y:6512 { yyVAL.node = yyDollar[1].node } case 516: yyDollar = yyS[yypt-1 : yypt+1] -// line internal/php5/php5.y:6495 +// line internal/php5/php5.y:6516 { yyVAL.node = yyDollar[1].node } case 517: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6502 +// line internal/php5/php5.y:6523 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -9129,7 +9150,7 @@ yydefault: } case 518: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6519 +// line internal/php5/php5.y:6540 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -9148,7 +9169,7 @@ yydefault: } case 519: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6539 +// line internal/php5/php5.y:6560 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -9167,7 +9188,7 @@ yydefault: } case 520: yyDollar = yyS[yypt-3 : yypt+1] -// line internal/php5/php5.y:6559 +// line internal/php5/php5.y:6580 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ diff --git a/internal/php5/php5.y b/internal/php5/php5.y index 1502664..bcdf386 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -3123,17 +3123,25 @@ instance_call: new_expr: T_NEW class_name_reference ctor_arguments { - if $3 != nil { - $$ = &ast.ExprNew{ast.Node{}, $2, $3.(*ast.ArgumentList)} - $$.GetNode().Position = position.NewTokenNodePosition($1, $3) + $$ = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $3), + }, + NewTkn: $1, + Class: $2, + OpenParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, + Arguments: $3.(*ast.ArgumentList).Arguments, + CloseParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, + } } else { - $$ = &ast.ExprNew{ast.Node{}, $2, nil} - $$.GetNode().Position = position.NewTokenNodePosition($1, $2) + $$ = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $2), + }, + Class: $2, + } } - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) } ; @@ -3195,12 +3203,27 @@ expr_without_variable: | variable '=' '&' T_NEW class_name_reference ctor_arguments { var _new *ast.ExprNew - - if $6 != nil { - _new = &ast.ExprNew{ast.Node{}, $5, $6.(*ast.ArgumentList)} + if $3 != nil { + _new = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($4, $6), + }, + NewTkn: $4, + Class: $5, + OpenParenthesisTkn: $6.(*ast.ArgumentList).OpenParenthesisTkn, + Arguments: $6.(*ast.ArgumentList).Arguments, + CloseParenthesisTkn: $6.(*ast.ArgumentList).OpenParenthesisTkn, + } } else { - _new = &ast.ExprNew{ast.Node{}, $5, nil} + _new = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($4, $5), + }, + NewTkn: $4, + Class: $5, + } } + $$ = &ast.ExprAssignReference{ast.Node{}, $1, _new} // save position @@ -3360,45 +3383,43 @@ expr_without_variable: } | rw_variable T_INC { - $$ = &ast.ExprPostInc{ast.Node{}, $1} - - // save position - $$.GetNode().Position = position.NewNodeTokenPosition($1, $2) - - // save comments - yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.SkippedTokens) + $$ = &ast.ExprPostInc{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition($1, $2), + }, + Var: $1, + IncTkn: $2, + } } | T_INC rw_variable { - $$ = &ast.ExprPreInc{ast.Node{}, $2} - - // save position - $$.GetNode().Position = position.NewTokenNodePosition($1, $2) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) + $$ = &ast.ExprPreInc{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $2), + }, + IncTkn: $1, + Var: $2, + } } | rw_variable T_DEC { - $$ = &ast.ExprPostDec{ast.Node{}, $1} - - // save position - $$.GetNode().Position = position.NewNodeTokenPosition($1, $2) - - // save comments - yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.SkippedTokens) + $$ = &ast.ExprPostDec{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition($1, $2), + }, + Var: $1, + DecTkn: $2, + } } | T_DEC rw_variable { - $$ = &ast.ExprPreDec{ast.Node{}, $2} - - // save position - $$.GetNode().Position = position.NewTokenNodePosition($1, $2) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) + $$ = &ast.ExprPreDec{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $2), + }, + DecTkn: $1, + Var: $2, + } } | expr T_BOOLEAN_OR expr { diff --git a/internal/php7/php7.go b/internal/php7/php7.go index 3979201..cfb8eb3 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:5000 +// line internal/php7/php7.y:5008 // 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{ast.Node{}, yyDollar[1].list} @@ -2121,469 +2121,469 @@ yydefault: } case 2: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 3: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 4: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 5: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 6: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 7: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 8: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 9: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:301 +// line internal/php7/php7.y:301 { yyVAL.token = yyDollar[1].token } case 10: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 11: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 12: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 13: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 14: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 15: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 16: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 17: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 18: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 19: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 20: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 21: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:302 +// line internal/php7/php7.y:302 { yyVAL.token = yyDollar[1].token } case 22: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 23: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 24: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 25: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 26: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 27: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 28: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 29: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 30: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 31: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:303 +// line internal/php7/php7.y:303 { yyVAL.token = yyDollar[1].token } case 32: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 33: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 34: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 35: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 36: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 37: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 38: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 39: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 40: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 41: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:304 +// line internal/php7/php7.y:304 { yyVAL.token = yyDollar[1].token } case 42: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 43: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 44: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 45: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 46: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 47: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 48: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 49: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 50: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 51: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 52: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:305 +// line internal/php7/php7.y:305 { yyVAL.token = yyDollar[1].token } case 53: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 54: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 55: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 56: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 57: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 58: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 59: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 60: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:306 +// line internal/php7/php7.y:306 { yyVAL.token = yyDollar[1].token } case 61: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 62: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 63: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 64: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 65: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 66: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 67: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 68: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 69: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 70: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 71: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:315 +// line internal/php7/php7.y:315 { yyVAL.token = yyDollar[1].token } case 72: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:315 +// line internal/php7/php7.y:315 { yyVAL.token = yyDollar[1].token } case 73: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:315 +// line internal/php7/php7.y:315 { yyVAL.token = yyDollar[1].token } case 74: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:315 +// line internal/php7/php7.y:315 { yyVAL.token = yyDollar[1].token } case 75: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:315 +// line internal/php7/php7.y:315 { yyVAL.token = yyDollar[1].token } case 76: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:315 +// line internal/php7/php7.y:315 { yyVAL.token = yyDollar[1].token } case 77: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:320 +// line internal/php7/php7.y:320 { yyVAL.token = yyDollar[1].token } case 78: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:324 +// line internal/php7/php7.y:324 { yyVAL.token = yyDollar[1].token } case 79: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:331 +// line internal/php7/php7.y:331 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -2596,13 +2596,13 @@ yydefault: } case 80: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:342 +// line internal/php7/php7.y:342 { yyVAL.list = []ast.Vertex{} } case 81: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:349 +// line internal/php7/php7.y:349 { yyVAL.list = []ast.Vertex{ &ast.NameNamePart{ @@ -2616,7 +2616,7 @@ yydefault: } case 82: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:361 +// line internal/php7/php7.y:361 { yyVAL.list = append(yyDollar[1].list, &ast.NameNamePart{ Node: ast.Node{ @@ -2629,7 +2629,7 @@ yydefault: } case 83: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:375 +// line internal/php7/php7.y:375 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -2640,7 +2640,7 @@ yydefault: } case 84: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:384 +// line internal/php7/php7.y:384 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -2653,7 +2653,7 @@ yydefault: } case 85: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:395 +// line internal/php7/php7.y:395 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -2665,44 +2665,44 @@ yydefault: } case 86: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:408 +// line internal/php7/php7.y:408 { // error yyVAL.node = nil } case 87: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:413 +// line internal/php7/php7.y:413 { yyVAL.node = yyDollar[1].node } case 88: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:417 +// line internal/php7/php7.y:417 { yyVAL.node = yyDollar[1].node } case 89: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:421 +// line internal/php7/php7.y:421 { yyVAL.node = yyDollar[1].node } case 90: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:425 +// line internal/php7/php7.y:425 { yyVAL.node = yyDollar[1].node } case 91: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:429 +// line internal/php7/php7.y:429 { yyVAL.node = yyDollar[1].node } case 92: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:433 +// line internal/php7/php7.y:433 { yyVAL.node = &ast.StmtHaltCompiler{ Node: ast.Node{ @@ -2716,7 +2716,7 @@ yydefault: } case 93: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:445 +// line internal/php7/php7.y:445 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2734,7 +2734,7 @@ yydefault: } case 94: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:461 +// line internal/php7/php7.y:461 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2754,7 +2754,7 @@ yydefault: } case 95: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:479 +// line internal/php7/php7.y:479 { yyVAL.node = &ast.StmtNamespace{ Node: ast.Node{ @@ -2768,7 +2768,7 @@ yydefault: } case 96: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:491 +// line internal/php7/php7.y:491 { use := yyDollar[2].node.(*ast.StmtGroupUse) @@ -2780,7 +2780,7 @@ yydefault: } case 97: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:501 +// line internal/php7/php7.y:501 { use := yyDollar[3].node.(*ast.StmtGroupUse) @@ -2793,7 +2793,7 @@ yydefault: } case 98: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:512 +// line internal/php7/php7.y:512 { yyVAL.node = &ast.StmtUse{ Node: ast.Node{ @@ -2806,7 +2806,7 @@ yydefault: } case 99: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:523 +// line internal/php7/php7.y:523 { yyVAL.node = &ast.StmtUse{ Node: ast.Node{ @@ -2820,7 +2820,7 @@ yydefault: } case 100: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:535 +// line internal/php7/php7.y:535 { yyVAL.node = &ast.StmtConstList{ Node: ast.Node{ @@ -2834,7 +2834,7 @@ yydefault: } case 101: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:550 +// line internal/php7/php7.y:550 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -2846,7 +2846,7 @@ yydefault: } case 102: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:560 +// line internal/php7/php7.y:560 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -2858,7 +2858,7 @@ yydefault: } case 103: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:573 +// line internal/php7/php7.y:573 { if len(yyDollar[4].list) > 0 { yyDollar[4].list[len(yyDollar[4].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[5].token @@ -2882,7 +2882,7 @@ yydefault: } case 104: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:595 +// line internal/php7/php7.y:595 { yyDollar[5].list[len(yyDollar[5].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[6].token @@ -2905,7 +2905,7 @@ yydefault: } case 105: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:619 +// line internal/php7/php7.y:619 { yyDollar[4].list[len(yyDollar[4].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[5].token @@ -2927,7 +2927,7 @@ yydefault: } case 106: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:639 +// line internal/php7/php7.y:639 { yyDollar[5].list[len(yyDollar[5].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[6].token @@ -2950,19 +2950,19 @@ yydefault: } case 107: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:663 +// line internal/php7/php7.y:663 { yyVAL.token = nil } case 108: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:667 +// line internal/php7/php7.y:667 { yyVAL.token = yyDollar[1].token } case 109: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:674 +// line internal/php7/php7.y:674 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2970,13 +2970,13 @@ yydefault: } case 110: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:680 +// line internal/php7/php7.y:680 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 111: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:687 +// line internal/php7/php7.y:687 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2984,13 +2984,13 @@ yydefault: } case 112: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:693 +// line internal/php7/php7.y:693 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 113: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:700 +// line internal/php7/php7.y:700 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2998,19 +2998,19 @@ yydefault: } case 114: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:706 +// line internal/php7/php7.y:706 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 115: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:713 +// line internal/php7/php7.y:713 { yyVAL.node = yyDollar[1].node } case 116: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:717 +// line internal/php7/php7.y:717 { decl := yyDollar[2].node.(*ast.StmtUseDeclaration) decl.Type = yyDollar[1].node @@ -3020,7 +3020,7 @@ yydefault: } case 117: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:728 +// line internal/php7/php7.y:728 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -3036,7 +3036,7 @@ yydefault: } case 118: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:742 +// line internal/php7/php7.y:742 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -3060,13 +3060,13 @@ yydefault: } case 119: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:767 +// line internal/php7/php7.y:767 { yyVAL.node = yyDollar[1].node } case 120: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:771 +// line internal/php7/php7.y:771 { decl := yyDollar[2].node.(*ast.StmtUseDeclaration) decl.NsSeparatorTkn = yyDollar[1].token @@ -3076,7 +3076,7 @@ yydefault: } case 121: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:782 +// line internal/php7/php7.y:782 { 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) @@ -3085,7 +3085,7 @@ yydefault: } case 122: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:789 +// line internal/php7/php7.y:789 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -3093,7 +3093,7 @@ yydefault: } case 123: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:798 +// line internal/php7/php7.y:798 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -3106,50 +3106,50 @@ yydefault: } case 124: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:809 +// line internal/php7/php7.y:809 { yyVAL.list = []ast.Vertex{} } case 125: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:816 +// line internal/php7/php7.y:816 { // error yyVAL.node = nil } case 126: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:821 +// line internal/php7/php7.y:821 { yyVAL.node = yyDollar[1].node } case 127: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:825 +// line internal/php7/php7.y:825 { yyVAL.node = yyDollar[1].node } case 128: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:829 +// line internal/php7/php7.y:829 { yyVAL.node = yyDollar[1].node } case 129: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:833 +// line internal/php7/php7.y:833 { yyVAL.node = yyDollar[1].node } case 130: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:837 +// line internal/php7/php7.y:837 { yyVAL.node = yyDollar[1].node } case 131: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:841 +// line internal/php7/php7.y:841 { yyVAL.node = &ast.StmtHaltCompiler{ Node: ast.Node{ @@ -3163,7 +3163,7 @@ yydefault: } case 132: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:855 +// line internal/php7/php7.y:855 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -3176,19 +3176,19 @@ yydefault: } case 133: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:866 +// line internal/php7/php7.y:866 { yyVAL.node = yyDollar[1].node } case 134: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:870 +// line internal/php7/php7.y:870 { yyVAL.node = yyDollar[1].node } case 135: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:874 +// line internal/php7/php7.y:874 { yyDollar[5].node.(*ast.StmtWhile).WhileTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtWhile).OpenParenthesisTkn = yyDollar[2].token @@ -3200,7 +3200,7 @@ yydefault: } case 136: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:884 +// line internal/php7/php7.y:884 { yyVAL.node = &ast.StmtDo{ Node: ast.Node{ @@ -3217,7 +3217,7 @@ yydefault: } case 137: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:899 +// line internal/php7/php7.y:899 { yyDollar[9].node.(*ast.StmtFor).ForTkn = yyDollar[1].token yyDollar[9].node.(*ast.StmtFor).OpenParenthesisTkn = yyDollar[2].token @@ -3233,7 +3233,7 @@ yydefault: } case 138: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:913 +// line internal/php7/php7.y:913 { yyDollar[5].node.(*ast.StmtSwitch).SwitchTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtSwitch).OpenParenthesisTkn = yyDollar[2].token @@ -3245,7 +3245,7 @@ yydefault: } case 139: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:923 +// line internal/php7/php7.y:923 { yyVAL.node = &ast.StmtBreak{ Node: ast.Node{ @@ -3258,7 +3258,7 @@ yydefault: } case 140: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:934 +// line internal/php7/php7.y:934 { yyVAL.node = &ast.StmtContinue{ Node: ast.Node{ @@ -3271,7 +3271,7 @@ yydefault: } case 141: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:945 +// line internal/php7/php7.y:945 { yyVAL.node = &ast.StmtReturn{ Node: ast.Node{ @@ -3284,7 +3284,7 @@ yydefault: } case 142: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:956 +// line internal/php7/php7.y:956 { yyDollar[2].node.(*ast.StmtGlobal).GlobalTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtGlobal).SemiColonTkn = yyDollar[3].token @@ -3294,7 +3294,7 @@ yydefault: } case 143: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:964 +// line internal/php7/php7.y:964 { yyDollar[2].node.(*ast.StmtStatic).StaticTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtStatic).SemiColonTkn = yyDollar[3].token @@ -3304,7 +3304,7 @@ yydefault: } case 144: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:972 +// line internal/php7/php7.y:972 { yyDollar[2].node.(*ast.StmtEcho).EchoTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtEcho).SemiColonTkn = yyDollar[3].token @@ -3314,7 +3314,7 @@ yydefault: } case 145: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:980 +// line internal/php7/php7.y:980 { yyVAL.node = &ast.StmtInlineHtml{ Node: ast.Node{ @@ -3326,7 +3326,7 @@ yydefault: } case 146: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:990 +// line internal/php7/php7.y:990 { yyVAL.node = &ast.StmtExpression{ Node: ast.Node{ @@ -3338,7 +3338,7 @@ yydefault: } case 147: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1000 +// line internal/php7/php7.y:1000 { yyDollar[3].node.(*ast.StmtUnset).UnsetTkn = yyDollar[1].token yyDollar[3].node.(*ast.StmtUnset).OpenParenthesisTkn = yyDollar[2].token @@ -3351,7 +3351,7 @@ yydefault: } case 148: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1011 +// line internal/php7/php7.y:1011 { yyDollar[7].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[7].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3365,7 +3365,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1023 +// line internal/php7/php7.y:1023 { yyDollar[9].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[9].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3381,7 +3381,7 @@ yydefault: } case 150: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1037 +// line internal/php7/php7.y:1037 { yyDollar[5].node.(*ast.StmtDeclare).DeclareTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtDeclare).OpenParenthesisTkn = yyDollar[2].token @@ -3394,7 +3394,7 @@ yydefault: } case 151: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1048 +// line internal/php7/php7.y:1048 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -3405,7 +3405,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1057 +// line internal/php7/php7.y:1057 { yyVAL.node = &ast.StmtTry{ TryTkn: yyDollar[1].token, @@ -3424,7 +3424,7 @@ yydefault: } case 153: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1074 +// line internal/php7/php7.y:1074 { yyVAL.node = &ast.StmtThrow{ Node: ast.Node{ @@ -3437,7 +3437,7 @@ yydefault: } case 154: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1085 +// line internal/php7/php7.y:1085 { yyVAL.node = &ast.StmtGoto{ Node: ast.Node{ @@ -3456,7 +3456,7 @@ yydefault: } case 155: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1102 +// line internal/php7/php7.y:1102 { yyVAL.node = &ast.StmtLabel{ Node: ast.Node{ @@ -3474,13 +3474,13 @@ yydefault: } case 156: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1120 +// line internal/php7/php7.y:1120 { yyVAL.list = []ast.Vertex{} } case 157: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1124 +// line internal/php7/php7.y:1124 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -3511,7 +3511,7 @@ yydefault: } case 158: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1155 +// line internal/php7/php7.y:1155 { yyVAL.node = &ast.StmtCatch{ Types: []ast.Vertex{yyDollar[1].node}, @@ -3519,7 +3519,7 @@ yydefault: } case 159: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1161 +// line internal/php7/php7.y:1161 { 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) @@ -3528,13 +3528,13 @@ yydefault: } case 160: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1171 +// line internal/php7/php7.y:1171 { yyVAL.node = nil } case 161: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1175 +// line internal/php7/php7.y:1175 { yyVAL.node = &ast.StmtFinally{ Node: ast.Node{ @@ -3548,7 +3548,7 @@ yydefault: } case 162: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1190 +// line internal/php7/php7.y:1190 { yyVAL.node = &ast.StmtUnset{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -3556,7 +3556,7 @@ yydefault: } case 163: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1196 +// line internal/php7/php7.y:1196 { 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) @@ -3565,13 +3565,13 @@ yydefault: } case 164: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1206 +// line internal/php7/php7.y:1206 { yyVAL.node = yyDollar[1].node } case 165: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:1213 +// line internal/php7/php7.y:1213 { yyVAL.node = &ast.StmtFunction{ Node: ast.Node{ @@ -3598,31 +3598,31 @@ yydefault: } case 166: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1241 +// line internal/php7/php7.y:1241 { yyVAL.token = nil } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1245 +// line internal/php7/php7.y:1245 { yyVAL.token = yyDollar[1].token } case 168: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1252 +// line internal/php7/php7.y:1252 { yyVAL.token = nil } case 169: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1256 +// line internal/php7/php7.y:1256 { yyVAL.token = yyDollar[1].token } case 170: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1263 +// line internal/php7/php7.y:1263 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -3646,7 +3646,7 @@ yydefault: } case 171: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:1285 +// line internal/php7/php7.y:1285 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -3669,19 +3669,19 @@ yydefault: } case 172: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1309 +// line internal/php7/php7.y:1309 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 173: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1313 +// line internal/php7/php7.y:1313 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 174: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1320 +// line internal/php7/php7.y:1320 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -3693,7 +3693,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1330 +// line internal/php7/php7.y:1330 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -3705,7 +3705,7 @@ yydefault: } case 176: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1343 +// line internal/php7/php7.y:1343 { yyVAL.node = &ast.StmtTrait{ Node: ast.Node{ @@ -3726,7 +3726,7 @@ yydefault: } case 177: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1365 +// line internal/php7/php7.y:1365 { yyVAL.node = &ast.StmtInterface{ Node: ast.Node{ @@ -3748,13 +3748,13 @@ yydefault: } case 178: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1388 +// line internal/php7/php7.y:1388 { yyVAL.node = nil } case 179: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1392 +// line internal/php7/php7.y:1392 { yyVAL.node = &ast.StmtClassExtends{ Node: ast.Node{ @@ -3766,13 +3766,13 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1405 +// line internal/php7/php7.y:1405 { yyVAL.node = nil } case 181: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1409 +// line internal/php7/php7.y:1409 { yyVAL.node = &ast.StmtInterfaceExtends{ Node: ast.Node{ @@ -3785,13 +3785,13 @@ yydefault: } case 182: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1423 +// line internal/php7/php7.y:1423 { yyVAL.node = nil } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1427 +// line internal/php7/php7.y:1427 { yyVAL.node = &ast.StmtClassImplements{ Node: ast.Node{ @@ -3804,13 +3804,13 @@ yydefault: } case 184: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1441 +// line internal/php7/php7.y:1441 { yyVAL.node = yyDollar[1].node } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1445 +// line internal/php7/php7.y:1445 { yyVAL.node = &ast.ExprReference{ast.Node{}, yyDollar[2].node} @@ -3822,7 +3822,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1455 +// line internal/php7/php7.y:1455 { yyVAL.node = &ast.ExprList{ Node: ast.Node{ @@ -3837,7 +3837,7 @@ yydefault: } case 187: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1468 +// line internal/php7/php7.y:1468 { yyVAL.node = &ast.ExprList{ Node: ast.Node{ @@ -3851,7 +3851,7 @@ yydefault: } case 188: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1483 +// line internal/php7/php7.y:1483 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3862,7 +3862,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1492 +// line internal/php7/php7.y:1492 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3882,7 +3882,7 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1513 +// line internal/php7/php7.y:1513 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3893,7 +3893,7 @@ yydefault: } case 191: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1522 +// line internal/php7/php7.y:1522 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3913,7 +3913,7 @@ yydefault: } case 192: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1543 +// line internal/php7/php7.y:1543 { yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ @@ -3924,7 +3924,7 @@ yydefault: } case 193: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1552 +// line internal/php7/php7.y:1552 { yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ @@ -3944,7 +3944,7 @@ yydefault: } case 194: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1573 +// line internal/php7/php7.y:1573 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3957,7 +3957,7 @@ yydefault: } case 195: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1584 +// line internal/php7/php7.y:1584 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3971,7 +3971,7 @@ yydefault: } case 196: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1596 +// line internal/php7/php7.y:1596 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3986,7 +3986,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1609 +// line internal/php7/php7.y:1609 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -4002,13 +4002,13 @@ yydefault: } case 198: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1626 +// line internal/php7/php7.y:1626 { yyVAL.list = nil } case 199: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1630 +// line internal/php7/php7.y:1630 { yyVAL.list = append(yyDollar[1].list, &ast.StmtCase{ Node: ast.Node{ @@ -4022,7 +4022,7 @@ yydefault: } case 200: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1642 +// line internal/php7/php7.y:1642 { yyVAL.list = append(yyDollar[1].list, &ast.StmtDefault{ Node: ast.Node{ @@ -4035,19 +4035,19 @@ yydefault: } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1656 +// line internal/php7/php7.y:1656 { yyVAL.token = yyDollar[1].token } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1660 +// line internal/php7/php7.y:1660 { yyVAL.token = yyDollar[1].token } case 203: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1667 +// line internal/php7/php7.y:1667 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4058,7 +4058,7 @@ yydefault: } case 204: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1676 +// line internal/php7/php7.y:1676 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4078,7 +4078,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1697 +// line internal/php7/php7.y:1697 { yyVAL.node = &ast.StmtIf{ Node: ast.Node{ @@ -4093,7 +4093,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1710 +// line internal/php7/php7.y:1710 { yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, &ast.StmtElseIf{ Node: ast.Node{ @@ -4112,13 +4112,13 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1730 +// line internal/php7/php7.y:1730 { yyVAL.node = yyDollar[1].node } case 208: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1734 +// line internal/php7/php7.y:1734 { yyDollar[1].node.(*ast.StmtIf).Else = &ast.StmtElse{ Node: ast.Node{ @@ -4134,7 +4134,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1751 +// line internal/php7/php7.y:1751 { yyVAL.node = &ast.StmtIf{ Node: ast.Node{ @@ -4156,7 +4156,7 @@ yydefault: } case 210: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1771 +// line internal/php7/php7.y:1771 { yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, &ast.StmtElseIf{ Node: ast.Node{ @@ -4180,7 +4180,7 @@ yydefault: } case 211: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1796 +// line internal/php7/php7.y:1796 { yyDollar[1].node.(*ast.StmtIf).EndIfTkn = yyDollar[2].token yyDollar[1].node.(*ast.StmtIf).SemiColonTkn = yyDollar[3].token @@ -4190,7 +4190,7 @@ yydefault: } case 212: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1804 +// line internal/php7/php7.y:1804 { yyDollar[1].node.(*ast.StmtIf).Else = &ast.StmtElse{ Node: ast.Node{ @@ -4214,25 +4214,25 @@ yydefault: } case 213: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1829 +// line internal/php7/php7.y:1829 { yyVAL.list = yyDollar[1].list } case 214: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1833 +// line internal/php7/php7.y:1833 { yyVAL.list = nil } case 215: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1840 +// line internal/php7/php7.y:1840 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1844 +// line internal/php7/php7.y:1844 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4241,7 +4241,7 @@ yydefault: } case 217: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1854 +// line internal/php7/php7.y:1854 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -4295,7 +4295,7 @@ yydefault: } case 218: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1906 +// line internal/php7/php7.y:1906 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -4352,25 +4352,25 @@ yydefault: } case 219: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1964 +// line internal/php7/php7.y:1964 { yyVAL.node = nil } case 220: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1968 +// line internal/php7/php7.y:1968 { yyVAL.node = yyDollar[1].node } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1975 +// line internal/php7/php7.y:1975 { yyVAL.node = yyDollar[1].node } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1979 +// line internal/php7/php7.y:1979 { yyVAL.node = &ast.Nullable{ Node: ast.Node{ @@ -4382,7 +4382,7 @@ yydefault: } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1992 +// line internal/php7/php7.y:1992 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4394,7 +4394,7 @@ yydefault: } case 224: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2002 +// line internal/php7/php7.y:2002 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4406,19 +4406,19 @@ yydefault: } case 225: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2012 +// line internal/php7/php7.y:2012 { yyVAL.node = yyDollar[1].node } case 226: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2019 +// line internal/php7/php7.y:2019 { yyVAL.node = nil } case 227: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2023 +// line internal/php7/php7.y:2023 { yyVAL.node = &ast.ReturnType{ ColonTkn: yyDollar[1].token, @@ -4427,7 +4427,7 @@ yydefault: } case 228: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2033 +// line internal/php7/php7.y:2033 { yyVAL.node = &ast.ArgumentList{ Node: ast.Node{ @@ -4439,7 +4439,7 @@ yydefault: } case 229: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2043 +// line internal/php7/php7.y:2043 { argumentList := yyDollar[2].node.(*ast.ArgumentList) argumentList.Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token) @@ -4451,7 +4451,7 @@ yydefault: } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2056 +// line internal/php7/php7.y:2056 { yyVAL.node = &ast.ArgumentList{ Arguments: []ast.Vertex{yyDollar[1].node}, @@ -4459,7 +4459,7 @@ yydefault: } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2062 +// line internal/php7/php7.y:2062 { 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) @@ -4468,7 +4468,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2072 +// line internal/php7/php7.y:2072 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4479,7 +4479,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2081 +// line internal/php7/php7.y:2081 { yyVAL.node = &ast.Argument{ Node: ast.Node{ @@ -4491,7 +4491,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2094 +// line internal/php7/php7.y:2094 { 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) @@ -4500,7 +4500,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2101 +// line internal/php7/php7.y:2101 { yyVAL.node = &ast.StmtGlobal{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4508,13 +4508,13 @@ yydefault: } case 236: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2110 +// line internal/php7/php7.y:2110 { yyVAL.node = yyDollar[1].node } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2117 +// line internal/php7/php7.y:2117 { 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) @@ -4523,7 +4523,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2124 +// line internal/php7/php7.y:2124 { yyVAL.node = &ast.StmtStatic{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4531,7 +4531,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2133 +// line internal/php7/php7.y:2133 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -4557,7 +4557,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2157 +// line internal/php7/php7.y:2157 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -4584,19 +4584,19 @@ yydefault: } case 241: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2185 +// line internal/php7/php7.y:2185 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 242: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2189 +// line internal/php7/php7.y:2189 { yyVAL.list = []ast.Vertex{} } case 243: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2196 +// line internal/php7/php7.y:2196 { yyVAL.node = &ast.StmtPropertyList{ Node: ast.Node{ @@ -4611,7 +4611,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2209 +// line internal/php7/php7.y:2209 { yyVAL.node = &ast.StmtClassConstList{ Node: ast.Node{ @@ -4625,7 +4625,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2221 +// line internal/php7/php7.y:2221 { yyVAL.node = &ast.StmtTraitUse{ Node: ast.Node{ @@ -4639,7 +4639,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php7/php7.y:2233 +// line internal/php7/php7.y:2233 { pos := position.NewTokenNodePosition(yyDollar[2].token, yyDollar[10].node) if yyDollar[1].list != nil { @@ -4670,7 +4670,7 @@ yydefault: } case 247: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2265 +// line internal/php7/php7.y:2265 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -4678,7 +4678,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2271 +// line internal/php7/php7.y:2271 { 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) @@ -4687,7 +4687,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2281 +// line internal/php7/php7.y:2281 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -4698,7 +4698,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2290 +// line internal/php7/php7.y:2290 { yyVAL.node = &ast.StmtTraitAdaptationList{ Node: ast.Node{ @@ -4710,7 +4710,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2300 +// line internal/php7/php7.y:2300 { yyVAL.node = &ast.StmtTraitAdaptationList{ Node: ast.Node{ @@ -4723,19 +4723,19 @@ yydefault: } case 252: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2314 +// line internal/php7/php7.y:2314 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 253: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2318 +// line internal/php7/php7.y:2318 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 254: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2325 +// line internal/php7/php7.y:2325 { yyVAL.node = yyDollar[1].node @@ -4745,7 +4745,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2333 +// line internal/php7/php7.y:2333 { yyVAL.node = yyDollar[1].node @@ -4755,7 +4755,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2344 +// line internal/php7/php7.y:2344 { yyVAL.node = &ast.StmtTraitUsePrecedence{ Node: ast.Node{ @@ -4769,7 +4769,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2359 +// line internal/php7/php7.y:2359 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4788,7 +4788,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2376 +// line internal/php7/php7.y:2376 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4807,7 +4807,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2393 +// line internal/php7/php7.y:2393 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4827,7 +4827,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2411 +// line internal/php7/php7.y:2411 { yyVAL.node = &ast.StmtTraitUseAlias{ Node: ast.Node{ @@ -4840,7 +4840,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2425 +// line internal/php7/php7.y:2425 { yyVAL.node = &ast.StmtTraitMethodRef{ Node: ast.Node{ @@ -4857,13 +4857,13 @@ yydefault: } case 262: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2440 +// line internal/php7/php7.y:2440 { yyVAL.node = yyDollar[1].node } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2447 +// line internal/php7/php7.y:2447 { yyVAL.node = &ast.StmtTraitMethodRef{ Node: ast.Node{ @@ -4882,7 +4882,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2467 +// line internal/php7/php7.y:2467 { yyVAL.node = &ast.StmtNop{ Node: ast.Node{ @@ -4893,7 +4893,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2476 +// line internal/php7/php7.y:2476 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -4906,13 +4906,13 @@ yydefault: } case 266: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2490 +// line internal/php7/php7.y:2490 { yyVAL.list = yyDollar[1].list } case 267: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2494 +// line internal/php7/php7.y:2494 { yyVAL.list = []ast.Vertex{ &ast.Identifier{ @@ -4926,31 +4926,31 @@ yydefault: } case 268: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2509 +// line internal/php7/php7.y:2509 { yyVAL.list = nil } case 269: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2513 +// line internal/php7/php7.y:2513 { yyVAL.list = yyDollar[1].list } case 270: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2520 +// line internal/php7/php7.y:2520 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2524 +// line internal/php7/php7.y:2524 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 272: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2531 +// line internal/php7/php7.y:2531 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4962,7 +4962,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2541 +// line internal/php7/php7.y:2541 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4974,7 +4974,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2551 +// line internal/php7/php7.y:2551 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4986,7 +4986,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2561 +// line internal/php7/php7.y:2561 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -4998,7 +4998,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2571 +// line internal/php7/php7.y:2571 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5010,7 +5010,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2581 +// line internal/php7/php7.y:2581 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -5022,7 +5022,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2594 +// line internal/php7/php7.y:2594 { 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) @@ -5031,7 +5031,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2601 +// line internal/php7/php7.y:2601 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -5039,7 +5039,7 @@ yydefault: } case 280: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2610 +// line internal/php7/php7.y:2610 { yyVAL.node = &ast.StmtProperty{ Node: ast.Node{ @@ -5062,7 +5062,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2631 +// line internal/php7/php7.y:2631 { yyVAL.node = &ast.StmtProperty{ Node: ast.Node{ @@ -5086,7 +5086,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2656 +// line internal/php7/php7.y:2656 { lastNode(yyDollar[1].list).(*ast.StmtConstant).CommaTkn = yyDollar[2].token @@ -5094,13 +5094,13 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2662 +// line internal/php7/php7.y:2662 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 284: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2669 +// line internal/php7/php7.y:2669 { yyVAL.node = &ast.StmtConstant{ Node: ast.Node{ @@ -5121,7 +5121,7 @@ yydefault: } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2691 +// line internal/php7/php7.y:2691 { yyVAL.node = &ast.StmtConstant{ Node: ast.Node{ @@ -5142,7 +5142,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2713 +// line internal/php7/php7.y:2713 { 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) @@ -5151,7 +5151,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2720 +// line internal/php7/php7.y:2720 { yyVAL.node = &ast.StmtEcho{ Exprs: []ast.Vertex{yyDollar[1].node}, @@ -5159,25 +5159,25 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2729 +// line internal/php7/php7.y:2729 { yyVAL.node = yyDollar[1].node } case 289: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2736 +// line internal/php7/php7.y:2736 { yyVAL.list = nil } case 290: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2740 +// line internal/php7/php7.y:2740 { yyVAL.list = yyDollar[1].list } case 291: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2747 +// line internal/php7/php7.y:2747 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5186,13 +5186,13 @@ yydefault: } case 292: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2754 +// line internal/php7/php7.y:2754 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 293: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:2761 +// line internal/php7/php7.y:2761 { yyVAL.node = &ast.StmtClass{ Node: ast.Node{ @@ -5209,34 +5209,44 @@ yydefault: } case 294: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2779 +// line internal/php7/php7.y:2779 { if yyDollar[3].node != nil { - yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, yyDollar[3].node.(*ast.ArgumentList)} - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node) + yyVAL.node = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node), + }, + NewTkn: yyDollar[1].token, + Class: yyDollar[2].node, + OpenParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, + Arguments: yyDollar[3].node.(*ast.ArgumentList).Arguments, + CloseParenthesisTkn: yyDollar[3].node.(*ast.ArgumentList).OpenParenthesisTkn, + } } else { - yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, nil} - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node) + yyVAL.node = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node), + }, + NewTkn: yyDollar[1].token, + Class: yyDollar[2].node, + } } - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2792 +// line internal/php7/php7.y:2802 { - yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, nil} - - // save position - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) + yyVAL.node = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node), + }, + NewTkn: yyDollar[1].token, + Class: yyDollar[2].node, + } } case 296: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2805 +// line internal/php7/php7.y:2815 { listNode := &ast.ExprList{ Node: ast.Node{ @@ -5258,7 +5268,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:2825 +// line internal/php7/php7.y:2835 { listNode := &ast.ExprList{ Node: ast.Node{ @@ -5279,7 +5289,7 @@ yydefault: } case 298: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2844 +// line internal/php7/php7.y:2854 { yyVAL.node = &ast.ExprAssign{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5292,7 +5302,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2855 +// line internal/php7/php7.y:2865 { yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, yyDollar[4].node} @@ -5306,7 +5316,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2867 +// line internal/php7/php7.y:2877 { yyVAL.node = &ast.ExprClone{ Node: ast.Node{ @@ -5318,7 +5328,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2877 +// line internal/php7/php7.y:2887 { yyVAL.node = &ast.ExprAssignPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5331,7 +5341,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2888 +// line internal/php7/php7.y:2898 { yyVAL.node = &ast.ExprAssignMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5344,7 +5354,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2899 +// line internal/php7/php7.y:2909 { yyVAL.node = &ast.ExprAssignMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5357,7 +5367,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2910 +// line internal/php7/php7.y:2920 { yyVAL.node = &ast.ExprAssignPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5370,7 +5380,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2921 +// line internal/php7/php7.y:2931 { yyVAL.node = &ast.ExprAssignDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5383,7 +5393,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2932 +// line internal/php7/php7.y:2942 { yyVAL.node = &ast.ExprAssignConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5396,7 +5406,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2943 +// line internal/php7/php7.y:2953 { yyVAL.node = &ast.ExprAssignMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5409,7 +5419,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2954 +// line internal/php7/php7.y:2964 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5422,7 +5432,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2965 +// line internal/php7/php7.y:2975 { yyVAL.node = &ast.ExprAssignBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5435,7 +5445,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2976 +// line internal/php7/php7.y:2986 { yyVAL.node = &ast.ExprAssignBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5448,7 +5458,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2987 +// line internal/php7/php7.y:2997 { yyVAL.node = &ast.ExprAssignShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5461,7 +5471,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2998 +// line internal/php7/php7.y:3008 { yyVAL.node = &ast.ExprAssignShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5474,7 +5484,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3009 +// line internal/php7/php7.y:3019 { yyVAL.node = &ast.ExprAssignCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5487,57 +5497,55 @@ yydefault: } case 314: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3020 +// line internal/php7/php7.y:3030 { - yyVAL.node = &ast.ExprPostInc{ast.Node{}, yyDollar[1].node} - - // save position - yyVAL.node.GetNode().Position = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token) - - // save comments - yylex.(*Parser).MoveFreeFloating(yyDollar[1].node, yyVAL.node) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.SkippedTokens) + yyVAL.node = &ast.ExprPostInc{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token), + }, + Var: yyDollar[1].node, + IncTkn: yyDollar[2].token, + } } case 315: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3031 +// line internal/php7/php7.y:3040 { - yyVAL.node = &ast.ExprPreInc{ast.Node{}, yyDollar[2].node} - - // save position - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) + yyVAL.node = &ast.ExprPreInc{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node), + }, + IncTkn: yyDollar[1].token, + Var: yyDollar[2].node, + } } case 316: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3041 +// line internal/php7/php7.y:3050 { - yyVAL.node = &ast.ExprPostDec{ast.Node{}, yyDollar[1].node} - - // save position - yyVAL.node.GetNode().Position = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token) - - // save comments - yylex.(*Parser).MoveFreeFloating(yyDollar[1].node, yyVAL.node) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.SkippedTokens) + yyVAL.node = &ast.ExprPostDec{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token), + }, + Var: yyDollar[1].node, + DecTkn: yyDollar[2].token, + } } case 317: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3052 +// line internal/php7/php7.y:3060 { - yyVAL.node = &ast.ExprPreDec{ast.Node{}, yyDollar[2].node} - - // save position - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) + yyVAL.node = &ast.ExprPreDec{ + Node: ast.Node{ + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node), + }, + DecTkn: yyDollar[1].token, + Var: yyDollar[2].node, + } } case 318: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3062 +// line internal/php7/php7.y:3070 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5550,7 +5558,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3073 +// line internal/php7/php7.y:3081 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5563,7 +5571,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3084 +// line internal/php7/php7.y:3092 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5576,7 +5584,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3095 +// line internal/php7/php7.y:3103 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5589,7 +5597,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3106 +// line internal/php7/php7.y:3114 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5602,7 +5610,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3117 +// line internal/php7/php7.y:3125 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5615,7 +5623,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3128 +// line internal/php7/php7.y:3136 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5628,7 +5636,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3139 +// line internal/php7/php7.y:3147 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5641,7 +5649,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3150 +// line internal/php7/php7.y:3158 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5653,7 +5661,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3160 +// line internal/php7/php7.y:3168 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5666,7 +5674,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3171 +// line internal/php7/php7.y:3179 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5679,7 +5687,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3182 +// line internal/php7/php7.y:3190 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5692,7 +5700,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3193 +// line internal/php7/php7.y:3201 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5705,7 +5713,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3204 +// line internal/php7/php7.y:3212 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5718,7 +5726,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3215 +// line internal/php7/php7.y:3223 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5731,7 +5739,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3226 +// line internal/php7/php7.y:3234 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5744,7 +5752,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3237 +// line internal/php7/php7.y:3245 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5757,7 +5765,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3248 +// line internal/php7/php7.y:3256 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -5769,7 +5777,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3258 +// line internal/php7/php7.y:3266 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -5781,7 +5789,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3268 +// line internal/php7/php7.y:3276 { yyVAL.node = &ast.ExprBooleanNot{ Node: ast.Node{ @@ -5793,7 +5801,7 @@ yydefault: } case 338: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3278 +// line internal/php7/php7.y:3286 { yyVAL.node = &ast.ExprBitwiseNot{ Node: ast.Node{ @@ -5805,7 +5813,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3288 +// line internal/php7/php7.y:3296 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5818,7 +5826,7 @@ yydefault: } case 340: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3299 +// line internal/php7/php7.y:3307 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5831,7 +5839,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3310 +// line internal/php7/php7.y:3318 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5844,7 +5852,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3321 +// line internal/php7/php7.y:3329 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5858,7 +5866,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3333 +// line internal/php7/php7.y:3341 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5871,7 +5879,7 @@ yydefault: } case 344: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3344 +// line internal/php7/php7.y:3352 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5884,7 +5892,7 @@ yydefault: } case 345: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3355 +// line internal/php7/php7.y:3363 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5897,7 +5905,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3366 +// line internal/php7/php7.y:3374 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5910,7 +5918,7 @@ yydefault: } case 347: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3377 +// line internal/php7/php7.y:3385 { yyVAL.node = &ast.ExprBinarySpaceship{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5923,7 +5931,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3388 +// line internal/php7/php7.y:3396 { yyVAL.node = &ast.ExprInstanceOf{ Node: ast.Node{ @@ -5936,7 +5944,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3399 +// line internal/php7/php7.y:3407 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -5953,13 +5961,13 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3414 +// line internal/php7/php7.y:3422 { yyVAL.node = yyDollar[1].node } case 351: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:3418 +// line internal/php7/php7.y:3426 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -5973,7 +5981,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3430 +// line internal/php7/php7.y:3438 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -5987,7 +5995,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3442 +// line internal/php7/php7.y:3450 { yyVAL.node = &ast.ExprBinaryCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6000,13 +6008,13 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3453 +// line internal/php7/php7.y:3461 { yyVAL.node = yyDollar[1].node } case 355: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3457 +// line internal/php7/php7.y:3465 { yyVAL.node = &ast.ExprCastInt{ast.Node{}, yyDollar[2].node} @@ -6019,7 +6027,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3468 +// line internal/php7/php7.y:3476 { yyVAL.node = &ast.ExprCastDouble{ast.Node{}, yyDollar[2].node} @@ -6032,7 +6040,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3479 +// line internal/php7/php7.y:3487 { yyVAL.node = &ast.ExprCastString{ast.Node{}, yyDollar[2].node} @@ -6045,7 +6053,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3490 +// line internal/php7/php7.y:3498 { yyVAL.node = &ast.ExprCastArray{ast.Node{}, yyDollar[2].node} @@ -6058,7 +6066,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3501 +// line internal/php7/php7.y:3509 { yyVAL.node = &ast.ExprCastObject{ast.Node{}, yyDollar[2].node} @@ -6071,7 +6079,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3512 +// line internal/php7/php7.y:3520 { yyVAL.node = &ast.ExprCastBool{ast.Node{}, yyDollar[2].node} @@ -6084,7 +6092,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3523 +// line internal/php7/php7.y:3531 { yyVAL.node = &ast.ExprCastUnset{ast.Node{}, yyDollar[2].node} @@ -6097,7 +6105,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3534 +// line internal/php7/php7.y:3542 { exit := &ast.ExprExit{ DieTkn: yyDollar[1].token, @@ -6116,7 +6124,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3551 +// line internal/php7/php7.y:3559 { yyVAL.node = &ast.ExprErrorSuppress{ Node: ast.Node{ @@ -6128,13 +6136,13 @@ yydefault: } case 364: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3561 +// line internal/php7/php7.y:3569 { yyVAL.node = yyDollar[1].node } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3565 +// line internal/php7/php7.y:3573 { yyVAL.node = &ast.ExprShellExec{ast.Node{}, yyDollar[2].list} @@ -6146,7 +6154,7 @@ yydefault: } case 366: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3575 +// line internal/php7/php7.y:3583 { yyVAL.node = &ast.ExprPrint{ast.Node{}, yyDollar[2].node} @@ -6158,7 +6166,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3585 +// line internal/php7/php7.y:3593 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, nil} @@ -6170,7 +6178,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3595 +// line internal/php7/php7.y:3603 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6182,7 +6190,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3605 +// line internal/php7/php7.y:3613 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6195,7 +6203,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3616 +// line internal/php7/php7.y:3624 { yyVAL.node = &ast.ExprYieldFrom{ast.Node{}, yyDollar[2].node} @@ -6207,13 +6215,13 @@ yydefault: } case 371: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3626 +// line internal/php7/php7.y:3634 { yyVAL.node = yyDollar[1].node } case 372: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3630 +// line internal/php7/php7.y:3638 { switch n := yyDollar[2].node.(type) { case *ast.ExprClosure: @@ -6228,7 +6236,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:3646 +// line internal/php7/php7.y:3654 { yyVAL.node = &ast.ExprClosure{ Node: ast.Node{ @@ -6249,7 +6257,7 @@ yydefault: } case 374: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:3665 +// line internal/php7/php7.y:3673 { yyVAL.node = &ast.ExprArrowFunction{ Node: ast.Node{ @@ -6268,25 +6276,25 @@ yydefault: } case 376: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3689 +// line internal/php7/php7.y:3697 { yyVAL.token = nil } case 377: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3693 +// line internal/php7/php7.y:3701 { yyVAL.token = yyDollar[1].token } case 378: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3700 +// line internal/php7/php7.y:3708 { yyVAL.ClosureUse = nil } case 379: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3704 +// line internal/php7/php7.y:3712 { yyVAL.ClosureUse = &ast.ExprClosureUse{ Node: ast.Node{ @@ -6301,7 +6309,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3720 +// line internal/php7/php7.y:3728 { 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) @@ -6310,7 +6318,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3727 +// line internal/php7/php7.y:3735 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -6318,7 +6326,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3736 +// line internal/php7/php7.y:3744 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -6337,7 +6345,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3753 +// line internal/php7/php7.y:3761 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -6359,7 +6367,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3776 +// line internal/php7/php7.y:3784 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6373,7 +6381,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3788 +// line internal/php7/php7.y:3796 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6386,7 +6394,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3799 +// line internal/php7/php7.y:3807 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6399,7 +6407,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3810 +// line internal/php7/php7.y:3818 { yyVAL.node = &ast.ExprFunctionCall{ Node: ast.Node{ @@ -6413,7 +6421,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3825 +// line internal/php7/php7.y:3833 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -6425,31 +6433,31 @@ yydefault: } case 389: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3835 +// line internal/php7/php7.y:3843 { yyVAL.node = yyDollar[1].node } case 390: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3842 +// line internal/php7/php7.y:3850 { yyVAL.node = yyDollar[1].node } case 391: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3846 +// line internal/php7/php7.y:3854 { yyVAL.node = yyDollar[1].node } case 392: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3853 +// line internal/php7/php7.y:3861 { yyVAL.node = nil } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3857 +// line internal/php7/php7.y:3865 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6466,13 +6474,13 @@ yydefault: } case 394: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3875 +// line internal/php7/php7.y:3883 { yyVAL.list = []ast.Vertex{} } case 395: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3879 +// line internal/php7/php7.y:3887 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -6486,25 +6494,25 @@ yydefault: } case 396: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3891 +// line internal/php7/php7.y:3899 { yyVAL.list = yyDollar[1].list } case 397: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3898 +// line internal/php7/php7.y:3906 { yyVAL.node = nil } case 398: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3902 +// line internal/php7/php7.y:3910 { yyVAL.node = yyDollar[1].node } case 399: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3909 +// line internal/php7/php7.y:3917 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6519,7 +6527,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3922 +// line internal/php7/php7.y:3930 { yyVAL.node = &ast.ExprArray{ Node: ast.Node{ @@ -6533,7 +6541,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3934 +// line internal/php7/php7.y:3942 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -6545,7 +6553,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3947 +// line internal/php7/php7.y:3955 { yyVAL.node = &ast.ScalarLnumber{ Node: ast.Node{ @@ -6557,7 +6565,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3957 +// line internal/php7/php7.y:3965 { yyVAL.node = &ast.ScalarDnumber{ Node: ast.Node{ @@ -6569,7 +6577,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3967 +// line internal/php7/php7.y:3975 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6581,7 +6589,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3977 +// line internal/php7/php7.y:3985 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6593,7 +6601,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3987 +// line internal/php7/php7.y:3995 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6605,7 +6613,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3997 +// line internal/php7/php7.y:4005 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6617,7 +6625,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4007 +// line internal/php7/php7.y:4015 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6629,7 +6637,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4017 +// line internal/php7/php7.y:4025 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6641,7 +6649,7 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4027 +// line internal/php7/php7.y:4035 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6653,7 +6661,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4037 +// line internal/php7/php7.y:4045 { yyVAL.node = &ast.ScalarMagicConstant{ Node: ast.Node{ @@ -6665,7 +6673,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4047 +// line internal/php7/php7.y:4055 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -6686,7 +6694,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4066 +// line internal/php7/php7.y:4074 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -6698,7 +6706,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4076 +// line internal/php7/php7.y:4084 { yyVAL.node = &ast.ScalarEncapsed{ Node: ast.Node{ @@ -6711,7 +6719,7 @@ yydefault: } case 415: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4087 +// line internal/php7/php7.y:4095 { yyVAL.node = &ast.ScalarHeredoc{ Node: ast.Node{ @@ -6724,19 +6732,19 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4098 +// line internal/php7/php7.y:4106 { yyVAL.node = yyDollar[1].node } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4102 +// line internal/php7/php7.y:4110 { yyVAL.node = yyDollar[1].node } case 418: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4109 +// line internal/php7/php7.y:4117 { yyVAL.node = &ast.ExprConstFetch{ Node: ast.Node{ @@ -6747,7 +6755,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4118 +// line internal/php7/php7.y:4126 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -6766,7 +6774,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4135 +// line internal/php7/php7.y:4143 { yyVAL.node = &ast.ExprClassConstFetch{ Node: ast.Node{ @@ -6785,43 +6793,43 @@ yydefault: } case 421: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4155 +// line internal/php7/php7.y:4163 { yyVAL.node = yyDollar[1].node } case 422: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4159 +// line internal/php7/php7.y:4167 { yyVAL.node = yyDollar[1].node } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4166 +// line internal/php7/php7.y:4174 { yyVAL.node = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4170 +// line internal/php7/php7.y:4178 { yyVAL.node = yyDollar[1].node } case 425: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4177 +// line internal/php7/php7.y:4185 { yyVAL.node = yyDollar[1].node } case 426: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4184 +// line internal/php7/php7.y:4192 { yyVAL.node = yyDollar[1].node } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4188 +// line internal/php7/php7.y:4196 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6838,19 +6846,19 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4203 +// line internal/php7/php7.y:4211 { yyVAL.node = yyDollar[1].node } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4210 +// line internal/php7/php7.y:4218 { yyVAL.node = yyDollar[1].node } case 430: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4214 +// line internal/php7/php7.y:4222 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6867,19 +6875,19 @@ yydefault: } case 431: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4229 +// line internal/php7/php7.y:4237 { yyVAL.node = yyDollar[1].node } case 432: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4236 +// line internal/php7/php7.y:4244 { yyVAL.node = yyDollar[1].node } case 433: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4240 +// line internal/php7/php7.y:4248 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6893,7 +6901,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4252 +// line internal/php7/php7.y:4260 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6907,7 +6915,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4264 +// line internal/php7/php7.y:4272 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -6921,7 +6929,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4276 +// line internal/php7/php7.y:4284 { yyVAL.node = &ast.ExprMethodCall{ Node: ast.Node{ @@ -6937,25 +6945,25 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4290 +// line internal/php7/php7.y:4298 { yyVAL.node = yyDollar[1].node } case 438: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4297 +// line internal/php7/php7.y:4305 { yyVAL.node = yyDollar[1].node } case 439: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4301 +// line internal/php7/php7.y:4309 { yyVAL.node = yyDollar[1].node } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4305 +// line internal/php7/php7.y:4313 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -6968,7 +6976,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4319 +// line internal/php7/php7.y:4327 { name := &ast.Identifier{ Node: ast.Node{ @@ -6987,7 +6995,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4336 +// line internal/php7/php7.y:4344 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -7001,7 +7009,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4348 +// line internal/php7/php7.y:4356 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -7013,7 +7021,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4361 +// line internal/php7/php7.y:4369 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7026,7 +7034,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4372 +// line internal/php7/php7.y:4380 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7039,13 +7047,13 @@ yydefault: } case 446: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4386 +// line internal/php7/php7.y:4394 { yyVAL.node = yyDollar[1].node } case 447: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4390 +// line internal/php7/php7.y:4398 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7059,7 +7067,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4402 +// line internal/php7/php7.y:4410 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7073,7 +7081,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4414 +// line internal/php7/php7.y:4422 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -7086,7 +7094,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4425 +// line internal/php7/php7.y:4433 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7099,7 +7107,7 @@ yydefault: } case 451: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4436 +// line internal/php7/php7.y:4444 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7112,7 +7120,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4450 +// line internal/php7/php7.y:4458 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -7124,7 +7132,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4460 +// line internal/php7/php7.y:4468 { yyVAL.node = yyDollar[2].node @@ -7134,13 +7142,13 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4468 +// line internal/php7/php7.y:4476 { yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4475 +// line internal/php7/php7.y:4483 { yyVAL.node = &ast.Identifier{ Node: ast.Node{ @@ -7152,7 +7160,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4485 +// line internal/php7/php7.y:4493 { yyVAL.node = yyDollar[2].node @@ -7162,13 +7170,13 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4493 +// line internal/php7/php7.y:4501 { yyVAL.node = yyDollar[1].node } case 458: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4500 +// line internal/php7/php7.y:4508 { pairList := yyDollar[1].node.(*ast.ParserSeparatedList) fistPair := pairList.Items[0].(*ast.ExprArrayItem) @@ -7181,19 +7189,19 @@ yydefault: } case 459: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4514 +// line internal/php7/php7.y:4522 { yyVAL.node = &ast.ExprArrayItem{} } case 460: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4518 +// line internal/php7/php7.y:4526 { yyVAL.node = yyDollar[1].node } case 461: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4525 +// line internal/php7/php7.y:4533 { 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) @@ -7202,7 +7210,7 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4532 +// line internal/php7/php7.y:4540 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -7210,7 +7218,7 @@ yydefault: } case 463: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4541 +// line internal/php7/php7.y:4549 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7223,7 +7231,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4552 +// line internal/php7/php7.y:4560 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7234,7 +7242,7 @@ yydefault: } case 465: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4561 +// line internal/php7/php7.y:4569 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7252,7 +7260,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4577 +// line internal/php7/php7.y:4585 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7268,7 +7276,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4591 +// line internal/php7/php7.y:4599 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7280,7 +7288,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:4601 +// line internal/php7/php7.y:4609 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7302,7 +7310,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4621 +// line internal/php7/php7.y:4629 { yyVAL.node = &ast.ExprArrayItem{ Node: ast.Node{ @@ -7322,13 +7330,13 @@ yydefault: } case 470: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4642 +// line internal/php7/php7.y:4650 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 471: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4646 +// line internal/php7/php7.y:4654 { yyVAL.list = append( yyDollar[1].list, @@ -7343,13 +7351,13 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4659 +// line internal/php7/php7.y:4667 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 473: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4663 +// line internal/php7/php7.y:4671 { yyVAL.list = []ast.Vertex{ &ast.ScalarEncapsedStringPart{ @@ -7364,7 +7372,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4679 +// line internal/php7/php7.y:4687 { name := &ast.Identifier{ Node: ast.Node{ @@ -7383,7 +7391,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4696 +// line internal/php7/php7.y:4704 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7408,7 +7416,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4719 +// line internal/php7/php7.y:4727 { yyVAL.node = &ast.ExprPropertyFetch{ Node: ast.Node{ @@ -7438,7 +7446,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4747 +// line internal/php7/php7.y:4755 { variable := &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -7453,7 +7461,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4760 +// line internal/php7/php7.y:4768 { name := &ast.Identifier{ Node: ast.Node{ @@ -7475,7 +7483,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:4780 +// line internal/php7/php7.y:4788 { yyVAL.node = &ast.ExprArrayDimFetch{ Node: ast.Node{ @@ -7502,7 +7510,7 @@ yydefault: } case 480: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4805 +// line internal/php7/php7.y:4813 { yyVAL.node = yyDollar[2].node @@ -7512,7 +7520,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4816 +// line internal/php7/php7.y:4824 { yyVAL.node = &ast.ScalarString{ Node: ast.Node{ @@ -7524,7 +7532,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4826 +// line internal/php7/php7.y:4834 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -7547,7 +7555,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4847 +// line internal/php7/php7.y:4855 { _, err := strconv.Atoi(string(yyDollar[2].token.Value)) isInt := err == nil @@ -7575,7 +7583,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4873 +// line internal/php7/php7.y:4881 { identifier := &ast.Identifier{ Node: ast.Node{ @@ -7594,7 +7602,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:4893 +// line internal/php7/php7.y:4901 { if yyDollar[4].token != nil { yyDollar[3].node.(*ast.ParserSeparatedList).SeparatorTkns = append(yyDollar[3].node.(*ast.ParserSeparatedList).SeparatorTkns, yyDollar[4].token) @@ -7613,7 +7621,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4910 +// line internal/php7/php7.y:4918 { yyVAL.node = &ast.ExprEmpty{ Node: ast.Node{ @@ -7627,7 +7635,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4922 +// line internal/php7/php7.y:4930 { yyVAL.node = &ast.ExprInclude{ Node: ast.Node{ @@ -7639,7 +7647,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4932 +// line internal/php7/php7.y:4940 { yyVAL.node = &ast.ExprIncludeOnce{ Node: ast.Node{ @@ -7651,7 +7659,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4942 +// line internal/php7/php7.y:4950 { yyVAL.node = &ast.ExprEval{ Node: ast.Node{ @@ -7665,7 +7673,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4954 +// line internal/php7/php7.y:4962 { yyVAL.node = &ast.ExprRequire{ast.Node{}, yyDollar[2].node} @@ -7677,7 +7685,7 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4964 +// line internal/php7/php7.y:4972 { yyVAL.node = &ast.ExprRequireOnce{ast.Node{}, yyDollar[2].node} @@ -7689,7 +7697,7 @@ yydefault: } case 492: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4977 +// line internal/php7/php7.y:4985 { yyVAL.node = &ast.ParserSeparatedList{ Items: []ast.Vertex{yyDollar[1].node}, @@ -7697,7 +7705,7 @@ yydefault: } case 493: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4983 +// line internal/php7/php7.y:4991 { 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) @@ -7706,7 +7714,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4993 +// line internal/php7/php7.y:5001 { yyVAL.node = yyDollar[1].node } diff --git a/internal/php7/php7.y b/internal/php7/php7.y index ca0a1c2..581403b 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -2778,25 +2778,35 @@ new_expr: T_NEW class_name_reference ctor_arguments { if $3 != nil { - $$ = &ast.ExprNew{ast.Node{}, $2, $3.(*ast.ArgumentList)} - $$.GetNode().Position = position.NewTokenNodePosition($1, $3) + $$ = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $3), + }, + NewTkn: $1, + Class: $2, + OpenParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, + Arguments: $3.(*ast.ArgumentList).Arguments, + CloseParenthesisTkn: $3.(*ast.ArgumentList).OpenParenthesisTkn, + } } else { - $$ = &ast.ExprNew{ast.Node{}, $2, nil} - $$.GetNode().Position = position.NewTokenNodePosition($1, $2) + $$ = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $2), + }, + NewTkn: $1, + Class: $2, + } } - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) } | T_NEW anonymous_class { - $$ = &ast.ExprNew{ast.Node{}, $2, nil} - - // save position - $$.GetNode().Position = position.NewTokenNodePosition($1, $2) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) + $$ = &ast.ExprNew{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $2), + }, + NewTkn: $1, + Class: $2, + } } ; @@ -3018,45 +3028,43 @@ expr_without_variable: } | variable T_INC { - $$ = &ast.ExprPostInc{ast.Node{}, $1} - - // save position - $$.GetNode().Position = position.NewNodeTokenPosition($1, $2) - - // save comments - yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.SkippedTokens) + $$ = &ast.ExprPostInc{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition($1, $2), + }, + Var: $1, + IncTkn: $2, + } } | T_INC variable { - $$ = &ast.ExprPreInc{ast.Node{}, $2} - - // save position - $$.GetNode().Position = position.NewTokenNodePosition($1, $2) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) + $$ = &ast.ExprPreInc{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $2), + }, + IncTkn: $1, + Var: $2, + } } | variable T_DEC { - $$ = &ast.ExprPostDec{ast.Node{}, $1} - - // save position - $$.GetNode().Position = position.NewNodeTokenPosition($1, $2) - - // save comments - yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.SkippedTokens) + $$ = &ast.ExprPostDec{ + Node: ast.Node{ + Position: position.NewNodeTokenPosition($1, $2), + }, + Var: $1, + DecTkn: $2, + } } | T_DEC variable { - $$ = &ast.ExprPreDec{ast.Node{}, $2} - - // save position - $$.GetNode().Position = position.NewTokenNodePosition($1, $2) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) + $$ = &ast.ExprPreDec{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $2), + }, + DecTkn: $1, + Var: $2, + } } | expr T_BOOLEAN_OR expr { diff --git a/pkg/ast/node.go b/pkg/ast/node.go index 9f90db7..cadaa12 100644 --- a/pkg/ast/node.go +++ b/pkg/ast/node.go @@ -1230,8 +1230,11 @@ func (n *ExprMethodCall) Accept(v NodeVisitor) { // ExprNew node type ExprNew struct { Node - Class Vertex - ArgumentList *ArgumentList + NewTkn *token.Token + Class Vertex + OpenParenthesisTkn *token.Token + Arguments []Vertex + CloseParenthesisTkn *token.Token } func (n *ExprNew) Accept(v NodeVisitor) { @@ -1241,7 +1244,8 @@ func (n *ExprNew) Accept(v NodeVisitor) { // ExprPostDec node type ExprPostDec struct { Node - Var Vertex + Var Vertex + DecTkn *token.Token } func (n *ExprPostDec) Accept(v NodeVisitor) { @@ -1251,7 +1255,8 @@ func (n *ExprPostDec) Accept(v NodeVisitor) { // ExprPostInc node type ExprPostInc struct { Node - Var Vertex + Var Vertex + IncTkn *token.Token } func (n *ExprPostInc) Accept(v NodeVisitor) { @@ -1261,7 +1266,8 @@ func (n *ExprPostInc) Accept(v NodeVisitor) { // ExprPreDec node type ExprPreDec struct { Node - Var Vertex + DecTkn *token.Token + Var Vertex } func (n *ExprPreDec) Accept(v NodeVisitor) { @@ -1271,7 +1277,8 @@ func (n *ExprPreDec) Accept(v NodeVisitor) { // ExprPreInc node type ExprPreInc struct { Node - Var Vertex + IncTkn *token.Token + Var Vertex } func (n *ExprPreInc) Accept(v NodeVisitor) { diff --git a/pkg/ast/traverser/dfs.go b/pkg/ast/traverser/dfs.go index fecf672..ad492b0 100644 --- a/pkg/ast/traverser/dfs.go +++ b/pkg/ast/traverser/dfs.go @@ -1415,10 +1415,12 @@ func (t *DFS) Traverse(n ast.Vertex) { t.Traverse(nn.Class) t.visitor.Leave("Class", true) } - if nn.ArgumentList != nil { - t.visitor.Enter("ArgumentList", true) - t.Traverse(nn.ArgumentList) - t.visitor.Leave("ArgumentList", true) + if nn.Arguments != nil { + t.visitor.Enter("Arguments", false) + for _, c := range nn.Arguments { + t.Traverse(c) + } + t.visitor.Leave("Arguments", false) } case *ast.ExprPostDec: if nn == nil { diff --git a/pkg/printer/pretty_printer.go b/pkg/printer/pretty_printer.go index ef01e44..a840cea 100644 --- a/pkg/printer/pretty_printer.go +++ b/pkg/printer/pretty_printer.go @@ -1143,9 +1143,9 @@ func (p *PrettyPrinter) printExprNew(n ast.Vertex) { io.WriteString(p.w, "new ") p.Print(nn.Class) - if nn.ArgumentList != nil { + if nn.Arguments != nil { io.WriteString(p.w, "(") - p.joinPrint(", ", nn.ArgumentList.Arguments) + p.joinPrint(", ", nn.Arguments) io.WriteString(p.w, ")") } } diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go index 8791841..58ac6eb 100644 --- a/pkg/printer/printer.go +++ b/pkg/printer/printer.go @@ -1710,10 +1710,10 @@ func (p *Printer) printExprNew(n ast.Vertex) { p.bufStart = " " p.Print(nn.Class) - if nn.ArgumentList != nil { - p.printFreeFloatingOrDefault(nn.ArgumentList, token.Start, "(") - p.joinPrint(",", nn.ArgumentList.Arguments) - p.printFreeFloatingOrDefault(nn.ArgumentList, token.End, ")") + if nn.Arguments != nil { + p.printToken(nn.OpenParenthesisTkn, "(") + p.joinPrint(",", nn.Arguments) + p.printToken(nn.CloseParenthesisTkn, ")") } p.printFreeFloating(nn, token.End)