From 2cf5a7401edc016b46ae2f02bb90dfae8c9de8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD=E4=BA=91?= <71159641+littlewhitecloud@users.noreply.github.com> Date: Sun, 10 Dec 2023 15:48:49 +0800 Subject: [PATCH] del todos --- src/tokenize.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tokenize.c b/src/tokenize.c index 3e6b53f1..fe0fd83f 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -220,9 +220,10 @@ static bool is_keyword(const char *s) // - self-hosted compiler // - syntax documentation "import", "def", "declare", "class", "union", "enum", "global", - "return", "if", "elif", "else", "while", "for", "pass", "break", "continue", - "True", "False", "None", "NULL", "void", "noreturn", - "and", "or", "not", "self", "as", "sizeof", "assert", + "return", "if", "elif", "else", "while", "for", "break", "continue", + "True", "False", "NULL", "self", + "and", "or", "not", "as", "sizeof", "assert", "pass", + "void", "noreturn", "bool", "byte", "short", "int", "long", "float", "double", }; for (const char **kw = &keywords[0]; kw < &keywords[sizeof(keywords)/sizeof(keywords[0])]; kw++) @@ -295,7 +296,6 @@ static char *read_string(struct State *st, char quote, int *len) case '\n': // \ at end of line, string continues on next line if (quote == '\'') { - // TODO: tests st->location.lineno--; // to get error at the correct line number goto missing_end_quote; } @@ -321,7 +321,6 @@ static char *read_string(struct State *st, char quote, int *len) return result.ptr; missing_end_quote: - // TODO: tests if (quote == '"') fail_with_error(st->location, "missing \" to end the string"); else