Skip to content

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

@dsheets

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?

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