summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sys/include/np/lex.h1
-rw-r--r--src/sys/np/core/np_lex.c3
-rw-r--r--src/sys/np/core/np_parse.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/sys/include/np/lex.h b/src/sys/include/np/lex.h
index 8977305..ba4bdb8 100644
--- a/src/sys/include/np/lex.h
+++ b/src/sys/include/np/lex.h
@@ -61,6 +61,7 @@ typedef enum {
TT_LT, /* '<' */
TT_LBRACK, /* '[' */
TT_RBRACK, /* ']' */
+ TT_COLON, /* ':' */
/* Types */
TT_U8, /* 'u8' */
diff --git a/src/sys/np/core/np_lex.c b/src/sys/np/core/np_lex.c
index 787f369..27341ab 100644
--- a/src/sys/np/core/np_lex.c
+++ b/src/sys/np/core/np_lex.c
@@ -287,6 +287,9 @@ lex_nom(struct np_work *work, struct lex_token *res)
case ']':
res->token = TT_RBRACK;
break;
+ case ':':
+ res->token = TT_COLON;
+ break;
default:
if (is_num(c)) {
lex_nomnum(work, c, res);
diff --git a/src/sys/np/core/np_parse.c b/src/sys/np/core/np_parse.c
index 29079d7..b894edb 100644
--- a/src/sys/np/core/np_parse.c
+++ b/src/sys/np/core/np_parse.c
@@ -54,6 +54,7 @@ static const char *stoktab[] = {
[TT_LT] = "<TT_LESSTHAN>",
[TT_LBRACK] = "<TT_LBRACK>",
[TT_RBRACK] = "<TT_RBRACK>",
+ [TT_COLON] = "<TT_COLON>",
/* Types */
[TT_U8] = "<TT_U8>",