diff --git a/internal/php7/php7.go b/internal/php7/php7.go index c267235..f5e4667 100644 --- a/internal/php7/php7.go +++ b/internal/php7/php7.go @@ -346,7 +346,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -// line internal/php7/php7.y:5615 +// line internal/php7/php7.y:5603 // line yacctab:1 var yyExca = [...]int{ @@ -3812,10 +3812,6 @@ yydefault: } yylex.(*Parser).setFreeFloating(yyVAL.node, token.Name, yyDollar[5].token.Tokens) yylex.(*Parser).setFreeFloating(yyVAL.node, token.ParamList, yyDollar[7].token.Tokens) - if yyDollar[8].node != nil { - yylex.(*Parser).setFreeFloatingTokens(yyVAL.node, token.Params, yyDollar[8].node.GetNode().Tokens[token.Colon]) - delete(yyDollar[8].node.GetNode().Tokens, token.Colon) - } yylex.(*Parser).setFreeFloating(yyVAL.node, token.ReturnType, yyDollar[9].token.Tokens) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Stmts, yyDollar[11].token.Tokens) @@ -3829,31 +3825,31 @@ yydefault: } case 166: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1473 + // line internal/php7/php7.y:1470 { yyVAL.token = nil } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1477 + // line internal/php7/php7.y:1474 { yyVAL.token = yyDollar[1].token } case 168: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1484 + // line internal/php7/php7.y:1481 { yyVAL.token = nil } case 169: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1488 + // line internal/php7/php7.y:1485 { yyVAL.token = yyDollar[1].token } case 170: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1495 + // line internal/php7/php7.y:1492 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, name, yyDollar[1].list, nil, yyDollar[4].ClassExtends, yyDollar[5].ClassImplements, yyDollar[8].list} @@ -3873,7 +3869,7 @@ yydefault: } case 171: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:1513 + // line internal/php7/php7.y:1510 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, name, nil, nil, yyDollar[3].ClassExtends, yyDollar[4].ClassImplements, yyDollar[7].list} @@ -3892,7 +3888,7 @@ yydefault: } case 172: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1533 + // line internal/php7/php7.y:1530 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3900,7 +3896,7 @@ yydefault: } case 173: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1539 + // line internal/php7/php7.y:1536 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -3908,7 +3904,7 @@ yydefault: } case 174: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1548 + // line internal/php7/php7.y:1545 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -3922,7 +3918,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1560 + // line internal/php7/php7.y:1557 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -3936,7 +3932,7 @@ yydefault: } case 176: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1575 + // line internal/php7/php7.y:1572 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtTrait{ast.Node{}, name, yyDollar[5].list} @@ -3955,7 +3951,7 @@ yydefault: } case 177: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1595 + // line internal/php7/php7.y:1592 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtInterface{ast.Node{}, name, yyDollar[3].InterfaceExtends, yyDollar[6].list} @@ -3974,7 +3970,7 @@ yydefault: } case 178: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1615 + // line internal/php7/php7.y:1612 { yyVAL.ClassExtends = nil @@ -3982,7 +3978,7 @@ yydefault: } case 179: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1621 + // line internal/php7/php7.y:1618 { yyVAL.ClassExtends = &ast.StmtClassExtends{ast.Node{}, yyDollar[2].node} @@ -3996,7 +3992,7 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1636 + // line internal/php7/php7.y:1633 { yyVAL.InterfaceExtends = nil @@ -4004,7 +4000,7 @@ yydefault: } case 181: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1642 + // line internal/php7/php7.y:1639 { yyVAL.InterfaceExtends = &ast.StmtInterfaceExtends{ast.Node{}, yyDollar[2].list} @@ -4018,7 +4014,7 @@ yydefault: } case 182: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1657 + // line internal/php7/php7.y:1654 { yyVAL.ClassImplements = nil @@ -4026,7 +4022,7 @@ yydefault: } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1663 + // line internal/php7/php7.y:1660 { yyVAL.ClassImplements = &ast.StmtClassImplements{ast.Node{}, yyDollar[2].list} @@ -4040,7 +4036,7 @@ yydefault: } case 184: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1678 + // line internal/php7/php7.y:1675 { yyVAL.node = yyDollar[1].node @@ -4048,7 +4044,7 @@ yydefault: } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1684 + // line internal/php7/php7.y:1681 { yyVAL.node = &ast.ExprReference{ast.Node{}, yyDollar[2].node} @@ -4062,7 +4058,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1696 + // line internal/php7/php7.y:1693 { yyVAL.node = &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -4078,7 +4074,7 @@ yydefault: } case 187: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1710 + // line internal/php7/php7.y:1707 { yyVAL.node = &ast.ExprShortList{ast.Node{}, yyDollar[2].list} @@ -4093,7 +4089,7 @@ yydefault: } case 188: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1726 + // line internal/php7/php7.y:1723 { yyVAL.node = &ast.StmtFor{ast.Node{}, nil, nil, nil, yyDollar[1].node} @@ -4104,7 +4100,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1735 + // line internal/php7/php7.y:1732 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltFor{ast.Node{}, nil, nil, nil, stmtList} @@ -4123,7 +4119,7 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1755 + // line internal/php7/php7.y:1752 { yyVAL.node = &ast.StmtForeach{ast.Node{}, nil, nil, nil, yyDollar[1].node} @@ -4134,7 +4130,7 @@ yydefault: } case 191: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1764 + // line internal/php7/php7.y:1761 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltForeach{ast.Node{}, nil, nil, nil, stmtList} @@ -4153,7 +4149,7 @@ yydefault: } case 192: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1784 + // line internal/php7/php7.y:1781 { yyVAL.node = &ast.StmtDeclare{ast.Node{}, false, nil, yyDollar[1].node} @@ -4164,7 +4160,7 @@ yydefault: } case 193: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1793 + // line internal/php7/php7.y:1790 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtDeclare{ast.Node{}, true, nil, stmtList} @@ -4183,7 +4179,7 @@ yydefault: } case 194: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1813 + // line internal/php7/php7.y:1810 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtSwitch{ast.Node{}, nil, caseList} @@ -4200,7 +4196,7 @@ yydefault: } case 195: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1828 + // line internal/php7/php7.y:1825 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.StmtSwitch{ast.Node{}, nil, caseList} @@ -4218,7 +4214,7 @@ yydefault: } case 196: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1844 + // line internal/php7/php7.y:1841 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltSwitch{ast.Node{}, nil, caseList} @@ -4237,7 +4233,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1861 + // line internal/php7/php7.y:1858 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[3].list} @@ -4258,7 +4254,7 @@ yydefault: } case 198: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1883 + // line internal/php7/php7.y:1880 { yyVAL.list = []ast.Vertex{} @@ -4266,7 +4262,7 @@ yydefault: } case 199: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1889 + // line internal/php7/php7.y:1886 { _case := &ast.StmtCase{ast.Node{}, yyDollar[3].node, yyDollar[5].list} yyVAL.list = append(yyDollar[1].list, _case) @@ -4283,7 +4279,7 @@ yydefault: } case 200: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1904 + // line internal/php7/php7.y:1901 { _default := &ast.StmtDefault{ast.Node{}, yyDollar[4].list} yyVAL.list = append(yyDollar[1].list, _default) @@ -4300,19 +4296,19 @@ yydefault: } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1922 + // line internal/php7/php7.y:1919 { yyVAL.token = yyDollar[1].token } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1926 + // line internal/php7/php7.y:1923 { yyVAL.token = yyDollar[1].token } case 203: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1933 + // line internal/php7/php7.y:1930 { yyVAL.node = &ast.StmtWhile{ast.Node{}, nil, yyDollar[1].node} @@ -4323,7 +4319,7 @@ yydefault: } case 204: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1942 + // line internal/php7/php7.y:1939 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltWhile{ast.Node{}, nil, stmtList} @@ -4342,7 +4338,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1962 + // line internal/php7/php7.y:1959 { yyVAL.node = &ast.StmtIf{ast.Node{}, yyDollar[3].node, yyDollar[5].node, nil, nil} @@ -4358,7 +4354,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1976 + // line internal/php7/php7.y:1973 { _elseIf := &ast.StmtElseIf{ast.Node{}, yyDollar[4].node, yyDollar[6].node} yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, _elseIf) @@ -4378,7 +4374,7 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1997 + // line internal/php7/php7.y:1994 { yyVAL.node = yyDollar[1].node @@ -4386,7 +4382,7 @@ yydefault: } case 208: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2003 + // line internal/php7/php7.y:2000 { _else := &ast.StmtElse{ast.Node{}, yyDollar[3].node} yyDollar[1].node.(*ast.StmtIf).Else = _else @@ -4404,7 +4400,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2022 + // line internal/php7/php7.y:2019 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[6].list} yyVAL.node = &ast.StmtAltIf{ast.Node{}, yyDollar[3].node, stmts, nil, nil} @@ -4423,7 +4419,7 @@ yydefault: } case 210: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:2039 + // line internal/php7/php7.y:2036 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[7].list} _elseIf := &ast.StmtAltElseIf{ast.Node{}, yyDollar[4].node, stmts} @@ -4445,7 +4441,7 @@ yydefault: } case 211: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2062 + // line internal/php7/php7.y:2059 { yyVAL.node = yyDollar[1].node @@ -4461,7 +4457,7 @@ yydefault: } case 212: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2076 + // line internal/php7/php7.y:2073 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[4].list} _else := &ast.StmtAltElse{ast.Node{}, stmts} @@ -4485,7 +4481,7 @@ yydefault: } case 213: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2101 + // line internal/php7/php7.y:2098 { yyVAL.list = yyDollar[1].list @@ -4493,7 +4489,7 @@ yydefault: } case 214: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2107 + // line internal/php7/php7.y:2104 { yyVAL.list = nil @@ -4501,7 +4497,7 @@ yydefault: } case 215: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2116 + // line internal/php7/php7.y:2113 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4509,7 +4505,7 @@ yydefault: } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2122 + // line internal/php7/php7.y:2119 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4520,7 +4516,7 @@ yydefault: } case 217: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2134 + // line internal/php7/php7.y:2131 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} identifier.GetNode().Position = position.NewTokenPosition(yyDollar[4].token) @@ -4558,7 +4554,7 @@ yydefault: } case 218: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2170 + // line internal/php7/php7.y:2167 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} identifier.GetNode().Position = position.NewTokenPosition(yyDollar[4].token) @@ -4597,7 +4593,7 @@ yydefault: } case 219: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2210 + // line internal/php7/php7.y:2207 { yyVAL.node = nil @@ -4605,7 +4601,7 @@ yydefault: } case 220: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2216 + // line internal/php7/php7.y:2213 { yyVAL.node = yyDollar[1].node @@ -4613,7 +4609,7 @@ yydefault: } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2225 + // line internal/php7/php7.y:2222 { yyVAL.node = yyDollar[1].node @@ -4621,7 +4617,7 @@ yydefault: } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2231 + // line internal/php7/php7.y:2228 { yyVAL.node = &ast.Nullable{ast.Node{}, yyDollar[2].node} @@ -4635,7 +4631,7 @@ yydefault: } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2246 + // line internal/php7/php7.y:2243 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4649,7 +4645,7 @@ yydefault: } case 224: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2258 + // line internal/php7/php7.y:2255 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4663,7 +4659,7 @@ yydefault: } case 225: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2270 + // line internal/php7/php7.y:2267 { yyVAL.node = yyDollar[1].node @@ -4671,7 +4667,7 @@ yydefault: } case 226: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2279 + // line internal/php7/php7.y:2276 { yyVAL.node = nil @@ -4679,18 +4675,18 @@ yydefault: } case 227: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2285 + // line internal/php7/php7.y:2282 { yyVAL.node = yyDollar[2].node // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Colon, yyDollar[1].token.Tokens) + yylex.(*Parser).setFreeFloatingTokens(yyVAL.node, token.Start, append(yyDollar[1].token.Tokens, yyVAL.node.GetNode().Tokens[token.Start]...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 228: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2297 + // line internal/php7/php7.y:2294 { yyVAL.node = &ast.ArgumentList{ast.Node{}, nil} @@ -4705,7 +4701,7 @@ yydefault: } case 229: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2310 + // line internal/php7/php7.y:2307 { yyVAL.node = &ast.ArgumentList{ast.Node{}, yyDollar[2].list} @@ -4724,7 +4720,7 @@ yydefault: } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2330 + // line internal/php7/php7.y:2327 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4732,7 +4728,7 @@ yydefault: } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2336 + // line internal/php7/php7.y:2333 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4743,7 +4739,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2348 + // line internal/php7/php7.y:2345 { yyVAL.node = &ast.Argument{ast.Node{}, false, false, yyDollar[1].node} @@ -4757,7 +4753,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2360 + // line internal/php7/php7.y:2357 { yyVAL.node = &ast.Argument{ast.Node{}, true, false, yyDollar[2].node} @@ -4771,7 +4767,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2375 + // line internal/php7/php7.y:2372 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4782,7 +4778,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2384 + // line internal/php7/php7.y:2381 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4790,7 +4786,7 @@ yydefault: } case 236: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2393 + // line internal/php7/php7.y:2390 { yyVAL.node = yyDollar[1].node @@ -4798,7 +4794,7 @@ yydefault: } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2402 + // line internal/php7/php7.y:2399 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4809,7 +4805,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2411 + // line internal/php7/php7.y:2408 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4817,7 +4813,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2420 + // line internal/php7/php7.y:2417 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4835,7 +4831,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2436 + // line internal/php7/php7.y:2433 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4854,7 +4850,7 @@ yydefault: } case 241: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2456 + // line internal/php7/php7.y:2453 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -4862,7 +4858,7 @@ yydefault: } case 242: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2462 + // line internal/php7/php7.y:2459 { yyVAL.list = []ast.Vertex{} @@ -4870,7 +4866,7 @@ yydefault: } case 243: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2471 + // line internal/php7/php7.y:2468 { yyVAL.node = &ast.StmtPropertyList{ast.Node{}, yyDollar[1].list, yyDollar[2].node, yyDollar[3].list} @@ -4886,7 +4882,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2485 + // line internal/php7/php7.y:2482 { yyVAL.node = &ast.StmtClassConstList{ast.Node{}, yyDollar[1].list, yyDollar[3].list} @@ -4907,7 +4903,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2504 + // line internal/php7/php7.y:2501 { yyVAL.node = &ast.StmtTraitUse{ast.Node{}, yyDollar[2].list, yyDollar[3].node} @@ -4921,7 +4917,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php7/php7.y:2516 + // line internal/php7/php7.y:2513 { name := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtClassMethod{ast.Node{}, yyDollar[3].token != nil, name, yyDollar[1].list, yyDollar[7].list, yyDollar[9].node, yyDollar[10].node} @@ -4949,16 +4945,12 @@ yydefault: } yylex.(*Parser).setFreeFloating(yyVAL.node, token.Name, yyDollar[6].token.Tokens) yylex.(*Parser).setFreeFloating(yyVAL.node, token.ParameterList, yyDollar[8].token.Tokens) - if yyDollar[9].node != nil { - yylex.(*Parser).setFreeFloatingTokens(yyVAL.node, token.Params, yyDollar[9].node.GetNode().Tokens[token.Colon]) - delete(yyDollar[9].node.GetNode().Tokens, token.Colon) - } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 247: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2553 + // line internal/php7/php7.y:2547 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4966,7 +4958,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2559 + // line internal/php7/php7.y:2553 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4977,7 +4969,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2571 + // line internal/php7/php7.y:2565 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -4991,7 +4983,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2584 + // line internal/php7/php7.y:2578 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, nil} @@ -5005,7 +4997,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2596 + // line internal/php7/php7.y:2590 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, yyDollar[2].list} @@ -5019,7 +5011,7 @@ yydefault: } case 252: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2611 + // line internal/php7/php7.y:2605 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5027,7 +5019,7 @@ yydefault: } case 253: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2617 + // line internal/php7/php7.y:2611 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -5035,7 +5027,7 @@ yydefault: } case 254: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2626 + // line internal/php7/php7.y:2620 { yyVAL.node = yyDollar[1].node @@ -5047,7 +5039,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2636 + // line internal/php7/php7.y:2630 { yyVAL.node = yyDollar[1].node @@ -5059,7 +5051,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2649 + // line internal/php7/php7.y:2643 { yyVAL.node = &ast.StmtTraitUsePrecedence{ast.Node{}, yyDollar[1].node, yyDollar[3].list} @@ -5074,7 +5066,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2665 + // line internal/php7/php7.y:2659 { alias := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, nil, alias} @@ -5092,7 +5084,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2681 + // line internal/php7/php7.y:2675 { alias := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, nil, alias} @@ -5110,7 +5102,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2697 + // line internal/php7/php7.y:2691 { alias := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, alias} @@ -5128,7 +5120,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2713 + // line internal/php7/php7.y:2707 { yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, nil} @@ -5143,7 +5135,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2729 + // line internal/php7/php7.y:2723 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, nil, name} @@ -5159,7 +5151,7 @@ yydefault: } case 262: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2743 + // line internal/php7/php7.y:2737 { yyVAL.node = yyDollar[1].node @@ -5167,7 +5159,7 @@ yydefault: } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2752 + // line internal/php7/php7.y:2746 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, yyDollar[1].node, target} @@ -5185,7 +5177,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2771 + // line internal/php7/php7.y:2765 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -5200,7 +5192,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2784 + // line internal/php7/php7.y:2778 { yyVAL.node = &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} @@ -5215,7 +5207,7 @@ yydefault: } case 266: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2800 + // line internal/php7/php7.y:2794 { yyVAL.list = yyDollar[1].list @@ -5223,7 +5215,7 @@ yydefault: } case 267: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2806 + // line internal/php7/php7.y:2800 { modifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{modifier} @@ -5238,7 +5230,7 @@ yydefault: } case 268: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2822 + // line internal/php7/php7.y:2816 { yyVAL.list = nil @@ -5246,7 +5238,7 @@ yydefault: } case 269: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2828 + // line internal/php7/php7.y:2822 { yyVAL.list = yyDollar[1].list @@ -5254,7 +5246,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2837 + // line internal/php7/php7.y:2831 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5262,7 +5254,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2843 + // line internal/php7/php7.y:2837 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -5270,7 +5262,7 @@ yydefault: } case 272: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2852 + // line internal/php7/php7.y:2846 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5284,7 +5276,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2864 + // line internal/php7/php7.y:2858 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5298,7 +5290,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2876 + // line internal/php7/php7.y:2870 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5312,7 +5304,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2888 + // line internal/php7/php7.y:2882 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5326,7 +5318,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2900 + // line internal/php7/php7.y:2894 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5340,7 +5332,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2912 + // line internal/php7/php7.y:2906 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5354,7 +5346,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2927 + // line internal/php7/php7.y:2921 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5365,7 +5357,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2936 + // line internal/php7/php7.y:2930 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5373,7 +5365,7 @@ yydefault: } case 280: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2945 + // line internal/php7/php7.y:2939 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -5391,7 +5383,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2961 + // line internal/php7/php7.y:2955 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -5410,7 +5402,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2981 + // line internal/php7/php7.y:2975 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5421,7 +5413,7 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2990 + // line internal/php7/php7.y:2984 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5429,7 +5421,7 @@ yydefault: } case 284: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2999 + // line internal/php7/php7.y:2993 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtConstant{ast.Node{}, name, yyDollar[3].node} @@ -5446,7 +5438,7 @@ yydefault: } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3017 + // line internal/php7/php7.y:3011 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtConstant{ast.Node{}, name, yyDollar[3].node} @@ -5463,7 +5455,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3035 + // line internal/php7/php7.y:3029 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5474,7 +5466,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3044 + // line internal/php7/php7.y:3038 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5482,7 +5474,7 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3053 + // line internal/php7/php7.y:3047 { yyVAL.node = yyDollar[1].node @@ -5490,7 +5482,7 @@ yydefault: } case 289: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3062 + // line internal/php7/php7.y:3056 { yyVAL.list = nil @@ -5498,7 +5490,7 @@ yydefault: } case 290: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3068 + // line internal/php7/php7.y:3062 { yyVAL.list = yyDollar[1].list @@ -5506,7 +5498,7 @@ yydefault: } case 291: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3077 + // line internal/php7/php7.y:3071 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5517,7 +5509,7 @@ yydefault: } case 292: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3086 + // line internal/php7/php7.y:3080 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5525,7 +5517,7 @@ yydefault: } case 293: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:3095 + // line internal/php7/php7.y:3089 { if yyDollar[2].node != nil { yyVAL.node = &ast.StmtClass{ast.Node{}, nil, nil, yyDollar[2].node.(*ast.ArgumentList), yyDollar[3].ClassExtends, yyDollar[4].ClassImplements, yyDollar[7].list} @@ -5545,7 +5537,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3116 + // line internal/php7/php7.y:3110 { if yyDollar[3].node != nil { yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, yyDollar[3].node.(*ast.ArgumentList)} @@ -5562,7 +5554,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3131 + // line internal/php7/php7.y:3125 { yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, nil} @@ -5576,7 +5568,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:3146 + // line internal/php7/php7.y:3140 { listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, listNode, yyDollar[6].node} @@ -5595,7 +5587,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:3163 + // line internal/php7/php7.y:3157 { shortList := &ast.ExprShortList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, shortList, yyDollar[5].node} @@ -5613,7 +5605,7 @@ yydefault: } case 298: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3179 + // line internal/php7/php7.y:3173 { yyVAL.node = &ast.ExprAssign{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5628,7 +5620,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3192 + // line internal/php7/php7.y:3186 { yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, yyDollar[4].node} @@ -5644,7 +5636,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3206 + // line internal/php7/php7.y:3200 { yyVAL.node = &ast.ExprClone{ast.Node{}, yyDollar[2].node} @@ -5658,7 +5650,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3218 + // line internal/php7/php7.y:3212 { yyVAL.node = &ast.ExprAssignPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5673,7 +5665,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3231 + // line internal/php7/php7.y:3225 { yyVAL.node = &ast.ExprAssignMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5688,7 +5680,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3244 + // line internal/php7/php7.y:3238 { yyVAL.node = &ast.ExprAssignMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5703,7 +5695,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3257 + // line internal/php7/php7.y:3251 { yyVAL.node = &ast.ExprAssignPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5718,7 +5710,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3270 + // line internal/php7/php7.y:3264 { yyVAL.node = &ast.ExprAssignDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5733,7 +5725,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3283 + // line internal/php7/php7.y:3277 { yyVAL.node = &ast.ExprAssignConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5748,7 +5740,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3296 + // line internal/php7/php7.y:3290 { yyVAL.node = &ast.ExprAssignMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5763,7 +5755,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3309 + // line internal/php7/php7.y:3303 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5778,7 +5770,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3322 + // line internal/php7/php7.y:3316 { yyVAL.node = &ast.ExprAssignBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5793,7 +5785,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3335 + // line internal/php7/php7.y:3329 { yyVAL.node = &ast.ExprAssignBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5808,7 +5800,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3348 + // line internal/php7/php7.y:3342 { yyVAL.node = &ast.ExprAssignShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5823,7 +5815,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3361 + // line internal/php7/php7.y:3355 { yyVAL.node = &ast.ExprAssignShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5838,7 +5830,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3374 + // line internal/php7/php7.y:3368 { yyVAL.node = &ast.ExprAssignCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5853,7 +5845,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3387 + // line internal/php7/php7.y:3381 { yyVAL.node = &ast.ExprPostInc{ast.Node{}, yyDollar[1].node} @@ -5868,7 +5860,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3400 + // line internal/php7/php7.y:3394 { yyVAL.node = &ast.ExprPreInc{ast.Node{}, yyDollar[2].node} @@ -5882,7 +5874,7 @@ yydefault: } case 316: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3412 + // line internal/php7/php7.y:3406 { yyVAL.node = &ast.ExprPostDec{ast.Node{}, yyDollar[1].node} @@ -5897,7 +5889,7 @@ yydefault: } case 317: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3425 + // line internal/php7/php7.y:3419 { yyVAL.node = &ast.ExprPreDec{ast.Node{}, yyDollar[2].node} @@ -5911,7 +5903,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3437 + // line internal/php7/php7.y:3431 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5926,7 +5918,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3450 + // line internal/php7/php7.y:3444 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5941,7 +5933,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3463 + // line internal/php7/php7.y:3457 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5956,7 +5948,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3476 + // line internal/php7/php7.y:3470 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5971,7 +5963,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3489 + // line internal/php7/php7.y:3483 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5986,7 +5978,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3502 + // line internal/php7/php7.y:3496 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6001,7 +5993,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3515 + // line internal/php7/php7.y:3509 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6016,7 +6008,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3528 + // line internal/php7/php7.y:3522 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6031,7 +6023,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3541 + // line internal/php7/php7.y:3535 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6046,7 +6038,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3554 + // line internal/php7/php7.y:3548 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6061,7 +6053,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3567 + // line internal/php7/php7.y:3561 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6076,7 +6068,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3580 + // line internal/php7/php7.y:3574 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6091,7 +6083,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3593 + // line internal/php7/php7.y:3587 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6106,7 +6098,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3606 + // line internal/php7/php7.y:3600 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6121,7 +6113,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3619 + // line internal/php7/php7.y:3613 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6136,7 +6128,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3632 + // line internal/php7/php7.y:3626 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6151,7 +6143,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3645 + // line internal/php7/php7.y:3639 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6166,7 +6158,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3658 + // line internal/php7/php7.y:3652 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -6180,7 +6172,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3670 + // line internal/php7/php7.y:3664 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -6194,7 +6186,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3682 + // line internal/php7/php7.y:3676 { yyVAL.node = &ast.ExprBooleanNot{ast.Node{}, yyDollar[2].node} @@ -6208,7 +6200,7 @@ yydefault: } case 338: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3694 + // line internal/php7/php7.y:3688 { yyVAL.node = &ast.ExprBitwiseNot{ast.Node{}, yyDollar[2].node} @@ -6222,7 +6214,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3706 + // line internal/php7/php7.y:3700 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6237,7 +6229,7 @@ yydefault: } case 340: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3719 + // line internal/php7/php7.y:3713 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6252,7 +6244,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3732 + // line internal/php7/php7.y:3726 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6267,7 +6259,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3745 + // line internal/php7/php7.y:3739 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6283,7 +6275,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3759 + // line internal/php7/php7.y:3753 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6298,7 +6290,7 @@ yydefault: } case 344: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3772 + // line internal/php7/php7.y:3766 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6313,7 +6305,7 @@ yydefault: } case 345: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3785 + // line internal/php7/php7.y:3779 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6328,7 +6320,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3798 + // line internal/php7/php7.y:3792 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6343,7 +6335,7 @@ yydefault: } case 347: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3811 + // line internal/php7/php7.y:3805 { yyVAL.node = &ast.ExprBinarySpaceship{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6358,7 +6350,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3824 + // line internal/php7/php7.y:3818 { yyVAL.node = &ast.ExprInstanceOf{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6373,7 +6365,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3837 + // line internal/php7/php7.y:3831 { yyVAL.node = yyDollar[2].node @@ -6385,7 +6377,7 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3847 + // line internal/php7/php7.y:3841 { yyVAL.node = yyDollar[1].node @@ -6393,7 +6385,7 @@ yydefault: } case 351: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:3853 + // line internal/php7/php7.y:3847 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -6409,7 +6401,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3867 + // line internal/php7/php7.y:3861 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -6425,7 +6417,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3881 + // line internal/php7/php7.y:3875 { yyVAL.node = &ast.ExprBinaryCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6440,7 +6432,7 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3894 + // line internal/php7/php7.y:3888 { yyVAL.node = yyDollar[1].node @@ -6448,7 +6440,7 @@ yydefault: } case 355: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3900 + // line internal/php7/php7.y:3894 { yyVAL.node = &ast.ExprCastInt{ast.Node{}, yyDollar[2].node} @@ -6463,7 +6455,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3913 + // line internal/php7/php7.y:3907 { yyVAL.node = &ast.ExprCastDouble{ast.Node{}, yyDollar[2].node} @@ -6478,7 +6470,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3926 + // line internal/php7/php7.y:3920 { yyVAL.node = &ast.ExprCastString{ast.Node{}, yyDollar[2].node} @@ -6493,7 +6485,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3939 + // line internal/php7/php7.y:3933 { yyVAL.node = &ast.ExprCastArray{ast.Node{}, yyDollar[2].node} @@ -6508,7 +6500,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3952 + // line internal/php7/php7.y:3946 { yyVAL.node = &ast.ExprCastObject{ast.Node{}, yyDollar[2].node} @@ -6523,7 +6515,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3965 + // line internal/php7/php7.y:3959 { yyVAL.node = &ast.ExprCastBool{ast.Node{}, yyDollar[2].node} @@ -6538,7 +6530,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3978 + // line internal/php7/php7.y:3972 { yyVAL.node = &ast.ExprCastUnset{ast.Node{}, yyDollar[2].node} @@ -6553,7 +6545,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3991 + // line internal/php7/php7.y:3985 { var e *ast.ExprExit if yyDollar[2].node != nil { @@ -6582,7 +6574,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4018 + // line internal/php7/php7.y:4012 { yyVAL.node = &ast.ExprErrorSuppress{ast.Node{}, yyDollar[2].node} @@ -6596,7 +6588,7 @@ yydefault: } case 364: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4030 + // line internal/php7/php7.y:4024 { yyVAL.node = yyDollar[1].node @@ -6604,7 +6596,7 @@ yydefault: } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4036 + // line internal/php7/php7.y:4030 { yyVAL.node = &ast.ExprShellExec{ast.Node{}, yyDollar[2].list} @@ -6618,7 +6610,7 @@ yydefault: } case 366: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4048 + // line internal/php7/php7.y:4042 { yyVAL.node = &ast.ExprPrint{ast.Node{}, yyDollar[2].node} @@ -6632,7 +6624,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4060 + // line internal/php7/php7.y:4054 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, nil} @@ -6646,7 +6638,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4072 + // line internal/php7/php7.y:4066 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6660,7 +6652,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4084 + // line internal/php7/php7.y:4078 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6675,7 +6667,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4097 + // line internal/php7/php7.y:4091 { yyVAL.node = &ast.ExprYieldFrom{ast.Node{}, yyDollar[2].node} @@ -6689,7 +6681,7 @@ yydefault: } case 371: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4109 + // line internal/php7/php7.y:4103 { yyVAL.node = yyDollar[1].node @@ -6697,7 +6689,7 @@ yydefault: } case 372: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4115 + // line internal/php7/php7.y:4109 { yyVAL.node = yyDollar[2].node @@ -6720,7 +6712,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:4138 + // line internal/php7/php7.y:4132 { yyVAL.node = &ast.ExprClosure{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[5].list, yyDollar[7].ClosureUse, yyDollar[8].node, yyDollar[10].list} @@ -6736,10 +6728,6 @@ yydefault: yylex.(*Parser).setFreeFloating(yyVAL.node, token.Ampersand, yyDollar[4].token.Tokens) } yylex.(*Parser).setFreeFloating(yyVAL.node, token.ParameterList, yyDollar[6].token.Tokens) - if yyDollar[8].node != nil { - yylex.(*Parser).setFreeFloatingTokens(yyVAL.node, token.LexicalVars, yyDollar[8].node.GetNode().Tokens[token.Colon]) - delete(yyDollar[8].node.GetNode().Tokens, token.Colon) - } yylex.(*Parser).setFreeFloating(yyVAL.node, token.ReturnType, yyDollar[9].token.Tokens) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Stmts, yyDollar[11].token.Tokens) @@ -6757,7 +6745,7 @@ yydefault: } case 374: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:4170 + // line internal/php7/php7.y:4161 { yyVAL.node = &ast.ExprArrowFunction{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[4].list, yyDollar[6].node, yyDollar[9].node} @@ -6773,10 +6761,6 @@ yydefault: yylex.(*Parser).setFreeFloating(yyVAL.node, token.Ampersand, yyDollar[3].token.Tokens) } yylex.(*Parser).setFreeFloating(yyVAL.node, token.ParameterList, yyDollar[5].token.Tokens) - if yyDollar[6].node != nil { - yylex.(*Parser).setFreeFloatingTokens(yyVAL.node, token.Params, yyDollar[6].node.GetNode().Tokens[token.Colon]) - delete(yyDollar[6].node.GetNode().Tokens, token.Colon) - } yylex.(*Parser).setFreeFloating(yyVAL.node, token.ReturnType, yyDollar[8].token.Tokens) // normalize @@ -6789,19 +6773,19 @@ yydefault: } case 376: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4205 + // line internal/php7/php7.y:4193 { yyVAL.token = nil } case 377: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4209 + // line internal/php7/php7.y:4197 { yyVAL.token = yyDollar[1].token } case 378: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4216 + // line internal/php7/php7.y:4204 { yyVAL.ClosureUse = nil @@ -6809,7 +6793,7 @@ yydefault: } case 379: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4222 + // line internal/php7/php7.y:4210 { yyVAL.ClosureUse = &ast.ExprClosureUse{ast.Node{}, yyDollar[3].list} @@ -6825,7 +6809,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4239 + // line internal/php7/php7.y:4227 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -6836,7 +6820,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4248 + // line internal/php7/php7.y:4236 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -6844,7 +6828,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4257 + // line internal/php7/php7.y:4245 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} @@ -6860,7 +6844,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4271 + // line internal/php7/php7.y:4259 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -6879,7 +6863,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4291 + // line internal/php7/php7.y:4279 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -6893,7 +6877,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4303 + // line internal/php7/php7.y:4291 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6908,7 +6892,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4316 + // line internal/php7/php7.y:4304 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6923,7 +6907,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4329 + // line internal/php7/php7.y:4317 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -6937,7 +6921,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4344 + // line internal/php7/php7.y:4332 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -6951,7 +6935,7 @@ yydefault: } case 389: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4356 + // line internal/php7/php7.y:4344 { yyVAL.node = yyDollar[1].node @@ -6959,7 +6943,7 @@ yydefault: } case 390: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4365 + // line internal/php7/php7.y:4353 { yyVAL.node = yyDollar[1].node @@ -6967,7 +6951,7 @@ yydefault: } case 391: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4371 + // line internal/php7/php7.y:4359 { yyVAL.node = yyDollar[1].node @@ -6975,7 +6959,7 @@ yydefault: } case 392: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4380 + // line internal/php7/php7.y:4368 { yyVAL.node = nil @@ -6983,7 +6967,7 @@ yydefault: } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4386 + // line internal/php7/php7.y:4374 { yyVAL.node = &ast.ExprExit{ast.Node{}, false, yyDollar[2].node} @@ -6998,7 +6982,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4402 + // line internal/php7/php7.y:4390 { yyVAL.list = []ast.Vertex{} @@ -7006,7 +6990,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4408 + // line internal/php7/php7.y:4396 { part := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{part} @@ -7018,7 +7002,7 @@ yydefault: } case 396: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4418 + // line internal/php7/php7.y:4406 { yyVAL.list = yyDollar[1].list @@ -7026,7 +7010,7 @@ yydefault: } case 397: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4427 + // line internal/php7/php7.y:4415 { yyVAL.node = nil @@ -7034,7 +7018,7 @@ yydefault: } case 398: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4433 + // line internal/php7/php7.y:4421 { yyVAL.node = yyDollar[1].node @@ -7042,7 +7026,7 @@ yydefault: } case 399: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4442 + // line internal/php7/php7.y:4430 { yyVAL.node = &ast.ExprArray{ast.Node{}, yyDollar[3].list} @@ -7058,7 +7042,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4456 + // line internal/php7/php7.y:4444 { yyVAL.node = &ast.ExprShortArray{ast.Node{}, yyDollar[2].list} @@ -7073,7 +7057,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4469 + // line internal/php7/php7.y:4457 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -7087,7 +7071,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4484 + // line internal/php7/php7.y:4472 { yyVAL.node = &ast.ScalarLnumber{ast.Node{}, yyDollar[1].token.Value} @@ -7101,7 +7085,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4496 + // line internal/php7/php7.y:4484 { yyVAL.node = &ast.ScalarDnumber{ast.Node{}, yyDollar[1].token.Value} @@ -7115,7 +7099,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4508 + // line internal/php7/php7.y:4496 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7129,7 +7113,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4520 + // line internal/php7/php7.y:4508 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7143,7 +7127,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4532 + // line internal/php7/php7.y:4520 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7157,7 +7141,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4544 + // line internal/php7/php7.y:4532 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7171,7 +7155,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4556 + // line internal/php7/php7.y:4544 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7185,7 +7169,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4568 + // line internal/php7/php7.y:4556 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7199,7 +7183,7 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4580 + // line internal/php7/php7.y:4568 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7213,7 +7197,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4592 + // line internal/php7/php7.y:4580 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7227,7 +7211,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4604 + // line internal/php7/php7.y:4592 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, []ast.Vertex{encapsed}} @@ -7243,7 +7227,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4618 + // line internal/php7/php7.y:4606 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, nil} @@ -7257,7 +7241,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4630 + // line internal/php7/php7.y:4618 { yyVAL.node = &ast.ScalarEncapsed{ast.Node{}, yyDollar[2].list} @@ -7271,7 +7255,7 @@ yydefault: } case 415: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4642 + // line internal/php7/php7.y:4630 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, yyDollar[2].list} @@ -7285,7 +7269,7 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4654 + // line internal/php7/php7.y:4642 { yyVAL.node = yyDollar[1].node @@ -7293,7 +7277,7 @@ yydefault: } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4660 + // line internal/php7/php7.y:4648 { yyVAL.node = yyDollar[1].node @@ -7301,7 +7285,7 @@ yydefault: } case 418: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4669 + // line internal/php7/php7.y:4657 { yyVAL.node = &ast.ExprConstFetch{ast.Node{}, yyDollar[1].node} @@ -7315,7 +7299,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4681 + // line internal/php7/php7.y:4669 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -7333,7 +7317,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4697 + // line internal/php7/php7.y:4685 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -7351,7 +7335,7 @@ yydefault: } case 421: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4716 + // line internal/php7/php7.y:4704 { yyVAL.node = yyDollar[1].node @@ -7359,7 +7343,7 @@ yydefault: } case 422: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4722 + // line internal/php7/php7.y:4710 { yyVAL.node = yyDollar[1].node @@ -7367,7 +7351,7 @@ yydefault: } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4731 + // line internal/php7/php7.y:4719 { yyVAL.node = nil @@ -7375,7 +7359,7 @@ yydefault: } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4737 + // line internal/php7/php7.y:4725 { yyVAL.node = yyDollar[1].node @@ -7383,7 +7367,7 @@ yydefault: } case 425: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4746 + // line internal/php7/php7.y:4734 { yyVAL.node = yyDollar[1].node @@ -7391,7 +7375,7 @@ yydefault: } case 426: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4755 + // line internal/php7/php7.y:4743 { yyVAL.node = yyDollar[1].node @@ -7399,7 +7383,7 @@ yydefault: } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4761 + // line internal/php7/php7.y:4749 { yyVAL.node = yyDollar[2].node @@ -7411,7 +7395,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4771 + // line internal/php7/php7.y:4759 { yyVAL.node = yyDollar[1].node @@ -7419,7 +7403,7 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4780 + // line internal/php7/php7.y:4768 { yyVAL.node = yyDollar[1].node @@ -7427,7 +7411,7 @@ yydefault: } case 430: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4786 + // line internal/php7/php7.y:4774 { yyVAL.node = yyDollar[2].node @@ -7439,7 +7423,7 @@ yydefault: } case 431: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4796 + // line internal/php7/php7.y:4784 { yyVAL.node = yyDollar[1].node @@ -7447,7 +7431,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4805 + // line internal/php7/php7.y:4793 { yyVAL.node = yyDollar[1].node @@ -7455,7 +7439,7 @@ yydefault: } case 433: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4811 + // line internal/php7/php7.y:4799 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7470,7 +7454,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4824 + // line internal/php7/php7.y:4812 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7485,7 +7469,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4837 + // line internal/php7/php7.y:4825 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7500,7 +7484,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4850 + // line internal/php7/php7.y:4838 { yyVAL.node = &ast.ExprMethodCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -7515,7 +7499,7 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4863 + // line internal/php7/php7.y:4851 { yyVAL.node = yyDollar[1].node @@ -7523,7 +7507,7 @@ yydefault: } case 438: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4872 + // line internal/php7/php7.y:4860 { yyVAL.node = yyDollar[1].node @@ -7531,7 +7515,7 @@ yydefault: } case 439: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4878 + // line internal/php7/php7.y:4866 { yyVAL.node = yyDollar[1].node @@ -7539,7 +7523,7 @@ yydefault: } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4884 + // line internal/php7/php7.y:4872 { yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7554,7 +7538,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4900 + // line internal/php7/php7.y:4888 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -7570,7 +7554,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4914 + // line internal/php7/php7.y:4902 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -7586,7 +7570,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4928 + // line internal/php7/php7.y:4916 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -7600,7 +7584,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4943 + // line internal/php7/php7.y:4931 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7615,7 +7599,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4956 + // line internal/php7/php7.y:4944 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7630,7 +7614,7 @@ yydefault: } case 446: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4972 + // line internal/php7/php7.y:4960 { yyVAL.node = yyDollar[1].node @@ -7638,7 +7622,7 @@ yydefault: } case 447: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4978 + // line internal/php7/php7.y:4966 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7653,7 +7637,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4991 + // line internal/php7/php7.y:4979 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7668,7 +7652,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5004 + // line internal/php7/php7.y:4992 { yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7683,7 +7667,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5017 + // line internal/php7/php7.y:5005 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7698,7 +7682,7 @@ yydefault: } case 451: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5030 + // line internal/php7/php7.y:5018 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7713,7 +7697,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5046 + // line internal/php7/php7.y:5034 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -7727,7 +7711,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5058 + // line internal/php7/php7.y:5046 { yyVAL.node = yyDollar[2].node @@ -7739,7 +7723,7 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5068 + // line internal/php7/php7.y:5056 { yyVAL.node = yyDollar[1].node @@ -7747,7 +7731,7 @@ yydefault: } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5077 + // line internal/php7/php7.y:5065 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -7761,7 +7745,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5089 + // line internal/php7/php7.y:5077 { yyVAL.node = yyDollar[2].node @@ -7773,7 +7757,7 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5099 + // line internal/php7/php7.y:5087 { yyVAL.node = yyDollar[1].node @@ -7781,7 +7765,7 @@ yydefault: } case 458: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5108 + // line internal/php7/php7.y:5096 { yyVAL.list = yyDollar[1].list @@ -7789,7 +7773,7 @@ yydefault: } case 459: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:5117 + // line internal/php7/php7.y:5105 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, nil} @@ -7797,7 +7781,7 @@ yydefault: } case 460: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5123 + // line internal/php7/php7.y:5111 { yyVAL.node = yyDollar[1].node @@ -7805,7 +7789,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5132 + // line internal/php7/php7.y:5120 { if len(yyDollar[1].list) == 0 { yyDollar[1].list = []ast.Vertex{&ast.ExprArrayItem{ast.Node{}, false, nil, nil}} @@ -7820,7 +7804,7 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5145 + // line internal/php7/php7.y:5133 { if yyDollar[1].node.(*ast.ExprArrayItem).Key == nil && yyDollar[1].node.(*ast.ExprArrayItem).Val == nil { yyVAL.list = []ast.Vertex{} @@ -7832,7 +7816,7 @@ yydefault: } case 463: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5158 + // line internal/php7/php7.y:5146 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, yyDollar[3].node} @@ -7847,7 +7831,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5171 + // line internal/php7/php7.y:5159 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} @@ -7861,7 +7845,7 @@ yydefault: } case 465: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5183 + // line internal/php7/php7.y:5171 { reference := &ast.ExprReference{ast.Node{}, yyDollar[4].node} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, reference} @@ -7879,7 +7863,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5199 + // line internal/php7/php7.y:5187 { reference := &ast.ExprReference{ast.Node{}, yyDollar[2].node} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, reference} @@ -7895,7 +7879,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5213 + // line internal/php7/php7.y:5201 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, true, nil, yyDollar[2].node} @@ -7909,7 +7893,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:5225 + // line internal/php7/php7.y:5213 { // TODO: Cannot use list() as standalone expression listNode := &ast.ExprList{ast.Node{}, yyDollar[5].list} @@ -7930,7 +7914,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5244 + // line internal/php7/php7.y:5232 { // TODO: Cannot use list() as standalone expression listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -7949,7 +7933,7 @@ yydefault: } case 470: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5264 + // line internal/php7/php7.y:5252 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -7957,7 +7941,7 @@ yydefault: } case 471: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5270 + // line internal/php7/php7.y:5258 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.list = append(yyDollar[1].list, encapsed) @@ -7972,7 +7956,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5283 + // line internal/php7/php7.y:5271 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -7980,7 +7964,7 @@ yydefault: } case 473: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5289 + // line internal/php7/php7.y:5277 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{encapsed, yyDollar[2].node} @@ -7995,7 +7979,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5305 + // line internal/php7/php7.y:5293 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -8011,7 +7995,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5319 + // line internal/php7/php7.y:5307 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -8030,7 +8014,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5336 + // line internal/php7/php7.y:5324 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -8051,7 +8035,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5355 + // line internal/php7/php7.y:5343 { variable := &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -8068,7 +8052,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5370 + // line internal/php7/php7.y:5358 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, name} @@ -8087,7 +8071,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:5387 + // line internal/php7/php7.y:5375 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -8108,7 +8092,7 @@ yydefault: } case 480: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5406 + // line internal/php7/php7.y:5394 { yyVAL.node = yyDollar[2].node @@ -8120,7 +8104,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5419 + // line internal/php7/php7.y:5407 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -8134,7 +8118,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5431 + // line internal/php7/php7.y:5419 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -8153,7 +8137,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5448 + // line internal/php7/php7.y:5436 { var lnumber *ast.ScalarLnumber // TODO: add option to handle 64 bit integer @@ -8181,7 +8165,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5474 + // line internal/php7/php7.y:5462 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} @@ -8197,7 +8181,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:5491 + // line internal/php7/php7.y:5479 { yyVAL.node = &ast.ExprIsset{ast.Node{}, yyDollar[3].list} @@ -8217,7 +8201,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5509 + // line internal/php7/php7.y:5497 { yyVAL.node = &ast.ExprEmpty{ast.Node{}, yyDollar[3].node} @@ -8233,7 +8217,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5523 + // line internal/php7/php7.y:5511 { yyVAL.node = &ast.ExprInclude{ast.Node{}, yyDollar[2].node} @@ -8247,7 +8231,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5535 + // line internal/php7/php7.y:5523 { yyVAL.node = &ast.ExprIncludeOnce{ast.Node{}, yyDollar[2].node} @@ -8261,7 +8245,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5547 + // line internal/php7/php7.y:5535 { yyVAL.node = &ast.ExprEval{ast.Node{}, yyDollar[3].node} @@ -8277,7 +8261,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5561 + // line internal/php7/php7.y:5549 { yyVAL.node = &ast.ExprRequire{ast.Node{}, yyDollar[2].node} @@ -8291,7 +8275,7 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5573 + // line internal/php7/php7.y:5561 { yyVAL.node = &ast.ExprRequireOnce{ast.Node{}, yyDollar[2].node} @@ -8305,7 +8289,7 @@ yydefault: } case 492: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5588 + // line internal/php7/php7.y:5576 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -8313,7 +8297,7 @@ yydefault: } case 493: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5594 + // line internal/php7/php7.y:5582 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -8324,7 +8308,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5606 + // line internal/php7/php7.y:5594 { yyVAL.node = yyDollar[1].node diff --git a/internal/php7/php7.y b/internal/php7/php7.y index deb2eff..1fb33a9 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -1453,9 +1453,6 @@ function_declaration_statement: } yylex.(*Parser).setFreeFloating($$, token.Name, $5.Tokens) yylex.(*Parser).setFreeFloating($$, token.ParamList, $7.Tokens) - if $8 != nil { - yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $8.GetNode().Tokens[token.Colon]); delete($8.GetNode().Tokens, token.Colon) - } yylex.(*Parser).setFreeFloating($$, token.ReturnType, $9.Tokens) yylex.(*Parser).setFreeFloating($$, token.Stmts, $11.Tokens) @@ -2286,7 +2283,7 @@ return_type: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Colon, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2540,9 +2537,6 @@ class_statement: } yylex.(*Parser).setFreeFloating($$, token.Name, $6.Tokens) yylex.(*Parser).setFreeFloating($$, token.ParameterList, $8.Tokens) - if $9 != nil { - yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $9.GetNode().Tokens[token.Colon]); delete($9.GetNode().Tokens, token.Colon) - } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4150,9 +4144,6 @@ inline_function: yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Tokens) } yylex.(*Parser).setFreeFloating($$, token.ParameterList, $6.Tokens) - if $8 != nil { - yylex.(*Parser).setFreeFloatingTokens($$, token.LexicalVars, $8.GetNode().Tokens[token.Colon]); delete($8.GetNode().Tokens, token.Colon) - } yylex.(*Parser).setFreeFloating($$, token.ReturnType, $9.Tokens) yylex.(*Parser).setFreeFloating($$, token.Stmts, $11.Tokens) @@ -4182,9 +4173,6 @@ inline_function: yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Tokens) }; yylex.(*Parser).setFreeFloating($$, token.ParameterList, $5.Tokens) - if $6 != nil { - yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $6.GetNode().Tokens[token.Colon]); delete($6.GetNode().Tokens, token.Colon) - }; yylex.(*Parser).setFreeFloating($$, token.ReturnType, $8.Tokens) // normalize diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go index dd06f0f..6fd54bc 100644 --- a/pkg/printer/printer.go +++ b/pkg/printer/printer.go @@ -1409,7 +1409,7 @@ func (p *Printer) printExprArrowFunction(n ast.Vertex) { p.printFreeFloating(nn, token.Params) if nn.ReturnType != nil { - io.WriteString(p.w, ":") + p.bufStart = ":" p.Print(nn.ReturnType) } p.printFreeFloating(nn, token.ReturnType) @@ -1505,7 +1505,7 @@ func (p *Printer) printExprClosure(n ast.Vertex) { p.printFreeFloating(nn, token.LexicalVars) if nn.ReturnType != nil { - io.WriteString(p.w, ":") + p.bufStart = ":" p.Print(nn.ReturnType) } p.printFreeFloating(nn, token.ReturnType) @@ -2285,7 +2285,7 @@ func (p *Printer) printStmtClassMethod(n ast.Vertex) { p.printFreeFloating(nn, token.Params) if nn.ReturnType != nil { - io.WriteString(p.w, ":") + p.bufStart = ":" p.Print(nn.ReturnType) } @@ -2703,7 +2703,7 @@ func (p *Printer) printStmtFunction(n ast.Vertex) { p.printFreeFloating(nn, token.Params) if nn.ReturnType != nil { - io.WriteString(p.w, ":") + p.bufStart = ":" p.Print(nn.ReturnType) } p.printFreeFloating(nn, token.ReturnType) diff --git a/pkg/token/position.go b/pkg/token/position.go index 1a3b02d..28f7802 100644 --- a/pkg/token/position.go +++ b/pkg/token/position.go @@ -6,7 +6,6 @@ type Position int const ( Start Position = iota End - Colon SemiColon AltEnd Dollar diff --git a/pkg/token/position_string.go b/pkg/token/position_string.go index a2f713a..ef682f8 100644 --- a/pkg/token/position_string.go +++ b/pkg/token/position_string.go @@ -10,84 +10,83 @@ func _() { var x [1]struct{} _ = x[Start-0] _ = x[End-1] - _ = x[Colon-2] - _ = x[SemiColon-3] - _ = x[AltEnd-4] - _ = x[Dollar-5] - _ = x[Ampersand-6] - _ = x[Name-7] - _ = x[Prefix-8] - _ = x[Key-9] - _ = x[Var-10] - _ = x[UseType-11] - _ = x[ReturnType-12] - _ = x[OptionalType-13] - _ = x[CaseSeparator-14] - _ = x[LexicalVars-15] - _ = x[Params-16] - _ = x[Ref-17] - _ = x[Cast-18] - _ = x[Expr-19] - _ = x[InitExpr-20] - _ = x[CondExpr-21] - _ = x[IncExpr-22] - _ = x[True-23] - _ = x[Cond-24] - _ = x[HaltCompiller-25] - _ = x[Namespace-26] - _ = x[Static-27] - _ = x[Class-28] - _ = x[Use-29] - _ = x[While-30] - _ = x[For-31] - _ = x[Switch-32] - _ = x[Break-33] - _ = x[Foreach-34] - _ = x[Declare-35] - _ = x[Label-36] - _ = x[Finally-37] - _ = x[List-38] - _ = x[Default-39] - _ = x[If-40] - _ = x[ElseIf-41] - _ = x[Else-42] - _ = x[Variadic-43] - _ = x[Function-44] - _ = x[DoubleArrow-45] - _ = x[Alias-46] - _ = x[As-47] - _ = x[Equal-48] - _ = x[Exit-49] - _ = x[Array-50] - _ = x[Isset-51] - _ = x[Empty-52] - _ = x[Eval-53] - _ = x[Echo-54] - _ = x[Try-55] - _ = x[Catch-56] - _ = x[Unset-57] - _ = x[Stmts-58] - _ = x[VarList-59] - _ = x[ConstList-60] - _ = x[NameList-61] - _ = x[ParamList-62] - _ = x[ModifierList-63] - _ = x[ArrayPairList-64] - _ = x[CaseListStart-65] - _ = x[CaseListEnd-66] - _ = x[ArgumentList-67] - _ = x[PropertyList-68] - _ = x[ParameterList-69] - _ = x[AdaptationList-70] - _ = x[LexicalVarList-71] - _ = x[UseDeclarationList-72] - _ = x[OpenParenthesisToken-73] - _ = x[CloseParenthesisToken-74] + _ = x[SemiColon-2] + _ = x[AltEnd-3] + _ = x[Dollar-4] + _ = x[Ampersand-5] + _ = x[Name-6] + _ = x[Prefix-7] + _ = x[Key-8] + _ = x[Var-9] + _ = x[UseType-10] + _ = x[ReturnType-11] + _ = x[OptionalType-12] + _ = x[CaseSeparator-13] + _ = x[LexicalVars-14] + _ = x[Params-15] + _ = x[Ref-16] + _ = x[Cast-17] + _ = x[Expr-18] + _ = x[InitExpr-19] + _ = x[CondExpr-20] + _ = x[IncExpr-21] + _ = x[True-22] + _ = x[Cond-23] + _ = x[HaltCompiller-24] + _ = x[Namespace-25] + _ = x[Static-26] + _ = x[Class-27] + _ = x[Use-28] + _ = x[While-29] + _ = x[For-30] + _ = x[Switch-31] + _ = x[Break-32] + _ = x[Foreach-33] + _ = x[Declare-34] + _ = x[Label-35] + _ = x[Finally-36] + _ = x[List-37] + _ = x[Default-38] + _ = x[If-39] + _ = x[ElseIf-40] + _ = x[Else-41] + _ = x[Variadic-42] + _ = x[Function-43] + _ = x[DoubleArrow-44] + _ = x[Alias-45] + _ = x[As-46] + _ = x[Equal-47] + _ = x[Exit-48] + _ = x[Array-49] + _ = x[Isset-50] + _ = x[Empty-51] + _ = x[Eval-52] + _ = x[Echo-53] + _ = x[Try-54] + _ = x[Catch-55] + _ = x[Unset-56] + _ = x[Stmts-57] + _ = x[VarList-58] + _ = x[ConstList-59] + _ = x[NameList-60] + _ = x[ParamList-61] + _ = x[ModifierList-62] + _ = x[ArrayPairList-63] + _ = x[CaseListStart-64] + _ = x[CaseListEnd-65] + _ = x[ArgumentList-66] + _ = x[PropertyList-67] + _ = x[ParameterList-68] + _ = x[AdaptationList-69] + _ = x[LexicalVarList-70] + _ = x[UseDeclarationList-71] + _ = x[OpenParenthesisToken-72] + _ = x[CloseParenthesisToken-73] } -const _Position_name = "StartEndColonSemiColonAltEndDollarAmpersandNamePrefixKeyVarUseTypeReturnTypeOptionalTypeCaseSeparatorLexicalVarsParamsRefCastExprInitExprCondExprIncExprTrueCondHaltCompillerNamespaceStaticClassUseWhileForSwitchBreakForeachDeclareLabelFinallyListDefaultIfElseIfElseVariadicFunctionDoubleArrowAliasAsEqualExitArrayIssetEmptyEvalEchoTryCatchUnsetStmtsVarListConstListNameListParamListModifierListArrayPairListCaseListStartCaseListEndArgumentListPropertyListParameterListAdaptationListLexicalVarListUseDeclarationListOpenParenthesisTokenCloseParenthesisToken" +const _Position_name = "StartEndSemiColonAltEndDollarAmpersandNamePrefixKeyVarUseTypeReturnTypeOptionalTypeCaseSeparatorLexicalVarsParamsRefCastExprInitExprCondExprIncExprTrueCondHaltCompillerNamespaceStaticClassUseWhileForSwitchBreakForeachDeclareLabelFinallyListDefaultIfElseIfElseVariadicFunctionDoubleArrowAliasAsEqualExitArrayIssetEmptyEvalEchoTryCatchUnsetStmtsVarListConstListNameListParamListModifierListArrayPairListCaseListStartCaseListEndArgumentListPropertyListParameterListAdaptationListLexicalVarListUseDeclarationListOpenParenthesisTokenCloseParenthesisToken" -var _Position_index = [...]uint16{0, 5, 8, 13, 22, 28, 34, 43, 47, 53, 56, 59, 66, 76, 88, 101, 112, 118, 121, 125, 129, 137, 145, 152, 156, 160, 173, 182, 188, 193, 196, 201, 204, 210, 215, 222, 229, 234, 241, 245, 252, 254, 260, 264, 272, 280, 291, 296, 298, 303, 307, 312, 317, 322, 326, 330, 333, 338, 343, 348, 355, 364, 372, 381, 393, 406, 419, 430, 442, 454, 467, 481, 495, 513, 533, 554} +var _Position_index = [...]uint16{0, 5, 8, 17, 23, 29, 38, 42, 48, 51, 54, 61, 71, 83, 96, 107, 113, 116, 120, 124, 132, 140, 147, 151, 155, 168, 177, 183, 188, 191, 196, 199, 205, 210, 217, 224, 229, 236, 240, 247, 249, 255, 259, 267, 275, 286, 291, 293, 298, 302, 307, 312, 317, 321, 325, 328, 333, 338, 343, 350, 359, 367, 376, 388, 401, 414, 425, 437, 449, 462, 476, 490, 508, 528, 549} func (i Position) String() string { if i < 0 || i >= Position(len(_Position_index)-1) {