lexer: Add token for ':'

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-02-15 12:30:57 -05:00
parent aa8afdd3d0
commit 44017eb06f
3 changed files with 6 additions and 0 deletions

View File

@@ -255,6 +255,10 @@ lexer_scan(struct rifle_state *state, struct token *res)
res->type = TT_SLASH;
res->c = c;
return 0;
case ':':
res->type = TT_COLON;
res->c = c;
return 0;
default:
if (lexer_scan_ident(state, c, res) == 0) {
lexer_check_kw(state, res);

View File

@@ -40,6 +40,7 @@ static const char *toktab[] = {
[TT_MINUS] = qtok("-"),
[TT_STAR] = qtok("*"),
[TT_SLASH] = qtok("/"),
[TT_COLON] = qtok(":"),
[TT_F] = qtok(".f"),
[TT_EXTERN] = qtok(".extern")
};