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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user