Skip to content

Literal newlines in strings and characters do not update position #3

Description

@dsheets

If you use something like string ":\n" in a parser, the line position is not updated if it matches.

In many cases, the string or character to consume is literal and so newline search can be done before the monad application while the parser is constructed. In the cases where the match is not literal, a string search is a small price to pay (imho) for correct position calculation.

Finally, is there a test suite for the library?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions