diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-28 13:07:34 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-28 13:07:34 +0200 |
| commit | 61190b56be38a0a39fc37307a9fbfce759b505c3 (patch) | |
| tree | 9c0c71c70d78aa94cf85c95130573cff330bdb6e /src/core/token.h | |
| parent | 43614694706ac61b2cebef486b7fa9368c78fe6a (diff) | |
Remove dead token/symbol types and fix SYM_INLINEFUNCTION latent error
- Remove IS_A_FUNCTION/IS_NOT_A_FUNCTION macros from symbol.h: referenced
non-existent SYM_INLINEFUNCTION enum value (latent compile error) and
were never used anywhere in the codebase
- Remove TT_BOOL from TokenType enum: marked "temporarily disabled" but
unused for years; YAGNI
- Remove TT_NOTEQ from TokenType enum: duplicate of TT_NEQ ("!="), never
referenced
- Remove IS_NON_TERMINAL/IS_NOT_NON_TERMINAL macros: referenced
START_NON_TERMINALS/END_NON_TERMINALS sentinels that don't exist in the
enum — would cause compile errors if ever used
- Remove token_new_couble declaration (typo) and token_new_double
implementation: function had no callers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/core/token.h')
| -rw-r--r-- | src/core/token.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/core/token.h b/src/core/token.h index 1660e7b..497dc78 100644 --- a/src/core/token.h +++ b/src/core/token.h @@ -47,8 +47,6 @@ #define IS_NOT_KEYWORD(t) !IS_KEYWORD(t) #define IS_OPERATOR(t) (START_OPERATORS < t && t < END_OPERATORS) #define IS_NOT_OPERATOR(t) !IS_OPERATOR(t) -#define IS_NON_TERMINAL(t) (START_NON_TERMINALS < t && t < END_NON_TERMINALS) -#define IS_NOT_NON_TERMINAL(t) !IS_NON_TERMINAL(t) #define IS_IDENT(t) (t == TT_IDENT) #define IS_NOT_IDENT(t) !(IS_IDENT(t)) #define IS_ASSIGNABLE(t) (START_ASSIGNABLES < t && t < END_ASSIGNABLES) @@ -78,8 +76,6 @@ typedef enum { // Diverse TT_NONE, TT_END_OF_CODE, - TT_BOOL, // Temporaly disabled, maybe NUMERICAL in future again - // Diverse types START_TERMINALS, START_TYPES, @@ -147,7 +143,6 @@ typedef enum { TT_MULT, TT_NEQ, TT_NOT, - TT_NOTEQ, TT_OR, TT_RE, TT_RSHIFT, @@ -177,7 +172,6 @@ typedef struct { Token* token_new(char *c_val, TokenType tt_cur, int i_line_nr, int i_pos_nr, char *c_filename); Token* token_new_integer(int i_val); -Token* token_new_couble(double d_val); Token* token_new_string(char *c_val); Token* token_new_array(int i_size); Token* token_new_copy(Token *p_token); |
