hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/lexer.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-19 11:01:51 +0200
committerhachem <im@hachem.wtf>2026-09-19 11:01:51 +0200
commit08b8cbbccd8c8d7dab75746ee9d134f67455de91 (patch)
tree83de1ed169e14b2595cd9da9e5c16f1d84c8c808 /lexer.h
parent05bf718e37efdc5201ad281e85da7850af31bd59 (diff)
feat: start work on ast
Diffstat (limited to 'lexer.h')
-rw-r--r--lexer.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/lexer.h b/lexer.h
index eb7a4d3..4e09ace 100644
--- a/lexer.h
+++ b/lexer.h
@@ -3,8 +3,6 @@
#include <stdbool.h>
#include <stdio.h>
-// single characters stand for themselves
-// so the named tokens start past them
enum Token
{
TOK_END = 0,
@@ -16,15 +14,9 @@ enum Token
TOK_CHAR
};
-// provided by flex
-// the input
-// the current line
-// and the scanner itself
-extern FILE* yyin;
-extern int yylineno;
-int yylex(void);
+extern FILE* yyin; // input
+extern int yylineno; // current line
+int yylex(void); // scanner
-// true once the lexer has refused something
bool lexer_failed(void);
-// the character inside the most recent TOK_CHAR
char lexer_character(void);