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
This commit is contained in:
Markus Triska
2021-12-08 10:42:19 +01:00
parent 637daa5bda
commit f79b8a1ca5

View File

@@ -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)