]> ocean-lang.org Git - ocean/blobdiff - csrc/scanner.mdc
scanner: make sure parsing finishes properly when no final end-of-line.
[ocean] / 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;
        }