From 699b1a9f70dca7b86373ec5b11597beb1ea4da68 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 3 Jun 2014 21:16:58 +1000 Subject: [PATCH] scanner: make sure parsing finishes properly when no final end-of-line. If the last node doesn't end with an end-of-line, we still need to produce all delayed tokens. Signed-off-by: NeilBrown --- csrc/scanner.mdc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/csrc/scanner.mdc b/csrc/scanner.mdc index 37b336f..05df51d 100644 --- a/csrc/scanner.mdc +++ b/csrc/scanner.mdc @@ -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; } -- 2.43.0