~repos /plum
git clone https://pyrossh.dev/repos/plum.git
A statically typed, imperative programming language inspired by rust, python
21ed6516
—
Peter John 3 years ago
split class tests
test/corpus/class_definitions.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
================================================================================
|
|
2
|
-
Class definitions
|
|
2
|
+
Class definitions - Simple
|
|
3
3
|
================================================================================
|
|
4
4
|
|
|
5
5
|
package definitions
|
|
@@ -9,22 +9,10 @@ class AnimalStrong:
|
|
|
9
9
|
userName: Int
|
|
10
10
|
currentAddress: Address
|
|
11
11
|
|
|
12
|
-
class Bat<S, T>:
|
|
13
|
-
a: S
|
|
14
|
-
b: T
|
|
15
|
-
|
|
16
|
-
class AnimalSubSpecies(B, C):
|
|
17
|
-
a: String
|
|
18
|
-
b: Float
|
|
19
|
-
|
|
20
|
-
class A<S, T>(B, C):
|
|
21
|
-
a: S
|
|
22
|
-
b: T
|
|
23
|
-
|
|
24
12
|
--------------------------------------------------------------------------------
|
|
25
13
|
|
|
26
14
|
(source_file
|
|
27
|
-
(package
|
|
15
|
+
(package
|
|
28
16
|
(identifier))
|
|
29
17
|
(class_definition
|
|
30
18
|
(definition_name)
|
|
@@ -39,7 +27,23 @@ class A<S, T>(B, C):
|
|
|
39
27
|
(class_field
|
|
40
28
|
(variable_name)
|
|
41
29
|
(type
|
|
42
|
-
(definition_name))))
|
|
30
|
+
(definition_name)))))
|
|
31
|
+
|
|
32
|
+
================================================================================
|
|
33
|
+
Class definitions - Generic
|
|
34
|
+
================================================================================
|
|
35
|
+
|
|
36
|
+
package definitions
|
|
37
|
+
|
|
38
|
+
class Bat<S, T>:
|
|
39
|
+
a: S
|
|
40
|
+
b: T
|
|
41
|
+
|
|
42
|
+
--------------------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
(source_file
|
|
45
|
+
(package
|
|
46
|
+
(identifier))
|
|
43
47
|
(class_definition
|
|
44
48
|
(definition_name)
|
|
45
49
|
(generic_list
|
|
@@ -52,7 +56,23 @@ class A<S, T>(B, C):
|
|
|
52
56
|
(class_field
|
|
53
57
|
(variable_name)
|
|
54
58
|
(type
|
|
55
|
-
(definition_name))))
|
|
59
|
+
(definition_name)))))
|
|
60
|
+
|
|
61
|
+
================================================================================
|
|
62
|
+
Class definitions - Traits
|
|
63
|
+
================================================================================
|
|
64
|
+
|
|
65
|
+
package definitions
|
|
66
|
+
|
|
67
|
+
class AnimalSubSpecies(B, C):
|
|
68
|
+
a: String
|
|
69
|
+
b: Float
|
|
70
|
+
|
|
71
|
+
--------------------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
(source_file
|
|
74
|
+
(package
|
|
75
|
+
(identifier))
|
|
56
76
|
(class_definition
|
|
57
77
|
(definition_name)
|
|
58
78
|
(trait_list
|
|
@@ -65,7 +85,23 @@ class A<S, T>(B, C):
|
|
|
65
85
|
(class_field
|
|
66
86
|
(variable_name)
|
|
67
87
|
(type
|
|
68
|
-
(definition_name))))
|
|
88
|
+
(definition_name)))))
|
|
89
|
+
|
|
90
|
+
================================================================================
|
|
91
|
+
Class definitions - Genrics + Traits
|
|
92
|
+
================================================================================
|
|
93
|
+
|
|
94
|
+
package definitions
|
|
95
|
+
|
|
96
|
+
class A<S, T>(B, C):
|
|
97
|
+
a: S
|
|
98
|
+
b: T
|
|
99
|
+
|
|
100
|
+
--------------------------------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
(source_file
|
|
103
|
+
(package
|
|
104
|
+
(identifier))
|
|
69
105
|
(class_definition
|
|
70
106
|
(definition_name)
|
|
71
107
|
(generic_list
|
|
@@ -81,4 +117,4 @@ class A<S, T>(B, C):
|
|
|
81
117
|
(class_field
|
|
82
118
|
(variable_name)
|
|
83
119
|
(type
|
|
84
|
-
(definition_name)))))
|
|
120
|
+
(definition_name)))))
|