interface extends list
This commit is contained in:
parent
16e83cee21
commit
940e551b0e
@ -12,12 +12,11 @@ type Interface struct {
|
|||||||
node.SimpleNode
|
node.SimpleNode
|
||||||
token token.Token
|
token token.Token
|
||||||
name token.Token
|
name token.Token
|
||||||
extends node.Node
|
extends []node.Node
|
||||||
stmts []node.Node
|
stmts []node.Node
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: stmts myst be []node.Node
|
func NewInterface(token token.Token, name token.Token, extends []node.Node, stmts []node.Node) node.Node {
|
||||||
func NewInterface(token token.Token, name token.Token, extends node.Node, stmts []node.Node) node.Node {
|
|
||||||
return Interface{
|
return Interface{
|
||||||
node.SimpleNode{Name: "Interface", Attributes: make(map[string]string)},
|
node.SimpleNode{Name: "Interface", Attributes: make(map[string]string)},
|
||||||
token,
|
token,
|
||||||
@ -32,7 +31,9 @@ func (n Interface) Print(out io.Writer, indent string) {
|
|||||||
|
|
||||||
if n.extends != nil {
|
if n.extends != nil {
|
||||||
fmt.Fprintf(out, "\n%vextends:", indent+" ")
|
fmt.Fprintf(out, "\n%vextends:", indent+" ")
|
||||||
n.extends.Print(out, indent+" ")
|
for _, nn := range n.extends {
|
||||||
|
nn.Print(out, indent+" ")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if n.stmts != nil {
|
if n.stmts != nil {
|
||||||
|
298
parser/parser.go
298
parser/parser.go
@ -604,21 +604,21 @@ var yyAct = [...]int{
|
|||||||
807, 197, 199, 198, 332, 607, 795, 610, 608, 308,
|
807, 197, 199, 198, 332, 607, 795, 610, 608, 308,
|
||||||
766, 718, 669, 279, 280, 642, 817, 633, 628, 785,
|
766, 718, 669, 279, 280, 642, 817, 633, 628, 785,
|
||||||
229, 564, 812, 824, 810, 825, 554, 118, 231, 409,
|
229, 564, 812, 824, 810, 825, 554, 118, 231, 409,
|
||||||
1, 831, 912, 570, 659, 544, 255, 256, 529, 803,
|
1, 831, 379, 912, 659, 544, 255, 256, 570, 803,
|
||||||
842, 221, 519, 830, 835, 813, 578, 846, 833, 365,
|
842, 529, 221, 830, 519, 813, 578, 846, 833, 835,
|
||||||
855, 804, 841, 687, 688, 689, 686, 685, 684, 848,
|
855, 365, 841, 687, 688, 689, 686, 685, 684, 804,
|
||||||
864, 854, 167, 168, 161, 162, 160, 163, 165, 166,
|
864, 854, 167, 168, 161, 162, 160, 163, 165, 166,
|
||||||
863, 178, 651, 144, 872, 748, 873, 141, 868, 321,
|
863, 178, 848, 651, 872, 144, 873, 748, 868, 141,
|
||||||
877, 148, 800, 164, 861, 666, 879, 829, 250, 37,
|
877, 321, 148, 164, 861, 800, 879, 666, 829, 250,
|
||||||
681, 679, 855, 678, 782, 878, 223, 42, 882, 41,
|
37, 681, 855, 679, 782, 878, 678, 223, 882, 42,
|
||||||
15, 14, 606, 854, 888, 889, 266, 48, 890, 87,
|
41, 15, 14, 854, 888, 889, 606, 266, 890, 87,
|
||||||
88, 89, 90, 91, 47, 107, 49, 82, 73, 74,
|
88, 89, 90, 91, 48, 47, 107, 49, 73, 74,
|
||||||
80, 75, 71, 247, 896, 893, 61, 264, 897, 60,
|
82, 75, 80, 71, 896, 893, 247, 61, 897, 264,
|
||||||
898, 902, 901, 900, 853, 578, 852, 163, 165, 166,
|
898, 902, 901, 900, 60, 578, 853, 163, 165, 166,
|
||||||
586, 178, 851, 850, 677, 907, 44, 909, 572, 910,
|
586, 178, 852, 851, 850, 907, 677, 909, 44, 910,
|
||||||
737, 663, 860, 164, 55, 56, 915, 645, 309, 117,
|
572, 737, 663, 164, 55, 56, 915, 860, 645, 309,
|
||||||
57, 296, 58, 53, 54, 62, 63, 64, 65, 66,
|
57, 117, 58, 53, 54, 62, 63, 64, 65, 66,
|
||||||
67, 68, 70, 379, 51, 84, 52, 3, 433, 744,
|
67, 68, 70, 296, 51, 84, 52, 3, 433, 744,
|
||||||
670, 24, 76, 77, 0, 0, 0, 69, 46, 92,
|
670, 24, 76, 77, 0, 0, 0, 69, 46, 92,
|
||||||
93, 35, 0, 104, 0, 26, 0, 0, 0, 109,
|
93, 35, 0, 104, 0, 26, 0, 0, 0, 109,
|
||||||
25, 17, 16, 0, 18, 0, 29, 0, 30, 0,
|
25, 17, 16, 0, 18, 0, 29, 0, 30, 0,
|
||||||
@ -1365,18 +1365,18 @@ var yyPact = [...]int{
|
|||||||
var yyPgo = [...]int{
|
var yyPgo = [...]int{
|
||||||
|
|
||||||
0, 940, 939, 46, 686, 6, 938, 3, 937, 14,
|
0, 940, 939, 46, 686, 6, 938, 3, 937, 14,
|
||||||
27, 79, 77, 70, 51, 933, 921, 20, 919, 94,
|
27, 79, 77, 70, 51, 933, 20, 921, 94, 15,
|
||||||
15, 78, 918, 0, 62, 917, 912, 17, 11, 911,
|
78, 919, 0, 62, 918, 917, 17, 11, 912, 911,
|
||||||
910, 36, 61, 49, 33, 908, 35, 906, 72, 50,
|
36, 61, 49, 33, 910, 35, 908, 72, 50, 906,
|
||||||
904, 9, 903, 902, 896, 894, 13, 48, 889, 887,
|
9, 904, 903, 902, 896, 13, 48, 894, 889, 111,
|
||||||
111, 98, 197, 886, 883, 882, 8, 880, 81, 43,
|
98, 197, 887, 886, 883, 8, 882, 81, 43, 880,
|
||||||
877, 55, 47, 876, 875, 874, 867, 866, 97, 862,
|
55, 47, 877, 876, 875, 874, 867, 97, 866, 862,
|
||||||
861, 860, 38, 859, 10, 4, 857, 856, 42, 32,
|
861, 38, 860, 10, 4, 859, 857, 42, 32, 41,
|
||||||
41, 2, 16, 853, 851, 850, 5, 775, 849, 670,
|
2, 16, 856, 853, 851, 5, 775, 850, 670, 849,
|
||||||
848, 28, 847, 845, 842, 90, 841, 31, 839, 837,
|
28, 848, 847, 845, 90, 842, 31, 841, 839, 25,
|
||||||
25, 29, 835, 833, 832, 24, 819, 811, 809, 549,
|
29, 837, 835, 833, 24, 832, 819, 811, 549, 809,
|
||||||
804, 18, 802, 801, 44, 86, 83, 798, 103, 1,
|
18, 804, 802, 44, 86, 83, 801, 103, 1, 7,
|
||||||
7, 793, 19, 792, 790, 37, 12,
|
798, 19, 793, 792, 790, 37, 12,
|
||||||
}
|
}
|
||||||
var yyR1 = [...]int{
|
var yyR1 = [...]int{
|
||||||
|
|
||||||
@ -1387,48 +1387,48 @@ var yyR1 = [...]int{
|
|||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 6,
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 6,
|
||||||
6, 6, 6, 6, 6, 6, 7, 7, 118, 118,
|
6, 6, 6, 6, 6, 6, 7, 7, 117, 117,
|
||||||
91, 91, 9, 9, 9, 8, 8, 8, 8, 8,
|
90, 90, 9, 9, 9, 8, 8, 8, 8, 8,
|
||||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 87,
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 86,
|
||||||
87, 16, 16, 18, 18, 125, 125, 101, 101, 100,
|
86, 15, 15, 17, 17, 125, 125, 100, 100, 99,
|
||||||
100, 109, 109, 17, 17, 20, 20, 19, 19, 95,
|
99, 108, 108, 16, 16, 19, 19, 18, 18, 94,
|
||||||
95, 119, 119, 22, 22, 22, 22, 22, 22, 10,
|
94, 118, 118, 21, 21, 21, 21, 21, 21, 10,
|
||||||
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
||||||
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
||||||
10, 10, 10, 93, 93, 92, 92, 30, 30, 108,
|
10, 10, 10, 92, 92, 91, 91, 29, 29, 107,
|
||||||
108, 31, 11, 1, 1, 2, 2, 12, 12, 88,
|
107, 30, 11, 1, 1, 2, 2, 12, 12, 87,
|
||||||
88, 4, 4, 13, 14, 33, 33, 15, 15, 72,
|
87, 4, 4, 13, 14, 32, 32, 123, 123, 71,
|
||||||
72, 27, 27, 27, 27, 26, 26, 28, 28, 29,
|
71, 26, 26, 26, 26, 25, 25, 27, 27, 28,
|
||||||
29, 104, 104, 104, 104, 105, 105, 105, 126, 126,
|
28, 103, 103, 103, 103, 104, 104, 104, 126, 126,
|
||||||
25, 25, 73, 73, 70, 70, 76, 76, 71, 71,
|
24, 24, 72, 72, 69, 69, 75, 75, 70, 70,
|
||||||
120, 120, 121, 121, 34, 34, 35, 35, 82, 82,
|
119, 119, 120, 120, 33, 33, 34, 34, 81, 81,
|
||||||
80, 80, 80, 81, 81, 116, 116, 117, 117, 36,
|
79, 79, 79, 80, 80, 115, 115, 116, 116, 35,
|
||||||
36, 99, 99, 38, 103, 103, 39, 39, 122, 122,
|
35, 98, 98, 37, 102, 102, 38, 38, 121, 121,
|
||||||
40, 40, 40, 40, 75, 75, 107, 107, 107, 106,
|
39, 39, 39, 39, 74, 74, 106, 106, 106, 105,
|
||||||
106, 41, 41, 42, 43, 43, 43, 43, 45, 45,
|
105, 40, 40, 41, 42, 42, 42, 42, 44, 44,
|
||||||
44, 123, 123, 83, 83, 84, 84, 85, 85, 86,
|
43, 122, 122, 82, 82, 83, 83, 84, 84, 85,
|
||||||
86, 86, 86, 86, 86, 102, 102, 46, 46, 94,
|
85, 85, 85, 85, 85, 101, 101, 45, 45, 93,
|
||||||
94, 74, 21, 96, 96, 47, 97, 97, 98, 98,
|
93, 73, 20, 95, 95, 46, 96, 96, 97, 97,
|
||||||
49, 48, 48, 37, 37, 37, 37, 37, 37, 37,
|
48, 47, 47, 36, 36, 36, 36, 36, 36, 36,
|
||||||
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
|
||||||
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
|
||||||
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
|
||||||
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
|
||||||
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
|
||||||
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
|
||||||
37, 37, 37, 37, 37, 37, 37, 37, 37, 3,
|
36, 36, 36, 36, 36, 36, 36, 36, 36, 3,
|
||||||
3, 111, 111, 110, 110, 56, 56, 57, 57, 57,
|
3, 110, 110, 109, 109, 55, 55, 56, 56, 56,
|
||||||
57, 50, 50, 51, 51, 54, 54, 90, 90, 90,
|
56, 49, 49, 50, 50, 53, 53, 89, 89, 89,
|
||||||
115, 115, 61, 61, 61, 55, 55, 55, 55, 55,
|
114, 114, 60, 60, 60, 54, 54, 54, 54, 54,
|
||||||
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
|
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
|
||||||
55, 62, 62, 62, 23, 23, 24, 24, 60, 63,
|
54, 61, 61, 61, 22, 22, 23, 23, 59, 62,
|
||||||
63, 63, 64, 64, 64, 65, 65, 65, 65, 65,
|
62, 62, 63, 63, 63, 64, 64, 64, 64, 64,
|
||||||
65, 32, 32, 32, 52, 52, 52, 66, 66, 67,
|
64, 31, 31, 31, 51, 51, 51, 65, 65, 66,
|
||||||
67, 67, 67, 67, 67, 58, 58, 58, 59, 59,
|
66, 66, 66, 66, 66, 57, 57, 57, 58, 58,
|
||||||
59, 114, 78, 78, 113, 113, 77, 77, 77, 77,
|
58, 113, 77, 77, 112, 112, 76, 76, 76, 76,
|
||||||
77, 77, 89, 89, 89, 89, 68, 68, 68, 68,
|
76, 76, 88, 88, 88, 88, 67, 67, 67, 67,
|
||||||
68, 68, 68, 69, 69, 69, 69, 53, 53, 53,
|
67, 67, 67, 68, 68, 68, 68, 52, 52, 52,
|
||||||
53, 53, 53, 53, 112, 112, 79,
|
52, 52, 52, 52, 111, 111, 78,
|
||||||
}
|
}
|
||||||
var yyR2 = [...]int{
|
var yyR2 = [...]int{
|
||||||
|
|
||||||
@ -1484,98 +1484,98 @@ var yyR2 = [...]int{
|
|||||||
}
|
}
|
||||||
var yyChk = [...]int{
|
var yyChk = [...]int{
|
||||||
|
|
||||||
-1000, -124, -118, -8, -10, -11, -12, -13, -14, 127,
|
-1000, -124, -117, -8, -10, -11, -12, -13, -14, 127,
|
||||||
154, 120, 114, 161, -70, -71, 97, 96, 99, 106,
|
154, 120, 114, 161, -69, -70, 97, 96, 99, 106,
|
||||||
110, 111, 115, 122, 76, 95, 90, -23, 124, 101,
|
110, 111, 115, 122, 76, 95, 90, -22, 124, 101,
|
||||||
103, 163, 116, 119, 112, 86, 113, -88, 128, 129,
|
103, 163, 116, 119, 112, 86, 113, -87, 128, 129,
|
||||||
130, -73, -76, -32, -37, -4, 83, -65, -66, -63,
|
130, -72, -75, -31, -36, -4, 83, -64, -65, -62,
|
||||||
134, 69, 71, 58, 59, 49, 50, 55, 57, 164,
|
134, 69, 71, 58, 59, 49, 50, 55, 57, 164,
|
||||||
-48, -53, 60, 61, 62, 63, 64, 65, 66, 82,
|
-47, -52, 60, 61, 62, 63, 64, 65, 66, 82,
|
||||||
67, -55, 160, 13, 14, 16, 77, 78, -52, -62,
|
67, -54, 160, 13, 14, 16, 77, 78, -51, -61,
|
||||||
-57, -50, -60, -61, 70, 125, 126, 4, 5, 6,
|
-56, -49, -59, -60, 70, 125, 126, 4, 5, 6,
|
||||||
7, 8, 84, 85, 141, 142, 156, 138, 139, 140,
|
7, 8, 84, 85, 141, 142, 156, 138, 139, 140,
|
||||||
155, 137, 149, 159, 88, 167, -9, -64, 135, 94,
|
155, 137, 149, 159, 88, 167, -9, -63, 135, 94,
|
||||||
-91, 157, 164, 157, -91, 161, 86, -18, -87, -109,
|
-90, 157, 164, 157, -90, 161, 86, -17, -86, -108,
|
||||||
-91, 157, 113, 114, -19, -20, -95, -21, 86, -119,
|
-90, 157, 113, 114, -18, -19, -94, -20, 86, -118,
|
||||||
164, -10, 113, 154, 164, 164, -24, -23, 76, -24,
|
164, -10, 113, 154, 164, 164, -23, -22, 76, -23,
|
||||||
-24, -99, -38, -52, -103, 113, -39, 88, -96, -47,
|
-23, -98, -37, -51, -102, 113, -38, 88, -95, -46,
|
||||||
-23, 163, 33, 34, 10, 12, 11, 35, 37, 36,
|
-22, 163, 33, 34, 10, 12, 11, 35, 37, 36,
|
||||||
51, 49, 50, 52, 68, 53, 54, 47, 48, 40,
|
51, 49, 50, 52, 68, 53, 54, 47, 48, 40,
|
||||||
41, 38, 39, 43, 44, 45, 46, 42, 56, 30,
|
41, 38, 39, 43, 44, 45, 46, 42, 56, 30,
|
||||||
32, 164, 164, 164, 161, -23, 86, 31, -3, 37,
|
32, 164, 164, 164, 161, -22, 86, 31, -3, 37,
|
||||||
128, -4, 86, 86, 86, 73, 74, 73, 75, 74,
|
128, -4, 86, 86, 86, 73, 74, 73, 75, 74,
|
||||||
17, 18, 19, 20, 29, 21, 22, 23, 24, 25,
|
17, 18, 19, 20, 29, 21, 22, 23, 24, 25,
|
||||||
26, 27, 28, 58, 59, 164, 69, 161, 133, 164,
|
26, 27, 28, 58, 59, 164, 69, 161, 133, 164,
|
||||||
-114, -113, -78, -77, -23, 37, 134, -23, -32, -62,
|
-113, -112, -77, -76, -22, 37, 134, -22, -31, -61,
|
||||||
164, -61, 76, 69, -32, -23, -23, -23, -23, -23,
|
164, -60, 76, 69, -31, -22, -22, -22, -22, -22,
|
||||||
-23, -23, -23, -23, -23, -23, -23, -54, 164, -23,
|
-22, -22, -22, -22, -22, -22, -22, -53, 164, -22,
|
||||||
-90, 93, -89, -68, 88, 151, 152, -23, -23, -23,
|
-89, 93, -88, -67, 88, 151, 152, -22, -22, -22,
|
||||||
69, 153, 153, -51, -49, -50, -67, 128, -9, -52,
|
69, 153, 153, -50, -48, -49, -66, 128, -9, -51,
|
||||||
164, 164, -23, -23, 164, -23, -23, 93, 150, -89,
|
164, 164, -22, -22, 164, -22, -22, 93, 150, -88,
|
||||||
-89, 93, 161, -52, -116, 164, -116, 164, 157, -91,
|
-88, 93, 161, -51, -115, 164, -115, 164, 157, -90,
|
||||||
165, -91, 163, 161, -118, 163, -16, -109, -91, 157,
|
165, -90, 163, 161, -117, 163, -15, -108, -90, 157,
|
||||||
163, 9, 157, 105, -91, -20, 163, 9, 17, -22,
|
163, 9, 157, 105, -90, -19, 163, 9, 17, -21,
|
||||||
162, -10, -11, -12, -13, -14, 127, -23, 97, -3,
|
162, -10, -11, -12, -13, -14, 127, -22, 97, -3,
|
||||||
-97, -98, -23, -23, 163, 163, 163, 163, 9, 163,
|
-96, -97, -22, -22, 163, 163, 163, 163, 9, 163,
|
||||||
9, -3, 17, 163, 9, -23, -23, -23, -23, -23,
|
9, -3, 17, 163, 9, -22, -22, -22, -22, -22,
|
||||||
-23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
|
-22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
|
||||||
-23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
|
-22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
|
||||||
-23, -51, -23, 31, -23, -108, -31, -32, -23, -95,
|
-22, -50, -22, 31, -22, -107, -30, -31, -22, -94,
|
||||||
-119, 163, 163, 86, 164, 86, -33, 131, 161, -15,
|
-118, 163, 163, 86, 164, 86, -32, 131, 161, -123,
|
||||||
131, 164, -10, 164, 163, 31, -23, 37, -23, -23,
|
131, 164, -10, 164, 163, 31, -22, 37, -22, -22,
|
||||||
-23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
|
-22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
|
||||||
-23, -24, -23, -59, 86, 161, -52, -114, 166, 9,
|
-22, -23, -22, -58, 86, 161, -51, -113, 166, 9,
|
||||||
15, -32, 164, -23, -114, 165, -24, 160, -68, -68,
|
15, -31, 164, -22, -113, 165, -23, 160, -67, -67,
|
||||||
93, 69, 133, -23, 87, -32, 15, -24, -58, -7,
|
93, 69, 133, -22, 87, -31, 15, -23, -57, -7,
|
||||||
-52, 161, 86, -6, -5, 76, 77, 78, 79, 80,
|
-51, 161, 86, -6, -5, 76, 77, 78, 79, 80,
|
||||||
81, 4, 5, 6, 7, 8, 10, 11, 12, 56,
|
81, 4, 5, 6, 7, 8, 10, 11, 12, 56,
|
||||||
70, 71, 82, 83, 73, 74, 75, 95, 96, 97,
|
70, 71, 82, 83, 73, 74, 75, 95, 96, 97,
|
||||||
98, 99, 100, 101, 102, 103, 104, 105, 116, 117,
|
98, 99, 100, 101, 102, 103, 104, 105, 116, 117,
|
||||||
118, 119, 120, 121, 122, 123, 124, 125, 126, 111,
|
118, 119, 120, 121, 122, 123, 124, 125, 126, 111,
|
||||||
112, 113, 114, 115, 13, 14, 134, 106, 107, 108,
|
112, 113, 114, 115, 13, 14, 134, 106, 107, 108,
|
||||||
109, 110, 135, 136, 131, 132, 154, 129, 130, 128,
|
109, 110, 135, 136, 131, 132, 154, 129, 130, 128,
|
||||||
137, 138, 140, 139, 141, 142, 156, 155, -58, -7,
|
137, 138, 140, 139, 141, 142, 156, 155, -57, -7,
|
||||||
-52, -115, -116, 153, 69, 161, 133, 153, -115, -112,
|
-51, -114, -115, 153, 69, 161, 133, 153, -114, -111,
|
||||||
-79, -23, -23, -23, 150, 150, 159, -23, 165, -117,
|
-78, -22, -22, -22, 150, 150, 159, -22, 165, -116,
|
||||||
-36, -23, 158, -114, 86, 163, -118, 162, 163, 163,
|
-35, -22, 158, -113, 86, 163, -117, 162, 163, 163,
|
||||||
157, -91, -19, 157, -91, 161, 86, 157, -21, -23,
|
157, -90, -18, 157, -90, 161, 86, 157, -20, -22,
|
||||||
164, 165, 164, 163, 9, 165, -38, -39, 164, -23,
|
164, 165, 164, 163, 9, 165, -37, -38, 164, -22,
|
||||||
-47, 31, -23, -125, 9, 105, 165, 162, 164, -120,
|
-46, 31, -22, -125, 9, 105, 165, 162, 164, -119,
|
||||||
-121, -34, -35, -82, -80, 30, 135, 136, -9, -33,
|
-120, -33, -34, -81, -79, 30, 135, 136, -9, -32,
|
||||||
-72, 132, -9, -122, 161, -75, -9, -23, -23, -119,
|
-71, 132, -9, -121, 161, -74, -9, -22, -22, -118,
|
||||||
-23, 165, 166, 162, -116, -23, 165, 17, -78, -23,
|
-22, 165, 166, 162, -115, -22, 165, 17, -77, -22,
|
||||||
37, 134, -114, 165, 166, 165, -69, 86, 89, 50,
|
37, 134, -113, 165, 166, 165, -68, 86, 89, 50,
|
||||||
88, 86, 162, 162, 69, 162, -23, 166, -116, -23,
|
88, 86, 162, 162, 69, 162, -22, 166, -115, -22,
|
||||||
-116, -52, -24, -23, -59, -52, -33, -125, 9, 165,
|
-115, -51, -23, -22, -58, -51, -32, -125, 9, 165,
|
||||||
165, 162, -125, 9, -23, 165, 162, 161, 157, -101,
|
165, 162, -125, 9, -22, 165, 162, 161, 157, -100,
|
||||||
-17, -20, -87, 161, 165, -25, -10, 31, -23, -97,
|
-16, -19, -86, 161, 165, -24, -10, 31, -22, -96,
|
||||||
-23, -104, 161, 31, -120, -23, 165, -31, -27, -32,
|
-22, -103, 161, 31, -119, -22, 165, -30, -26, -31,
|
||||||
37, 134, 69, -29, -10, 31, -93, -120, 165, 9,
|
37, 134, 69, -28, -10, 31, -92, -119, 165, 9,
|
||||||
-1, 37, -80, -72, 161, -75, 162, -40, -83, -84,
|
-1, 37, -79, -71, 161, -74, 162, -39, -82, -83,
|
||||||
120, -85, 123, -86, 81, 80, 79, 76, 77, 78,
|
120, -84, 123, -85, 81, 80, 79, 76, 77, 78,
|
||||||
-122, 9, 165, 165, 75, -10, 31, 162, 17, -23,
|
-121, 9, 165, 165, 75, -10, 31, 162, 17, -22,
|
||||||
-32, 164, 165, 166, 89, -23, 162, 166, 162, -72,
|
-31, 164, 165, 166, 89, -22, 162, 166, 162, -71,
|
||||||
165, -79, 165, -36, -100, -20, 161, -125, 9, -20,
|
165, -78, 165, -35, -99, -19, 161, -125, 9, -19,
|
||||||
-101, 163, -119, 165, 163, -105, 163, -105, 163, 165,
|
-100, 163, -118, 165, 163, -104, 163, -104, 163, 165,
|
||||||
163, 165, 15, -32, 164, -114, -119, -30, 117, 118,
|
163, 165, 15, -31, 164, -113, -118, -29, 117, 118,
|
||||||
165, -111, 120, -34, -2, 158, 161, -122, -102, -46,
|
165, -110, 120, -33, -2, 158, 161, -121, -101, -45,
|
||||||
88, 114, 113, -75, -86, 162, -9, -10, 31, 163,
|
88, 114, 113, -74, -85, 162, -9, -10, 31, 163,
|
||||||
-119, -23, -114, 166, 161, -125, 9, -100, 162, -17,
|
-118, -22, -113, 166, 161, -125, 9, -99, 162, -16,
|
||||||
-125, 98, 163, -97, 162, 108, 109, -105, 107, -105,
|
-125, 98, 163, -96, 162, 108, 109, -104, 107, -104,
|
||||||
-111, -28, -10, 31, -27, -114, 166, 104, 164, 161,
|
-110, -27, -10, 31, -26, -113, 166, 104, 164, 161,
|
||||||
-81, 31, -81, 164, 88, -122, 162, 163, 9, 17,
|
-80, 31, -80, 164, 88, -121, 162, 163, 9, 17,
|
||||||
-94, -74, -7, -3, -107, 163, 161, -119, 165, 162,
|
-93, -73, -7, -3, -106, 163, 161, -118, 165, 162,
|
||||||
-122, 162, -20, -125, 162, 163, 165, -23, -126, 31,
|
-121, 162, -19, -125, 162, 163, 165, -22, -126, 31,
|
||||||
163, 162, 163, 107, -81, -119, 165, 165, 163, -92,
|
163, 162, 163, 107, -80, -118, 165, 165, 163, -91,
|
||||||
-9, -119, 161, -82, 161, -110, -56, 88, 37, 17,
|
-9, -118, 161, -81, 161, -109, -55, 88, 37, 17,
|
||||||
162, -46, -23, 163, 9, 17, -7, 162, -106, -41,
|
162, -45, -22, 163, 9, 17, -7, 162, -105, -40,
|
||||||
-42, -43, -44, -45, -9, -7, 154, 86, 162, 162,
|
-41, -42, -43, -44, -9, -7, 154, 86, 162, 162,
|
||||||
-26, -10, 31, -126, -119, 163, 161, 102, -28, 88,
|
-25, -10, 31, -126, -118, 163, 161, 102, -27, 88,
|
||||||
35, 162, -119, -119, 165, 9, 88, -23, -74, -23,
|
35, 162, -118, -118, 165, 9, 88, -22, -73, -22,
|
||||||
164, 162, -41, 163, 163, 121, 105, 153, -119, -119,
|
164, 162, -40, 163, 163, 121, 105, 153, -118, -118,
|
||||||
-119, 163, 165, -9, 162, 162, -56, -120, -75, 86,
|
-118, 163, 165, -9, 162, 162, -55, -119, -74, 86,
|
||||||
-5, -86, -7, 100, 162, 161, 165, -7, 163, -119,
|
-5, -85, -7, 100, 162, 161, 165, -7, 163, -118,
|
||||||
-81, 162, -123, 163, 161, -119, 162,
|
-80, 162, -122, 163, 161, -118, 162,
|
||||||
}
|
}
|
||||||
var yyDef = [...]int{
|
var yyDef = [...]int{
|
||||||
|
|
||||||
@ -2638,7 +2638,7 @@ yydefault:
|
|||||||
yyDollar = yyS[yypt-1 : yypt+1]
|
yyDollar = yyS[yypt-1 : yypt+1]
|
||||||
//line parser/parser.y:295
|
//line parser/parser.y:295
|
||||||
{
|
{
|
||||||
yyVAL.node = node.NewSimpleNode("FuncUseType")
|
yyVAL.node = node.NewIdentifier(yyDollar[1].token)
|
||||||
}
|
}
|
||||||
case 100:
|
case 100:
|
||||||
yyDollar = yyS[yypt-1 : yypt+1]
|
yyDollar = yyS[yypt-1 : yypt+1]
|
||||||
@ -3078,7 +3078,7 @@ yydefault:
|
|||||||
yyDollar = yyS[yypt-6 : yypt+1]
|
yyDollar = yyS[yypt-6 : yypt+1]
|
||||||
//line parser/parser.y:476
|
//line parser/parser.y:476
|
||||||
{
|
{
|
||||||
yyVAL.node = stmt.NewInterface(yyDollar[1].token, yyDollar[2].token, yyDollar[3].node, yyDollar[5].list)
|
yyVAL.node = stmt.NewInterface(yyDollar[1].token, yyDollar[2].token, yyDollar[3].list, yyDollar[5].list)
|
||||||
}
|
}
|
||||||
case 175:
|
case 175:
|
||||||
yyDollar = yyS[yypt-0 : yypt+1]
|
yyDollar = yyS[yypt-0 : yypt+1]
|
||||||
@ -3096,13 +3096,13 @@ yydefault:
|
|||||||
yyDollar = yyS[yypt-0 : yypt+1]
|
yyDollar = yyS[yypt-0 : yypt+1]
|
||||||
//line parser/parser.y:485
|
//line parser/parser.y:485
|
||||||
{
|
{
|
||||||
yyVAL.node = nil
|
yyVAL.list = nil
|
||||||
}
|
}
|
||||||
case 178:
|
case 178:
|
||||||
yyDollar = yyS[yypt-2 : yypt+1]
|
yyDollar = yyS[yypt-2 : yypt+1]
|
||||||
//line parser/parser.y:486
|
//line parser/parser.y:486
|
||||||
{
|
{
|
||||||
yyVAL.node = yyDollar[2].node
|
yyVAL.list = yyDollar[2].node.(node.SimpleNode).Children
|
||||||
}
|
}
|
||||||
case 179:
|
case 179:
|
||||||
yyDollar = yyS[yypt-0 : yypt+1]
|
yyDollar = yyS[yypt-0 : yypt+1]
|
||||||
|
@ -192,7 +192,7 @@ func Parse(src io.Reader, fName string) node.Node {
|
|||||||
|
|
||||||
%type <node> top_statement name statement function_declaration_statement
|
%type <node> top_statement name statement function_declaration_statement
|
||||||
%type <node> class_declaration_statement trait_declaration_statement
|
%type <node> class_declaration_statement trait_declaration_statement
|
||||||
%type <node> interface_declaration_statement interface_extends_list
|
%type <node> interface_declaration_statement
|
||||||
%type <node> group_use_declaration inline_use_declaration
|
%type <node> group_use_declaration inline_use_declaration
|
||||||
%type <node> mixed_group_use_declaration use_declaration unprefixed_use_declaration
|
%type <node> mixed_group_use_declaration use_declaration unprefixed_use_declaration
|
||||||
%type <node> const_decl inner_statement
|
%type <node> const_decl inner_statement
|
||||||
@ -227,7 +227,7 @@ func Parse(src io.Reader, fName string) node.Node {
|
|||||||
%type <list> use_declarations lexical_var_list lexical_vars isset_variables non_empty_array_pair_list
|
%type <list> use_declarations lexical_var_list lexical_vars isset_variables non_empty_array_pair_list
|
||||||
%type <list> array_pair_list ctor_arguments argument_list non_empty_argument_list top_statement_list
|
%type <list> array_pair_list ctor_arguments argument_list non_empty_argument_list top_statement_list
|
||||||
%type <list> inner_statement_list parameter_list non_empty_parameter_list class_statement_list
|
%type <list> inner_statement_list parameter_list non_empty_parameter_list class_statement_list
|
||||||
%type <list> method_body
|
%type <list> method_body interface_extends_list
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ top_statement:
|
|||||||
;
|
;
|
||||||
|
|
||||||
use_type:
|
use_type:
|
||||||
T_FUNCTION { $$ = node.NewSimpleNode("FuncUseType"); }
|
T_FUNCTION { $$ = node.NewIdentifier($1) }
|
||||||
| T_CONST { $$ = node.NewSimpleNode("ConstUseType"); }
|
| T_CONST { $$ = node.NewSimpleNode("ConstUseType"); }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -483,7 +483,7 @@ extends_from:
|
|||||||
|
|
||||||
interface_extends_list:
|
interface_extends_list:
|
||||||
/* empty */ { $$ = nil }
|
/* empty */ { $$ = nil }
|
||||||
| T_EXTENDS name_list { $$ = $2; }
|
| T_EXTENDS name_list { $$ = $2.(node.SimpleNode).Children }
|
||||||
;
|
;
|
||||||
|
|
||||||
implements_list:
|
implements_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user