Beautify the token list output.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 13 Nov 2017 17:39:23 +0000 (18:39 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 13 Nov 2017 17:39:23 +0000 (18:39 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
lexer/main.c

index 691d54eef5162acaa4f8c5ee5514e0f02d1834bb..0cdc70b9da3f066fa591869584e4a0fae7af8cd6 100644 (file)
@@ -237,7 +237,7 @@ int main() {
             wprintf(L"Scanner error with token value: %ls\n", token[tokenFound].value);
             exit(EXIT_FAILURE);
         }
-        if (c != WEOF) {
+        if (tokenType == MOT || tokenType == MOTCLE) {
             wprintf(L"%20s: %ls\n", tokenTypestr[tokenType], token[tokenFound].value);
         } else {
             wprintf(L"%20s\n", tokenTypestr[tokenType]);