diff options
author | Bad Diode <bd@badd10de.dev> | 2021-11-02 14:07:46 +0100 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-11-02 14:07:46 +0100 |
commit | fedab6bac08333ca31e69f21add7b66c575ec87c (patch) | |
tree | ee40a85250e04a632ba674b29767bf5d270731d0 /src/parser.c | |
parent | 9866fad84ada32ef4f386e8be6ca09bd3711f034 (diff) | |
download | bdl-fedab6bac08333ca31e69f21add7b66c575ec87c.tar.gz bdl-fedab6bac08333ca31e69f21add7b66c575ec87c.zip |
Add compilation of `display` primitive
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.c b/src/parser.c index 86cf713..9191aa2 100644 --- a/src/parser.c +++ b/src/parser.c | |||
@@ -10,6 +10,7 @@ static char *builtins [] = { | |||
10 | "=", "<", ">", "<=", ">=", | 10 | "=", "<", ">", "<=", ">=", |
11 | "not", "and", "or", | 11 | "not", "and", "or", |
12 | "nil?", "zero?", "fixnum?", "bool?", | 12 | "nil?", "zero?", "fixnum?", "bool?", |
13 | "display", | ||
13 | }; | 14 | }; |
14 | 15 | ||
15 | uint64_t | 16 | uint64_t |
@@ -597,6 +598,8 @@ parse(Token *tokens, Errors *errors) { | |||
597 | array_free(roots); | 598 | array_free(roots); |
598 | roots = final_roots; | 599 | roots = final_roots; |
599 | 600 | ||
601 | // TODO: Check if primitive procedures have been given the right number of | ||
602 | // arguments. | ||
600 | // TODO: Type check basic expressions (e.g. arithmetic/numeric comparisons). | 603 | // TODO: Type check basic expressions (e.g. arithmetic/numeric comparisons). |
601 | // We can't be sure when we have functions unless the return type is known. | 604 | // We can't be sure when we have functions unless the return type is known. |
602 | 605 | ||