From 68ee90596ac4da9f8b42502110fd56ec07576bd9 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: Sat, 16 Dec 2023 20:01:50 +0800 Subject: [PATCH] emm --- src/tokenize.c | 1 - src/typecheck.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tokenize.c b/src/tokenize.c index 6de30e6b..c744617c 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -126,7 +126,6 @@ static int read_indentation_level_for_newline_token(struct State *st) consume_rest_of_line(st); else if (c == '\0') { // Ignore newline+spaces at end of file. Do not validate 4 spaces. - // TODO: test case return 0; } else { unread_byte(st, c); diff --git a/src/typecheck.c b/src/typecheck.c index 3ed29370..2d5b4e09 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -86,7 +86,9 @@ static const char *short_type_description(const Type *t) return "a number type"; case TYPE_ARRAY: return "an array type"; - } + case TYPE_BOOL: + assert(0); + } } ExportSymbol *typecheck_stage1_create_types(FileTypes *ft, const AstFile *ast)