diff options
| -rw-r--r-- | core/lexer.c | 4 | ||||
| -rw-r--r-- | core/parser.c | 1 | ||||
| -rw-r--r-- | include/cescal/token.h | 1 |
3 files changed, 6 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"), diff --git a/include/cescal/token.h b/include/cescal/token.h index 5f6b903..1f214bb 100644 --- a/include/cescal/token.h +++ b/include/cescal/token.h @@ -17,6 +17,7 @@ typedef enum { TT_LPAREN, /* '(' */ TT_RPAREN, /* '( */ TT_COMMA, /* ',' */ + TT_COLON, /* ':' */ TT_ARROW, /* '->' */ TT_DEFINE, /* '#define' */ TT_IFNDEF, /* '#ifndef' */ |
