From bfbea887dafb6833ff4c5ff6c2b03dc2b30d2ef2 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Sun, 5 Jul 2020 17:48:59 +0900 Subject: [PATCH] lex: Fix lexing of xor operators --- src/lex.c | 2 +- src/token.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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, -- 2.47.3