diff options
| author | hachem <im@hachem.wtf> | 2026-09-19 11:01:51 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-19 11:01:51 +0200 |
| commit | 08b8cbbccd8c8d7dab75746ee9d134f67455de91 (patch) | |
| tree | 83de1ed169e14b2595cd9da9e5c16f1d84c8c808 /lexer.h | |
| parent | 05bf718e37efdc5201ad281e85da7850af31bd59 (diff) | |
feat: start work on ast
Diffstat (limited to 'lexer.h')
| -rw-r--r-- | lexer.h | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -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); |
