diff --git a/internal/php5/php5.go b/internal/php5/php5.go index 498f6b5..7492a95 100644 --- a/internal/php5/php5.go +++ b/internal/php5/php5.go @@ -346,7 +346,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -// line internal/php5/php5.y:6151 +// line internal/php5/php5.y:6157 type simpleIndirectReference struct { all []*ast.ExprVariable @@ -706,9 +706,9 @@ var yyAct = [...]int{ 920, 39, 903, 920, 260, 261, 483, 896, 260, 261, 448, 839, 944, 836, 566, 231, 948, 231, 1006, 949, 531, 842, 1005, 449, 725, 39, 232, 843, 232, 192, - 841, 39, 394, 946, 260, 261, 341, 698, 538, 929, - 290, 519, 460, 318, 314, 973, 127, 403, 575, 401, - 519, 335, 945, 1009, 343, 389, 939, 519, 519, 519, + 841, 39, 341, 946, 260, 261, 698, 538, 929, 290, + 460, 519, 318, 314, 127, 973, 403, 575, 401, 335, + 519, 945, 1009, 343, 394, 389, 939, 519, 519, 519, 519, 519, 164, 157, 161, 231, 528, 608, 531, 997, 970, 179, 182, 183, 991, 969, 232, 968, 189, 191, 967, 848, 849, 850, 847, 846, 845, 519, 838, 837, @@ -1607,9 +1607,9 @@ var yyPgo = [...]int{ 1121, 4, 1120, 1119, 1114, 16, 1111, 1110, 1109, 1108, 48, 5, 1100, 1097, 1095, 1090, 1089, 2, 1087, 607, 1086, 1084, 1083, 18, 202, 1082, 1076, 1075, 1074, 1073, - 12, 1072, 1071, 6, 19, 1069, 1068, 1067, 9, 50, - 0, 1066, 1064, 1063, 117, 599, 1062, 1060, 62, 8, - 1059, 1058, 1057, 1056, 14, 47, 1052, 1044, 1042, 1038, + 1072, 12, 1071, 1069, 6, 19, 1068, 1067, 1066, 9, + 50, 0, 1064, 1063, 1062, 117, 599, 1060, 1059, 62, + 8, 1058, 1057, 1056, 1052, 14, 47, 1044, 1042, 1038, 3, 1034, 23, 1033, 1031, 1027, 35, 1026, 1022, 1019, 1018, 1014, 1008, 1002, 25, 1001, 1000, 999, 24, 996, 15, 17, 993, 34, 992, 991, 986, 984, 177, 13, @@ -1617,29 +1617,29 @@ var yyPgo = [...]int{ } var yyR1 = [...]int{ - 0, 151, 99, 99, 100, 100, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 101, 101, - 6, 6, 6, 6, 102, 102, 7, 7, 7, 7, - 103, 103, 8, 8, 8, 8, 55, 55, 104, 104, + 0, 151, 100, 100, 101, 101, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 102, 102, + 6, 6, 6, 6, 103, 103, 7, 7, 7, 7, + 104, 104, 8, 8, 8, 8, 55, 55, 105, 105, 26, 26, 26, 26, 26, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 117, 117, 60, 60, 118, 118, 119, 119, 61, 87, 87, 58, 53, 54, 149, 149, 150, 150, 62, 63, 63, 66, 66, 66, 66, - 95, 95, 2, 97, 97, 96, 96, 126, 126, 94, - 94, 93, 93, 93, 91, 91, 90, 90, 59, 59, - 116, 116, 88, 88, 88, 88, 115, 115, 115, 4, - 4, 92, 92, 111, 111, 112, 112, 56, 56, 57, + 96, 96, 2, 98, 98, 97, 97, 126, 126, 95, + 95, 94, 94, 94, 92, 92, 91, 91, 59, 59, + 88, 88, 89, 89, 89, 89, 116, 116, 116, 4, + 4, 93, 93, 112, 112, 113, 113, 56, 56, 57, 57, 120, 120, 121, 121, 65, 65, 64, 64, 64, 64, 84, 84, 84, 127, 127, 70, 70, 70, 70, 82, 82, 29, 29, 29, 81, 81, 81, 81, 122, 122, 67, 67, 67, 67, 69, 128, 128, 86, 86, 129, 129, 130, 130, 71, 71, 72, 131, 131, 75, - 75, 74, 73, 73, 76, 76, 89, 89, 123, 123, + 75, 74, 73, 73, 76, 76, 90, 90, 123, 123, 124, 124, 132, 132, 77, 77, 77, 77, 77, 77, - 125, 125, 125, 125, 68, 68, 85, 85, 114, 114, - 113, 113, 138, 138, 136, 136, 137, 137, 137, 139, + 125, 125, 125, 125, 68, 68, 85, 85, 115, 115, + 114, 114, 138, 138, 136, 136, 137, 137, 137, 139, 139, 44, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, @@ -1648,8 +1648,8 @@ var yyR1 = [...]int{ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 52, 52, 52, 52, - 49, 49, 49, 49, 48, 48, 1, 98, 98, 110, - 110, 110, 110, 25, 25, 25, 25, 25, 25, 25, + 49, 49, 49, 49, 48, 48, 1, 99, 99, 111, + 111, 111, 111, 25, 25, 25, 25, 25, 25, 25, 25, 13, 13, 13, 13, 47, 47, 47, 45, 45, 43, 43, 146, 146, 145, 51, 51, 51, 133, 133, 133, 83, 83, 9, 9, 9, 9, 9, 9, 9, @@ -1664,11 +1664,11 @@ var yyR1 = [...]int{ 140, 142, 142, 78, 141, 141, 141, 42, 42, 46, 46, 14, 24, 24, 22, 22, 22, 23, 23, 23, 12, 12, 12, 11, 11, 15, 15, 143, 143, 144, - 144, 144, 41, 41, 148, 148, 109, 109, 40, 40, - 40, 108, 108, 107, 107, 107, 107, 107, 107, 107, - 107, 105, 105, 105, 105, 35, 35, 35, 35, 35, + 144, 144, 41, 41, 148, 148, 110, 110, 40, 40, + 40, 109, 109, 108, 108, 108, 108, 108, 108, 108, + 108, 106, 106, 106, 106, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 39, 39, 39, 39, 39, - 39, 39, 39, 106, 106, 38, 38, 32, 32, 33, + 39, 39, 39, 107, 107, 38, 38, 32, 32, 33, 34, } var yyR2 = [...]int{ @@ -1729,7 +1729,7 @@ var yyR2 = [...]int{ } var yyChk = [...]int{ - -1000, -151, -99, -5, 2, -27, -53, -54, 52, 80, + -1000, -151, -100, -5, 2, -27, -53, -54, 52, 80, 45, -55, -28, 10, -62, -63, 39, 144, 7, 21, 20, 23, 30, 34, 35, 40, -52, 47, 99, 19, 14, -16, 49, 25, 27, 146, 41, 44, 36, -1, @@ -1739,10 +1739,10 @@ var yyChk = [...]int{ 113, 114, 6, 158, -31, -49, -48, 143, 97, -22, 92, 50, 51, 4, 5, 85, 86, 87, 11, -37, -34, -9, 142, 75, 63, 18, 61, 150, -23, -24, - -25, -32, -100, 83, -13, 8, 9, 67, 68, 82, + -25, -32, -101, 83, -13, 8, 9, 67, 68, 82, 64, 65, 66, 81, -12, -148, -46, -14, -42, -11, - 159, 12, 148, -100, 144, 83, 10, -101, 37, 39, - -6, -100, 83, 146, 160, 147, 10, -104, -50, 148, + 159, 12, 148, -101, 144, 83, 10, -102, 37, 39, + -6, -101, 83, 146, 160, 147, 10, -105, -50, 148, -50, -27, -1, 80, 148, -50, 146, -16, 98, 99, 146, -16, 146, -17, -21, -16, 146, -82, -29, 12, 159, -81, -1, 12, -85, -16, 146, 131, 132, 88, @@ -1751,87 +1751,87 @@ var yyChk = [...]int{ 168, 141, 91, 152, 148, 148, 148, 144, -16, 10, -149, 153, 10, 10, -17, -21, -16, 53, 53, 162, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 148, -16, 105, 106, -20, -21, -100, 80, + 128, 129, 148, -16, 105, 106, -20, -21, -101, 80, 83, -13, -14, 99, -20, -16, -16, -16, -16, -44, -16, -52, -16, -16, -16, -16, -16, -16, -16, -51, - 148, -50, -16, 150, 150, -133, 17, -105, -35, 12, - 77, 78, -16, 58, -45, -13, -43, -100, 80, 83, + 148, -50, -16, 150, 150, -133, 17, -106, -35, 12, + 77, 78, -16, 58, -45, -13, -43, -101, 80, 83, -23, -12, -148, -14, 148, 148, -16, -16, 148, -16, - -16, 150, -105, 17, 17, 76, -105, 150, 148, -108, - -107, -16, 153, 150, 150, 83, -84, 148, -100, 79, + -16, 150, -106, 17, 17, 76, -106, 150, 148, -109, + -108, -16, 153, 150, 150, 83, -84, 148, -101, 79, 150, 144, -12, 159, 79, -84, 144, 149, 146, 144, - -99, -100, 146, 160, -102, -7, -100, 83, -103, -8, - -100, 83, 29, -100, 10, 162, -26, 145, 2, -27, - -53, -54, 52, -27, 147, -92, -27, 147, 21, -149, - -114, -113, -16, -88, 144, 147, 146, 146, 146, 146, + -100, -101, 146, 160, -103, -7, -101, 83, -104, -8, + -101, 83, 29, -101, 10, 162, -26, 145, 2, -27, + -53, -54, 52, -27, 147, -93, -27, 147, 21, -149, + -115, -114, -16, -89, 144, 147, 146, 146, 146, 146, 146, 160, -18, 144, -21, 146, 160, -149, 162, 146, 160, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -45, -16, 147, -87, - -58, -21, -21, -17, -116, 10, -104, 146, 146, 10, - 148, -95, 56, -97, 56, 59, -16, 153, -16, -16, + -58, -21, -21, -17, -88, 10, -105, 146, 146, 10, + 148, -96, 56, -98, 56, 59, -16, 153, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -109, -40, -21, 60, 83, -100, 79, 79, 149, 149, + -110, -40, -21, 60, 83, -101, 79, 79, 149, 149, 149, 149, -15, -16, -15, 143, -35, -35, 17, 150, 58, -16, 11, -21, -143, -144, -42, -41, -12, -148, - 10, 144, -83, -84, 79, 83, -100, 58, -12, 79, - -106, -38, -21, -17, -21, -16, -16, -15, 142, 76, - 76, -15, -108, 151, -3, 160, 59, -19, -21, -15, + 10, 144, -83, -84, 79, 83, -101, 58, -12, 79, + -107, -38, -21, -17, -21, -16, -16, -15, 142, 76, + 76, -15, -109, 151, -3, 160, 59, -19, -21, -15, -15, 10, 149, -127, -52, -70, -17, -21, 153, 84, -84, -41, -42, 10, 53, -15, -16, -41, -42, 10, - -16, 146, -99, 145, -84, -6, 146, 160, 29, -100, - 146, 160, 29, -100, 10, 29, 162, -30, -79, -9, - -33, -100, 80, 83, 61, 150, -10, 63, -80, 18, - 75, -13, 156, 157, 155, 154, 148, 148, -111, -104, - -104, -50, 146, 160, -115, 146, -115, 146, -29, -16, + -16, 146, -100, 145, -84, -6, 146, 160, 29, -101, + 146, 160, 29, -101, 10, 29, 162, -30, -79, -9, + -33, -101, 80, 83, 61, 150, -10, 63, -80, 18, + 75, -13, 156, 157, 155, 154, 148, 148, -112, -105, + -105, -50, 146, 160, -116, 146, -116, 146, -29, -16, 12, 148, -30, -16, 147, -16, 149, 160, 29, 29, 149, 160, 162, 145, 148, -120, -121, -65, -64, 61, - 62, -47, -100, 80, 83, -96, 57, -47, 144, -126, - -47, -17, -21, -21, 92, 149, 160, 148, -100, -139, + 62, -47, -101, 80, 83, -97, 57, -47, 144, -126, + -47, -17, -21, -21, 92, 149, 160, 148, -101, -139, -137, -136, -138, 150, -140, 58, 151, 151, -36, 10, 13, 12, 10, 145, 145, 150, 145, -141, -78, -142, - -84, 150, 144, -12, -16, -42, -100, -143, -42, 149, + -84, 150, 144, -12, -16, -42, -101, -143, -42, 149, 160, 149, 149, 149, 151, 151, 149, -16, 153, -16, 153, 151, 151, 149, 160, 149, -19, -16, -84, -84, 151, 145, -84, -84, 145, 145, -7, 10, 29, -8, 10, 29, 10, -30, 150, 155, 154, 164, 133, 165, 166, 161, 153, 163, 134, 135, 169, 89, 90, 88, 132, 131, 136, 137, 138, 139, 167, 168, 140, 141, - 152, 83, -100, 148, -134, -135, -79, 17, 79, -79, - -79, -79, -79, -79, 149, -56, 94, 95, -112, 22, - 146, -114, -16, 145, 32, 33, -115, 31, -115, 145, - 162, -120, -16, 146, -58, -93, -21, 153, 60, -93, + 152, 83, -101, 148, -134, -135, -79, 17, 79, -79, + -79, -79, -79, -79, 149, -56, 94, 95, -113, 22, + 146, -115, -16, 145, 32, 33, -116, 31, -116, 145, + 162, -120, -16, 146, -58, -94, -21, 153, 60, -94, -59, -27, 147, 10, -30, -117, 42, -120, 149, 160, - -149, 83, -100, 144, -126, -122, 160, -45, 162, -40, - -109, 150, -138, -140, -15, -143, 151, -16, -147, 150, + -149, 83, -101, 144, -126, -122, 160, -45, 162, -40, + -110, 150, -138, -140, -15, -143, 151, -16, -147, 150, 150, -15, -16, 145, -146, -38, 59, -19, -19, -70, 10, 10, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, 147, -79, - -100, -134, 151, -3, 160, 59, 10, 53, 149, 146, + -101, -134, 151, -3, 160, 59, 10, 53, 149, 146, -50, -27, -57, 94, 95, 146, 146, -16, -4, 147, - 146, 145, 146, 31, -30, 149, -94, 59, -21, 148, - -94, -104, 162, -60, 43, 148, 149, -98, 45, -65, - -150, 84, -100, -122, 145, -67, -123, -68, -69, -124, + 146, 145, 146, 31, -30, 149, -95, 59, -21, 148, + -95, -105, 162, -60, 43, 148, 149, -99, 45, -65, + -150, 84, -101, -122, 145, -67, -123, -68, -69, -124, -132, 48, 39, 45, -77, 104, 103, 102, 99, 100, 101, -47, -83, -16, 149, -15, 151, -141, 151, -140, -15, -15, 151, 145, -145, 58, -16, 153, 151, -79, - 147, 149, -79, -79, -27, 96, -50, 147, -114, -4, - -104, 146, -98, 149, -93, -109, 149, 28, -30, 144, + 147, 149, -79, -79, -27, 96, -50, 147, -115, -4, + -105, 146, -99, 149, -94, -110, 149, 28, -30, 144, -47, 144, 144, 148, 12, 145, -125, 12, 146, 160, -1, -77, 10, -128, -47, 151, 145, 151, 151, -143, - -19, -79, 59, 146, 147, -104, 149, -104, 144, -90, - -27, 147, 149, -90, 146, -104, 12, -104, -104, -110, + -19, -79, 59, 146, 147, -105, 149, -105, 144, -91, + -27, 147, 149, -91, 146, -105, 12, -105, -105, -111, 12, 153, 162, 146, 160, 162, 10, -149, 162, -86, - 160, 146, 144, -79, -104, -91, -27, 147, -104, -104, + 160, 146, 144, -79, -105, -92, -27, 147, -105, -105, 145, 149, 145, 145, 149, 160, 12, -30, 12, -30, 162, 10, -30, -47, -129, -130, -71, -72, -73, -74, - -75, -47, 10, -104, 145, 26, 144, 12, 153, 162, + -75, -47, 10, -105, 145, 26, 144, 12, 153, 162, -30, 148, 145, -71, 146, 146, 46, 29, 79, 24, - 146, -104, 12, -30, -120, -131, -47, -76, -77, 10, - 146, 145, 149, 160, 10, -118, -119, -61, 42, -89, - 146, 144, -47, -61, 148, -104, -47, 145, 12, 149, - 144, -104, 145, + 146, -105, 12, -30, -120, -131, -47, -76, -77, 10, + 146, 145, 149, 160, 10, -118, -119, -61, 42, -90, + 146, 144, -47, -61, 148, -105, -47, 145, 12, 149, + 144, -105, 145, } var yyDef = [...]int{ @@ -2806,7 +2806,7 @@ yydefault: { constList := yyDollar[1].node.(*ast.StmtConstList) constList.Node.Position = position.NewNodesPosition(yyDollar[1].node, yyDollar[5].node) - lastNode(constList.Consts).(*ast.StmtConstant).CommaTkn = yyDollar[2].token + constList.SeparatorTkns = append(constList.SeparatorTkns, yyDollar[2].token) constList.Consts = append(constList.Consts, &ast.StmtConstant{ Node: ast.Node{ Position: position.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node), @@ -3268,20 +3268,18 @@ yydefault: yyDollar = yyS[yypt-5 : yypt+1] // line internal/php5/php5.y:1132 { + yyDollar[5].node.(*ast.StmtDeclare).DeclareTkn = yyDollar[1].token + yyDollar[5].node.(*ast.StmtDeclare).OpenParenthesisTkn = yyDollar[2].token + yyDollar[5].node.(*ast.StmtDeclare).Consts = yyDollar[3].node.(*ast.ParserSeparatedList).Items + yyDollar[5].node.(*ast.StmtDeclare).SeparatorTkns = yyDollar[3].node.(*ast.ParserSeparatedList).SeparatorTkns + yyDollar[5].node.(*ast.StmtDeclare).CloseParenthesisTkn = yyDollar[4].token + yyDollar[5].node.(*ast.StmtDeclare).Node.Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node) + yyVAL.node = yyDollar[5].node - yyVAL.node.(*ast.StmtDeclare).Consts = yyDollar[3].list - - // save position - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Declare, yyDollar[2].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.ConstList, yyDollar[4].token.SkippedTokens) } case 71: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1145 + // line internal/php5/php5.y:1143 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -3294,7 +3292,7 @@ yydefault: } case 72: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:1156 + // line internal/php5/php5.y:1154 { yyVAL.node = &ast.StmtTry{ast.Node{}, yyDollar[3].list, yyDollar[5].list, yyDollar[6].node} @@ -3312,7 +3310,7 @@ yydefault: } case 73: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1172 + // line internal/php5/php5.y:1170 { yyVAL.node = &ast.StmtThrow{ast.Node{}, yyDollar[2].node} @@ -3326,7 +3324,7 @@ yydefault: } case 74: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1184 + // line internal/php5/php5.y:1182 { label := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtGoto{ast.Node{}, label} @@ -3343,13 +3341,13 @@ yydefault: } case 75: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1202 + // line internal/php5/php5.y:1200 { yyVAL.list = []ast.Vertex{} } case 76: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:1206 + // line internal/php5/php5.y:1204 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -3371,13 +3369,13 @@ yydefault: } case 77: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1229 + // line internal/php5/php5.y:1227 { yyVAL.node = nil } case 78: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1233 + // line internal/php5/php5.y:1231 { yyVAL.node = &ast.StmtFinally{ast.Node{}, yyDollar[3].list} @@ -3391,31 +3389,31 @@ yydefault: } case 79: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1248 + // line internal/php5/php5.y:1246 { yyVAL.list = yyDollar[1].list } case 80: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1252 + // line internal/php5/php5.y:1250 { yyVAL.list = []ast.Vertex{} } case 81: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1259 + // line internal/php5/php5.y:1257 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 82: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1263 + // line internal/php5/php5.y:1261 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 83: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:1270 + // line internal/php5/php5.y:1268 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -3436,7 +3434,7 @@ yydefault: } case 84: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1292 + // line internal/php5/php5.y:1290 { yyVAL.node = &ast.StmtUnset{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -3444,7 +3442,7 @@ yydefault: } case 85: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1298 + // line internal/php5/php5.y:1296 { 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) @@ -3453,49 +3451,49 @@ yydefault: } case 86: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1308 + // line internal/php5/php5.y:1306 { yyVAL.node = yyDollar[1].node } case 87: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1315 + // line internal/php5/php5.y:1313 { yyVAL.node = yyDollar[1].node } case 88: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1322 + // line internal/php5/php5.y:1320 { yyVAL.node = yyDollar[1].node } case 89: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1329 + // line internal/php5/php5.y:1327 { yyVAL.token = nil } case 90: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1333 + // line internal/php5/php5.y:1331 { yyVAL.token = yyDollar[1].token } case 91: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1340 + // line internal/php5/php5.y:1338 { yyVAL.token = nil } case 92: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1344 + // line internal/php5/php5.y:1342 { yyVAL.token = yyDollar[1].token } case 93: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:1351 + // line internal/php5/php5.y:1349 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtFunction{ast.Node{}, yyDollar[2].token != nil, name, yyDollar[5].list, nil, yyDollar[8].list} @@ -3519,7 +3517,7 @@ yydefault: } case 94: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php5/php5.y:1376 + // line internal/php5/php5.y:1374 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} switch n := yyDollar[1].node.(type) { @@ -3547,7 +3545,7 @@ yydefault: } case 95: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:1402 + // line internal/php5/php5.y:1400 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtInterface{ast.Node{}, name, yyDollar[3].InterfaceExtends, yyDollar[5].list} @@ -3564,7 +3562,7 @@ yydefault: } case 96: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1421 + // line internal/php5/php5.y:1419 { yyVAL.node = &ast.StmtClass{ast.Node{}, nil, nil, nil, nil, nil, nil} @@ -3576,7 +3574,7 @@ yydefault: } case 97: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1431 + // line internal/php5/php5.y:1429 { classModifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, nil, []ast.Vertex{classModifier}, nil, nil, nil, nil} @@ -3591,7 +3589,7 @@ yydefault: } case 98: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1444 + // line internal/php5/php5.y:1442 { yyVAL.node = &ast.StmtTrait{ast.Node{}, nil, nil} @@ -3603,7 +3601,7 @@ yydefault: } case 99: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1454 + // line internal/php5/php5.y:1452 { classModifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, nil, []ast.Vertex{classModifier}, nil, nil, nil, nil} @@ -3618,13 +3616,13 @@ yydefault: } case 100: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1470 + // line internal/php5/php5.y:1468 { yyVAL.ClassExtends = nil } case 101: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1474 + // line internal/php5/php5.y:1472 { yyVAL.ClassExtends = &ast.StmtClassExtends{ast.Node{}, yyDollar[2].node} @@ -3636,19 +3634,19 @@ yydefault: } case 102: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1487 + // line internal/php5/php5.y:1485 { yyVAL.token = yyDollar[1].token } case 103: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1494 + // line internal/php5/php5.y:1492 { yyVAL.InterfaceExtends = nil } case 104: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1498 + // line internal/php5/php5.y:1496 { yyVAL.InterfaceExtends = &ast.StmtInterfaceExtends{ast.Node{}, yyDollar[2].list} @@ -3660,13 +3658,13 @@ yydefault: } case 105: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1511 + // line internal/php5/php5.y:1509 { yyVAL.ClassImplements = nil } case 106: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1515 + // line internal/php5/php5.y:1513 { yyVAL.ClassImplements = &ast.StmtClassImplements{ast.Node{}, yyDollar[2].list} @@ -3678,13 +3676,13 @@ yydefault: } case 107: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1528 + // line internal/php5/php5.y:1526 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 108: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1532 + // line internal/php5/php5.y:1530 { switch n := lastNode(yyDollar[1].list).(type) { case *ast.NameName: @@ -3698,13 +3696,13 @@ yydefault: } case 109: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1544 + // line internal/php5/php5.y:1542 { yyVAL.node = nil } case 110: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1548 + // line internal/php5/php5.y:1546 { yyVAL.node = &ast.StmtForeach{ DoubleArrowTkn: yyDollar[1].token, @@ -3713,13 +3711,13 @@ yydefault: } case 111: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1558 + // line internal/php5/php5.y:1556 { yyVAL.node = yyDollar[1].node } case 112: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1562 + // line internal/php5/php5.y:1560 { yyVAL.node = &ast.ExprReference{ast.Node{}, yyDollar[2].node} @@ -3731,7 +3729,7 @@ yydefault: } case 113: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1572 + // line internal/php5/php5.y:1570 { yyVAL.node = &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -3745,7 +3743,7 @@ yydefault: } case 114: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1587 + // line internal/php5/php5.y:1585 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3756,7 +3754,7 @@ yydefault: } case 115: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1596 + // line internal/php5/php5.y:1594 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3776,7 +3774,7 @@ yydefault: } case 116: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1617 + // line internal/php5/php5.y:1615 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3787,7 +3785,7 @@ yydefault: } case 117: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1626 + // line internal/php5/php5.y:1624 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3807,80 +3805,88 @@ yydefault: } case 118: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1648 + // line internal/php5/php5.y:1646 { - yyVAL.node = &ast.StmtDeclare{ast.Node{}, false, nil, yyDollar[1].node} - - // save position - yyVAL.node.GetNode().Position = position.NewNodePosition(yyDollar[1].node) + yyVAL.node = &ast.StmtDeclare{ + Node: ast.Node{ + Position: position.NewNodePosition(yyDollar[1].node), + }, + Stmt: yyDollar[1].node, + } } case 119: yyDollar = yyS[yypt-4 : yypt+1] // line internal/php5/php5.y:1655 { - stmtList := &ast.StmtStmtList{ + yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ - Position: position.NewNodeListPosition(yyDollar[2].list), + Position: position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token), }, - Stmts: yyDollar[2].list, + Alt: true, + ColonTkn: yyDollar[1].token, + Stmt: &ast.StmtStmtList{ + Node: ast.Node{ + Position: position.NewNodeListPosition(yyDollar[2].list), + }, + Stmts: yyDollar[2].list, + }, + EndDeclareTkn: yyDollar[3].token, + SemiColonTkn: yyDollar[4].token, } - yyVAL.node = &ast.StmtDeclare{ast.Node{}, true, nil, stmtList} - - // save position - yyVAL.node.GetNode().Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Cond, yyDollar[1].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Stmts, yyDollar[3].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.AltEnd, yyDollar[4].token.SkippedTokens) - yylex.(*Parser).setToken(yyVAL.node, token.SemiColon, yyDollar[4].token.SkippedTokens) } case 120: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1678 + // line internal/php5/php5.y:1677 { - yyVAL.list = []ast.Vertex{ - &ast.StmtConstant{ - Node: ast.Node{ - Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node), - }, - Name: &ast.Identifier{ + yyVAL.node = &ast.ParserSeparatedList{ + Items: []ast.Vertex{ + &ast.StmtConstant{ Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[1].token), + Position: position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node), }, - Value: yyDollar[1].token.Value, + Name: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[1].token), + }, + Value: yyDollar[1].token.Value, + }, + EqualTkn: yyDollar[2].token, + Expr: yyDollar[3].node, }, - EqualTkn: yyDollar[2].token, - Expr: yyDollar[3].node, }, } - yylex.(*Parser).setFreeFloating(lastNode(yyVAL.list).(*ast.StmtConstant).Name, token.Start, yyDollar[1].token.SkippedTokens) + yylex.(*Parser).setFreeFloating(lastNode(yyVAL.node.(*ast.ParserSeparatedList).Items).(*ast.StmtConstant).Name, token.Start, yyDollar[1].token.SkippedTokens) } case 121: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1698 + // line internal/php5/php5.y:1699 { - lastNode(yyDollar[1].list).(*ast.StmtConstant).CommaTkn = yyDollar[2].token - yyVAL.list = append(yyDollar[1].list, &ast.StmtConstant{ - Node: ast.Node{ - Position: position.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node), - }, - Name: &ast.Identifier{ + 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, + &ast.StmtConstant{ Node: ast.Node{ - Position: position.NewTokenPosition(yyDollar[3].token), + Position: position.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node), }, - Value: yyDollar[3].token.Value, + Name: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition(yyDollar[3].token), + }, + Value: yyDollar[3].token.Value, + }, + EqualTkn: yyDollar[4].token, + Expr: yyDollar[5].node, }, - EqualTkn: yyDollar[4].token, - Expr: yyDollar[5].node, - }) + ) - yylex.(*Parser).setFreeFloating(lastNode(yyVAL.list).(*ast.StmtConstant).Name, token.Start, yyDollar[3].token.SkippedTokens) + yyVAL.node = yyDollar[1].node + + yylex.(*Parser).setFreeFloating(lastNode(yyVAL.node.(*ast.ParserSeparatedList).Items).(*ast.StmtConstant).Name, token.Start, yyDollar[3].token.SkippedTokens) } case 122: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1721 + // line internal/php5/php5.y:1727 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3893,7 +3899,7 @@ yydefault: } case 123: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1732 + // line internal/php5/php5.y:1738 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3907,7 +3913,7 @@ yydefault: } case 124: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1744 + // line internal/php5/php5.y:1750 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3922,7 +3928,7 @@ yydefault: } case 125: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1757 + // line internal/php5/php5.y:1763 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3938,13 +3944,13 @@ yydefault: } case 126: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1775 + // line internal/php5/php5.y:1781 { yyVAL.list = nil } case 127: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1779 + // line internal/php5/php5.y:1785 { yyVAL.list = append(yyDollar[1].list, &ast.StmtCase{ Node: ast.Node{ @@ -3958,7 +3964,7 @@ yydefault: } case 128: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1791 + // line internal/php5/php5.y:1797 { yyVAL.list = append(yyDollar[1].list, &ast.StmtDefault{ Node: ast.Node{ @@ -3971,19 +3977,19 @@ yydefault: } case 129: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1806 + // line internal/php5/php5.y:1812 { yyVAL.token = yyDollar[1].token } case 130: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1810 + // line internal/php5/php5.y:1816 { yyVAL.token = yyDollar[1].token } case 131: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1818 + // line internal/php5/php5.y:1824 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -3994,7 +4000,7 @@ yydefault: } case 132: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1827 + // line internal/php5/php5.y:1833 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4014,13 +4020,13 @@ yydefault: } case 133: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1850 + // line internal/php5/php5.y:1856 { yyVAL.list = nil } case 134: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1854 + // line internal/php5/php5.y:1860 { yyVAL.list = append(yyDollar[1].list, &ast.StmtElseIf{ Node: ast.Node{ @@ -4035,13 +4041,13 @@ yydefault: } case 135: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1871 + // line internal/php5/php5.y:1877 { yyVAL.list = nil } case 136: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1875 + // line internal/php5/php5.y:1881 { yyVAL.list = append(yyDollar[1].list, &ast.StmtElseIf{ Node: ast.Node{ @@ -4063,13 +4069,13 @@ yydefault: } case 137: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1899 + // line internal/php5/php5.y:1905 { yyVAL.node = nil } case 138: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1903 + // line internal/php5/php5.y:1909 { yyVAL.node = &ast.StmtElse{ Node: ast.Node{ @@ -4081,13 +4087,13 @@ yydefault: } case 139: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1917 + // line internal/php5/php5.y:1923 { yyVAL.node = nil } case 140: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1921 + // line internal/php5/php5.y:1927 { yyVAL.node = &ast.StmtElse{ Node: ast.Node{ @@ -4106,25 +4112,25 @@ yydefault: } case 141: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1942 + // line internal/php5/php5.y:1948 { yyVAL.list = yyDollar[1].list } case 142: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1946 + // line internal/php5/php5.y:1952 { yyVAL.list = nil } case 143: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1953 + // line internal/php5/php5.y:1959 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 144: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1957 + // line internal/php5/php5.y:1963 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4133,7 +4139,7 @@ yydefault: } case 145: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1967 + // line internal/php5/php5.y:1973 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} identifier.GetNode().Position = position.NewTokenPosition(yyDollar[4].token) @@ -4169,7 +4175,7 @@ yydefault: } case 146: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:2001 + // line internal/php5/php5.y:2007 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} identifier.GetNode().Position = position.NewTokenPosition(yyDollar[4].token) @@ -4206,13 +4212,13 @@ yydefault: } case 147: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2040 + // line internal/php5/php5.y:2046 { yyVAL.node = nil } case 148: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2044 + // line internal/php5/php5.y:2050 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4224,7 +4230,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2054 + // line internal/php5/php5.y:2060 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4236,13 +4242,13 @@ yydefault: } case 150: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2064 + // line internal/php5/php5.y:2070 { yyVAL.node = yyDollar[1].node } case 151: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2072 + // line internal/php5/php5.y:2078 { yyVAL.node = &ast.ArgumentList{ast.Node{}, nil} @@ -4255,7 +4261,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2083 + // line internal/php5/php5.y:2089 { yyVAL.node = &ast.ArgumentList{ast.Node{}, yyDollar[2].list} @@ -4268,7 +4274,7 @@ yydefault: } case 153: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2094 + // line internal/php5/php5.y:2100 { arg := &ast.Argument{ast.Node{}, false, false, yyDollar[2].node} yyVAL.node = &ast.ArgumentList{ast.Node{}, []ast.Vertex{arg}} @@ -4283,13 +4289,13 @@ yydefault: } case 154: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2111 + // line internal/php5/php5.y:2117 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 155: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2115 + // line internal/php5/php5.y:2121 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4298,7 +4304,7 @@ yydefault: } case 156: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2125 + // line internal/php5/php5.y:2131 { yyVAL.node = &ast.Argument{ast.Node{}, false, false, yyDollar[1].node} @@ -4310,7 +4316,7 @@ yydefault: } case 157: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2135 + // line internal/php5/php5.y:2141 { yyVAL.node = &ast.Argument{ast.Node{}, false, false, yyDollar[1].node} @@ -4322,7 +4328,7 @@ yydefault: } case 158: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2145 + // line internal/php5/php5.y:2151 { yyVAL.node = &ast.Argument{ast.Node{}, false, true, yyDollar[2].node} @@ -4334,7 +4340,7 @@ yydefault: } case 159: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2155 + // line internal/php5/php5.y:2161 { yyVAL.node = &ast.Argument{ast.Node{}, true, false, yyDollar[2].node} @@ -4346,7 +4352,7 @@ yydefault: } case 160: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2168 + // line internal/php5/php5.y:2174 { 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) @@ -4355,7 +4361,7 @@ yydefault: } case 161: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2175 + // line internal/php5/php5.y:2181 { yyVAL.node = &ast.StmtGlobal{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4363,7 +4369,7 @@ yydefault: } case 162: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2185 + // line internal/php5/php5.y:2191 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -4377,7 +4383,7 @@ yydefault: } case 163: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2197 + // line internal/php5/php5.y:2203 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -4389,7 +4395,7 @@ yydefault: } case 164: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2207 + // line internal/php5/php5.y:2213 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -4403,7 +4409,7 @@ yydefault: } case 165: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2223 + // line internal/php5/php5.y:2229 { identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4427,7 +4433,7 @@ yydefault: } case 166: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2245 + // line internal/php5/php5.y:2251 { identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4453,7 +4459,7 @@ yydefault: } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2269 + // line internal/php5/php5.y:2275 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4478,7 +4484,7 @@ yydefault: } case 168: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2292 + // line internal/php5/php5.y:2298 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4505,19 +4511,19 @@ yydefault: } case 169: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2321 + // line internal/php5/php5.y:2327 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 170: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2325 + // line internal/php5/php5.y:2331 { yyVAL.list = []ast.Vertex{} } case 171: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2333 + // line internal/php5/php5.y:2339 { yyVAL.node = &ast.StmtPropertyList{ast.Node{}, yyDollar[1].list, nil, yyDollar[2].list} @@ -4531,7 +4537,7 @@ yydefault: } case 172: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2345 + // line internal/php5/php5.y:2351 { yyDollar[1].node.(*ast.StmtClassConstList).SemiColonTkn = yyDollar[2].token yyDollar[1].node.(*ast.StmtClassConstList).Node.Position = position.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token) @@ -4539,13 +4545,13 @@ yydefault: } case 173: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2351 + // line internal/php5/php5.y:2357 { yyVAL.node = yyDollar[1].node } case 174: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:2355 + // line internal/php5/php5.y:2361 { name := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtClassMethod{ast.Node{}, yyDollar[3].token != nil, name, yyDollar[1].list, yyDollar[6].list, nil, yyDollar[8].node} @@ -4576,7 +4582,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2387 + // line internal/php5/php5.y:2393 { yyVAL.node = &ast.StmtTraitUse{ast.Node{}, yyDollar[2].list, yyDollar[3].node} @@ -4588,13 +4594,13 @@ yydefault: } case 176: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2400 + // line internal/php5/php5.y:2406 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 177: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2404 + // line internal/php5/php5.y:2410 { switch n := lastNode(yyDollar[1].list).(type) { case *ast.NameName: @@ -4608,7 +4614,7 @@ yydefault: } case 178: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2416 + // line internal/php5/php5.y:2422 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -4620,7 +4626,7 @@ yydefault: } case 179: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2426 + // line internal/php5/php5.y:2432 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, yyDollar[2].list} @@ -4632,31 +4638,31 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2439 + // line internal/php5/php5.y:2445 { yyVAL.list = nil } case 181: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2443 + // line internal/php5/php5.y:2449 { yyVAL.list = yyDollar[1].list } case 182: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2450 + // line internal/php5/php5.y:2456 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2454 + // line internal/php5/php5.y:2460 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 184: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2461 + // line internal/php5/php5.y:2467 { yyVAL.node = yyDollar[1].node @@ -4666,7 +4672,7 @@ yydefault: } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2469 + // line internal/php5/php5.y:2475 { yyVAL.node = yyDollar[1].node @@ -4676,7 +4682,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2480 + // line internal/php5/php5.y:2486 { yyVAL.node = &ast.StmtTraitUsePrecedence{ast.Node{}, yyDollar[1].node, yyDollar[3].list} @@ -4689,13 +4695,13 @@ yydefault: } case 187: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2494 + // line internal/php5/php5.y:2500 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 188: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2498 + // line internal/php5/php5.y:2504 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4704,7 +4710,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2508 + // line internal/php5/php5.y:2514 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, nil, name} @@ -4718,13 +4724,13 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2520 + // line internal/php5/php5.y:2526 { yyVAL.node = yyDollar[1].node } case 191: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2527 + // line internal/php5/php5.y:2533 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, yyDollar[1].node, target} @@ -4740,7 +4746,7 @@ yydefault: } case 192: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2544 + // line internal/php5/php5.y:2550 { alias := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, alias} @@ -4756,7 +4762,7 @@ yydefault: } case 193: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2558 + // line internal/php5/php5.y:2564 { yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, nil} @@ -4769,19 +4775,19 @@ yydefault: } case 194: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2572 + // line internal/php5/php5.y:2578 { yyVAL.node = nil } case 195: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2576 + // line internal/php5/php5.y:2582 { yyVAL.node = yyDollar[1].node } case 196: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2583 + // line internal/php5/php5.y:2589 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -4794,7 +4800,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2594 + // line internal/php5/php5.y:2600 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -4807,13 +4813,13 @@ yydefault: } case 198: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2608 + // line internal/php5/php5.y:2614 { yyVAL.list = yyDollar[1].list } case 199: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2612 + // line internal/php5/php5.y:2618 { modifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{modifier} @@ -4826,31 +4832,31 @@ yydefault: } case 200: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2626 + // line internal/php5/php5.y:2632 { yyVAL.list = nil } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2630 + // line internal/php5/php5.y:2636 { yyVAL.list = yyDollar[1].list } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2637 + // line internal/php5/php5.y:2643 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 203: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2641 + // line internal/php5/php5.y:2647 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 204: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2648 + // line internal/php5/php5.y:2654 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4862,7 +4868,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2658 + // line internal/php5/php5.y:2664 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4874,7 +4880,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2668 + // line internal/php5/php5.y:2674 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4886,7 +4892,7 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2678 + // line internal/php5/php5.y:2684 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4898,7 +4904,7 @@ yydefault: } case 208: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2688 + // line internal/php5/php5.y:2694 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4910,7 +4916,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2698 + // line internal/php5/php5.y:2704 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4922,7 +4928,7 @@ yydefault: } case 210: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2711 + // line internal/php5/php5.y:2717 { identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4940,7 +4946,7 @@ yydefault: } case 211: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2727 + // line internal/php5/php5.y:2733 { identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4959,7 +4965,7 @@ yydefault: } case 212: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2744 + // line internal/php5/php5.y:2750 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4976,7 +4982,7 @@ yydefault: } case 213: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2759 + // line internal/php5/php5.y:2765 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4994,7 +5000,7 @@ yydefault: } case 214: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2778 + // line internal/php5/php5.y:2784 { constList := yyDollar[1].node.(*ast.StmtClassConstList) constList.Node.Position = position.NewNodesPosition(yyDollar[1].node, yyDollar[5].node) @@ -5019,7 +5025,7 @@ yydefault: } case 215: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2801 + // line internal/php5/php5.y:2807 { yyVAL.node = &ast.StmtClassConstList{ Node: ast.Node{ @@ -5047,7 +5053,7 @@ yydefault: } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2830 + // line internal/php5/php5.y:2836 { 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) @@ -5056,7 +5062,7 @@ yydefault: } case 217: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2837 + // line internal/php5/php5.y:2843 { yyVAL.node = &ast.StmtEcho{ Exprs: []ast.Vertex{yyDollar[1].node}, @@ -5064,19 +5070,19 @@ yydefault: } case 218: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2847 + // line internal/php5/php5.y:2853 { yyVAL.list = nil } case 219: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2851 + // line internal/php5/php5.y:2857 { yyVAL.list = yyDollar[1].list } case 220: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2858 + // line internal/php5/php5.y:2864 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5085,25 +5091,25 @@ yydefault: } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2865 + // line internal/php5/php5.y:2871 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2872 + // line internal/php5/php5.y:2878 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2876 + // line internal/php5/php5.y:2882 { yyVAL.list = yyDollar[1].list } case 224: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2883 + // line internal/php5/php5.y:2889 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -5117,7 +5123,7 @@ yydefault: } case 225: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2895 + // line internal/php5/php5.y:2901 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[2].node} yyVAL.list = []ast.Vertex{fetch} @@ -5131,37 +5137,37 @@ yydefault: } case 226: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2910 + // line internal/php5/php5.y:2916 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 227: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2914 + // line internal/php5/php5.y:2920 { yyVAL.list = yyDollar[1].list } case 228: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2918 + // line internal/php5/php5.y:2924 { yyVAL.list = yyDollar[1].list } case 229: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2925 + // line internal/php5/php5.y:2931 { yyVAL.list = nil } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2929 + // line internal/php5/php5.y:2935 { yyVAL.list = yyDollar[1].list } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2936 + // line internal/php5/php5.y:2942 { if yyDollar[3].node != nil { @@ -5177,7 +5183,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:2953 + // line internal/php5/php5.y:2959 { listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, listNode, yyDollar[6].node} @@ -5194,7 +5200,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2968 + // line internal/php5/php5.y:2974 { yyVAL.node = &ast.ExprAssign{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5207,7 +5213,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2979 + // line internal/php5/php5.y:2985 { yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, yyDollar[4].node} @@ -5221,7 +5227,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:2991 + // line internal/php5/php5.y:2997 { var _new *ast.ExprNew @@ -5248,7 +5254,7 @@ yydefault: } case 236: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3016 + // line internal/php5/php5.y:3022 { yyVAL.node = &ast.ExprClone{ast.Node{}, yyDollar[2].node} @@ -5260,7 +5266,7 @@ yydefault: } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3026 + // line internal/php5/php5.y:3032 { yyVAL.node = &ast.ExprAssignPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5272,7 +5278,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3036 + // line internal/php5/php5.y:3042 { yyVAL.node = &ast.ExprAssignMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5285,7 +5291,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3047 + // line internal/php5/php5.y:3053 { yyVAL.node = &ast.ExprAssignMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5298,7 +5304,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3058 + // line internal/php5/php5.y:3064 { yyVAL.node = &ast.ExprAssignPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5311,7 +5317,7 @@ yydefault: } case 241: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3069 + // line internal/php5/php5.y:3075 { yyVAL.node = &ast.ExprAssignDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5324,7 +5330,7 @@ yydefault: } case 242: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3080 + // line internal/php5/php5.y:3086 { yyVAL.node = &ast.ExprAssignConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5337,7 +5343,7 @@ yydefault: } case 243: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3091 + // line internal/php5/php5.y:3097 { yyVAL.node = &ast.ExprAssignMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5350,7 +5356,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3102 + // line internal/php5/php5.y:3108 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5363,7 +5369,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3113 + // line internal/php5/php5.y:3119 { yyVAL.node = &ast.ExprAssignBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5376,7 +5382,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3124 + // line internal/php5/php5.y:3130 { yyVAL.node = &ast.ExprAssignBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5389,7 +5395,7 @@ yydefault: } case 247: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3135 + // line internal/php5/php5.y:3141 { yyVAL.node = &ast.ExprAssignShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5402,7 +5408,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3146 + // line internal/php5/php5.y:3152 { yyVAL.node = &ast.ExprAssignShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5415,7 +5421,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3157 + // line internal/php5/php5.y:3163 { yyVAL.node = &ast.ExprPostInc{ast.Node{}, yyDollar[1].node} @@ -5428,7 +5434,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3168 + // line internal/php5/php5.y:3174 { yyVAL.node = &ast.ExprPreInc{ast.Node{}, yyDollar[2].node} @@ -5440,7 +5446,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3178 + // line internal/php5/php5.y:3184 { yyVAL.node = &ast.ExprPostDec{ast.Node{}, yyDollar[1].node} @@ -5453,7 +5459,7 @@ yydefault: } case 252: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3189 + // line internal/php5/php5.y:3195 { yyVAL.node = &ast.ExprPreDec{ast.Node{}, yyDollar[2].node} @@ -5465,7 +5471,7 @@ yydefault: } case 253: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3199 + // line internal/php5/php5.y:3205 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5478,7 +5484,7 @@ yydefault: } case 254: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3210 + // line internal/php5/php5.y:3216 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5491,7 +5497,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3221 + // line internal/php5/php5.y:3227 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5504,7 +5510,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3232 + // line internal/php5/php5.y:3238 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5517,7 +5523,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3243 + // line internal/php5/php5.y:3249 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5530,7 +5536,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3254 + // line internal/php5/php5.y:3260 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5543,7 +5549,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3265 + // line internal/php5/php5.y:3271 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5556,7 +5562,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3276 + // line internal/php5/php5.y:3282 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5569,7 +5575,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3287 + // line internal/php5/php5.y:3293 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5581,7 +5587,7 @@ yydefault: } case 262: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3297 + // line internal/php5/php5.y:3303 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5594,7 +5600,7 @@ yydefault: } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3308 + // line internal/php5/php5.y:3314 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5607,7 +5613,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3319 + // line internal/php5/php5.y:3325 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5620,7 +5626,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3330 + // line internal/php5/php5.y:3336 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5633,7 +5639,7 @@ yydefault: } case 266: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3341 + // line internal/php5/php5.y:3347 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5646,7 +5652,7 @@ yydefault: } case 267: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3352 + // line internal/php5/php5.y:3358 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5659,7 +5665,7 @@ yydefault: } case 268: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3363 + // line internal/php5/php5.y:3369 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5672,7 +5678,7 @@ yydefault: } case 269: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3374 + // line internal/php5/php5.y:3380 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5685,7 +5691,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3385 + // line internal/php5/php5.y:3391 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -5697,7 +5703,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3395 + // line internal/php5/php5.y:3401 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -5709,7 +5715,7 @@ yydefault: } case 272: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3405 + // line internal/php5/php5.y:3411 { yyVAL.node = &ast.ExprBooleanNot{ast.Node{}, yyDollar[2].node} @@ -5721,7 +5727,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3415 + // line internal/php5/php5.y:3421 { yyVAL.node = &ast.ExprBitwiseNot{ast.Node{}, yyDollar[2].node} @@ -5733,7 +5739,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3425 + // line internal/php5/php5.y:3431 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5746,7 +5752,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3436 + // line internal/php5/php5.y:3442 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5759,7 +5765,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3447 + // line internal/php5/php5.y:3453 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5772,7 +5778,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3458 + // line internal/php5/php5.y:3464 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5786,7 +5792,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3470 + // line internal/php5/php5.y:3476 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5799,7 +5805,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3481 + // line internal/php5/php5.y:3487 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5812,7 +5818,7 @@ yydefault: } case 280: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3492 + // line internal/php5/php5.y:3498 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5825,7 +5831,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3503 + // line internal/php5/php5.y:3509 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5838,7 +5844,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3514 + // line internal/php5/php5.y:3520 { yyVAL.node = &ast.ExprInstanceOf{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5851,19 +5857,19 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3525 + // line internal/php5/php5.y:3531 { yyVAL.node = yyDollar[1].node } case 284: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3529 + // line internal/php5/php5.y:3535 { yyVAL.node = yyDollar[1].node } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3533 + // line internal/php5/php5.y:3539 { yyVAL.node = yyDollar[2].node @@ -5895,7 +5901,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:3563 + // line internal/php5/php5.y:3569 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -5909,7 +5915,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3575 + // line internal/php5/php5.y:3581 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -5923,13 +5929,13 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3587 + // line internal/php5/php5.y:3593 { yyVAL.node = yyDollar[1].node } case 289: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3591 + // line internal/php5/php5.y:3597 { yyVAL.node = &ast.ExprCastInt{ast.Node{}, yyDollar[2].node} @@ -5942,7 +5948,7 @@ yydefault: } case 290: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3602 + // line internal/php5/php5.y:3608 { yyVAL.node = &ast.ExprCastDouble{ast.Node{}, yyDollar[2].node} @@ -5955,7 +5961,7 @@ yydefault: } case 291: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3613 + // line internal/php5/php5.y:3619 { yyVAL.node = &ast.ExprCastString{ast.Node{}, yyDollar[2].node} @@ -5968,7 +5974,7 @@ yydefault: } case 292: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3624 + // line internal/php5/php5.y:3630 { yyVAL.node = &ast.ExprCastArray{ast.Node{}, yyDollar[2].node} @@ -5981,7 +5987,7 @@ yydefault: } case 293: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3635 + // line internal/php5/php5.y:3641 { yyVAL.node = &ast.ExprCastObject{ast.Node{}, yyDollar[2].node} @@ -5994,7 +6000,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3646 + // line internal/php5/php5.y:3652 { yyVAL.node = &ast.ExprCastBool{ast.Node{}, yyDollar[2].node} @@ -6007,7 +6013,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3657 + // line internal/php5/php5.y:3663 { yyVAL.node = &ast.ExprCastUnset{ast.Node{}, yyDollar[2].node} @@ -6020,7 +6026,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3668 + // line internal/php5/php5.y:3674 { yyVAL.node = &ast.ExprExit{ast.Node{}, false, yyDollar[2].node} @@ -6040,7 +6046,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3686 + // line internal/php5/php5.y:3692 { yyVAL.node = &ast.ExprErrorSuppress{ast.Node{}, yyDollar[2].node} @@ -6052,25 +6058,25 @@ yydefault: } case 298: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3696 + // line internal/php5/php5.y:3702 { yyVAL.node = yyDollar[1].node } case 299: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3700 + // line internal/php5/php5.y:3706 { yyVAL.node = yyDollar[1].node } case 300: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3704 + // line internal/php5/php5.y:3710 { yyVAL.node = yyDollar[1].node } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3708 + // line internal/php5/php5.y:3714 { yyVAL.node = &ast.ExprShellExec{ast.Node{}, yyDollar[2].list} @@ -6082,7 +6088,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3718 + // line internal/php5/php5.y:3724 { yyVAL.node = &ast.ExprPrint{ast.Node{}, yyDollar[2].node} @@ -6094,7 +6100,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3728 + // line internal/php5/php5.y:3734 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, nil} @@ -6106,7 +6112,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:3738 + // line internal/php5/php5.y:3744 { yyVAL.node = &ast.ExprClosure{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[4].list, yyDollar[6].ClosureUse, nil, yyDollar[8].list} @@ -6133,7 +6139,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php5/php5.y:3762 + // line internal/php5/php5.y:3768 { yyVAL.node = &ast.ExprClosure{ast.Node{}, yyDollar[3].token != nil, true, yyDollar[5].list, yyDollar[7].ClosureUse, nil, yyDollar[9].list} @@ -6161,7 +6167,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3790 + // line internal/php5/php5.y:3796 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6173,7 +6179,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3800 + // line internal/php5/php5.y:3806 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6185,7 +6191,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3810 + // line internal/php5/php5.y:3816 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6198,7 +6204,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3821 + // line internal/php5/php5.y:3827 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6211,7 +6217,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3835 + // line internal/php5/php5.y:3841 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6224,7 +6230,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3846 + // line internal/php5/php5.y:3852 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6237,7 +6243,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3857 + // line internal/php5/php5.y:3863 { str := &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, str, yyDollar[3].node} @@ -6253,7 +6259,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3871 + // line internal/php5/php5.y:3877 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6266,7 +6272,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3885 + // line internal/php5/php5.y:3891 { yyVAL.node = &ast.ExprArray{ast.Node{}, yyDollar[3].list} @@ -6280,7 +6286,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3897 + // line internal/php5/php5.y:3903 { yyVAL.node = &ast.ExprShortArray{ast.Node{}, yyDollar[2].list} @@ -6293,19 +6299,19 @@ yydefault: } case 316: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3911 + // line internal/php5/php5.y:3917 { yyVAL.token = yyDollar[1].token } case 317: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:3918 + // line internal/php5/php5.y:3924 { yyVAL.ClosureUse = nil } case 318: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3922 + // line internal/php5/php5.y:3928 { yyVAL.ClosureUse = &ast.ExprClosureUse{ast.Node{}, yyDollar[3].list} @@ -6319,7 +6325,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3937 + // line internal/php5/php5.y:3943 { identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -6335,7 +6341,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3951 + // line internal/php5/php5.y:3957 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -6354,7 +6360,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3968 + // line internal/php5/php5.y:3974 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -6369,7 +6375,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3981 + // line internal/php5/php5.y:3987 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -6387,7 +6393,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4000 + // line internal/php5/php5.y:4006 { name := &ast.NameName{ Node: ast.Node{ @@ -6402,7 +6408,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4013 + // line internal/php5/php5.y:4019 { name := &ast.NameRelative{ Node: ast.Node{ @@ -6419,7 +6425,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4028 + // line internal/php5/php5.y:4034 { name := &ast.NameFullyQualified{ Node: ast.Node{ @@ -6435,7 +6441,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4042 + // line internal/php5/php5.y:4048 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6448,7 +6454,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4053 + // line internal/php5/php5.y:4059 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6461,7 +6467,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4064 + // line internal/php5/php5.y:4070 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6474,7 +6480,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4075 + // line internal/php5/php5.y:4081 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6487,7 +6493,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4086 + // line internal/php5/php5.y:4092 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -6499,7 +6505,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4099 + // line internal/php5/php5.y:4105 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -6511,7 +6517,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4109 + // line internal/php5/php5.y:4115 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -6522,7 +6528,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4118 + // line internal/php5/php5.y:4124 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -6535,7 +6541,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4129 + // line internal/php5/php5.y:4135 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -6547,7 +6553,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4142 + // line internal/php5/php5.y:4148 { yyVAL.node = &ast.NameName{ Node: ast.Node{ @@ -6558,7 +6564,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4151 + // line internal/php5/php5.y:4157 { yyVAL.node = &ast.NameRelative{ Node: ast.Node{ @@ -6571,7 +6577,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4162 + // line internal/php5/php5.y:4168 { yyVAL.node = &ast.NameFullyQualified{ Node: ast.Node{ @@ -6583,19 +6589,19 @@ yydefault: } case 338: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4175 + // line internal/php5/php5.y:4181 { yyVAL.node = yyDollar[1].node } case 339: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4179 + // line internal/php5/php5.y:4185 { yyVAL.node = yyDollar[1].node } case 340: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4186 + // line internal/php5/php5.y:4192 { yyVAL.node = yyDollar[1].node @@ -6636,25 +6642,25 @@ yydefault: } case 341: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4225 + // line internal/php5/php5.y:4231 { yyVAL.node = yyDollar[1].node } case 342: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4233 + // line internal/php5/php5.y:4239 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 343: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4237 + // line internal/php5/php5.y:4243 { yyVAL.list = []ast.Vertex{} } case 344: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4245 + // line internal/php5/php5.y:4251 { yyVAL.list = yyDollar[2].list @@ -6663,13 +6669,13 @@ yydefault: } case 345: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4255 + // line internal/php5/php5.y:4261 { yyVAL.node = nil } case 346: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4259 + // line internal/php5/php5.y:4265 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6685,19 +6691,19 @@ yydefault: } case 347: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4273 + // line internal/php5/php5.y:4279 { yyVAL.node = yyDollar[1].node } case 348: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4280 + // line internal/php5/php5.y:4286 { yyVAL.list = []ast.Vertex{} } case 349: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4284 + // line internal/php5/php5.y:4290 { part := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{part} @@ -6707,25 +6713,25 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4292 + // line internal/php5/php5.y:4298 { yyVAL.list = yyDollar[1].list } case 351: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4299 + // line internal/php5/php5.y:4305 { yyVAL.node = nil } case 352: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4303 + // line internal/php5/php5.y:4309 { yyVAL.node = yyDollar[1].node } case 353: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4310 + // line internal/php5/php5.y:4316 { yyVAL.node = &ast.ScalarLnumber{ast.Node{}, yyDollar[1].token.Value} @@ -6737,7 +6743,7 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4320 + // line internal/php5/php5.y:4326 { yyVAL.node = &ast.ScalarDnumber{ast.Node{}, yyDollar[1].token.Value} @@ -6749,7 +6755,7 @@ yydefault: } case 355: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4330 + // line internal/php5/php5.y:4336 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -6761,7 +6767,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4340 + // line internal/php5/php5.y:4346 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6773,7 +6779,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4350 + // line internal/php5/php5.y:4356 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6785,7 +6791,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4360 + // line internal/php5/php5.y:4366 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6797,7 +6803,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4370 + // line internal/php5/php5.y:4376 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6809,7 +6815,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4380 + // line internal/php5/php5.y:4386 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6821,7 +6827,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4390 + // line internal/php5/php5.y:4396 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6833,7 +6839,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4400 + // line internal/php5/php5.y:4406 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6845,7 +6851,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4410 + // line internal/php5/php5.y:4416 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, []ast.Vertex{encapsed}} @@ -6859,7 +6865,7 @@ yydefault: } case 364: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4422 + // line internal/php5/php5.y:4428 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, nil} @@ -6871,7 +6877,7 @@ yydefault: } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4435 + // line internal/php5/php5.y:4441 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -6887,25 +6893,25 @@ yydefault: } case 366: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4452 + // line internal/php5/php5.y:4458 { yyVAL.node = yyDollar[1].node } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4459 + // line internal/php5/php5.y:4465 { yyVAL.node = yyDollar[1].node } case 368: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4463 + // line internal/php5/php5.y:4469 { yyVAL.node = yyDollar[1].node } case 369: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4467 + // line internal/php5/php5.y:4473 { name := &ast.NameName{ Node: ast.Node{ @@ -6920,7 +6926,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4480 + // line internal/php5/php5.y:4486 { name := &ast.NameRelative{ Node: ast.Node{ @@ -6937,7 +6943,7 @@ yydefault: } case 371: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4495 + // line internal/php5/php5.y:4501 { name := &ast.NameFullyQualified{ Node: ast.Node{ @@ -6953,7 +6959,7 @@ yydefault: } case 372: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4509 + // line internal/php5/php5.y:4515 { yyVAL.node = &ast.ExprArray{ast.Node{}, yyDollar[3].list} @@ -6967,7 +6973,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4521 + // line internal/php5/php5.y:4527 { yyVAL.node = &ast.ExprShortArray{ast.Node{}, yyDollar[2].list} @@ -6980,13 +6986,13 @@ yydefault: } case 374: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4532 + // line internal/php5/php5.y:4538 { yyVAL.node = yyDollar[1].node } case 375: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4536 + // line internal/php5/php5.y:4542 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6998,13 +7004,13 @@ yydefault: } case 376: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4546 + // line internal/php5/php5.y:4552 { yyVAL.node = yyDollar[1].node } case 377: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4553 + // line internal/php5/php5.y:4559 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7017,7 +7023,7 @@ yydefault: } case 378: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4564 + // line internal/php5/php5.y:4570 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7030,7 +7036,7 @@ yydefault: } case 379: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4575 + // line internal/php5/php5.y:4581 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7043,7 +7049,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4586 + // line internal/php5/php5.y:4592 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7056,7 +7062,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4597 + // line internal/php5/php5.y:4603 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7069,7 +7075,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4608 + // line internal/php5/php5.y:4614 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7082,7 +7088,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4619 + // line internal/php5/php5.y:4625 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7095,7 +7101,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4630 + // line internal/php5/php5.y:4636 { yyVAL.node = &ast.ExprBooleanNot{ast.Node{}, yyDollar[2].node} @@ -7107,7 +7113,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4640 + // line internal/php5/php5.y:4646 { yyVAL.node = &ast.ExprBitwiseNot{ast.Node{}, yyDollar[2].node} @@ -7119,7 +7125,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4650 + // line internal/php5/php5.y:4656 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7132,7 +7138,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4661 + // line internal/php5/php5.y:4667 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7145,7 +7151,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4672 + // line internal/php5/php5.y:4678 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7158,7 +7164,7 @@ yydefault: } case 389: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4683 + // line internal/php5/php5.y:4689 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7171,7 +7177,7 @@ yydefault: } case 390: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4694 + // line internal/php5/php5.y:4700 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7184,7 +7190,7 @@ yydefault: } case 391: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4705 + // line internal/php5/php5.y:4711 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7197,7 +7203,7 @@ yydefault: } case 392: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4716 + // line internal/php5/php5.y:4722 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7210,7 +7216,7 @@ yydefault: } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4727 + // line internal/php5/php5.y:4733 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7223,7 +7229,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4738 + // line internal/php5/php5.y:4744 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7236,7 +7242,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4749 + // line internal/php5/php5.y:4755 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7249,7 +7255,7 @@ yydefault: } case 396: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4760 + // line internal/php5/php5.y:4766 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7262,7 +7268,7 @@ yydefault: } case 397: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4771 + // line internal/php5/php5.y:4777 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7275,7 +7281,7 @@ yydefault: } case 398: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4782 + // line internal/php5/php5.y:4788 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7288,7 +7294,7 @@ yydefault: } case 399: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4793 + // line internal/php5/php5.y:4799 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7301,7 +7307,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4804 + // line internal/php5/php5.y:4810 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7315,7 +7321,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4816 + // line internal/php5/php5.y:4822 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7328,7 +7334,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4827 + // line internal/php5/php5.y:4833 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7341,7 +7347,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4838 + // line internal/php5/php5.y:4844 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7354,7 +7360,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4849 + // line internal/php5/php5.y:4855 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7367,7 +7373,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4860 + // line internal/php5/php5.y:4866 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -7381,7 +7387,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:4872 + // line internal/php5/php5.y:4878 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -7395,7 +7401,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4884 + // line internal/php5/php5.y:4890 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -7407,7 +7413,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4894 + // line internal/php5/php5.y:4900 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -7419,7 +7425,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4904 + // line internal/php5/php5.y:4910 { yyVAL.node = yyDollar[2].node @@ -7429,13 +7435,13 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4915 + // line internal/php5/php5.y:4921 { yyVAL.node = yyDollar[1].node } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4919 + // line internal/php5/php5.y:4925 { name := &ast.NameName{ Node: ast.Node{ @@ -7450,7 +7456,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4932 + // line internal/php5/php5.y:4938 { name := &ast.NameRelative{ Node: ast.Node{ @@ -7467,7 +7473,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4947 + // line internal/php5/php5.y:4953 { name := &ast.NameFullyQualified{ Node: ast.Node{ @@ -7483,7 +7489,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4964 + // line internal/php5/php5.y:4970 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -7497,25 +7503,25 @@ yydefault: } case 415: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4976 + // line internal/php5/php5.y:4982 { yyVAL.node = yyDollar[1].node } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4980 + // line internal/php5/php5.y:4986 { yyVAL.node = yyDollar[1].node } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4984 + // line internal/php5/php5.y:4990 { yyVAL.node = yyDollar[1].node } case 418: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4988 + // line internal/php5/php5.y:4994 { yyVAL.node = &ast.ScalarEncapsed{ast.Node{}, yyDollar[2].list} @@ -7527,7 +7533,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4998 + // line internal/php5/php5.y:5004 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, yyDollar[2].list} @@ -7539,7 +7545,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5008 + // line internal/php5/php5.y:5014 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7551,13 +7557,13 @@ yydefault: } case 421: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5021 + // line internal/php5/php5.y:5027 { yyVAL.list = nil } case 422: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5025 + // line internal/php5/php5.y:5031 { yyVAL.list = yyDollar[1].list @@ -7568,19 +7574,19 @@ yydefault: } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5037 + // line internal/php5/php5.y:5043 { yyVAL.token = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5041 + // line internal/php5/php5.y:5047 { yyVAL.token = yyDollar[1].token } case 425: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5048 + // line internal/php5/php5.y:5054 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[3].node, yyDollar[5].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -7595,7 +7601,7 @@ yydefault: } case 426: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5061 + // line internal/php5/php5.y:5067 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -7609,7 +7615,7 @@ yydefault: } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5073 + // line internal/php5/php5.y:5079 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, yyDollar[3].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -7623,7 +7629,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5085 + // line internal/php5/php5.y:5091 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -7636,19 +7642,19 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5099 + // line internal/php5/php5.y:5105 { yyVAL.node = yyDollar[1].node } case 430: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5103 + // line internal/php5/php5.y:5109 { yyVAL.node = yyDollar[1].node } case 431: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5110 + // line internal/php5/php5.y:5116 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7665,7 +7671,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5125 + // line internal/php5/php5.y:5131 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -7682,25 +7688,25 @@ yydefault: } case 433: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5144 + // line internal/php5/php5.y:5150 { yyVAL.node = yyDollar[1].node } case 434: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5152 + // line internal/php5/php5.y:5158 { yyVAL.node = yyDollar[1].node } case 435: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5159 + // line internal/php5/php5.y:5165 { yyVAL.node = yyDollar[1].node } case 436: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5166 + // line internal/php5/php5.y:5172 { yyVAL.node = yyDollar[1].node @@ -7758,25 +7764,25 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5222 + // line internal/php5/php5.y:5228 { yyVAL.node = yyDollar[1].node } case 438: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5229 + // line internal/php5/php5.y:5235 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) } case 439: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5233 + // line internal/php5/php5.y:5239 { yyVAL.list = []ast.Vertex{} } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5241 + // line internal/php5/php5.y:5247 { if yyDollar[3].list != nil { yyDollar[3].list[0].(*ast.ExprMethodCall).Method = yyDollar[2].list[len(yyDollar[2].list)-1].(*ast.ExprPropertyFetch).Property @@ -7790,7 +7796,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5256 + // line internal/php5/php5.y:5262 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -7804,7 +7810,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5268 + // line internal/php5/php5.y:5274 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = []ast.Vertex{yyDollar[1].node, fetch} @@ -7818,7 +7824,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5283 + // line internal/php5/php5.y:5289 { yyVAL.node = &ast.ExprMethodCall{ast.Node{}, nil, nil, yyDollar[1].node.(*ast.ArgumentList)} @@ -7827,31 +7833,31 @@ yydefault: } case 444: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5293 + // line internal/php5/php5.y:5299 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 445: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5297 + // line internal/php5/php5.y:5303 { yyVAL.list = yyDollar[1].list } case 446: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5301 + // line internal/php5/php5.y:5307 { yyVAL.list = nil } case 447: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5308 + // line internal/php5/php5.y:5314 { yyVAL.node = yyDollar[1].node } case 448: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5312 + // line internal/php5/php5.y:5318 { yyDollar[1].simpleIndirectReference.last.VarName = yyDollar[2].node @@ -7863,7 +7869,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5325 + // line internal/php5/php5.y:5331 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7876,7 +7882,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5336 + // line internal/php5/php5.y:5342 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7889,13 +7895,13 @@ yydefault: } case 451: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5350 + // line internal/php5/php5.y:5356 { yyVAL.node = yyDollar[1].node } case 452: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5357 + // line internal/php5/php5.y:5363 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7908,7 +7914,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5368 + // line internal/php5/php5.y:5374 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7921,31 +7927,31 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5382 + // line internal/php5/php5.y:5388 { yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5386 + // line internal/php5/php5.y:5392 { yyVAL.node = yyDollar[1].node } case 456: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5390 + // line internal/php5/php5.y:5396 { yyVAL.node = yyDollar[1].node } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5398 + // line internal/php5/php5.y:5404 { yyVAL.node = yyDollar[1].node } case 458: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5402 + // line internal/php5/php5.y:5408 { yyDollar[1].simpleIndirectReference.last.VarName = yyDollar[2].node @@ -7957,13 +7963,13 @@ yydefault: } case 459: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5412 + // line internal/php5/php5.y:5418 { yyVAL.node = yyDollar[1].node } case 460: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5419 + // line internal/php5/php5.y:5425 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7976,7 +7982,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5430 + // line internal/php5/php5.y:5436 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7989,13 +7995,13 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5441 + // line internal/php5/php5.y:5447 { yyVAL.node = yyDollar[1].node } case 463: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5449 + // line internal/php5/php5.y:5455 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -8009,7 +8015,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5461 + // line internal/php5/php5.y:5467 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -8023,25 +8029,25 @@ yydefault: } case 465: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5476 + // line internal/php5/php5.y:5482 { yyVAL.node = nil } case 466: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5480 + // line internal/php5/php5.y:5486 { yyVAL.node = yyDollar[1].node } case 467: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5488 + // line internal/php5/php5.y:5494 { yyVAL.list = yyDollar[1].list } case 468: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5492 + // line internal/php5/php5.y:5498 { fetch := &ast.ExprPropertyFetch{ast.Node{}, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{fetch} @@ -8051,7 +8057,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5503 + // line internal/php5/php5.y:5509 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -8065,7 +8071,7 @@ yydefault: } case 470: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5515 + // line internal/php5/php5.y:5521 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -8079,7 +8085,7 @@ yydefault: } case 471: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5527 + // line internal/php5/php5.y:5533 { fetch := &ast.ExprPropertyFetch{ast.Node{}, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{fetch} @@ -8089,7 +8095,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5538 + // line internal/php5/php5.y:5544 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -8101,7 +8107,7 @@ yydefault: } case 473: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5548 + // line internal/php5/php5.y:5554 { yyVAL.node = yyDollar[2].node @@ -8114,7 +8120,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5562 + // line internal/php5/php5.y:5568 { n := &ast.ExprVariable{ast.Node{}, nil} yyVAL.simpleIndirectReference = simpleIndirectReference{[]*ast.ExprVariable{n}, n} @@ -8127,7 +8133,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5573 + // line internal/php5/php5.y:5579 { n := &ast.ExprVariable{ast.Node{}, nil} @@ -8144,7 +8150,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5591 + // line internal/php5/php5.y:5597 { if len(yyDollar[1].list) == 0 { yyDollar[1].list = []ast.Vertex{&ast.ExprArrayItem{ast.Node{}, false, nil, nil}} @@ -8157,7 +8163,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5602 + // line internal/php5/php5.y:5608 { if yyDollar[1].node.(*ast.ExprArrayItem).Key == nil && yyDollar[1].node.(*ast.ExprArrayItem).Val == nil { yyVAL.list = []ast.Vertex{} @@ -8167,7 +8173,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5614 + // line internal/php5/php5.y:5620 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} @@ -8179,7 +8185,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5624 + // line internal/php5/php5.y:5630 { listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, listNode} @@ -8195,19 +8201,19 @@ yydefault: } case 480: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5638 + // line internal/php5/php5.y:5644 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, nil} } case 481: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5646 + // line internal/php5/php5.y:5652 { yyVAL.list = []ast.Vertex{} } case 482: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5650 + // line internal/php5/php5.y:5656 { yyVAL.list = yyDollar[1].list @@ -8222,7 +8228,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5666 + // line internal/php5/php5.y:5672 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[3].node, yyDollar[5].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8237,7 +8243,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5679 + // line internal/php5/php5.y:5685 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8251,7 +8257,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5691 + // line internal/php5/php5.y:5697 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, yyDollar[3].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -8265,7 +8271,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5703 + // line internal/php5/php5.y:5709 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -8278,7 +8284,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:5714 + // line internal/php5/php5.y:5720 { reference := &ast.ExprReference{ast.Node{}, yyDollar[6].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[3].node, reference} @@ -8296,7 +8302,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5730 + // line internal/php5/php5.y:5736 { reference := &ast.ExprReference{ast.Node{}, yyDollar[4].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, reference} @@ -8312,7 +8318,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5744 + // line internal/php5/php5.y:5750 { reference := &ast.ExprReference{ast.Node{}, yyDollar[4].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, reference} @@ -8329,7 +8335,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5759 + // line internal/php5/php5.y:5765 { reference := &ast.ExprReference{ast.Node{}, yyDollar[2].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, reference} @@ -8344,13 +8350,13 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5775 + // line internal/php5/php5.y:5781 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 492: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5779 + // line internal/php5/php5.y:5785 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.list = append(yyDollar[1].list, encapsed) @@ -8363,13 +8369,13 @@ yydefault: } case 493: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5790 + // line internal/php5/php5.y:5796 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 494: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5794 + // line internal/php5/php5.y:5800 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{encapsed, yyDollar[2].node} @@ -8382,7 +8388,7 @@ yydefault: } case 495: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5808 + // line internal/php5/php5.y:5814 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -8396,7 +8402,7 @@ yydefault: } case 496: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5820 + // line internal/php5/php5.y:5826 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -8413,7 +8419,7 @@ yydefault: } case 497: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5835 + // line internal/php5/php5.y:5841 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -8432,7 +8438,7 @@ yydefault: } case 498: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5852 + // line internal/php5/php5.y:5858 { variable := &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -8447,7 +8453,7 @@ yydefault: } case 499: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5865 + // line internal/php5/php5.y:5871 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, name} @@ -8464,7 +8470,7 @@ yydefault: } case 500: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:5880 + // line internal/php5/php5.y:5886 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -8483,7 +8489,7 @@ yydefault: } case 501: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5897 + // line internal/php5/php5.y:5903 { yyVAL.node = yyDollar[2].node @@ -8493,7 +8499,7 @@ yydefault: } case 502: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5908 + // line internal/php5/php5.y:5914 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -8505,7 +8511,7 @@ yydefault: } case 503: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5918 + // line internal/php5/php5.y:5924 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -8522,7 +8528,7 @@ yydefault: } case 504: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5933 + // line internal/php5/php5.y:5939 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} @@ -8536,7 +8542,7 @@ yydefault: } case 505: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5948 + // line internal/php5/php5.y:5954 { yyVAL.node = &ast.ExprIsset{ast.Node{}, yyDollar[3].list} @@ -8550,7 +8556,7 @@ yydefault: } case 506: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5960 + // line internal/php5/php5.y:5966 { exprBrackets := &ast.ParserBrackets{ Node: ast.Node{ @@ -8572,7 +8578,7 @@ yydefault: } case 507: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5980 + // line internal/php5/php5.y:5986 { exprBrackets := &ast.ParserBrackets{ Node: ast.Node{ @@ -8594,7 +8600,7 @@ yydefault: } case 508: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6000 + // line internal/php5/php5.y:6006 { yyVAL.node = &ast.ExprInclude{ast.Node{}, yyDollar[2].node} @@ -8606,7 +8612,7 @@ yydefault: } case 509: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6010 + // line internal/php5/php5.y:6016 { yyVAL.node = &ast.ExprIncludeOnce{ast.Node{}, yyDollar[2].node} @@ -8618,7 +8624,7 @@ yydefault: } case 510: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6020 + // line internal/php5/php5.y:6026 { exprBrackets := &ast.ParserBrackets{ Node: ast.Node{ @@ -8640,7 +8646,7 @@ yydefault: } case 511: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6040 + // line internal/php5/php5.y:6046 { yyVAL.node = &ast.ExprRequire{ast.Node{}, yyDollar[2].node} @@ -8652,7 +8658,7 @@ yydefault: } case 512: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6050 + // line internal/php5/php5.y:6056 { yyVAL.node = &ast.ExprRequireOnce{ast.Node{}, yyDollar[2].node} @@ -8664,13 +8670,13 @@ yydefault: } case 513: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6063 + // line internal/php5/php5.y:6069 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 514: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6067 + // line internal/php5/php5.y:6073 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -8679,19 +8685,19 @@ yydefault: } case 515: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6077 + // line internal/php5/php5.y:6083 { yyVAL.node = yyDollar[1].node } case 516: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6081 + // line internal/php5/php5.y:6087 { yyVAL.node = yyDollar[1].node } case 517: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6088 + // line internal/php5/php5.y:6094 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -8707,7 +8713,7 @@ yydefault: } case 518: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6102 + // line internal/php5/php5.y:6108 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -8723,7 +8729,7 @@ yydefault: } case 519: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6119 + // line internal/php5/php5.y:6125 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -8739,7 +8745,7 @@ yydefault: } case 520: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6136 + // line internal/php5/php5.y:6142 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} diff --git a/internal/php5/php5.y b/internal/php5/php5.y index 5fb516e..53276ee 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -241,7 +241,7 @@ import ( %type trait_method_reference_fully_qualified trait_method_reference trait_modifiers member_modifier method %type static_scalar_value static_operation static_var_list global_var_list %type ctor_arguments function_call_parameter_list echo_expr_list -%type trait_adaptations unset_variables +%type trait_adaptations unset_variables declare_list %type switch_case_list %type method_body %type foreach_statement for_statement while_statement @@ -255,7 +255,7 @@ import ( %type top_statement_list namespace_name use_declarations use_function_declarations use_const_declarations %type inner_statement_list encaps_list isset_variables non_empty_array_pair_list %type array_pair_list assignment_list lexical_var_list elseif_list new_elseif_list non_empty_for_expr -%type for_expr case_list declare_list catch_statement additional_catches +%type for_expr case_list catch_statement additional_catches %type non_empty_additional_catches parameter_list non_empty_parameter_list class_statement_list %type class_statement_list variable_modifiers method_modifiers class_variable_declaration %type interface_list non_empty_function_call_parameter_list trait_list trait_adaptation_list non_empty_trait_adaptation_list @@ -722,7 +722,7 @@ constant_declaration: { constList := $1.(*ast.StmtConstList) constList.Node.Position = position.NewNodesPosition($1, $5) - lastNode(constList.Consts).(*ast.StmtConstant).CommaTkn = $2 + constList.SeparatorTkns = append(constList.SeparatorTkns, $2) constList.Consts = append(constList.Consts, &ast.StmtConstant{ Node: ast.Node{ Position: position.NewTokenNodePosition($3, $5), @@ -1130,16 +1130,14 @@ unticked_statement: } | T_DECLARE '(' declare_list ')' declare_statement { + $5.(*ast.StmtDeclare).DeclareTkn = $1 + $5.(*ast.StmtDeclare).OpenParenthesisTkn = $2 + $5.(*ast.StmtDeclare).Consts = $3.(*ast.ParserSeparatedList).Items + $5.(*ast.StmtDeclare).SeparatorTkns = $3.(*ast.ParserSeparatedList).SeparatorTkns + $5.(*ast.StmtDeclare).CloseParenthesisTkn = $4 + $5.(*ast.StmtDeclare).Node.Position = position.NewTokenNodePosition($1, $5) + $$ = $5 - $$.(*ast.StmtDeclare).Consts = $3 - - // save position - $$.GetNode().Position = position.NewTokenNodePosition($1, $5) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.Declare, $2.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.SkippedTokens) } | ';' { @@ -1646,29 +1644,30 @@ foreach_statement: declare_statement: statement { - $$ = &ast.StmtDeclare{ast.Node{}, false, nil, $1} - - // save position - $$.GetNode().Position = position.NewNodePosition($1) + $$ = &ast.StmtDeclare{ + Node: ast.Node{ + Position: position.NewNodePosition($1), + }, + Stmt: $1, + } } | ':' inner_statement_list T_ENDDECLARE ';' { - stmtList := &ast.StmtStmtList{ + $$ = &ast.StmtDeclare{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewTokensPosition($1, $4), }, - Stmts: $2, + Alt: true, + ColonTkn: $1, + Stmt: &ast.StmtStmtList{ + Node: ast.Node{ + Position: position.NewNodeListPosition($2), + }, + Stmts: $2, + }, + EndDeclareTkn: $3, + SemiColonTkn: $4, } - $$ = &ast.StmtDeclare{ast.Node{}, true, nil, stmtList} - - // save position - $$.GetNode().Position = position.NewTokensPosition($1, $4) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.SkippedTokens) - yylex.(*Parser).setToken($$, token.SemiColon, $4.SkippedTokens) } ; @@ -1676,42 +1675,49 @@ declare_statement: declare_list: T_STRING '=' static_scalar { - $$ = []ast.Vertex{ - &ast.StmtConstant{ - Node: ast.Node{ - Position: position.NewTokenNodePosition($1, $3), - }, - Name: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition($1), + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{ + &ast.StmtConstant{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($1, $3), }, - Value: $1.Value, + Name: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition($1), + }, + Value: $1.Value, + }, + EqualTkn: $2, + Expr: $3, }, - EqualTkn: $2, - Expr: $3, }, } - yylex.(*Parser).setFreeFloating(lastNode($$).(*ast.StmtConstant).Name, token.Start, $1.SkippedTokens) + yylex.(*Parser).setFreeFloating(lastNode($$.(*ast.ParserSeparatedList).Items).(*ast.StmtConstant).Name, token.Start, $1.SkippedTokens) } | declare_list ',' T_STRING '=' static_scalar { - lastNode($1).(*ast.StmtConstant).CommaTkn = $2 - $$ = append($1, &ast.StmtConstant{ - Node: ast.Node{ - Position: position.NewTokenNodePosition($3, $5), - }, - Name: &ast.Identifier{ - Node: ast.Node{ - Position: position.NewTokenPosition($3), + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append( + $1.(*ast.ParserSeparatedList).Items, + &ast.StmtConstant{ + Node: ast.Node{ + Position: position.NewTokenNodePosition($3, $5), }, - Value: $3.Value, + Name: &ast.Identifier{ + Node: ast.Node{ + Position: position.NewTokenPosition($3), + }, + Value: $3.Value, + }, + EqualTkn: $4, + Expr: $5, }, - EqualTkn: $4, - Expr: $5, - }) + ) - yylex.(*Parser).setFreeFloating(lastNode($$).(*ast.StmtConstant).Name, token.Start, $3.SkippedTokens) + $$ = $1 + + yylex.(*Parser).setFreeFloating(lastNode($$.(*ast.ParserSeparatedList).Items).(*ast.StmtConstant).Name, token.Start, $3.SkippedTokens) } ; diff --git a/internal/php7/php7.go b/internal/php7/php7.go index 4b801a5..6ecb7f7 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:4797 +// line internal/php7/php7.y:4800 // line yacctab:1 var yyExca = [...]int{ @@ -1429,11 +1429,11 @@ var yyPgo = [...]int{ 19, 38, 913, 912, 79, 911, 73, 910, 5, 909, 908, 905, 904, 15, 62, 903, 902, 100, 87, 274, 901, 900, 899, 6, 898, 86, 41, 897, 56, 49, - 896, 895, 894, 893, 892, 99, 890, 883, 882, 881, - 880, 10, 879, 878, 46, 39, 40, 2, 16, 705, - 43, 85, 876, 875, 871, 12, 870, 868, 555, 867, - 50, 37, 864, 862, 9, 762, 20, 553, 860, 18, - 858, 855, 854, 88, 36, 853, 25, 33, 848, 45, + 896, 895, 894, 893, 892, 99, 890, 883, 882, 88, + 881, 880, 10, 879, 878, 46, 39, 40, 2, 16, + 705, 43, 85, 876, 875, 871, 12, 870, 868, 555, + 867, 50, 37, 864, 862, 9, 762, 20, 553, 860, + 18, 858, 855, 854, 36, 853, 25, 33, 848, 45, 846, 554, 845, 844, 839, 34, 837, 80, 1, 3, 832, 17, 831, 821, 803, 7, 767, 752, 28, } @@ -1447,27 +1447,27 @@ var yyR1 = [...]int{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 117, - 117, 99, 99, 10, 10, 10, 9, 9, 9, 9, + 117, 100, 100, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 95, 95, 16, 16, 18, 18, 7, 7, 107, + 9, 96, 96, 16, 16, 18, 18, 7, 7, 107, 107, 106, 106, 111, 111, 17, 17, 20, 20, 19, - 19, 103, 103, 118, 118, 22, 22, 22, 22, 22, + 19, 69, 69, 118, 118, 22, 22, 22, 22, 22, 22, 22, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 101, 101, 100, 100, - 26, 26, 89, 89, 27, 12, 1, 1, 2, 2, - 13, 13, 126, 126, 79, 79, 14, 15, 90, 90, - 92, 92, 91, 91, 96, 96, 96, 96, 86, 86, - 85, 85, 25, 25, 83, 83, 83, 83, 109, 109, - 109, 8, 8, 87, 87, 70, 70, 68, 68, 72, - 72, 69, 69, 119, 119, 120, 120, 29, 29, 30, - 30, 78, 78, 76, 76, 76, 77, 77, 80, 80, + 11, 11, 11, 11, 11, 11, 102, 102, 101, 101, + 26, 26, 90, 90, 27, 12, 1, 1, 2, 2, + 13, 13, 126, 126, 80, 80, 14, 15, 91, 91, + 93, 93, 92, 92, 97, 97, 97, 97, 87, 87, + 86, 86, 25, 25, 84, 84, 84, 84, 109, 109, + 109, 8, 8, 88, 88, 71, 71, 68, 68, 73, + 73, 70, 70, 119, 119, 120, 120, 29, 29, 30, + 30, 79, 79, 77, 77, 77, 78, 78, 81, 81, 116, 116, 31, 31, 33, 33, 34, 35, 35, 36, - 36, 121, 121, 37, 37, 37, 37, 125, 125, 82, - 82, 82, 110, 110, 38, 38, 39, 40, 40, 40, - 40, 42, 42, 41, 84, 84, 123, 123, 122, 122, - 124, 124, 94, 94, 94, 94, 94, 94, 108, 108, - 43, 43, 102, 102, 71, 21, 67, 67, 44, 104, + 36, 121, 121, 37, 37, 37, 37, 125, 125, 83, + 83, 83, 110, 110, 38, 38, 39, 40, 40, 40, + 40, 42, 42, 41, 85, 85, 123, 123, 122, 122, + 124, 124, 95, 95, 95, 95, 95, 95, 108, 108, + 43, 43, 103, 103, 72, 21, 67, 67, 44, 104, 104, 105, 105, 46, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, @@ -1476,19 +1476,19 @@ var yyR1 = [...]int{ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 88, 88, 128, 3, 3, 93, 93, + 32, 32, 32, 89, 89, 128, 3, 3, 94, 94, 112, 112, 53, 53, 54, 54, 54, 54, 47, 47, - 48, 48, 51, 51, 98, 98, 98, 81, 81, 58, + 48, 48, 51, 51, 99, 99, 99, 82, 82, 58, 58, 58, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 59, 59, 59, 23, 23, 24, 24, 57, 60, 60, 60, 61, 61, 61, 62, 62, 62, 62, 62, 62, 28, 28, 28, 49, 49, 49, 63, 63, 64, 64, 64, 64, - 64, 64, 55, 55, 55, 56, 56, 56, 115, 74, - 74, 114, 114, 73, 73, 73, 73, 73, 73, 73, - 97, 97, 97, 97, 65, 65, 65, 65, 65, 65, + 64, 64, 55, 55, 55, 56, 56, 56, 115, 75, + 75, 114, 114, 74, 74, 74, 74, 74, 74, 74, + 98, 98, 98, 98, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 50, 50, 50, 50, 50, - 50, 50, 113, 113, 75, + 50, 50, 113, 113, 76, } var yyR2 = [...]int{ @@ -1546,44 +1546,44 @@ var yyR2 = [...]int{ var yyChk = [...]int{ -1000, -127, -117, -9, 2, -11, -12, -13, -14, -15, - 52, 80, 45, 39, 144, -68, -69, 21, 20, 23, + 52, 80, 45, 39, 144, -68, -70, 21, 20, 23, 30, 34, 35, 40, 47, 99, 19, 14, -23, 49, 25, 27, 146, 41, 44, 36, 10, 37, -126, 53, - 54, 55, -70, -72, -28, -32, -79, 7, -62, -63, + 54, 55, -71, -73, -28, -32, -80, 7, -62, -63, -60, 60, 150, 93, 105, 106, 155, 154, 156, 157, 148, -45, -50, 108, 109, 110, 111, 112, 113, 114, - 6, 158, -52, 143, 97, 98, 107, -88, 100, 101, + 6, 158, -52, 143, 97, 98, 107, -89, 100, 101, -49, -59, -54, -47, -57, -58, 92, 50, 51, 4, 5, 85, 86, 87, 8, 9, 67, 68, 82, 64, 65, 66, 81, 63, 75, 142, 38, 12, 159, -10, - -61, 61, 18, -99, 83, 148, 83, -99, 144, 10, - -18, -95, -111, -99, 83, 37, 39, -19, -20, -103, + -61, 61, 18, -100, 83, 148, 83, -100, 144, 10, + -18, -96, -111, -100, 83, 37, 39, -19, -20, -69, -21, 10, -118, 148, -11, 37, 80, 148, 148, -24, - -23, 99, -24, -24, -33, -34, -49, -35, -88, -36, + -23, 99, -24, -24, -33, -34, -49, -35, -89, -36, 12, -67, -44, -23, 146, 131, 132, 88, 90, 89, 161, 153, 163, 169, 155, 154, 164, 133, 165, 166, 134, 135, 136, 137, 138, 139, 167, 140, 168, 141, 116, 91, 152, 115, 148, 148, 148, 144, -23, 10, - 147, -3, 153, 53, -79, 10, 10, 10, 94, 95, + 147, -3, 153, 53, -80, 10, 10, 10, 94, 95, 94, 96, 95, 162, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 105, 106, 148, - 150, 144, 58, 148, -115, -114, -74, -73, -23, 153, + 150, 144, 58, 148, -115, -114, -75, -74, -23, 153, 84, 60, -23, -28, -59, 148, -58, 99, 150, -28, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -51, 148, -23, -98, 17, -97, -65, 12, + -23, -23, -51, 148, -23, -99, 17, -98, -65, 12, 77, 78, -23, -23, -23, 150, 79, 79, -48, -46, -47, -64, 53, -10, -49, 148, 148, -23, -23, 148, - -23, -23, 17, 76, -97, -97, 17, -3, 144, -49, - -80, 148, -80, 148, 83, -99, 149, -99, 146, 144, - -117, 146, -16, -111, -99, 83, 146, 160, 83, 29, - -99, -20, 146, 160, 162, -22, 145, 2, -11, -12, + -23, -23, 17, 76, -98, -98, 17, -3, 144, -49, + -81, 148, -81, 148, 83, -100, 149, -100, 146, 144, + -117, 146, -16, -111, -100, 83, 146, 160, 83, 29, + -100, -20, 146, 160, 162, -22, 145, 2, -11, -12, -13, -14, -15, 52, -23, 21, -3, -104, -105, -23, -23, 146, 146, 146, 146, 160, 146, 160, 162, 146, 160, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -48, -23, 147, - -23, -89, -27, -28, -23, -103, -118, 146, 146, 10, - -128, 10, -90, 56, -128, -92, 56, 148, -11, 148, + -23, -90, -27, -28, -23, -69, -118, 146, 146, 10, + -128, 10, -91, 56, -128, -93, 56, 148, -11, 148, 146, 147, -23, 153, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -24, -23, -56, 10, 144, -49, -115, 151, 160, 59, -28, -23, @@ -1597,48 +1597,48 @@ var yyChk = [...]int{ 39, 40, 97, 98, 60, 30, 31, 32, 33, 34, 61, 62, 56, 57, 80, 54, 55, 53, 63, 64, 66, 65, 67, 68, 82, 81, 38, -55, -6, -49, - -81, -80, 79, 150, 144, 58, 79, -81, -113, -75, + -82, -81, 79, 150, 144, 58, 79, -82, -113, -76, -23, -23, -23, 76, 76, 142, 148, -23, 149, -116, -31, -23, 84, -115, 10, 146, -117, 145, 146, 146, - 83, -99, -19, 83, -99, 144, 10, 83, -21, -23, + 83, -100, -19, 83, -100, 144, 10, 83, -21, -23, 148, 149, 148, 146, 160, 149, -34, -36, -23, -44, - 147, -23, -7, 160, 29, 149, 145, -128, 148, -90, - -91, 57, -10, 144, -128, -125, -10, -23, -23, -118, - -23, 149, 151, 145, -80, -23, 149, 162, -74, -23, + 147, -23, -7, 160, 29, 149, 145, -128, 148, -91, + -92, 57, -10, 144, -128, -125, -10, -23, -23, -118, + -23, 149, 151, 145, -81, -23, 149, 162, -75, -23, 153, 60, -115, 149, 151, 149, -66, 10, 13, 154, - 12, 10, 145, 145, 150, 145, -23, 151, -80, -23, - -80, -49, -24, -23, -56, -49, -90, -7, 160, 149, - 149, -119, -120, -29, -30, -78, -76, 152, 61, 62, + 12, 10, 145, 145, 150, 145, -23, 151, -81, -23, + -81, -49, -24, -23, -56, -49, -91, -7, 160, 149, + 149, -119, -120, -29, -30, -79, -77, 152, 61, 62, -10, 145, -7, 160, -23, 149, 145, 144, 83, -107, - -17, -20, -95, 144, -128, 149, -87, -11, 147, -23, - -104, -23, -83, 144, 147, -23, 149, -27, -96, -28, - 153, 60, 150, -25, -11, 147, -101, 148, -119, -91, + -17, -20, -96, 144, -128, 149, -88, -11, 147, -23, + -104, -23, -84, 144, 147, -23, 149, -27, -97, -28, + 153, 60, 150, -25, -11, 147, -102, 148, -119, -92, -128, -125, -121, 144, 160, 149, 149, 96, -11, 147, 145, 162, -23, -28, 148, 149, 151, 13, -23, 145, - 151, 145, -91, 149, -75, 149, 160, -1, 153, -76, + 151, 145, -92, 149, -76, 149, 160, -1, 153, -77, 149, -31, -106, -20, 144, -7, 160, -20, -107, 146, -118, 149, 146, -109, 146, -109, 146, 146, 149, 59, -28, 148, -115, -118, -26, 42, 43, -119, 149, -128, - 144, 145, -37, -123, -122, 45, -124, 48, -94, 104, + 144, 145, -37, -123, -122, 45, -124, 48, -95, 104, 103, 102, 99, 100, 101, -121, -10, -11, 147, 146, - -118, -23, -115, 151, -128, -77, 147, -29, -2, 84, + -118, -23, -115, 151, -128, -78, 147, -29, -2, 84, -7, 160, -106, 145, -17, -7, 22, 146, -104, 145, - 32, 33, -109, 31, -109, -85, -11, 147, -96, -28, - -115, 151, 28, 148, 144, 149, -93, 45, 144, -121, - -30, 39, 37, -125, -94, 145, -118, 149, 145, 144, - -128, -78, 12, 145, -20, -7, 145, 146, 149, -23, + 32, 33, -109, 31, -109, -86, -11, 147, -97, -28, + -115, 151, 28, 148, 144, 149, -94, 45, 144, -121, + -30, 39, 37, -125, -95, 145, -118, 149, 145, 144, + -128, -79, 12, 145, -20, -7, 145, 146, 149, -23, -8, 147, 146, 145, 146, 31, -118, 149, 149, 146, - -100, -10, -118, -77, -77, 148, -121, 145, -108, -43, - 12, -102, -71, -6, -3, -82, 146, 144, -121, 59, - 162, 145, -86, -11, 147, -8, -118, 146, 26, -85, + -101, -10, -118, -78, -78, 148, -121, 145, -108, -43, + 12, -103, -72, -6, -3, -83, 146, 144, -121, 59, + 162, 145, -87, -11, 147, -8, -118, 146, 26, -86, 12, 161, 145, 144, 144, -112, -53, 12, 153, 145, 146, 160, -128, 162, 146, 160, 162, -6, 145, -110, -38, -39, -40, -41, -42, -10, -6, 80, 10, 145, -23, -23, -118, -118, 146, 149, -10, -118, -118, 149, - 160, 12, -43, -23, -71, -23, -128, 145, -38, 146, + 160, 12, -43, -23, -72, -23, -128, 145, -38, 146, 146, 46, 29, 79, 24, 144, 145, 145, -53, -128, - -128, 148, -125, 10, -4, -94, -6, 146, -118, -119, - -6, 145, 149, -77, -84, 146, 144, -118, 145, + -128, 148, -125, 10, -4, -95, -6, 146, -118, -119, + -6, 145, 149, -78, -85, 146, 144, -118, 145, } var yyDef = [...]int{ @@ -2829,14 +2829,15 @@ yydefault: Node: ast.Node{ Position: position.NewTokensPosition(yyDollar[1].token, yyDollar[3].token), }, - ConstTkn: yyDollar[1].token, - Consts: yyDollar[2].list, - SemiColonTkn: yyDollar[3].token, + ConstTkn: yyDollar[1].token, + Consts: yyDollar[2].node.(*ast.ParserSeparatedList).Items, + SeparatorTkns: yyDollar[2].node.(*ast.ParserSeparatedList).SeparatorTkns, + SemiColonTkn: yyDollar[3].token, } } case 101: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:553 + // line internal/php7/php7.y:554 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -2848,7 +2849,7 @@ yydefault: } case 102: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:563 + // line internal/php7/php7.y:564 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -2860,7 +2861,7 @@ yydefault: } case 103: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:576 + // line internal/php7/php7.y:577 { if len(yyDollar[4].list) > 0 { yyDollar[4].list[len(yyDollar[4].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[5].token @@ -2884,7 +2885,7 @@ yydefault: } case 104: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:598 + // line internal/php7/php7.y:599 { yyDollar[5].list[len(yyDollar[5].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[6].token @@ -2907,7 +2908,7 @@ yydefault: } case 105: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:622 + // line internal/php7/php7.y:623 { yyDollar[4].list[len(yyDollar[4].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[5].token @@ -2929,7 +2930,7 @@ yydefault: } case 106: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:642 + // line internal/php7/php7.y:643 { yyDollar[5].list[len(yyDollar[5].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[6].token @@ -2952,19 +2953,19 @@ yydefault: } case 107: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:666 + // line internal/php7/php7.y:667 { yyVAL.token = nil } case 108: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:670 + // line internal/php7/php7.y:671 { yyVAL.token = yyDollar[1].token } case 109: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:677 + // line internal/php7/php7.y:678 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2972,13 +2973,13 @@ yydefault: } case 110: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:683 + // line internal/php7/php7.y:684 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 111: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:690 + // line internal/php7/php7.y:691 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -2986,13 +2987,13 @@ yydefault: } case 112: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:696 + // line internal/php7/php7.y:697 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 113: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:703 + // line internal/php7/php7.y:704 { yyDollar[1].list[len(yyDollar[1].list)-1].(*ast.StmtUseDeclaration).CommaTkn = yyDollar[2].token @@ -3000,19 +3001,19 @@ yydefault: } case 114: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:709 + // line internal/php7/php7.y:710 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 115: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:716 + // line internal/php7/php7.y:717 { yyVAL.node = yyDollar[1].node } case 116: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:720 + // line internal/php7/php7.y:721 { decl := yyDollar[2].node.(*ast.StmtUseDeclaration) decl.Type = yyDollar[1].node @@ -3022,7 +3023,7 @@ yydefault: } case 117: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:731 + // line internal/php7/php7.y:732 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -3038,7 +3039,7 @@ yydefault: } case 118: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:745 + // line internal/php7/php7.y:746 { yyVAL.node = &ast.StmtUseDeclaration{ Node: ast.Node{ @@ -3061,13 +3062,13 @@ yydefault: } case 119: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:769 + // line internal/php7/php7.y:770 { yyVAL.node = yyDollar[1].node } case 120: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:773 + // line internal/php7/php7.y:774 { decl := yyDollar[2].node.(*ast.StmtUseDeclaration) decl.NsSeparatorTkn = yyDollar[1].token @@ -3077,21 +3078,24 @@ yydefault: } case 121: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:784 + // line internal/php7/php7.y:785 { - lastNode(yyDollar[1].list).(*ast.StmtConstant).CommaTkn = yyDollar[2].token + 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) - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + yyVAL.node = yyDollar[1].node } case 122: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:790 + // line internal/php7/php7.y:792 { - yyVAL.list = []ast.Vertex{yyDollar[1].node} + yyVAL.node = &ast.ParserSeparatedList{ + Items: []ast.Vertex{yyDollar[1].node}, + } } case 123: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:797 + // line internal/php7/php7.y:801 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -3104,50 +3108,50 @@ yydefault: } case 124: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:808 + // line internal/php7/php7.y:812 { yyVAL.list = []ast.Vertex{} } case 125: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:815 + // line internal/php7/php7.y:819 { // error yyVAL.node = nil } case 126: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:820 + // line internal/php7/php7.y:824 { yyVAL.node = yyDollar[1].node } case 127: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:824 + // line internal/php7/php7.y:828 { yyVAL.node = yyDollar[1].node } case 128: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:828 + // line internal/php7/php7.y:832 { yyVAL.node = yyDollar[1].node } case 129: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:832 + // line internal/php7/php7.y:836 { yyVAL.node = yyDollar[1].node } case 130: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:836 + // line internal/php7/php7.y:840 { yyVAL.node = yyDollar[1].node } case 131: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:840 + // line internal/php7/php7.y:844 { yyVAL.node = &ast.StmtHaltCompiler{ Node: ast.Node{ @@ -3161,7 +3165,7 @@ yydefault: } case 132: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:854 + // line internal/php7/php7.y:858 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -3174,19 +3178,19 @@ yydefault: } case 133: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:865 + // line internal/php7/php7.y:869 { yyVAL.node = yyDollar[1].node } case 134: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:869 + // line internal/php7/php7.y:873 { yyVAL.node = yyDollar[1].node } case 135: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:873 + // line internal/php7/php7.y:877 { yyDollar[5].node.(*ast.StmtWhile).WhileTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtWhile).OpenParenthesisTkn = yyDollar[2].token @@ -3198,7 +3202,7 @@ yydefault: } case 136: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:883 + // line internal/php7/php7.y:887 { yyVAL.node = &ast.StmtDo{ Node: ast.Node{ @@ -3215,7 +3219,7 @@ yydefault: } case 137: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:898 + // line internal/php7/php7.y:902 { yyDollar[9].node.(*ast.StmtFor).ForTkn = yyDollar[1].token yyDollar[9].node.(*ast.StmtFor).OpenParenthesisTkn = yyDollar[2].token @@ -3231,7 +3235,7 @@ yydefault: } case 138: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:912 + // line internal/php7/php7.y:916 { yyDollar[5].node.(*ast.StmtSwitch).SwitchTkn = yyDollar[1].token yyDollar[5].node.(*ast.StmtSwitch).OpenParenthesisTkn = yyDollar[2].token @@ -3243,7 +3247,7 @@ yydefault: } case 139: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:922 + // line internal/php7/php7.y:926 { yyVAL.node = &ast.StmtBreak{ Node: ast.Node{ @@ -3256,7 +3260,7 @@ yydefault: } case 140: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:933 + // line internal/php7/php7.y:937 { yyVAL.node = &ast.StmtContinue{ Node: ast.Node{ @@ -3269,7 +3273,7 @@ yydefault: } case 141: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:944 + // line internal/php7/php7.y:948 { yyVAL.node = &ast.StmtReturn{ Node: ast.Node{ @@ -3282,7 +3286,7 @@ yydefault: } case 142: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:955 + // line internal/php7/php7.y:959 { yyDollar[2].node.(*ast.StmtGlobal).GlobalTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtGlobal).SemiColonTkn = yyDollar[3].token @@ -3292,7 +3296,7 @@ yydefault: } case 143: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:963 + // line internal/php7/php7.y:967 { yyDollar[2].node.(*ast.StmtStatic).StaticTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtStatic).SemiColonTkn = yyDollar[3].token @@ -3302,7 +3306,7 @@ yydefault: } case 144: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:971 + // line internal/php7/php7.y:975 { yyDollar[2].node.(*ast.StmtEcho).EchoTkn = yyDollar[1].token yyDollar[2].node.(*ast.StmtEcho).SemiColonTkn = yyDollar[3].token @@ -3312,7 +3316,7 @@ yydefault: } case 145: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:979 + // line internal/php7/php7.y:983 { yyVAL.node = &ast.StmtInlineHtml{ Node: ast.Node{ @@ -3324,7 +3328,7 @@ yydefault: } case 146: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:989 + // line internal/php7/php7.y:993 { yyVAL.node = &ast.StmtExpression{ast.Node{}, yyDollar[1].node} @@ -3338,7 +3342,7 @@ yydefault: } case 147: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1001 + // line internal/php7/php7.y:1005 { yyDollar[3].node.(*ast.StmtUnset).UnsetTkn = yyDollar[1].token yyDollar[3].node.(*ast.StmtUnset).OpenParenthesisTkn = yyDollar[2].token @@ -3351,7 +3355,7 @@ yydefault: } case 148: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1012 + // line internal/php7/php7.y:1016 { yyDollar[7].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[7].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3365,7 +3369,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1024 + // line internal/php7/php7.y:1028 { yyDollar[9].node.(*ast.StmtForeach).ForeachTkn = yyDollar[1].token yyDollar[9].node.(*ast.StmtForeach).OpenParenthesisTkn = yyDollar[2].token @@ -3381,22 +3385,20 @@ yydefault: } case 150: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1038 + // line internal/php7/php7.y:1042 { + yyDollar[5].node.(*ast.StmtDeclare).DeclareTkn = yyDollar[1].token + yyDollar[5].node.(*ast.StmtDeclare).OpenParenthesisTkn = yyDollar[2].token + yyDollar[5].node.(*ast.StmtDeclare).Consts = yyDollar[3].node.(*ast.ParserSeparatedList).Items + yyDollar[5].node.(*ast.StmtDeclare).SeparatorTkns = yyDollar[3].node.(*ast.ParserSeparatedList).SeparatorTkns + yyDollar[5].node.(*ast.StmtDeclare).CloseParenthesisTkn = yyDollar[4].token + yyDollar[5].node.(*ast.StmtDeclare).Node.Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node) + yyVAL.node = yyDollar[5].node - yyVAL.node.(*ast.StmtDeclare).Consts = yyDollar[3].list - - // save position - yyVAL.node.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Declare, yyDollar[2].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.ConstList, yyDollar[4].token.SkippedTokens) } case 151: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1051 + // line internal/php7/php7.y:1053 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -3409,7 +3411,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1062 + // line internal/php7/php7.y:1064 { if yyDollar[6].node == nil { yyVAL.node = &ast.StmtTry{ast.Node{}, yyDollar[3].list, yyDollar[5].list, yyDollar[6].node} @@ -3426,7 +3428,7 @@ yydefault: } case 153: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1077 + // line internal/php7/php7.y:1079 { yyVAL.node = &ast.StmtThrow{ast.Node{}, yyDollar[2].node} @@ -3440,7 +3442,7 @@ yydefault: } case 154: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1089 + // line internal/php7/php7.y:1091 { label := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtGoto{ast.Node{}, label} @@ -3457,7 +3459,7 @@ yydefault: } case 155: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1104 + // line internal/php7/php7.y:1106 { label := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtLabel{ast.Node{}, label} @@ -3472,13 +3474,13 @@ yydefault: } case 156: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1119 + // line internal/php7/php7.y:1121 { yyVAL.list = []ast.Vertex{} } case 157: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1123 + // line internal/php7/php7.y:1125 { identifier := &ast.Identifier{ast.Node{}, yyDollar[5].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -3500,13 +3502,13 @@ yydefault: } case 158: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1145 + // line internal/php7/php7.y:1147 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 159: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1149 + // line internal/php7/php7.y:1151 { switch n := lastNode(yyDollar[1].list).(type) { case *ast.NameName: @@ -3520,13 +3522,13 @@ yydefault: } case 160: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1161 + // line internal/php7/php7.y:1163 { yyVAL.node = nil } case 161: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1165 + // line internal/php7/php7.y:1167 { yyVAL.node = &ast.StmtFinally{ast.Node{}, yyDollar[3].list} @@ -3540,7 +3542,7 @@ yydefault: } case 162: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1180 + // line internal/php7/php7.y:1182 { yyVAL.node = &ast.StmtUnset{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -3548,7 +3550,7 @@ yydefault: } case 163: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1186 + // line internal/php7/php7.y:1188 { 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) @@ -3557,13 +3559,13 @@ yydefault: } case 164: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1196 + // line internal/php7/php7.y:1198 { yyVAL.node = yyDollar[1].node } case 165: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:1203 + // line internal/php7/php7.y:1205 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtFunction{ast.Node{}, yyDollar[2].token != nil, name, yyDollar[6].list, yyDollar[8].node, yyDollar[10].list} @@ -3593,31 +3595,31 @@ yydefault: } case 166: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1234 + // line internal/php7/php7.y:1236 { yyVAL.token = nil } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1238 + // line internal/php7/php7.y:1240 { yyVAL.token = yyDollar[1].token } case 168: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1245 + // line internal/php7/php7.y:1247 { yyVAL.token = nil } case 169: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1249 + // line internal/php7/php7.y:1251 { yyVAL.token = yyDollar[1].token } case 170: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1256 + // line internal/php7/php7.y:1258 { 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} @@ -3635,7 +3637,7 @@ yydefault: } case 171: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:1272 + // line internal/php7/php7.y:1274 { 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} @@ -3652,19 +3654,19 @@ yydefault: } case 172: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1290 + // line internal/php7/php7.y:1292 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 173: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1294 + // line internal/php7/php7.y:1296 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 174: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1301 + // line internal/php7/php7.y:1303 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -3676,7 +3678,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1311 + // line internal/php7/php7.y:1313 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -3688,7 +3690,7 @@ yydefault: } case 176: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1324 + // line internal/php7/php7.y:1326 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtTrait{ast.Node{}, name, yyDollar[5].list} @@ -3705,7 +3707,7 @@ yydefault: } case 177: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1342 + // line internal/php7/php7.y:1344 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtInterface{ast.Node{}, name, yyDollar[3].InterfaceExtends, yyDollar[6].list} @@ -3722,13 +3724,13 @@ yydefault: } case 178: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1360 + // line internal/php7/php7.y:1362 { yyVAL.ClassExtends = nil } case 179: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1364 + // line internal/php7/php7.y:1366 { yyVAL.ClassExtends = &ast.StmtClassExtends{ast.Node{}, yyDollar[2].node} @@ -3740,13 +3742,13 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1377 + // line internal/php7/php7.y:1379 { yyVAL.InterfaceExtends = nil } case 181: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1381 + // line internal/php7/php7.y:1383 { yyVAL.InterfaceExtends = &ast.StmtInterfaceExtends{ast.Node{}, yyDollar[2].list} @@ -3758,13 +3760,13 @@ yydefault: } case 182: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1394 + // line internal/php7/php7.y:1396 { yyVAL.ClassImplements = nil } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1398 + // line internal/php7/php7.y:1400 { yyVAL.ClassImplements = &ast.StmtClassImplements{ast.Node{}, yyDollar[2].list} @@ -3776,13 +3778,13 @@ yydefault: } case 184: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1411 + // line internal/php7/php7.y:1413 { yyVAL.node = yyDollar[1].node } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1415 + // line internal/php7/php7.y:1417 { yyVAL.node = &ast.ExprReference{ast.Node{}, yyDollar[2].node} @@ -3794,7 +3796,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1425 + // line internal/php7/php7.y:1427 { yyVAL.node = &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -3808,7 +3810,7 @@ yydefault: } case 187: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1437 + // line internal/php7/php7.y:1439 { yyVAL.node = &ast.ExprShortList{ast.Node{}, yyDollar[2].list} @@ -3821,7 +3823,7 @@ yydefault: } case 188: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1451 + // line internal/php7/php7.y:1453 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3832,7 +3834,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1460 + // line internal/php7/php7.y:1462 { yyVAL.node = &ast.StmtFor{ Node: ast.Node{ @@ -3852,7 +3854,7 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1481 + // line internal/php7/php7.y:1483 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3863,7 +3865,7 @@ yydefault: } case 191: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1490 + // line internal/php7/php7.y:1492 { yyVAL.node = &ast.StmtForeach{ Node: ast.Node{ @@ -3883,37 +3885,38 @@ yydefault: } case 192: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1511 + // line internal/php7/php7.y:1513 { - yyVAL.node = &ast.StmtDeclare{ast.Node{}, false, nil, yyDollar[1].node} - - // save position - yyVAL.node.GetNode().Position = position.NewNodePosition(yyDollar[1].node) + yyVAL.node = &ast.StmtDeclare{ + Node: ast.Node{ + Position: position.NewNodePosition(yyDollar[1].node), + }, + Stmt: yyDollar[1].node, + } } case 193: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1518 + // line internal/php7/php7.y:1522 { - stmtList := &ast.StmtStmtList{ + yyVAL.node = &ast.StmtDeclare{ Node: ast.Node{ - Position: position.NewNodeListPosition(yyDollar[2].list), + Position: position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token), }, - Stmts: yyDollar[2].list, + Alt: true, + ColonTkn: yyDollar[1].token, + Stmt: &ast.StmtStmtList{ + Node: ast.Node{ + Position: position.NewNodeListPosition(yyDollar[2].list), + }, + Stmts: yyDollar[2].list, + }, + EndDeclareTkn: yyDollar[3].token, + SemiColonTkn: yyDollar[4].token, } - yyVAL.node = &ast.StmtDeclare{ast.Node{}, true, nil, stmtList} - - // save position - yyVAL.node.GetNode().Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token) - - // save comments - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Cond, yyDollar[1].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Stmts, yyDollar[3].token.SkippedTokens) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.AltEnd, yyDollar[4].token.SkippedTokens) - yylex.(*Parser).setToken(yyVAL.node, token.SemiColon, yyDollar[4].token.SkippedTokens) } case 194: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1540 + // line internal/php7/php7.y:1543 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3926,7 +3929,7 @@ yydefault: } case 195: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1551 + // line internal/php7/php7.y:1554 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3940,7 +3943,7 @@ yydefault: } case 196: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1563 + // line internal/php7/php7.y:1566 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3955,7 +3958,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1576 + // line internal/php7/php7.y:1579 { yyVAL.node = &ast.StmtSwitch{ Node: ast.Node{ @@ -3971,13 +3974,13 @@ yydefault: } case 198: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1593 + // line internal/php7/php7.y:1596 { yyVAL.list = nil } case 199: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1597 + // line internal/php7/php7.y:1600 { yyVAL.list = append(yyDollar[1].list, &ast.StmtCase{ Node: ast.Node{ @@ -3991,7 +3994,7 @@ yydefault: } case 200: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1609 + // line internal/php7/php7.y:1612 { yyVAL.list = append(yyDollar[1].list, &ast.StmtDefault{ Node: ast.Node{ @@ -4004,19 +4007,19 @@ yydefault: } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1623 + // line internal/php7/php7.y:1626 { yyVAL.token = yyDollar[1].token } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1627 + // line internal/php7/php7.y:1630 { yyVAL.token = yyDollar[1].token } case 203: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1634 + // line internal/php7/php7.y:1637 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4027,7 +4030,7 @@ yydefault: } case 204: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1643 + // line internal/php7/php7.y:1646 { yyVAL.node = &ast.StmtWhile{ Node: ast.Node{ @@ -4047,7 +4050,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1664 + // line internal/php7/php7.y:1667 { yyVAL.node = &ast.StmtIf{ Node: ast.Node{ @@ -4062,7 +4065,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1677 + // line internal/php7/php7.y:1680 { yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, &ast.StmtElseIf{ Node: ast.Node{ @@ -4081,13 +4084,13 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1697 + // line internal/php7/php7.y:1700 { yyVAL.node = yyDollar[1].node } case 208: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1701 + // line internal/php7/php7.y:1704 { yyDollar[1].node.(*ast.StmtIf).Else = &ast.StmtElse{ Node: ast.Node{ @@ -4103,7 +4106,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1718 + // line internal/php7/php7.y:1721 { yyVAL.node = &ast.StmtIf{ Node: ast.Node{ @@ -4125,7 +4128,7 @@ yydefault: } case 210: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1738 + // line internal/php7/php7.y:1741 { yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, &ast.StmtElseIf{ Node: ast.Node{ @@ -4149,7 +4152,7 @@ yydefault: } case 211: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1763 + // line internal/php7/php7.y:1766 { yyDollar[1].node.(*ast.StmtIf).EndIfTkn = yyDollar[2].token yyDollar[1].node.(*ast.StmtIf).SemiColonTkn = yyDollar[3].token @@ -4159,7 +4162,7 @@ yydefault: } case 212: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1771 + // line internal/php7/php7.y:1774 { yyDollar[1].node.(*ast.StmtIf).Else = &ast.StmtElse{ Node: ast.Node{ @@ -4183,25 +4186,25 @@ yydefault: } case 213: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1796 + // line internal/php7/php7.y:1799 { yyVAL.list = yyDollar[1].list } case 214: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1800 + // line internal/php7/php7.y:1803 { yyVAL.list = nil } case 215: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1807 + // line internal/php7/php7.y:1810 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1811 + // line internal/php7/php7.y:1814 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4210,7 +4213,7 @@ yydefault: } case 217: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1821 + // line internal/php7/php7.y:1824 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} identifier.GetNode().Position = position.NewTokenPosition(yyDollar[4].token) @@ -4246,7 +4249,7 @@ yydefault: } case 218: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1855 + // line internal/php7/php7.y:1858 { identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} identifier.GetNode().Position = position.NewTokenPosition(yyDollar[4].token) @@ -4283,25 +4286,25 @@ yydefault: } case 219: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1893 + // line internal/php7/php7.y:1896 { yyVAL.node = nil } case 220: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1897 + // line internal/php7/php7.y:1900 { yyVAL.node = yyDollar[1].node } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1904 + // line internal/php7/php7.y:1907 { yyVAL.node = yyDollar[1].node } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1908 + // line internal/php7/php7.y:1911 { yyVAL.node = &ast.Nullable{ast.Node{}, yyDollar[2].node} @@ -4313,7 +4316,7 @@ yydefault: } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1921 + // line internal/php7/php7.y:1924 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4325,7 +4328,7 @@ yydefault: } case 224: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1931 + // line internal/php7/php7.y:1934 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4337,19 +4340,19 @@ yydefault: } case 225: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1941 + // line internal/php7/php7.y:1944 { yyVAL.node = yyDollar[1].node } case 226: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1948 + // line internal/php7/php7.y:1951 { yyVAL.node = nil } case 227: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1952 + // line internal/php7/php7.y:1955 { yyVAL.node = yyDollar[2].node @@ -4358,7 +4361,7 @@ yydefault: } case 228: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1962 + // line internal/php7/php7.y:1965 { yyVAL.node = &ast.ArgumentList{ast.Node{}, nil} @@ -4371,7 +4374,7 @@ yydefault: } case 229: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1973 + // line internal/php7/php7.y:1976 { yyVAL.node = &ast.ArgumentList{ast.Node{}, yyDollar[2].list} @@ -4388,13 +4391,13 @@ yydefault: } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1991 + // line internal/php7/php7.y:1994 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1995 + // line internal/php7/php7.y:1998 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4403,7 +4406,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2005 + // line internal/php7/php7.y:2008 { yyVAL.node = &ast.Argument{ast.Node{}, false, false, yyDollar[1].node} @@ -4415,7 +4418,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2015 + // line internal/php7/php7.y:2018 { yyVAL.node = &ast.Argument{ast.Node{}, true, false, yyDollar[2].node} @@ -4427,7 +4430,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2028 + // line internal/php7/php7.y:2031 { 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) @@ -4436,7 +4439,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2035 + // line internal/php7/php7.y:2038 { yyVAL.node = &ast.StmtGlobal{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4444,13 +4447,13 @@ yydefault: } case 236: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2044 + // line internal/php7/php7.y:2047 { yyVAL.node = yyDollar[1].node } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2051 + // line internal/php7/php7.y:2054 { 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) @@ -4459,7 +4462,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2058 + // line internal/php7/php7.y:2061 { yyVAL.node = &ast.StmtStatic{ Vars: []ast.Vertex{yyDollar[1].node}, @@ -4467,7 +4470,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2067 + // line internal/php7/php7.y:2070 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4488,7 +4491,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2086 + // line internal/php7/php7.y:2089 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4510,19 +4513,19 @@ yydefault: } case 241: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2109 + // line internal/php7/php7.y:2112 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 242: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2113 + // line internal/php7/php7.y:2116 { yyVAL.list = []ast.Vertex{} } case 243: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2120 + // line internal/php7/php7.y:2123 { yyVAL.node = &ast.StmtPropertyList{ast.Node{}, yyDollar[1].list, yyDollar[2].node, yyDollar[3].list} @@ -4536,7 +4539,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2132 + // line internal/php7/php7.y:2135 { yyVAL.node = &ast.StmtClassConstList{ Node: ast.Node{ @@ -4550,7 +4553,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2144 + // line internal/php7/php7.y:2147 { yyVAL.node = &ast.StmtTraitUse{ast.Node{}, yyDollar[2].list, yyDollar[3].node} @@ -4562,7 +4565,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php7/php7.y:2154 + // line internal/php7/php7.y:2157 { 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} @@ -4593,13 +4596,13 @@ yydefault: } case 247: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2186 + // line internal/php7/php7.y:2189 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2190 + // line internal/php7/php7.y:2193 { switch n := lastNode(yyDollar[1].list).(type) { case *ast.NameName: @@ -4613,7 +4616,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2202 + // line internal/php7/php7.y:2205 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -4625,7 +4628,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2212 + // line internal/php7/php7.y:2215 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, nil} @@ -4637,7 +4640,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2222 + // line internal/php7/php7.y:2225 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, yyDollar[2].list} @@ -4649,19 +4652,19 @@ yydefault: } case 252: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2235 + // line internal/php7/php7.y:2238 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 253: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2239 + // line internal/php7/php7.y:2242 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 254: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2246 + // line internal/php7/php7.y:2249 { yyVAL.node = yyDollar[1].node @@ -4671,7 +4674,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2254 + // line internal/php7/php7.y:2257 { yyVAL.node = yyDollar[1].node @@ -4681,7 +4684,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2265 + // line internal/php7/php7.y:2268 { yyVAL.node = &ast.StmtTraitUsePrecedence{ast.Node{}, yyDollar[1].node, yyDollar[3].list} @@ -4694,7 +4697,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2279 + // line internal/php7/php7.y:2282 { alias := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, nil, alias} @@ -4710,7 +4713,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2293 + // line internal/php7/php7.y:2296 { alias := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, nil, alias} @@ -4726,7 +4729,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2307 + // line internal/php7/php7.y:2310 { alias := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, alias} @@ -4742,7 +4745,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2321 + // line internal/php7/php7.y:2324 { yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, nil} @@ -4755,7 +4758,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2335 + // line internal/php7/php7.y:2338 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, nil, name} @@ -4769,13 +4772,13 @@ yydefault: } case 262: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2347 + // line internal/php7/php7.y:2350 { yyVAL.node = yyDollar[1].node } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2354 + // line internal/php7/php7.y:2357 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, yyDollar[1].node, target} @@ -4791,7 +4794,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2371 + // line internal/php7/php7.y:2374 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -4804,7 +4807,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2382 + // line internal/php7/php7.y:2385 { yyVAL.node = &ast.StmtStmtList{ Node: ast.Node{ @@ -4817,13 +4820,13 @@ yydefault: } case 266: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2396 + // line internal/php7/php7.y:2399 { yyVAL.list = yyDollar[1].list } case 267: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2400 + // line internal/php7/php7.y:2403 { modifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{modifier} @@ -4836,31 +4839,31 @@ yydefault: } case 268: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2414 + // line internal/php7/php7.y:2417 { yyVAL.list = nil } case 269: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2418 + // line internal/php7/php7.y:2421 { yyVAL.list = yyDollar[1].list } case 270: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2425 + // line internal/php7/php7.y:2428 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2429 + // line internal/php7/php7.y:2432 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 272: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2436 + // line internal/php7/php7.y:2439 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4872,7 +4875,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2446 + // line internal/php7/php7.y:2449 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4884,7 +4887,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2456 + // line internal/php7/php7.y:2459 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4896,7 +4899,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2466 + // line internal/php7/php7.y:2469 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4908,7 +4911,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2476 + // line internal/php7/php7.y:2479 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4920,7 +4923,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2486 + // line internal/php7/php7.y:2489 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4932,7 +4935,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2499 + // line internal/php7/php7.y:2502 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4941,13 +4944,13 @@ yydefault: } case 279: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2506 + // line internal/php7/php7.y:2509 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 280: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2513 + // line internal/php7/php7.y:2516 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4963,7 +4966,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2527 + // line internal/php7/php7.y:2530 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -4980,7 +4983,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2545 + // line internal/php7/php7.y:2548 { lastNode(yyDollar[1].list).(*ast.StmtConstant).CommaTkn = yyDollar[2].token @@ -4988,13 +4991,13 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2551 + // line internal/php7/php7.y:2554 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 284: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2558 + // line internal/php7/php7.y:2561 { yyVAL.node = &ast.StmtConstant{ Node: ast.Node{ @@ -5014,7 +5017,7 @@ yydefault: } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2579 + // line internal/php7/php7.y:2582 { yyVAL.node = &ast.StmtConstant{ Node: ast.Node{ @@ -5034,7 +5037,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2600 + // line internal/php7/php7.y:2603 { 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) @@ -5043,7 +5046,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2607 + // line internal/php7/php7.y:2610 { yyVAL.node = &ast.StmtEcho{ Exprs: []ast.Vertex{yyDollar[1].node}, @@ -5051,25 +5054,25 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2616 + // line internal/php7/php7.y:2619 { yyVAL.node = yyDollar[1].node } case 289: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2623 + // line internal/php7/php7.y:2626 { yyVAL.list = nil } case 290: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2627 + // line internal/php7/php7.y:2630 { yyVAL.list = yyDollar[1].list } case 291: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2634 + // line internal/php7/php7.y:2637 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5078,13 +5081,13 @@ yydefault: } case 292: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2641 + // line internal/php7/php7.y:2644 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 293: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:2648 + // line internal/php7/php7.y:2651 { 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} @@ -5102,7 +5105,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2667 + // line internal/php7/php7.y:2670 { if yyDollar[3].node != nil { yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, yyDollar[3].node.(*ast.ArgumentList)} @@ -5117,7 +5120,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2680 + // line internal/php7/php7.y:2683 { yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, nil} @@ -5129,7 +5132,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2693 + // line internal/php7/php7.y:2696 { listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, listNode, yyDollar[6].node} @@ -5146,7 +5149,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:2708 + // line internal/php7/php7.y:2711 { shortList := &ast.ExprShortList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, shortList, yyDollar[5].node} @@ -5162,7 +5165,7 @@ yydefault: } case 298: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2722 + // line internal/php7/php7.y:2725 { yyVAL.node = &ast.ExprAssign{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5175,7 +5178,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2733 + // line internal/php7/php7.y:2736 { yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, yyDollar[4].node} @@ -5189,7 +5192,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2745 + // line internal/php7/php7.y:2748 { yyVAL.node = &ast.ExprClone{ast.Node{}, yyDollar[2].node} @@ -5201,7 +5204,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2755 + // line internal/php7/php7.y:2758 { yyVAL.node = &ast.ExprAssignPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5214,7 +5217,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2766 + // line internal/php7/php7.y:2769 { yyVAL.node = &ast.ExprAssignMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5227,7 +5230,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2777 + // line internal/php7/php7.y:2780 { yyVAL.node = &ast.ExprAssignMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5240,7 +5243,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2788 + // line internal/php7/php7.y:2791 { yyVAL.node = &ast.ExprAssignPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5253,7 +5256,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2799 + // line internal/php7/php7.y:2802 { yyVAL.node = &ast.ExprAssignDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5266,7 +5269,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2810 + // line internal/php7/php7.y:2813 { yyVAL.node = &ast.ExprAssignConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5279,7 +5282,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2821 + // line internal/php7/php7.y:2824 { yyVAL.node = &ast.ExprAssignMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5292,7 +5295,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2832 + // line internal/php7/php7.y:2835 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5305,7 +5308,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2843 + // line internal/php7/php7.y:2846 { yyVAL.node = &ast.ExprAssignBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5318,7 +5321,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2854 + // line internal/php7/php7.y:2857 { yyVAL.node = &ast.ExprAssignBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5331,7 +5334,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2865 + // line internal/php7/php7.y:2868 { yyVAL.node = &ast.ExprAssignShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5344,7 +5347,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2876 + // line internal/php7/php7.y:2879 { yyVAL.node = &ast.ExprAssignShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5357,7 +5360,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2887 + // line internal/php7/php7.y:2890 { yyVAL.node = &ast.ExprAssignCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5370,7 +5373,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2898 + // line internal/php7/php7.y:2901 { yyVAL.node = &ast.ExprPostInc{ast.Node{}, yyDollar[1].node} @@ -5383,7 +5386,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2909 + // line internal/php7/php7.y:2912 { yyVAL.node = &ast.ExprPreInc{ast.Node{}, yyDollar[2].node} @@ -5395,7 +5398,7 @@ yydefault: } case 316: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2919 + // line internal/php7/php7.y:2922 { yyVAL.node = &ast.ExprPostDec{ast.Node{}, yyDollar[1].node} @@ -5408,7 +5411,7 @@ yydefault: } case 317: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2930 + // line internal/php7/php7.y:2933 { yyVAL.node = &ast.ExprPreDec{ast.Node{}, yyDollar[2].node} @@ -5420,7 +5423,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2940 + // line internal/php7/php7.y:2943 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5433,7 +5436,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2951 + // line internal/php7/php7.y:2954 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5446,7 +5449,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2962 + // line internal/php7/php7.y:2965 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5459,7 +5462,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2973 + // line internal/php7/php7.y:2976 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5472,7 +5475,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2984 + // line internal/php7/php7.y:2987 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5485,7 +5488,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2995 + // line internal/php7/php7.y:2998 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5498,7 +5501,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3006 + // line internal/php7/php7.y:3009 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5511,7 +5514,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3017 + // line internal/php7/php7.y:3020 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5524,7 +5527,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3028 + // line internal/php7/php7.y:3031 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5536,7 +5539,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3038 + // line internal/php7/php7.y:3041 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5549,7 +5552,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3049 + // line internal/php7/php7.y:3052 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5562,7 +5565,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3060 + // line internal/php7/php7.y:3063 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5575,7 +5578,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3071 + // line internal/php7/php7.y:3074 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5588,7 +5591,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3082 + // line internal/php7/php7.y:3085 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5601,7 +5604,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3093 + // line internal/php7/php7.y:3096 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5614,7 +5617,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3104 + // line internal/php7/php7.y:3107 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5627,7 +5630,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3115 + // line internal/php7/php7.y:3118 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5640,7 +5643,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3126 + // line internal/php7/php7.y:3129 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -5652,7 +5655,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3136 + // line internal/php7/php7.y:3139 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -5664,7 +5667,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3146 + // line internal/php7/php7.y:3149 { yyVAL.node = &ast.ExprBooleanNot{ast.Node{}, yyDollar[2].node} @@ -5676,7 +5679,7 @@ yydefault: } case 338: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3156 + // line internal/php7/php7.y:3159 { yyVAL.node = &ast.ExprBitwiseNot{ast.Node{}, yyDollar[2].node} @@ -5688,7 +5691,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3166 + // line internal/php7/php7.y:3169 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5701,7 +5704,7 @@ yydefault: } case 340: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3177 + // line internal/php7/php7.y:3180 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5714,7 +5717,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3188 + // line internal/php7/php7.y:3191 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5727,7 +5730,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3199 + // line internal/php7/php7.y:3202 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5741,7 +5744,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3211 + // line internal/php7/php7.y:3214 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5754,7 +5757,7 @@ yydefault: } case 344: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3222 + // line internal/php7/php7.y:3225 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5767,7 +5770,7 @@ yydefault: } case 345: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3233 + // line internal/php7/php7.y:3236 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5780,7 +5783,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3244 + // line internal/php7/php7.y:3247 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5793,7 +5796,7 @@ yydefault: } case 347: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3255 + // line internal/php7/php7.y:3258 { yyVAL.node = &ast.ExprBinarySpaceship{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5806,7 +5809,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3266 + // line internal/php7/php7.y:3269 { yyVAL.node = &ast.ExprInstanceOf{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5819,7 +5822,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3277 + // line internal/php7/php7.y:3280 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -5836,13 +5839,13 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3292 + // line internal/php7/php7.y:3295 { yyVAL.node = yyDollar[1].node } case 351: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:3296 + // line internal/php7/php7.y:3299 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -5856,7 +5859,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3308 + // line internal/php7/php7.y:3311 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -5870,7 +5873,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3320 + // line internal/php7/php7.y:3323 { yyVAL.node = &ast.ExprBinaryCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5883,13 +5886,13 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3331 + // line internal/php7/php7.y:3334 { yyVAL.node = yyDollar[1].node } case 355: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3335 + // line internal/php7/php7.y:3338 { yyVAL.node = &ast.ExprCastInt{ast.Node{}, yyDollar[2].node} @@ -5902,7 +5905,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3346 + // line internal/php7/php7.y:3349 { yyVAL.node = &ast.ExprCastDouble{ast.Node{}, yyDollar[2].node} @@ -5915,7 +5918,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3357 + // line internal/php7/php7.y:3360 { yyVAL.node = &ast.ExprCastString{ast.Node{}, yyDollar[2].node} @@ -5928,7 +5931,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3368 + // line internal/php7/php7.y:3371 { yyVAL.node = &ast.ExprCastArray{ast.Node{}, yyDollar[2].node} @@ -5941,7 +5944,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3379 + // line internal/php7/php7.y:3382 { yyVAL.node = &ast.ExprCastObject{ast.Node{}, yyDollar[2].node} @@ -5954,7 +5957,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3390 + // line internal/php7/php7.y:3393 { yyVAL.node = &ast.ExprCastBool{ast.Node{}, yyDollar[2].node} @@ -5967,7 +5970,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3401 + // line internal/php7/php7.y:3404 { yyVAL.node = &ast.ExprCastUnset{ast.Node{}, yyDollar[2].node} @@ -5980,7 +5983,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3412 + // line internal/php7/php7.y:3415 { yyVAL.node = &ast.ExprExit{ast.Node{}, false, yyDollar[2].node} @@ -6000,7 +6003,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3430 + // line internal/php7/php7.y:3433 { yyVAL.node = &ast.ExprErrorSuppress{ast.Node{}, yyDollar[2].node} @@ -6012,13 +6015,13 @@ yydefault: } case 364: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3440 + // line internal/php7/php7.y:3443 { yyVAL.node = yyDollar[1].node } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3444 + // line internal/php7/php7.y:3447 { yyVAL.node = &ast.ExprShellExec{ast.Node{}, yyDollar[2].list} @@ -6030,7 +6033,7 @@ yydefault: } case 366: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3454 + // line internal/php7/php7.y:3457 { yyVAL.node = &ast.ExprPrint{ast.Node{}, yyDollar[2].node} @@ -6042,7 +6045,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3464 + // line internal/php7/php7.y:3467 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, nil} @@ -6054,7 +6057,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3474 + // line internal/php7/php7.y:3477 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6066,7 +6069,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3484 + // line internal/php7/php7.y:3487 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6079,7 +6082,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3495 + // line internal/php7/php7.y:3498 { yyVAL.node = &ast.ExprYieldFrom{ast.Node{}, yyDollar[2].node} @@ -6091,13 +6094,13 @@ yydefault: } case 371: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3505 + // line internal/php7/php7.y:3508 { yyVAL.node = yyDollar[1].node } case 372: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3509 + // line internal/php7/php7.y:3512 { yyVAL.node = yyDollar[2].node @@ -6118,7 +6121,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:3530 + // line internal/php7/php7.y:3533 { yyVAL.node = &ast.ExprClosure{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[5].list, yyDollar[7].ClosureUse, yyDollar[8].node, yyDollar[10].list} @@ -6149,7 +6152,7 @@ yydefault: } case 374: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:3557 + // line internal/php7/php7.y:3560 { yyVAL.node = &ast.ExprArrowFunction{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[4].list, yyDollar[6].node, yyDollar[9].node} @@ -6175,25 +6178,25 @@ yydefault: } case 376: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3587 + // line internal/php7/php7.y:3590 { yyVAL.token = nil } case 377: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3591 + // line internal/php7/php7.y:3594 { yyVAL.token = yyDollar[1].token } case 378: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3598 + // line internal/php7/php7.y:3601 { yyVAL.ClosureUse = nil } case 379: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3602 + // line internal/php7/php7.y:3605 { yyVAL.ClosureUse = &ast.ExprClosureUse{ast.Node{}, yyDollar[3].list} @@ -6207,7 +6210,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3617 + // line internal/php7/php7.y:3620 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -6216,13 +6219,13 @@ yydefault: } case 381: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3624 + // line internal/php7/php7.y:3627 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 382: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3631 + // line internal/php7/php7.y:3634 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} @@ -6236,7 +6239,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3643 + // line internal/php7/php7.y:3646 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -6253,7 +6256,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3661 + // line internal/php7/php7.y:3664 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -6265,7 +6268,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3671 + // line internal/php7/php7.y:3674 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6278,7 +6281,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3682 + // line internal/php7/php7.y:3685 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6291,7 +6294,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3693 + // line internal/php7/php7.y:3696 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -6303,7 +6306,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3706 + // line internal/php7/php7.y:3709 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -6315,31 +6318,31 @@ yydefault: } case 389: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3716 + // line internal/php7/php7.y:3719 { yyVAL.node = yyDollar[1].node } case 390: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3723 + // line internal/php7/php7.y:3726 { yyVAL.node = yyDollar[1].node } case 391: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3727 + // line internal/php7/php7.y:3730 { yyVAL.node = yyDollar[1].node } case 392: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3734 + // line internal/php7/php7.y:3737 { yyVAL.node = nil } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3738 + // line internal/php7/php7.y:3741 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6356,13 +6359,13 @@ yydefault: } case 394: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3756 + // line internal/php7/php7.y:3759 { yyVAL.list = []ast.Vertex{} } case 395: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3760 + // line internal/php7/php7.y:3763 { part := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{part} @@ -6372,25 +6375,25 @@ yydefault: } case 396: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3768 + // line internal/php7/php7.y:3771 { yyVAL.list = yyDollar[1].list } case 397: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3775 + // line internal/php7/php7.y:3778 { yyVAL.node = nil } case 398: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3779 + // line internal/php7/php7.y:3782 { yyVAL.node = yyDollar[1].node } case 399: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3786 + // line internal/php7/php7.y:3789 { yyVAL.node = &ast.ExprArray{ast.Node{}, yyDollar[3].list} @@ -6404,7 +6407,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3798 + // line internal/php7/php7.y:3801 { yyVAL.node = &ast.ExprShortArray{ast.Node{}, yyDollar[2].list} @@ -6417,7 +6420,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3809 + // line internal/php7/php7.y:3812 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -6429,7 +6432,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3822 + // line internal/php7/php7.y:3825 { yyVAL.node = &ast.ScalarLnumber{ast.Node{}, yyDollar[1].token.Value} @@ -6441,7 +6444,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3832 + // line internal/php7/php7.y:3835 { yyVAL.node = &ast.ScalarDnumber{ast.Node{}, yyDollar[1].token.Value} @@ -6453,7 +6456,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3842 + // line internal/php7/php7.y:3845 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6465,7 +6468,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3852 + // line internal/php7/php7.y:3855 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6477,7 +6480,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3862 + // line internal/php7/php7.y:3865 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6489,7 +6492,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3872 + // line internal/php7/php7.y:3875 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6501,7 +6504,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3882 + // line internal/php7/php7.y:3885 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6513,7 +6516,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3892 + // line internal/php7/php7.y:3895 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6525,7 +6528,7 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3902 + // line internal/php7/php7.y:3905 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6537,7 +6540,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3912 + // line internal/php7/php7.y:3915 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -6549,7 +6552,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3922 + // line internal/php7/php7.y:3925 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, []ast.Vertex{encapsed}} @@ -6563,7 +6566,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3934 + // line internal/php7/php7.y:3937 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, nil} @@ -6575,7 +6578,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3944 + // line internal/php7/php7.y:3947 { yyVAL.node = &ast.ScalarEncapsed{ast.Node{}, yyDollar[2].list} @@ -6587,7 +6590,7 @@ yydefault: } case 415: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3954 + // line internal/php7/php7.y:3957 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, yyDollar[2].list} @@ -6599,19 +6602,19 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3964 + // line internal/php7/php7.y:3967 { yyVAL.node = yyDollar[1].node } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3968 + // line internal/php7/php7.y:3971 { yyVAL.node = yyDollar[1].node } case 418: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3975 + // line internal/php7/php7.y:3978 { yyVAL.node = &ast.ExprConstFetch{ast.Node{}, yyDollar[1].node} @@ -6623,7 +6626,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3985 + // line internal/php7/php7.y:3988 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -6639,7 +6642,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3999 + // line internal/php7/php7.y:4002 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -6655,43 +6658,43 @@ yydefault: } case 421: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4016 + // line internal/php7/php7.y:4019 { yyVAL.node = yyDollar[1].node } case 422: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4020 + // line internal/php7/php7.y:4023 { yyVAL.node = yyDollar[1].node } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4027 + // line internal/php7/php7.y:4030 { yyVAL.node = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4031 + // line internal/php7/php7.y:4034 { yyVAL.node = yyDollar[1].node } case 425: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4038 + // line internal/php7/php7.y:4041 { yyVAL.node = yyDollar[1].node } case 426: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4045 + // line internal/php7/php7.y:4048 { yyVAL.node = yyDollar[1].node } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4049 + // line internal/php7/php7.y:4052 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6708,19 +6711,19 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4064 + // line internal/php7/php7.y:4067 { yyVAL.node = yyDollar[1].node } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4071 + // line internal/php7/php7.y:4074 { yyVAL.node = yyDollar[1].node } case 430: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4075 + // line internal/php7/php7.y:4078 { yyVAL.node = &ast.ParserBrackets{ Node: ast.Node{ @@ -6737,19 +6740,19 @@ yydefault: } case 431: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4090 + // line internal/php7/php7.y:4093 { yyVAL.node = yyDollar[1].node } case 432: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4097 + // line internal/php7/php7.y:4100 { yyVAL.node = yyDollar[1].node } case 433: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4101 + // line internal/php7/php7.y:4104 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6762,7 +6765,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4112 + // line internal/php7/php7.y:4115 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6775,7 +6778,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4123 + // line internal/php7/php7.y:4126 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6788,7 +6791,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4134 + // line internal/php7/php7.y:4137 { yyVAL.node = &ast.ExprMethodCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6801,25 +6804,25 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4145 + // line internal/php7/php7.y:4148 { yyVAL.node = yyDollar[1].node } case 438: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4152 + // line internal/php7/php7.y:4155 { yyVAL.node = yyDollar[1].node } case 439: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4156 + // line internal/php7/php7.y:4159 { yyVAL.node = yyDollar[1].node } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4160 + // line internal/php7/php7.y:4163 { yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6832,7 +6835,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4174 + // line internal/php7/php7.y:4177 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -6846,7 +6849,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4186 + // line internal/php7/php7.y:4189 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -6860,7 +6863,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4198 + // line internal/php7/php7.y:4201 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -6872,7 +6875,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4211 + // line internal/php7/php7.y:4214 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6885,7 +6888,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4222 + // line internal/php7/php7.y:4225 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6898,13 +6901,13 @@ yydefault: } case 446: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4236 + // line internal/php7/php7.y:4239 { yyVAL.node = yyDollar[1].node } case 447: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4240 + // line internal/php7/php7.y:4243 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6917,7 +6920,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4251 + // line internal/php7/php7.y:4254 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6930,7 +6933,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4262 + // line internal/php7/php7.y:4265 { yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6943,7 +6946,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4273 + // line internal/php7/php7.y:4276 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6956,7 +6959,7 @@ yydefault: } case 451: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4284 + // line internal/php7/php7.y:4287 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6969,7 +6972,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4298 + // line internal/php7/php7.y:4301 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -6981,7 +6984,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4308 + // line internal/php7/php7.y:4311 { yyVAL.node = yyDollar[2].node @@ -6991,13 +6994,13 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4316 + // line internal/php7/php7.y:4319 { yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4323 + // line internal/php7/php7.y:4326 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -7009,7 +7012,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4333 + // line internal/php7/php7.y:4336 { yyVAL.node = yyDollar[2].node @@ -7019,31 +7022,31 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4341 + // line internal/php7/php7.y:4344 { yyVAL.node = yyDollar[1].node } case 458: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4348 + // line internal/php7/php7.y:4351 { yyVAL.list = yyDollar[1].list } case 459: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4355 + // line internal/php7/php7.y:4358 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, nil} } case 460: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4359 + // line internal/php7/php7.y:4362 { yyVAL.node = yyDollar[1].node } case 461: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4366 + // line internal/php7/php7.y:4369 { if len(yyDollar[1].list) == 0 { yyDollar[1].list = []ast.Vertex{&ast.ExprArrayItem{ast.Node{}, false, nil, nil}} @@ -7056,7 +7059,7 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4377 + // line internal/php7/php7.y:4380 { if yyDollar[1].node.(*ast.ExprArrayItem).Key == nil && yyDollar[1].node.(*ast.ExprArrayItem).Val == nil { yyVAL.list = []ast.Vertex{} @@ -7066,7 +7069,7 @@ yydefault: } case 463: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4388 + // line internal/php7/php7.y:4391 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, yyDollar[3].node} @@ -7079,7 +7082,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4399 + // line internal/php7/php7.y:4402 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} @@ -7091,7 +7094,7 @@ yydefault: } case 465: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4409 + // line internal/php7/php7.y:4412 { reference := &ast.ExprReference{ast.Node{}, yyDollar[4].node} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, reference} @@ -7107,7 +7110,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4423 + // line internal/php7/php7.y:4426 { reference := &ast.ExprReference{ast.Node{}, yyDollar[2].node} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, reference} @@ -7121,7 +7124,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4435 + // line internal/php7/php7.y:4438 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, true, nil, yyDollar[2].node} @@ -7133,7 +7136,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:4445 + // line internal/php7/php7.y:4448 { // TODO: Cannot use list() as standalone expression listNode := &ast.ExprList{ast.Node{}, yyDollar[5].list} @@ -7152,7 +7155,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4462 + // line internal/php7/php7.y:4465 { // TODO: Cannot use list() as standalone expression listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -7169,13 +7172,13 @@ yydefault: } case 470: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4480 + // line internal/php7/php7.y:4483 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 471: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4484 + // line internal/php7/php7.y:4487 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.list = append(yyDollar[1].list, encapsed) @@ -7188,13 +7191,13 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4495 + // line internal/php7/php7.y:4498 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 473: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4499 + // line internal/php7/php7.y:4502 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{encapsed, yyDollar[2].node} @@ -7207,7 +7210,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4513 + // line internal/php7/php7.y:4516 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -7221,7 +7224,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4525 + // line internal/php7/php7.y:4528 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -7238,7 +7241,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4540 + // line internal/php7/php7.y:4543 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -7257,7 +7260,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4557 + // line internal/php7/php7.y:4560 { variable := &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -7272,7 +7275,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4570 + // line internal/php7/php7.y:4573 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, name} @@ -7289,7 +7292,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:4585 + // line internal/php7/php7.y:4588 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -7308,7 +7311,7 @@ yydefault: } case 480: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4602 + // line internal/php7/php7.y:4605 { yyVAL.node = yyDollar[2].node @@ -7318,7 +7321,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4613 + // line internal/php7/php7.y:4616 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -7330,7 +7333,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4623 + // line internal/php7/php7.y:4626 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -7347,7 +7350,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4638 + // line internal/php7/php7.y:4641 { var lnumber *ast.ScalarLnumber // TODO: add option to handle 64 bit integer @@ -7373,7 +7376,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4662 + // line internal/php7/php7.y:4665 { identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} @@ -7387,7 +7390,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:4677 + // line internal/php7/php7.y:4680 { yyVAL.node = &ast.ExprIsset{ast.Node{}, yyDollar[3].list} @@ -7405,7 +7408,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4693 + // line internal/php7/php7.y:4696 { exprBrackets := &ast.ParserBrackets{ Node: ast.Node{ @@ -7427,7 +7430,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4713 + // line internal/php7/php7.y:4716 { yyVAL.node = &ast.ExprInclude{ast.Node{}, yyDollar[2].node} @@ -7439,7 +7442,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4723 + // line internal/php7/php7.y:4726 { yyVAL.node = &ast.ExprIncludeOnce{ast.Node{}, yyDollar[2].node} @@ -7451,7 +7454,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4733 + // line internal/php7/php7.y:4736 { exprBrackets := &ast.ParserBrackets{ Node: ast.Node{ @@ -7473,7 +7476,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4753 + // line internal/php7/php7.y:4756 { yyVAL.node = &ast.ExprRequire{ast.Node{}, yyDollar[2].node} @@ -7485,7 +7488,7 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4763 + // line internal/php7/php7.y:4766 { yyVAL.node = &ast.ExprRequireOnce{ast.Node{}, yyDollar[2].node} @@ -7497,13 +7500,13 @@ yydefault: } case 492: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4776 + // line internal/php7/php7.y:4779 { yyVAL.list = []ast.Vertex{yyDollar[1].node} } case 493: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4780 + // line internal/php7/php7.y:4783 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -7512,7 +7515,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4790 + // line internal/php7/php7.y:4793 { yyVAL.node = yyDollar[1].node } diff --git a/internal/php7/php7.y b/internal/php7/php7.y index 2d9825a..79efe9d 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -250,7 +250,7 @@ import ( %type variable_class_name dereferencable_scalar constant dereferencable %type callable_expr callable_variable static_member new_variable %type encaps_var encaps_var_offset echo_expr_list -%type if_stmt +%type if_stmt const_list %type alt_if_stmt %type if_stmt_without_else %type class_const_decl @@ -276,7 +276,7 @@ import ( %type encaps_list backticks_expr namespace_name catch_name_list catch_list class_const_list -%type const_list for_exprs non_empty_for_exprs +%type for_exprs non_empty_for_exprs %type unprefixed_use_declarations inline_use_declarations property_list %type case_list trait_adaptation_list %type use_declarations lexical_var_list isset_variables non_empty_array_pair_list @@ -541,9 +541,10 @@ top_statement: Node: ast.Node{ Position: position.NewTokensPosition($1, $3), }, - ConstTkn: $1, - Consts: $2, - SemiColonTkn: $3, + ConstTkn: $1, + Consts: $2.(*ast.ParserSeparatedList).Items, + SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns, + SemiColonTkn: $3, } } ; @@ -782,13 +783,16 @@ use_declaration: const_list: const_list ',' const_decl { - lastNode($1).(*ast.StmtConstant).CommaTkn = $2 + $1.(*ast.ParserSeparatedList).SeparatorTkns = append($1.(*ast.ParserSeparatedList).SeparatorTkns, $2) + $1.(*ast.ParserSeparatedList).Items = append($1.(*ast.ParserSeparatedList).Items, $3) - $$ = append($1, $3) + $$ = $1 } | const_decl { - $$ = []ast.Vertex{$1} + $$ = &ast.ParserSeparatedList{ + Items: []ast.Vertex{$1}, + } } ; @@ -1036,16 +1040,14 @@ statement: } | T_DECLARE '(' const_list ')' declare_statement { + $5.(*ast.StmtDeclare).DeclareTkn = $1 + $5.(*ast.StmtDeclare).OpenParenthesisTkn = $2 + $5.(*ast.StmtDeclare).Consts = $3.(*ast.ParserSeparatedList).Items + $5.(*ast.StmtDeclare).SeparatorTkns = $3.(*ast.ParserSeparatedList).SeparatorTkns + $5.(*ast.StmtDeclare).CloseParenthesisTkn = $4 + $5.(*ast.StmtDeclare).Node.Position = position.NewTokenNodePosition($1, $5) + $$ = $5 - $$.(*ast.StmtDeclare).Consts = $3 - - // save position - $$.GetNode().Position = position.NewTokenNodePosition($1, $5) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.Declare, $2.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.SkippedTokens) } | ';' { @@ -1509,29 +1511,30 @@ foreach_statement: declare_statement: statement { - $$ = &ast.StmtDeclare{ast.Node{}, false, nil, $1} - - // save position - $$.GetNode().Position = position.NewNodePosition($1) + $$ = &ast.StmtDeclare{ + Node: ast.Node{ + Position: position.NewNodePosition($1), + }, + Stmt: $1, + } } | ':' inner_statement_list T_ENDDECLARE ';' { - stmtList := &ast.StmtStmtList{ + $$ = &ast.StmtDeclare{ Node: ast.Node{ - Position: position.NewNodeListPosition($2), + Position: position.NewTokensPosition($1, $4), }, - Stmts: $2, + Alt: true, + ColonTkn: $1, + Stmt: &ast.StmtStmtList{ + Node: ast.Node{ + Position: position.NewNodeListPosition($2), + }, + Stmts: $2, + }, + EndDeclareTkn: $3, + SemiColonTkn: $4, } - $$ = &ast.StmtDeclare{ast.Node{}, true, nil, stmtList} - - // save position - $$.GetNode().Position = position.NewTokensPosition($1, $4) - - // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.SkippedTokens) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.SkippedTokens) - yylex.(*Parser).setToken($$, token.SemiColon, $4.SkippedTokens) } ; diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go index aa2170a..7e02236 100644 --- a/pkg/ast/ast.go +++ b/pkg/ast/ast.go @@ -189,7 +189,6 @@ type NodeVisitor interface { NameRelative(n *NameRelative) NameNamePart(n *NameNamePart) - ParserAs(n *ParserAs) - ParserNsSeparator(n *ParserNsSeparator) ParserBrackets(n *ParserBrackets) + ParserSeparatedList(n *ParserSeparatedList) } diff --git a/pkg/ast/node.go b/pkg/ast/node.go index 516019f..845c124 100644 --- a/pkg/ast/node.go +++ b/pkg/ast/node.go @@ -278,9 +278,10 @@ func (n *StmtClassMethod) Accept(v NodeVisitor) { // StmtConstList node type StmtConstList struct { Node - ConstTkn *token.Token - Consts []Vertex - SemiColonTkn *token.Token + ConstTkn *token.Token + Consts []Vertex + SeparatorTkns []*token.Token + SemiColonTkn *token.Token } func (n *StmtConstList) Accept(v NodeVisitor) { @@ -315,9 +316,16 @@ func (n *StmtContinue) Accept(v NodeVisitor) { // StmtDeclare node type StmtDeclare struct { Node - Alt bool - Consts []Vertex - Stmt Vertex + Alt bool + DeclareTkn *token.Token + OpenParenthesisTkn *token.Token + Consts []Vertex + SeparatorTkns []*token.Token + CloseParenthesisTkn *token.Token + ColonTkn *token.Token + Stmt Vertex + EndDeclareTkn *token.Token + SemiColonTkn *token.Token } func (n *StmtDeclare) Accept(v NodeVisitor) { @@ -1887,24 +1895,6 @@ func (n *NameNamePart) Accept(v NodeVisitor) { v.NameNamePart(n) } -type ParserAs struct { - Node - Child Vertex -} - -func (n *ParserAs) Accept(v NodeVisitor) { - v.ParserAs(n) -} - -type ParserNsSeparator struct { - Node - Child Vertex -} - -func (n *ParserNsSeparator) Accept(v NodeVisitor) { - v.ParserNsSeparator(n) -} - type ParserBrackets struct { Node OpenBracketTkn *token.Token @@ -1915,3 +1905,13 @@ type ParserBrackets struct { func (n *ParserBrackets) Accept(v NodeVisitor) { v.ParserBrackets(n) } + +type ParserSeparatedList struct { + Node + Items []Vertex + SeparatorTkns []*token.Token +} + +func (n *ParserSeparatedList) Accept(v NodeVisitor) { + v.ParserSeparatedList(n) +} diff --git a/pkg/ast/traverser/dfs.go b/pkg/ast/traverser/dfs.go index 615c682..b9189a0 100644 --- a/pkg/ast/traverser/dfs.go +++ b/pkg/ast/traverser/dfs.go @@ -2607,30 +2607,6 @@ func (t *DFS) Traverse(n ast.Vertex) { if !t.visitor.EnterNode(nn) { return } - case *ast.ParserAs: - if nn == nil { - return - } - if !t.visitor.EnterNode(nn) { - return - } - if nn.Child != nil { - t.visitor.Enter("Child", true) - t.Traverse(nn.Child) - t.visitor.Leave("Child", true) - } - case *ast.ParserNsSeparator: - if nn == nil { - return - } - if !t.visitor.EnterNode(nn) { - return - } - if nn.Child != nil { - t.visitor.Enter("Child", true) - t.Traverse(nn.Child) - t.visitor.Leave("Child", true) - } case *ast.ParserBrackets: if nn == nil { return diff --git a/pkg/ast/visitor/dump.go b/pkg/ast/visitor/dump.go index de06927..d8160c1 100644 --- a/pkg/ast/visitor/dump.go +++ b/pkg/ast/visitor/dump.go @@ -1293,20 +1293,12 @@ func (v *Dump) NameNamePart(n *ast.NameNamePart) { v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value)) } -func (v *Dump) ParserAs(n *ast.ParserAs) { - v.printIndentIfNotSingle(v.indent - 1) - v.print("&ast.ParserAs{\n") - v.printNode(n.GetNode()) -} - -func (v *Dump) ParserNsSeparator(n *ast.ParserNsSeparator) { - v.printIndentIfNotSingle(v.indent - 1) - v.print("&ast.ParserNsSeparator{\n") - v.printNode(n.GetNode()) -} - func (v *Dump) ParserBrackets(n *ast.ParserBrackets) { v.printIndentIfNotSingle(v.indent - 1) v.print("&ast.ParserBrackets{\n") v.printNode(n.GetNode()) } + +func (v *Dump) ParserSeparatedList(n *ast.ParserSeparatedList) { + // do nothing +} diff --git a/pkg/ast/visitor/filter_tokens.go b/pkg/ast/visitor/filter_tokens.go index 6c86b92..63fc40e 100644 --- a/pkg/ast/visitor/filter_tokens.go +++ b/pkg/ast/visitor/filter_tokens.go @@ -70,6 +70,7 @@ func (v *FilterTokens) StmtHaltCompiler(n *ast.StmtHaltCompiler) { func (v *FilterTokens) StmtConstList(n *ast.StmtConstList) { n.ConstTkn = nil + n.SeparatorTkns = nil n.SemiColonTkn = nil } @@ -224,3 +225,13 @@ func (v *FilterTokens) StmtForeach(n *ast.StmtForeach) { n.EndForeachTkn = nil n.SemiColonTkn = nil } + +func (v *FilterTokens) StmtDeclare(n *ast.StmtDeclare) { + n.DeclareTkn = nil + n.OpenParenthesisTkn = nil + n.SeparatorTkns = nil + n.CloseParenthesisTkn = nil + n.ColonTkn = nil + n.EndDeclareTkn = nil + n.SemiColonTkn = nil +} diff --git a/pkg/ast/visitor/null.go b/pkg/ast/visitor/null.go index 582033e..f5e1467 100644 --- a/pkg/ast/visitor/null.go +++ b/pkg/ast/visitor/null.go @@ -674,14 +674,10 @@ func (v *Null) NameNamePart(_ *ast.NameNamePart) { // do nothing } -func (v *Null) ParserAs(_ *ast.ParserAs) { - // do nothing -} - -func (v *Null) ParserNsSeparator(_ *ast.ParserNsSeparator) { - // do nothing -} - func (v *Null) ParserBrackets(_ *ast.ParserBrackets) { // do nothing } + +func (v *Null) ParserSeparatedList(_ *ast.ParserSeparatedList) { + // do nothing +} diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go index b808de1..9195d83 100644 --- a/pkg/printer/printer.go +++ b/pkg/printer/printer.go @@ -484,10 +484,6 @@ func (p *Printer) printNode(n ast.Vertex) { p.printStmtUseDeclaration(n) case *ast.StmtWhile: p.printStmtWhile(n) - case *ast.ParserAs: - p.printParserAs(n) - case *ast.ParserNsSeparator: - p.printParserNsSeparator(n) case *ast.ParserBrackets: p.printParserBrackets(n) } @@ -2158,7 +2154,7 @@ func (p *Printer) printStmtClassConstList(n *ast.StmtClassConstList) { func (p *Printer) printStmtConstList(n *ast.StmtConstList) { p.printToken(n.ConstTkn, "const") p.bufStart = " " - p.joinPrintRefactored(",", n.Consts) + p.printSeparatedList(n.Consts, n.SeparatorTkns, ",") p.printToken(n.SemiColonTkn, ";") } @@ -2180,37 +2176,33 @@ func (p *Printer) printStmtContinue(n *ast.StmtContinue) { p.printToken(n.SemiColonTkn, ";") } -func (p *Printer) printStmtDeclare(n ast.Vertex) { - nn := n.(*ast.StmtDeclare) - p.printFreeFloating(nn, token.Start) +func (p *Printer) printStmtDeclare(n *ast.StmtDeclare) { + if n.Alt { + p.printStmtAltDeclare(n) + return + } + p.printToken(n.DeclareTkn, "declare") + p.printToken(n.OpenParenthesisTkn, "(") + p.printSeparatedList(n.Consts, n.SeparatorTkns, ",") + p.printToken(n.CloseParenthesisTkn, ")") + p.Print(n.Stmt) +} - p.write([]byte("declare")) - p.printFreeFloating(nn, token.Declare) - p.write([]byte("(")) - p.joinPrintRefactored(",", nn.Consts) - p.printFreeFloating(nn, token.ConstList) - p.write([]byte(")")) +func (p *Printer) printStmtAltDeclare(n *ast.StmtDeclare) { + p.printToken(n.DeclareTkn, "declare") + p.printToken(n.OpenParenthesisTkn, "(") + p.printSeparatedList(n.Consts, n.SeparatorTkns, ",") + p.printToken(n.CloseParenthesisTkn, ")") + p.printToken(n.ColonTkn, ":") - if nn.Alt { - p.printFreeFloating(nn, token.Cond) - p.write([]byte(":")) - - s := nn.Stmt.(*ast.StmtStmtList) - p.printNodes(s.Stmts) - p.printFreeFloating(nn, token.Stmts) - - p.write([]byte("enddeclare")) - p.printFreeFloating(nn, token.AltEnd) - - p.printFreeFloating(nn, token.SemiColon) - if nn.GetNode().Tokens.IsEmpty() { - p.write([]byte(";")) - } + if stmtList, ok := n.Stmt.(*ast.StmtStmtList); ok { + p.printNodes(stmtList.Stmts) } else { - p.Print(nn.Stmt) + p.Print(n.Stmt) } - p.printFreeFloating(nn, token.End) + p.printToken(n.EndDeclareTkn, "enddeclare") + p.printToken(n.SemiColonTkn, ";") } func (p *Printer) printStmtDefault(n *ast.StmtDefault) { @@ -2960,26 +2952,6 @@ func (p *Printer) printStmtAltWhile(n *ast.StmtWhile) { p.printToken(n.SemiColonTkn, ";") } -func (p *Printer) printParserAs(n ast.Vertex) { - nn := n.(*ast.ParserAs) - p.printFreeFloating(nn, token.Start) - - p.write([]byte("as")) - p.Print(nn.Child) - - p.printFreeFloating(nn, token.End) -} - -func (p *Printer) printParserNsSeparator(n ast.Vertex) { - nn := n.(*ast.ParserNsSeparator) - p.printFreeFloating(nn, token.Start) - - p.write([]byte("\\")) - p.Print(nn.Child) - - p.printFreeFloating(nn, token.End) -} - func (p *Printer) printParserBrackets(n ast.Vertex) { nn := n.(*ast.ParserBrackets) p.printFreeFloating(nn, token.Start)