core: lexer: Add comment skipping

Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
2026-05-23 08:09:05 -04:00
parent 50bd6324fe
commit 3e3ccae003
3 changed files with 43 additions and 11 deletions
+12 -11
View File
@@ -30,17 +30,18 @@
* Converts numeric tokens into human readable strings
*/
static const char *toktab[] = {
[TT_NONE] = symtok("none"),
[TT_IDENT] = symtok("ident"),
[TT_INTLIT] = symtok("number"),
[TT_LPAREN] = qtok("("),
[TT_RPAREN] = qtok(")"),
[TT_COMMA] = qtok(","),
[TT_RETURN] = qtok("return"),
[TT_PUB] = qtok("pub"),
[TT_PROC] = qtok("proc"),
[TT_BEGIN] = qtok("begin"),
[TT_END] = qtok("end")
[TT_NONE] = symtok("none"),
[TT_IDENT] = symtok("ident"),
[TT_COMMENT] = symtok("comment"),
[TT_INTLIT] = symtok("number"),
[TT_LPAREN] = qtok("("),
[TT_RPAREN] = qtok(")"),
[TT_COMMA] = qtok(","),
[TT_RETURN] = qtok("return"),
[TT_PUB] = qtok("pub"),
[TT_PROC] = qtok("proc"),
[TT_BEGIN] = qtok("begin"),
[TT_END] = qtok("end")
};
int