harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e2f568bb6e42234131d1cd450bc75d3c52ea2641
parent c6e95aa442a2140d2983b1904be84ee5a515017a
Author: Sebastian <sebastian@sebsite.pw>
Date:   Mon,  7 Mar 2022 20:47:45 -0500

lex: remove T_PLUSPLUS and T_MINUSMINUS

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Minclude/lex.h | 2--
Msrc/lex.c | 8--------
2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/include/lex.h b/include/lex.h @@ -104,14 +104,12 @@ enum lexical_token { T_LXOREQ, T_MINUS, T_MINUSEQ, - T_MINUSMINUS, T_MODEQ, T_MODULO, T_NEQUAL, T_BOREQ, T_PLUS, T_PLUSEQ, - T_PLUSPLUS, T_QUESTION, T_RBRACE, T_RBRACKET, diff --git a/src/lex.c b/src/lex.c @@ -111,14 +111,12 @@ static const char *tokens[] = { [T_LXOREQ] = "^^=", [T_MINUS] = "-", [T_MINUSEQ] = "-=", - [T_MINUSMINUS] = "--", [T_MODEQ] = "%=", [T_MODULO] = "%", [T_NEQUAL] = "!=", [T_BOREQ] = "|=", [T_PLUS] = "+", [T_PLUSEQ] = "+=", - [T_PLUSPLUS] = "++", [T_QUESTION] = "?", [T_RBRACE] = "}", [T_RBRACKET] = "]", @@ -806,9 +804,6 @@ lex2(struct lexer *lexer, struct token *out, uint32_t c) case '=': out->token = T_PLUSEQ; break; - case '+': - out->token = T_PLUSPLUS; - break; default: push(lexer, c, false); out->token = T_PLUS; @@ -820,9 +815,6 @@ lex2(struct lexer *lexer, struct token *out, uint32_t c) case '=': out->token = T_MINUSEQ; break; - case '-': - out->token = T_MINUSMINUS; - break; default: if (c != UTF8_INVALID && c <= 0x7F && isdigit(c)) { push(lexer, c, false);