Skip to content

v0.5.4

Compare
Choose a tag to compare
@alllex alllex released this 03 Aug 06:47
· 53 commits to main since this release
761cf01

New

  • New parseOrElse and parseOrNull shorthand functions for Grammar
  • Case-insensitive parsing of literal and regex tokens with ignoreCase=true parameter
  • Case-insensitive grammars with Grammar<T>(ignoreCase = true) (makes all literal and regex tokens case-insensitive)
  • Parsing with non-root parser is now possible with g.parse(g.someParser, text) for easier testing and debugging
  • High level and combinator to type-safely parse sequences of parses up to Tuple7
  • New maybe alias for optional

Breaking

  • parser1 and parser2 now returns Parser<Tuple2<T1, T2>> instead of Parser<Pair<T1, T2>>

Deprecations

  • Parsing functions that start with parseEntire* are deprecated in favor of shorter parse* functions.
  • Unary operators on the ParsingContext are deprecated, because they have a different semantics for the same types compared to Grammar scope. Explicit functions like skip or has should be used instead.