- Fixes a crash in MS Edge 15-18 when using
Parsimmon.regexp
(thanks @ekilah)
- Adds support for the
s
(dotAll
) flag inParsimmon.regexp
- Improves peformance of
parser.mark
,parser.node
, andParsimmon.index
- Improves performance of
many
andtimes
- Adds
parser.assert(condition, message)
- Adds links within documentation
- Fixes standalone browser version to not crash on load because Buffer is not defined
- Adds
Parsimmon.Binary.buffer(length)
- Adds
Parsimmon.Binary.encodedString(encoding, length)
- Adds
Parsimmon.Binary.uintBE(length)
- Adds
Parsimmon.Binary.intBE(length)
- Adds
Parsimmon.Binary.uintLE(length)
- Adds
Parsimmon.Binary.intLE(length)
- Adds
Parsimmon.Binary.uint8
- Adds
Parsimmon.Binary.int8
- Adds
Parsimmon.Binary.uint16BE
- Adds
Parsimmon.Binary.uint16LE
- Adds
Parsimmon.Binary.int16LE
- Adds
Parsimmon.Binary.int16BE
- Adds
Parsimmon.Binary.uint32BE
- Adds
Parsimmon.Binary.uint32LE
- Adds
Parsimmon.Binary.int32LE
- Adds
Parsimmon.Binary.int32BE
- Adds
Parsimmon.Binary.floatBE
- Adds
Parsimmon.Binary.floatLE
- Adds
Parsimmon.Binary.doubleBE
- Adds
Parsimmon.Binary.doubleLE
- Fixes a bug where the error indicator (
^^
) was misaligned on the fifth byte in a given visual line for a binary parse error message
- Drastically improves error message formatting for
.tryParse
and.formatError
by showing a full preview of the input with surrounding context, pointing directly at the error (works for both string and Buffer parsers)
- Adds
parser.contramap(fn)
andparser.promap(fn)
- Adds
parser.desc(array)
signature andParsimmon.makeFailure(index, array)
signature to support starting with an array of expectations
- Adds
parser.tieWith(separator)
, a generalized version ofparser.tie()
- Shrinks UMD build from ~33 kb to ~11 kb
- Fixes a bug where
seqObj
andbitSeqObj
wouldn't work with keys that were already part ofObject.prototype
- Fixes a bug where
bitSeq
consumed the wrong input
- Adds support for binary parsing using Node.js Buffers
- Adds
Parsimmon.Binary.bitSeq
- Adds
Parsimmon.Binary.bitSeqObj
- Adds
Parsimmon.Binary.byte
- Fixes
parser.many()
to throw an error if it detects an infinite parse loop.
- Unpublished due to a Travis CI build issues.
- Fixes another bug with match groups outside the correct range in
Parsimmon.regexp(regexp, group)
.
- 100% unit test coverage! This does not mean bugs won't exist, but it keeps us much safer against regressions in the future.
- BUGFIX:
Parsimmon.regexp(regexp, group)
will now correctly fail to parse if thegroup
number is out of range for theregexp
number of groups. This worked correctly in the past, but was broken during a minor code clean up due to missing tests.
- Adds
Parsimmon.seqObj(...args)
NOTE: Code was completed on 2017-06-17, but due to human error, was not published on npm until 2017-06-26.
- Adds
parser.sepBy(separator)
alias forParsimmon.sepBy(parser, separator)
- Adds
parser.sepBy1(separator)
alias forParsimmon.sepBy1(parser, separator)
- Adds
Parsimmon.range(begin, end)
- Adds
parser.wrap(before, after)
- Adds
parser.trim(anotherParser)
- Adds
parser.tie()
- Adds
Parsimmon.createLanguage(parsers)
- Adds
parser.thru(wrapper)
- Adds
parser.node(name)
- Adds
Parsimmon.notFollowedBy(parser)
- Adds
parser.notFollowedBy(anotherParser)
- Adds
Parsimmon.lookahead(parser)
- Adds
parser.lookahead(anotherParser)
- Adds
Parsimmon.lookahead(string)
- Adds
Parsimmon.lookahead(regexp)
- Adds
parser.lookahead(string)
- Adds
parser.lookahead(regexp)
- BREAKING:
parser.empty
is now a function (parser.empty()
). - BREAKING:
f.ap(x)
is nowx.ap(f)
. - Adds
parser.tryParse(str)
which either returns the parsed value or throws an exception. - Adds support for
fantasy-land/*
prefixed versions of methods. Parsimmon.empty()
is a copy ofparser.empty()
.- Adds
.desc
descriptions fordigits
,letters
,optWhitespace
. - Adds
Parsimmon.isParser
. - Adds
parser.fallback(value)
. - Parsimmon now only has one namespace.
Parsimmon.Parser
is equal toParsimmon
itself for backwards compatibility purposes. - Exposes
Parsimmon.makeSuccess
andParsimmon.makeFailure
. - Documentation for
Parsimmon.formatError
,Parsimmon.parse
,Parsimmon.Parser
,Parsimmon.makeSuccess
,Parsimmon.makeFailure
,Parsimmon.isParser
,parser.fallback
.
- Adds
browser
field topackage.json
so unpkg serves the correct file. - Documentation overhaul in
README.md
. - Examples overhaul.
- BREAKING:
P.seqMap
now throws when passed zero arguments, or when the final argument is not a function. P.regex
is now an alias forP.regexp
.
- BREAKING:
P.regex
throws on regexps with flags other thanimu
now.
- Optimizes internal set union function, which should result in slightly faster parsing
- The
.expected
array on parse results is now unique and sorted - Updated Mocha and Chai versions
- Updated README a bit (mostly line wrapping stuff)
- No API changes
- Switches to npm-based task running
- Switches to UMD-based code
- Documentation updates
- Adds line/column information to
P.index
and.mark()
- Adds additional type assertions
This release may have been unpublished or something, I'm not exactly sure.
- add a second optional argument to
regex()
indicating group selection - eliminates pjs dependency
- add seqMap, oneOf, and noneOf
- Added .custom, .test, and .takeWhile for folks who don't like to use regexes.
- Added
.desc()
for custom parse error messages
- BREAKING: deprecated use of
.then(function(result) { ... })
. Usechain
instead. - BREAKING: errors are no longer thrown on invalid parses. Instead,
.parse(str)
returns an object with astatus
tag, indicating whether the parse was successful.
- never throw strings, always throw error objects
- add the MIT license
- add browser files to the npm package
- started updating the changelog again :x
- BREAKING:
seq
andalt
now take varargs instead of a single list argument.
- Uses less stack space with a non-cps implementation
- Added
Parsimmon.index
andParser::mark()
- fantasyland compatibility
- Better error messages: use the message from the furthest backtrack.
- Fix a "build directory nonexistent" bug :\
- Started a CHANGELOG
- Specify pjs 3.x
- added "use strict"
- Stopped trying to subclass Error (was silencing all parse errors :\ )
(Note: v0.0.3 is completely b0rken, and was unpublished from npm)