- Full ESM support
- Strong typescript support
- moveUntil don't join values by default
- parser.join(sep) is supported, only for TupleParser
- thenLeft and thenRight are not supported in typescript, too many combinations
Plus plenty of other things I dont have time to write now :/
Minor change on ts and bug fix
- Any then() and thenXYZ() function call will return a
Tuple. This tuple hassingle()andarray()methods to get value.Parser.drop(),F.nop()methods will produce a Neutral element for that Tuple : it will be ignored. - Therefore
thenReturns()is renamedreturns(). rep()andoptrep()will also produce a Tuple- combination of
rep()andthen()will produce one unique Tuple - you can break apart this tuple using
Parser.array()at any point if needed
- combination of
GenLexhas been totally refactored and simplified for high level parsers on tokens.- Typescript interface is operational and
masala-parser.d.tsdocumentation will generate Masala Parser reference. N.digit()andN.digits()return a number, not a string- Markdown bundled is removed from the lib, and put as example in typescript integration
Less important :
-
F.layer()along withParser.and()produces an array of results when all parsers are satisfied.- it makes backtracking like
F.try()withParser.or() - warning: it's still experimental for side cases
- it makes backtracking like
-
Bug correction on offset for high level parsers.
- Random Access in
ParserStreamwill result in unpredicted value. Don't do it.
- Random Access in
-
response.isConsumed()is replaced byresponse.isEos()0.6 -> 0.7: Typescript support
This release has been focused on typescript support.
- Export is a bit better handled; no more doublon
- Exporting
Parserinstead ofparser ExtractorBundleandTokenBundleare pruned (#96)
Every parser in CharBundle, FlowBundle and NumberBundle need to be called as a function
//Previously
const p = C.letter.then(N.integer).then(F.eos);
// Now:
const p = C.letter().then(N.integer()).then(F.eos());
It's less funky, but it avoids construction of Parsers at import statement, before writing the first line code.
F.startWith(value): Creates a Parser with a defined valueF.sequence()is pruned
Automated types are enabled with a partial declaration file. Basically, all functions of Parser, CharBundle, NumberBundle and FlowBundle are supported, but Genlex is not yet. 0.8 release will be focused on Genlex.
- Added
response.isCompleted()
flatmap()renamed toflatMap()
F.lazy(parser, params, self )accepts a thirdthisparameterF.sequence()is deprecated
Added to the FlowBundle
F.startsWith(value)F.moveUntil(string|stopParser)F.dropTo(string|stopParser)