From ef9311d79b829e59af10280b7eeef68942de1dfd Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 8 Aug 2022 09:21:18 +0200 Subject: change label syntax --- bootstrap/parse.c | 4 ++-- bootstrap/test2.cff | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'bootstrap') 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; } } -- cgit v1.2.3