]> git.corax.cc Git - ccc/commitdiff
lex: Fix lexing of xor operators
authorMatthias Kruk <m@m10k.eu>
Sun, 5 Jul 2020 08:48:59 +0000 (17:48 +0900)
committerMatthias Kruk <m@m10k.eu>
Sun, 5 Jul 2020 08:48:59 +0000 (17:48 +0900)
src/lex.c
src/token.h

index 83f71b69d0b6f67d0bb797e6fcf8230e75cae2b1..9d4738f2292fd7ccf87737685cbb9f5f312998ed 100644 (file)
--- 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 == '=') {
index df02a9b9419daedad0e4b539ad2d9179e129d613..3b6d02c6c7e8fee935bbd9674bc78936ea5103b0 100644 (file)
@@ -46,6 +46,7 @@ typedef enum {
        TOKEN_NOT,
        TOKEN_NUMBER,
        TOKEN_OR,
+       TOKEN_XOR,
        TOKEN_QMARK,
        TOKEN_RBRACE,
        TOKEN_RBRACKET,