hayleigh-dot-dev / nibble

A string parsing library heavily inspired by elm/parser.
MIT License
51 stars 7 forks source link

Fix for Gleam 0.26 #3

Closed Nicd closed 1 year ago

Nicd commented 1 year ago

Honestly I don't know what the name should be, so feel free to suggest another name. Without this label, the project won't compile on 0.26.

hayleigh-dot-dev commented 1 year ago

Thank you! I think any label ending with _parser is a bit redundant given they're all parsers. How about something like ignoring/dropping/skipping/chomping/ eg:

pratt.expression(
  one_of: [...],
  and_then_one_of: [...],
  dropping: nibble.spaces()
)

I guess dropping in particular works because we already have nibble.drop.