diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-09 02:50:34 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-09 02:50:34 +0300 |
| commit | e5f9d49e39210fe634305d57f1b01e013d66aa71 (patch) | |
| tree | 980b72d145339702a49557215567e3afbf3d7e35 /tests | |
| parent | 170f3ddc3d8967c0b5d4755c0221c396db215b2f (diff) | |
| download | ek-e5f9d49e39210fe634305d57f1b01e013d66aa71.tar.gz ek-e5f9d49e39210fe634305d57f1b01e013d66aa71.zip | |
simplify ast definition
+ Makes it a lot nicer to work with.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/if2.ek | 6 | ||||
| -rw-r--r-- | tests/loop.ek | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/if2.ek b/tests/if2.ek index b41b389..7589571 100644 --- a/tests/if2.ek +++ b/tests/if2.ek @@ -11,17 +11,17 @@ main() { if 0 { for i27 i = 0; i < 5; i = i + 1 { - putchar('0' + i); + putchar('0' + i as i9); } } else if 1 { for i27 i = 0; i < 5; i = i + 1 { - putchar('A' + i); + putchar('A' + i as i9); } } else { for i27 i = 0; i < 5; i = i + 1 { - putchar('K' + i); + putchar('K' + i as i9); } } diff --git a/tests/loop.ek b/tests/loop.ek index 301e7ea..265d09f 100644 --- a/tests/loop.ek +++ b/tests/loop.ek @@ -1,5 +1,6 @@ typedef i9 {} typedef i27 {} +typedef bool {} putchar(i9 c) { @@ -10,6 +11,6 @@ putchar(i9 c) main() { for i27 i = 0; i < 5; i = i + 1 { - putchar('A' + i); + putchar('A' + (i as i9)); } } |
