ricardo-valero / roc-parser

A simple Parser for Roc

Home Page:https://lukewilliamboswell.github.io/roc-parser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Parser for Roc

A simple Parser Combinator package for Roc.

color : Parser Utf8 [Red, Green, Blue]
color = 
    oneOf [
        const Red |> skip (string "red"), 
        const Green |> skip (string "green"),
        const Blue |> skip (string "blue"),
    ]

expect parseStr color "green" == Ok Green

Documentation

See lukewilliamboswell.github.io/roc-parser/

Locally generate docs using roc docs package/main.roc

Contributing

If you see anything that could be improved please create an Issue or Pull Request.

Tests

Run tests locally with roc test package/main.roc

Packaging

Bundle package into a URL for distribution using roc build --bundle .tar.br package/main.roc

About

A simple Parser for Roc

https://lukewilliamboswell.github.io/roc-parser/

License:Universal Permissive License v1.0


Languages

Language:Shell 100.0%