From 3ff33c4eecc9cce64827d52172c85123faac8b1c Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 19 Feb 2018 17:47:00 +1100 Subject: [PATCH] scanner: capture the tail of a string. A string can have a tail, "hello"xy where the "xy" might one day have a meaning (utf8? utf16??). We should capture that. Signed-off-by: NeilBrown --- csrc/scanner.mdc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csrc/scanner.mdc b/csrc/scanner.mdc index a5eeb1f..0d7a62d 100644 --- a/csrc/scanner.mdc +++ b/csrc/scanner.mdc @@ -520,6 +520,10 @@ If `TK_string` is ignored, then quote characters will appear as `TK_mark`s. break; } } + while (!at_eon(state) && (ch = get_char(state)) && + iswalpha(ch)) + ; + unget_char(state); close_token(state, &tk); return tk; } -- 2.43.0