From 757ca3716e8a2d540a2d30efc3c7640588a5acf4 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Tue, 30 Aug 2022 16:25:40 +0200 Subject: [PATCH] Remove unused tokens. --- src/compiler/enums.h | 4 ---- src/compiler/parse_stmt.c | 3 --- src/compiler/tokens.c | 6 ------ 3 files changed, 13 deletions(-) diff --git a/src/compiler/enums.h b/src/compiler/enums.h index 683be1e53..5564c9ef7 100644 --- a/src/compiler/enums.h +++ b/src/compiler/enums.h @@ -435,10 +435,6 @@ typedef enum TOKEN_CONST_IDENT, // Any purely uppercase ident, TOKEN_TYPE_IDENT, // Any ident on the format FooBar or __FooBar - // Asm - TOKEN_ASM_STRING, - TOKEN_ASM_CONSTRAINT, - // We want to parse $foo separately. // Otherwise we allow things like "# foo" which would be pretty bad. TOKEN_CT_IDENT, // $foobar diff --git a/src/compiler/parse_stmt.c b/src/compiler/parse_stmt.c index 5d236f1ef..d8d49ffef 100644 --- a/src/compiler/parse_stmt.c +++ b/src/compiler/parse_stmt.c @@ -845,9 +845,6 @@ Ast *parse_stmt(ParseContext *c) { switch (c->tok) { - case TOKEN_ASM_STRING: - case TOKEN_ASM_CONSTRAINT: - UNREACHABLE case TOKEN_LBRACE: return parse_compound_stmt(c); case TYPELIKE_TOKENS: diff --git a/src/compiler/tokens.c b/src/compiler/tokens.c index 4f32ac281..a0f09a33d 100644 --- a/src/compiler/tokens.c +++ b/src/compiler/tokens.c @@ -164,12 +164,6 @@ const char *token_type_to_string(TokenType type) case TOKEN_AT_CONST_IDENT: return "MACRO_CONST_IDENT"; - // Asm - case TOKEN_ASM_STRING: - return "ASM_STRING"; - case TOKEN_ASM_CONSTRAINT: - return "ASM_CONSTRAINT"; - // Values case TOKEN_STRING: return "STRING";