Open
Description
Delete Position { column :: Int, line :: Int }
and replace it with Int
representing the position index from the beginning of the input. For String
, the position index would be in units of CodePoints.
Delete the updatePosString
and updatePosSingle
functions.
purescript-parsing/src/Text/Parsing/Parser/String.purs
Lines 179 to 200 in dbd9aae
In updatePosString
there is an assumption that 1 tab = 8 spaces and there is no way for the library user to change that behavior. So I think updatePosString
has always been fundamentally broken.
We want to provide a way to track the line and column during the parse so that
- We can write indentation-sensitive parsers.
- We can report the line and column in a
ParseError
.
The Text.Parsing.Indent
module is used by some packages so we should try to keep it.
Metadata
Metadata
Assignees
Labels
No labels