Skip to content

Commit 8725b27

Browse files
committed
fix(#246): added whitespace consumption after alter (fixes #246)
1 parent 7afaf09 commit 8725b27

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

parsley/shared/src/main/scala/parsley/token/Lexer.scala

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ private [token] abstract class Lexeme {
3232
def apply[A](p: Parsley[A]): Parsley[A]
3333
}
3434

35-
// TODO: flatten out `numeric` and `text` (and `enclosing` and `separators`) for 5.0.0? wouldn't do much damage,
36-
// we can use documentation tags to group them in the high-level docs again :)
35+
// TODO: grouping for numeric and text? we can use documentation tags to group them in the high-level docs again :)
3736
/** This class provides a large selection of functionality concerned
3837
* with lexing.
3938
*
@@ -763,7 +762,7 @@ final class Lexer(desc: descriptions.LexicalDesc, errConfig: errors.ErrorConfig)
763762
"Whitespace cannot be altered unless `spaceDesc.whitespaceIsContextDependent` is true"
764763
)
765764
}
766-
wsImpl.rollback(wsImpl.setDuring(whiteSpace(newSpace))(within))
765+
wsImpl.rollback(wsImpl.setDuring(whiteSpace(newSpace))(whiteSpace ~> within))
767766
}
768767

769768
/** This parser skips '''zero''' or more (insignificant) whitespace characters as well as comments.

0 commit comments

Comments
 (0)