From f79b8a1ca5861ae6a7652301ed2b3faea4b0f0b4 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Wed, 8 Dec 2021 10:42:19 +0100 Subject: [PATCH] ENHANCED: support full layout text sequence (also comments) in integers with underscores Example: ?- X = 1_/**/2. %@ X = 12. Following the comment in https://github.com/mthom/scryer-prolog/pull/1112#issuecomment-981540485 --- crates/prolog_parser/src/lexer.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/prolog_parser/src/lexer.rs b/crates/prolog_parser/src/lexer.rs index 210722c6..8be50d36 100644 --- a/crates/prolog_parser/src/lexer.rs +++ b/crates/prolog_parser/src/lexer.rs @@ -564,11 +564,8 @@ impl<'a, R: Read> Lexer<'a, R> { if c == '_' { self.skip_char()?; + self.scan_for_layout()?; c = self.lookahead_char()?; - while layout_char!(c) { - self.skip_char()?; - c = self.lookahead_char()?; - } if decimal_digit_char!(c) { Ok(c) -- 2.54.0