diff options
| author | Ian Moffett <ian@mirocom.org> | 2026-05-23 08:54:14 -0400 |
|---|---|---|
| committer | Ian Moffett <ian@mirocom.org> | 2026-05-23 08:54:14 -0400 |
| commit | 07859d37359a82542267401a83392519e4984eb3 (patch) | |
| tree | a0eeb7ce8f6fe9d736b92c0a66efc238a47d58b4 /core | |
| parent | a6f776e1f2bd634395db0ddbbdf40575ad5bca23 (diff) | |
core: lexer: Add token for ':' byte
Signed-off-by: Ian Moffett <ian@mirocom.org>
Diffstat (limited to 'core')
| -rw-r--r-- | core/lexer.c | 4 | ||||
| -rw-r--r-- | core/parser.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/core/lexer.c b/core/lexer.c index 9705eb7..e627ba9 100644 --- a/core/lexer.c +++ b/core/lexer.c @@ -300,6 +300,10 @@ lexer_nom(struct cescal_state *state, struct token *res) res->type = TT_COMMA; res->c = c; return 0; + case ':': + res->type = TT_COLON; + res->c = c; + return 0; case '#': if ((c = lexer_consume_single(state, true)) == '\0') { return -1; diff --git a/core/parser.c b/core/parser.c index 5e86283..6720d84 100644 --- a/core/parser.c +++ b/core/parser.c @@ -37,6 +37,7 @@ static const char *toktab[] = { [TT_LPAREN] = qtok("("), [TT_RPAREN] = qtok(")"), [TT_COMMA] = qtok(","), + [TT_COLON] = qtok(":"), [TT_ARROW] = qtok("->"), [TT_DEFINE] = qtok("#define"), [TT_IFNDEF] = qtok("#ifndef"), |
