From: Matthias Kruk Date: Sun, 5 Jul 2020 08:48:59 +0000 (+0900) Subject: lex: Fix lexing of xor operators X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=bfbea887dafb6833ff4c5ff6c2b03dc2b30d2ef2;p=ccc lex: Fix lexing of xor operators --- diff --git a/src/lex.c b/src/lex.c index 83f71b6..9d4738f 100644 --- a/src/lex.c +++ b/src/lex.c @@ -445,7 +445,7 @@ struct token *_nexttoken(void) } _putnextchar(c); - return(token_new_from_str(TOKEN_ASSIGN_XOR, _line, _col, "^")); + return(token_new_from_str(TOKEN_XOR, _line, _col, "^")); case STATE_ASSIGN: if(c == '=') { diff --git a/src/token.h b/src/token.h index df02a9b..3b6d02c 100644 --- a/src/token.h +++ b/src/token.h @@ -46,6 +46,7 @@ typedef enum { TOKEN_NOT, TOKEN_NUMBER, TOKEN_OR, + TOKEN_XOR, TOKEN_QMARK, TOKEN_RBRACE, TOKEN_RBRACKET,