aboutsummaryrefslogtreecommitdiff
path: root/src/tools/zc0.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/zc0.c')
-rw-r--r--src/tools/zc0.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/zc0.c b/src/tools/zc0.c
index 5846e22..af85ff8 100644
--- a/src/tools/zc0.c
+++ b/src/tools/zc0.c
@@ -463,7 +463,7 @@ static int notatype(void)
static const char *w[] = { "return", "if", "else", "while", "for", "do", "break", "continue",
"let", "var", "fn", "const", "enhance", "struct", "enum", "asm", "switch", "case",
"default", "immediate", "type", "include", "as", "in", "new", "sizeof", "typeof",
- "o3", "unchecked", 0 };
+ "o3", "unchecked", "unbounded", 0 };
int i;
if (tk != T_ID) return 0;
for (i = 0; w[i]; i++) if (!strcmp(ts, w[i])) return 1;
@@ -769,7 +769,7 @@ static void stmt(void)
expect(";"); return;
}
}
- if (accept("unchecked")) { stmt(); return; }
+ if (accept("unchecked") || accept("unbounded")) { stmt(); return; }
if (accept("if")) {
expect("("); expr(); rval(); ftest(); expect(")");
a = here; lit(0); op(O_JZ); stmt();
@@ -1014,6 +1014,7 @@ static void top1(void)
}
if (accept("embed")) { embeddecl(0); return; }
{
+ if (accept("unbounded")) { if (accept(";")) return; top1(); return; }
if (accept("unchecked")) { top1(); return; }
if (accept("fn")) { fndef(0, 0); return; }
if (accept("const")) { optype(); do { char *n = ident(); if (dsn && !dnm[0]) strcpy(dnm, n); expect("="); add(n, K_CONST, cexpr()); } while (accept(",")); expect(";"); return; }