diff options
| author | 2022-08-08 09:21:18 +0200 | |
|---|---|---|
| committer | 2022-08-08 09:21:18 +0200 | |
| commit | ef9311d79b829e59af10280b7eeef68942de1dfd (patch) | |
| tree | 3fc7e61d98e89d9f51f5f3b41c68df10312cfdf6 /bootstrap | |
| parent | bc32ed90d6eaaca6406998961c50c5f5d5ca5260 (diff) | |
change label syntax
Diffstat (limited to 'bootstrap')
| -rw-r--r-- | bootstrap/parse.c | 4 | ||||
| -rw-r--r-- | bootstrap/test2.cff | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c index 706bfb5..fd2d703 100644 --- a/bootstrap/parse.c +++ b/bootstrap/parse.c @@ -128,7 +128,7 @@ aishsep(char c) { switch (c) case '(': case ')': case '[': case ']': case '{': case '}': case '.': case ',': - case ';': case '"': case '\'': + case ';': case '"': return 1; return 0; } @@ -378,7 +378,7 @@ lex(struct parser *P) { tok.t = '#tag'; } else if (!strcmp(s, "#?")) { tok.t = '#?'; - } else if (!strncmp(s, "#:", 2)) { + } else if (!strncmp(s, "#'", 2)) { tok.t = TKlabel; tok.str = xstrdup(s); } else { diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index 83e12fe..0d5d086 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -48,13 +48,13 @@ extern fn main() void { let i = v.Int; ! v.#tag++; - #:outer for let i = 0; i++ < 10; { + #'outer for let i = 0; i++ < 10; { printf("%d\n", i); while #t { if i < 2 { - continue #:outer; + continue #'outer; } - break #:outer; + break #'outer; } } |