diff options
Diffstat (limited to 'bootstrap')
| -rw-r--r-- | bootstrap/obj1/parse.cff.o | bin | 3864 -> 1256 bytes | |||
| -rw-r--r-- | bootstrap/obj1/util.cff.o | bin | 0 -> 1256 bytes | |||
| -rw-r--r-- | bootstrap/parse.c | 13 | ||||
| -rw-r--r-- | bootstrap/test.cff | 4 | ||||
| -rw-r--r-- | bootstrap/test2.cff | 4 |
5 files changed, 11 insertions, 10 deletions
diff --git a/bootstrap/obj1/parse.cff.o b/bootstrap/obj1/parse.cff.o Binary files differindex 87687b9..146ac8f 100644 --- a/bootstrap/obj1/parse.cff.o +++ b/bootstrap/obj1/parse.cff.o diff --git a/bootstrap/obj1/util.cff.o b/bootstrap/obj1/util.cff.o Binary files differnew file mode 100644 index 0000000..146ac8f --- /dev/null +++ b/bootstrap/obj1/util.cff.o diff --git a/bootstrap/parse.c b/bootstrap/parse.c index 180ddea..b1c0371 100644 --- a/bootstrap/parse.c +++ b/bootstrap/parse.c @@ -98,12 +98,8 @@ eatspaces(struct parser *P) { for (;; chr(P)) { if (aisspace(chrpeek(P))) continue; - else if (chrpeek(P) == '!') { - while (chrpeek(P) != '\n' && chrpeek(P) != 0) - chr(P); - } else { + else break; - } } } @@ -437,7 +433,12 @@ lex(struct parser *P) { else tok.t = '*'; return tok; case '/': - if (chrmatch(P, '=')) tok.t = '/='; + if (chrmatch(P, '=')) tok.t = '/='; + else if (chrmatch(P, '/')) { + while ((c = chr(P)) != 0 && c != '\n') + ; + return lex(P); + } else tok.t = '/'; return tok; case '%': diff --git a/bootstrap/test.cff b/bootstrap/test.cff index 14d489e..d835b7e 100644 --- a/bootstrap/test.cff +++ b/bootstrap/test.cff @@ -99,8 +99,8 @@ extern fn main (argc int, argv **u8) int { slice.#len; let const v Vec2f = {}; - ! v->zero(); - ! v.x += 1; + // v->zero(); + // v.x += 1; printf("sizeof(is) = %zu\n", sizeof(is)); printf("sizeof *void = %zu\n", sizeof *void); diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index 979d251..ddeec15 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -13,7 +13,7 @@ def X = 7 + 2; struct Bit<T> { def Z = 3; fn foo(x T) T { return (~x ^ Z) + X; } - !fn foo(x T) T { return ~x + Y; } + // fn foo(x T) T { return ~x + Y; } } defmacro def2(x, v) [static x = (v)] @@ -48,7 +48,7 @@ extern fn main() void { } let t = v.#tag; let i = v.Int; - ! v.#tag++; + // v.#tag++; #'outer for let i = 0; i++ < 10; { printf("%d\n", i); |