diff options
-rw-r--r-- | cc.h | 1 | ||||
-rw-r--r-- | scan.c | 5 | ||||
-rw-r--r-- | token.c | 1 |
3 files changed, 6 insertions, 1 deletions
@@ -93,6 +93,7 @@ enum tokenkind { TLOR, TQUESTION, TCOLON, + TCOLONCOLON, TSEMICOLON, TELLIPSIS, TASSIGN, @@ -367,7 +367,10 @@ again: return TQUESTION; case ':': nextchar(s); - return TCOLON; + if (s->chr != ':') + return TCOLON; + nextchar(s); + return TCOLONCOLON; case ';': nextchar(s); return TSEMICOLON; @@ -92,6 +92,7 @@ const char *tokstr[] = { [TLOR] = "||", [TQUESTION] = "?", [TCOLON] = ":", + [TCOLONCOLON] = "::", [TSEMICOLON] = ";", [TELLIPSIS] = "...", [TASSIGN] = "=", |