core: lexer: Add comment skipping
Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
+12
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user