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.c | |
| 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.c')
| -rw-r--r-- | src/core/token.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/core/token.c b/src/core/token.c index 17f98b2..f7cc745 100644 --- a/src/core/token.c +++ b/src/core/token.c @@ -112,7 +112,6 @@ tt_get_name(TokenType tt_cur) { CASE(TT_STRING,"TT_STRING") CASE(TT_ARRAY,"TT_ARRAY") CASE(TT_INTEGER,"TT_INTEGER") - CASE(TT_BOOL,"TT_BOOL") CASE(END_ASSIGNABLES, "END_ASSIGNABLES") CASE(END_NUMERICAL, "END_NUMERICAL") CASE(END_TYPES, "END_TYPES") @@ -176,7 +175,6 @@ tt_get_name(TokenType tt_cur) { CASE(TT_MULT,"TT_MULT") CASE(TT_NEQ,"TT_NEQ") CASE(TT_RE,"TT_RE") - CASE(TT_NOTEQ,"TT_NOTEQ") CASE(TT_SEMICOLON,"TT_SEMICOLON") CASE(TT_SUB,"TT_SUB") CASE(END_OPERATORS, "END_OPERATORS") @@ -235,15 +233,6 @@ token_new_integer(int i_val) { } Token* -token_new_double(double d_val) { - Token *p_token = token_new_dummy(); - token_set_tt(p_token, TT_DOUBLE); - token_set_dval(p_token, d_val); - - return (p_token); -} - -Token* token_new_string(char *c_val) { Token *p_token = token_new_dummy(); token_set_tt(p_token, TT_STRING); |
