aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-09 19:00:00 +0200
committerlemon <lsof@mailbox.org>2022-08-09 19:00:00 +0200
commit67c857650c3c8fce4960d7a60443544189b0ac4a (patch)
treefcfcfd96cd1254a4404a2011a258c21c0d9eb9f8 /bootstrap
parentd0fc961eeb2cf69b50edc83aae90fcebc3a0677f (diff)
change comment syntax
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/obj1/parse.cff.obin3864 -> 1256 bytes
-rw-r--r--bootstrap/obj1/util.cff.obin0 -> 1256 bytes
-rw-r--r--bootstrap/parse.c13
-rw-r--r--bootstrap/test.cff4
-rw-r--r--bootstrap/test2.cff4
5 files changed, 11 insertions, 10 deletions
diff --git a/bootstrap/obj1/parse.cff.o b/bootstrap/obj1/parse.cff.o
index 87687b9..146ac8f 100644
--- a/bootstrap/obj1/parse.cff.o
+++ b/bootstrap/obj1/parse.cff.o
Binary files differ
diff --git a/bootstrap/obj1/util.cff.o b/bootstrap/obj1/util.cff.o
new file mode 100644
index 0000000..146ac8f
--- /dev/null
+++ b/bootstrap/obj1/util.cff.o
Binary files differ
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);