- Remove more warnings on Elixir v1.18+
- Remove warnings on Elixir v1.18+
- Remove warnings and require Elixir v1.12
- Make error messages consistent across Elixir versions
- Ensure
integer(max: ...)also sets a minimum of 1 - Do not lose context on
repeat_while
- Deprecate returning a
{acc, context}fromquoted_post_traverseandquoted_pre_traverse. Return{rest, acc, context}instead.
- Avoid compile warnings with negative lookahead
- Fix clause warning for integer combinator
- Allow
:export_combinatorindefparsec
- Allow
restto be returned from post_traverse/pre_traverse
- Improve typespecs
- Add generator support to
NimbleParsec: it now generates code that matches a combinator
- Fix using
eventuallywith constructs that can accumulate - Fix lookahead combinators running in reverse order
- Raise on invalid
minfor integer
- Add
defcombinatorand support for remoteparsec. This allows larger parsers to be broken over multiple modules to speed up compilation by leveraging parallelism.
- Allow
byte_offsetto be given to:line
NimbleParsec v0.6.0 requires Elixir v1.6+.
- Avoid unused variable warnings
- Add
eventually/2combinator
- Optimize
repeatwith initiallookahead - Add
@spectoparsec/2
- Remove dialyzer warnings from emitted code
- Optimize lookahead with choice
- Support min: 0 on utf8_string/ascii_string
- Remove compiler warnings in code generated by
mix nimble_parsec.compile - Add
@specto combinators
- Introduce
pre_traverse/3 - Introduce
lookahead/2andlookahead_not/2which accepts combinators - Introduce
eos/1(end of string combinator)
- Deprecate
traverse/3in favor ofpost_traverse/3 repeat_until/3has been removed in favor ofrepeat/2withlookahead_not/2(seerepeat_while/3docs for an example)lookahead/2with a call has been removed as it can be easily achieved with apost_traverse/3
- Add
defcombinatorpand clarify the role ofdefparsecp
- Fix compilation error for certain combinations of ascii_string/utf8_string + traverse
- Respect the
labelconstruct when wrapping achoice
- Avoid exponential compilation time when line break is unknown
- Add
unwrap,tagandunwrap_and_tag - Add
nimble_parsec.compileto compile parsers without a NimbleParsec dependency
- Ensure multiple runtime traversals compose
- Do not duplicate entries in integer/ascii_string/utf8_string
- Support parser combinator contexts and return them in ok/error tuples
- Add
ascii_string/3andutf_string/3combinators - Add
lookahead/2combinator - Rename
literal/2tostring/2 - Add
line/2andbyte_offset/2combinators - The MFA given to
repeat_while/3now receives the accumulator, context, line, and byte_offset values and must return{:cont, context} | {:halt, context} - The MFA given to
quoted_repeat_while/3now receives the accumulator, context, line, and byte_offset values and must return{:cont, context} | {:halt, context} - The MFA given to
traverse/3now receives the rest, accumulator, context, line, and byte_offset values and must return{acc, context} | {:error, reason} - The MFA given to
quoted_traverse/3now receives the ASTs for the rest, accumulator, context, line, and byte_offset and must return{acc, context} | {:error, reason} - Instead of
lineas a positive integer, we now track{line, line_offset}wherelineis the same as before andline_offsetis the byte offset after the new line - Instead of
columnas a positive integer, we now trackbyte_offsetas a non-negative integer
- First release.