diff --git a/scan.c b/scan.c index 0e6e7b1..70a4e94 100644 --- a/scan.c +++ b/scan.c @@ -280,8 +280,9 @@ scankind(struct scanner *s, struct location *loc) switch (s->chr) { case ' ': case '\t': - case '\f': case '\v': + case '\f': + case '\r': s->sawspace = true; nextchar(s); goto again; diff --git a/test/crnl.c b/test/crnl.c new file mode 100644 index 0000000..79de557 --- /dev/null +++ b/test/crnl.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test/crnl.qbe b/test/crnl.qbe new file mode 100644 index 0000000..40d18e9 --- /dev/null +++ b/test/crnl.qbe @@ -0,0 +1,6 @@ +export +function w $main() { +@start.1 +@body.2 + ret 0 +}