]> ocean-lang.org Git - ocean/commitdiff
scanner: make sure parsing finishes properly when no final end-of-line.
authorNeilBrown <neil@brown.name>
Tue, 3 Jun 2014 11:16:58 +0000 (21:16 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 15 Jun 2014 05:40:03 +0000 (15:40 +1000)
If the last node doesn't end with an end-of-line, we still need
to produce all delayed tokens.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/scanner.mdc

index 37b336f2233c152b3cf398f385748cf647849c70..05df51d4be5f2b04e5b37b8859bbcc4b938e978c 100644 (file)
@@ -830,6 +830,11 @@ tokens will continue to return the same end-of-file token.
 
 ###### white space
        if (ch == WEOF) {
+               if (state->col) {
+                       state->col = 0;
+                       state->check_indent = 1;
+                       continue;
+               }
                tk.num = TK_eof;
                return tk;
        }