Commit 0f9dd15
committed
[Tolk] Implement generic structs and aliases
Now structures can be generic: Container<T> and similar.
The same goes for type aliases: type A<T> = Container<T>.
Like generic functions, every struct is instantiated,
"Container<int>" and "Container<slice>" become different
symbols, and on instantiation they walk though the pipeline.
Type inferring and checking are done only upon instantiation.1 parent 09019fe commit 0f9dd15
File tree
66 files changed
+2227
-401
lines changed- tolk-tester/tests
- invalid-declaration
- invalid-semantics
- invalid-syntax
- invalid-typing
- warnings-not-errors
- tolk
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
66 files changed
+2227
-401
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | | - | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
35 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| |||
204 | 214 | | |
205 | 215 | | |
206 | 216 | | |
207 | | - | |
| 217 | + | |
208 | 218 | | |
209 | 219 | | |
210 | 220 | | |
| |||
224 | 234 | | |
225 | 235 | | |
226 | 236 | | |
| 237 | + | |
227 | 238 | | |
228 | 239 | | |
229 | 240 | | |
| |||
0 commit comments