From db2b4a142c716ac4e4e2a3a69cf93b46200ccb7e Mon Sep 17 00:00:00 2001 From: Marvin Schlegel Date: Thu, 2 May 2024 22:21:53 +0200 Subject: [PATCH] lexer adjustments --- src/Parser/Lexer.x | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Parser/Lexer.x b/src/Parser/Lexer.x index d7f551d..ef76773 100644 --- a/src/Parser/Lexer.x +++ b/src/Parser/Lexer.x @@ -118,6 +118,8 @@ tokens :- "<<=" { \_ -> SHIFTLEFTEQUAL } ">>" { \_ -> SHIFTRIGHT } ">>=" { \_ -> SHIFTRIGHTEQUAL } + ">>>" { \_ -> UNSIGNEDSHIFTRIGHT } + ">>>=" { \_ -> UNSIGNEDSHIFTRIGHTEQUAL } { @@ -173,7 +175,7 @@ data Token | VOLATILE | WHILE | IDENTIFIER String - | INTEGERLITERAL Integer + | INTEGERLITERAL Int | CHARLITERAL Char | BOOLLITERAL Bool | NULLLITERAL @@ -219,6 +221,8 @@ data Token | SHIFTLEFTEQUAL | SHIFTRIGHT | SHIFTRIGHTEQUAL + | UNSIGNEDSHIFTRIGHT + | UNSIGNEDSHIFTRIGHTEQUAL deriving(Eq,Show) } \ No newline at end of file