Skip to content

Releases: typelevel/cats-parse

cats-parse 0.3.1

18 Feb 08:30
v0.3.1
42bb1ee
Compare
Choose a tag to compare

Released for Scala 3.0.0-RC1.

What's changed

Contributors to this release

@johnynek, @larsrh, @regadas and @scala-steward

Parser1 is dead, long live Parser0

11 Jan 23:11
9e40cb6
Compare
Choose a tag to compare

What's changed

There are three main changes:

  1. Parser1 becomes Parser, and Parser becomes Parser0. #116 by @martijnhoekstra
  2. We have methods to repeat up to a maximum number of times. #132 by @martijnhoekstra
  3. A trie-based parser for matching the longest string (Parser.stringIn): #110 by @satabin

This release is a significant change. In prior versions, Parser was a parser that could consume 0 or more characters and Parser1 consumed at least one. In practice we have found that almost always you want to work with a parser that does consume, so in this release we have switched: Parser consumes at least 1 character, and Parser0 consumes 0 or more. There are scala fix rules: https://github.com/martijnhoekstra/catsparsescalafix/ which @scala-steward knows about. They should get you almost all the way, if not 100% correct.

We wanted to make this change before the library was too widely adopted but we intend to put a significant premium going forward on source and binary compatibility. Please accept our apologies if this creates extra work for you.

In addition to the Parser0 change, we also allow repeating a parser a maximum number of times when doing a repetition. This is not commonly used, so most users won't need it. In addition, all the repetition methods are accessible as methods on Parser. Previously, some variants only existed on the companion. They all start with rep which should allow users of IDEs to find them more easily.

Lastly, there is a new parser: stringIn which matches the longest string from a collection of strings. This uses a trie internally, so it can be much faster when you have many strings you could when compared to using string with oneOf.

Huge thanks to @martijnhoekstra, @regadas, @satabin and @johnynek for contributions to this release.

new features and code improvements

dependency updates

Contributors to this release

@johnynek, @martijnhoekstra, @regadas, @satabin and @scala-steward

Selective Functor Edition

10 Dec 22:11
437af75
Compare
Choose a tag to compare

What's changed

This release adds a number of new parsers, including semver #78 and rfc5234 #66. There is a new class to compute line and column numbers and select specific lines from an input in order to show users where a parser went wrong #103. And a few new APIs including select, filter, between, and surroundedBy (see #101 #108 #79)

New features

Fixes

Version bumps

Contributors to this release

@johnynek, @mpilquist, @oguzhanunlu, @regadas, @rossabaker and @scala-steward

Now with ignoreCase Parsers!

12 Nov 18:22
0bc2f47
Compare
Choose a tag to compare

This is the second release of cats-parse. There were no bug fixes (nor any known bugs), but there are two new features and a number of new tests and laws added. The test coverage is now about 96%

New features:

  1. ignoreCase parsers: These are useful for parsing strings or characters while ignoring the case. For instance, parsing SQL can make use of these. See #50, #47, #46. Thanks for this work by @stephenjudkins !
  2. custom failure messages: In addition to Parser.fail there is now Parser.failWith(str: String) which allows you to set an error message which can be helpful for reporting clearer errors and debugging parsers. See #47, work by @johnynek

What's changed

Contributors to this release

@johnynek, @non, @regadas, @scala-steward, @stephenjudkins and @zmccoy

Initial Release

03 Nov 19:43
17965a4
Compare
Choose a tag to compare

What's changed

🏗️ Build Improvements

Contributors to this release

@Slakah, @johnynek, @mpilquist, @non, @rossabaker and @zmccoy