From 80e1d0fc957a2f254ca94232cca0269567888ddb Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 13 Aug 2025 04:17:46 +0900 Subject: feat: implement block-based variable scope --- tokenize.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tokenize.c') diff --git a/tokenize.c b/tokenize.c index e6c61c0..de4488e 100644 --- a/tokenize.c +++ b/tokenize.c @@ -14,8 +14,6 @@ Lexer* lexer_new(Token* pp_tokens) { } void tokenize_all(Lexer* l) { - int ch; - int start; while (l->src[l->pos].kind != TokenKind_eof) { Token* pp_tok = l->src + l->pos; Token* tok = l->tokens + l->n_tokens; @@ -24,7 +22,7 @@ void tokenize_all(Lexer* l) { ++l->pos; if (k == TokenKind_character_constant) { tok->kind = TokenKind_literal_int; - ch = pp_tok->raw.data[1]; + int ch = pp_tok->raw.data[1]; if (ch == '\\') { ch = pp_tok->raw.data[2]; if (ch == 'a') { -- cgit v1.2.3-70-g09d2