From f85f0d66f96ea89a6ca616ef7499460f206678d6 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Wed, 11 Aug 2010 09:04:50 +0000 Subject: [PATCH] Fixed unquoted string tokens not spanning embedded comments. --- src/serialization/tokenizer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/serialization/tokenizer.cpp b/src/serialization/tokenizer.cpp index 3c7af5c5778..432610109df 100644 --- a/src/serialization/tokenizer.cpp +++ b/src/serialization/tokenizer.cpp @@ -116,7 +116,7 @@ const token &tokenizer::next_token() if (peek_char() != '"') break; next_char_fast(); } - if (current_ == 254 ) { + if (current_ == 254) { skip_comment(); --lineno_; continue; @@ -144,6 +144,10 @@ const token &tokenizer::next_token() do { token_.value += current_; next_char_fast(); + while (current_ == 254) { + skip_comment(); + next_char_fast(); + } } while (is_alnum(current_)); } else { token_.type = token::MISC;