arowM/elm-parser-test/1.0.0

NOTE: the latest version is 1.1.0

Parser.Test

Helper functions to develop/test your own parser using elm/parser.

Core

run : Parser a -> String -> ( Result (List DeadEnd) a, Bool )

Check if a parser is backtrackable or not.

run (keyword "import") "imp"
--> (Err _, True)


run (keyword "import") "import"
--> (Ok (), False)


run spaces "  "
--> (Ok (), False)


run (backtrackable spaces) "  "
--> (Ok (), True)