-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Position to Int #162
Comments
https://hackage.haskell.org/package/indents-0.3.3/docs/Text-Parsec-Indent.html but the author of the indents library seems to have changed their mind and later versions are quite different https://hackage.haskell.org/package/indents-0.5.0.1/docs/Text-Parsec-Indent-Explicit.html |
Reporting the line and column in a I like the idea of an indentation-sensitive parser which is expressed as a transformer of https://hackage.haskell.org/package/indents-0.5.0.1/docs/Text-Parsec-Indent.html So we have something like an In the event of a parsing failure, the |
How can we get the indentation level out of I really don’t want to paramaterize
For starters I think we should change the definition of |
Delete
Position { column :: Int, line :: Int }
and replace it withInt
representing the position index from the beginning of the input. ForString
, the position index would be in units of CodePoints.Delete the
updatePosString
andupdatePosSingle
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 thinkupdatePosString
has always been fundamentally broken.We want to provide a way to track the line and column during the parse so that
ParseError
.The
Text.Parsing.Indent
module is used by some packages so we should try to keep it.The text was updated successfully, but these errors were encountered: