diff options
| author | 2026-10-14 16:25:05 +0330 | |
|---|---|---|
| committer | 2026-10-14 16:25:05 +0330 | |
| commit | 8a7092df7b7fc8a5eb4f02ef14588246bd111daf (patch) | |
| tree | 0d9d28ca93ccbddb1f99cb02b88ed466e0ade481 /src/tools/zc0.c | |
| parent | history: 43-stdlib notes point forward to zc0 no longer reserving u, m and d (diff) | |
| parent | merge bounds checking (diff) | |
Merge branch 'main' into work/xref
Diffstat (limited to 'src/tools/zc0.c')
| -rw-r--r-- | src/tools/zc0.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/zc0.c b/src/tools/zc0.c index 782d548..664ea79 100644 --- a/src/tools/zc0.c +++ b/src/tools/zc0.c @@ -492,7 +492,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; @@ -798,7 +798,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(); @@ -1048,6 +1048,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; } |
