- 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_traverse
andquoted_pre_traverse
. Return{rest, acc, context}
instead.
- Avoid compile warnings with negative lookahead
- Fix clause warning for integer combinator
- Allow
:export_combinator
indefparsec
- Allow
rest
to be returned from post_traverse/pre_traverse
- Improve typespecs
- Add generator support to
NimbleParsec
: it now generates code that matches a combinator
- Fix using
eventually
with constructs that can accumulate - Fix lookahead combinators running in reverse order
- Raise on invalid
min
for integer
- Add
defcombinator
and support for remoteparsec
. This allows larger parsers to be broken over multiple modules to speed up compilation by leveraging parallelism.
- Allow
byte_offset
to be given to:line
NimbleParsec v0.6.0 requires Elixir v1.6+.
- Avoid unused variable warnings
- Add
eventually/2
combinator
- Optimize
repeat
with initiallookahead
- Add
@spec
toparsec/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
@spec
to combinators
- Introduce
pre_traverse/3
- Introduce
lookahead/2
andlookahead_not/2
which accepts combinators - Introduce
eos/1
(end of string combinator)
- Deprecate
traverse/3
in favor ofpost_traverse/3
repeat_until/3
has been removed in favor ofrepeat/2
withlookahead_not/2
(seerepeat_while/3
docs for an example)lookahead/2
with a call has been removed as it can be easily achieved with apost_traverse/3
- Add
defcombinatorp
and clarify the role ofdefparsecp
- Fix compilation error for certain combinations of ascii_string/utf8_string + traverse
- Respect the
label
construct when wrapping achoice
- Avoid exponential compilation time when line break is unknown
- Add
unwrap
,tag
andunwrap_and_tag
- Add
nimble_parsec.compile
to 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/3
andutf_string/3
combinators - Add
lookahead/2
combinator - Rename
literal/2
tostring/2
- Add
line/2
andbyte_offset/2
combinators - The MFA given to
repeat_while/3
now receives the accumulator, context, line, and byte_offset values and must return{:cont, context} | {:halt, context}
- The MFA given to
quoted_repeat_while/3
now receives the accumulator, context, line, and byte_offset values and must return{:cont, context} | {:halt, context}
- The MFA given to
traverse/3
now receives the rest, accumulator, context, line, and byte_offset values and must return{acc, context} | {:error, reason}
- The MFA given to
quoted_traverse/3
now receives the ASTs for the rest, accumulator, context, line, and byte_offset and must return{acc, context} | {:error, reason}
- Instead of
line
as a positive integer, we now track{line, line_offset}
whereline
is the same as before andline_offset
is the byte offset after the new line - Instead of
column
as a positive integer, we now trackbyte_offset
as a non-negative integer
- First release.