- Change: Rename parser.text() to parser.span()
- Change: Rename T.str() to T.token()
- Change: Rename T.char to T.any
- Feature: Add Token Parsers API, an alternative Parser API.
- Change: child parsers has removed.
- Change api: T.cond(predicate) -> T.where(condition, parser)
- Improve types of T.language() API.
- Improve package build.
- Change: params of T.Parser constructor
- Add: T.parser() API
- Change: parser.many() API
- Change: T.sep() has removed
Migration guideconst parser1 = T.sep(item, separator, min); // replace T.sep() to the some combinators. const parser2 = seq([ item, seq([ separator, item, ], 1).many(min - 1), ]).map(result => [result[0], ...result[1]]);
- Change: T.createLanguage() has renamed to T.language()
- Dual package support (ES Modules and CommonJS)
- The module system was migrated to ES Module.
- Lazy parser implementation was changed.
- Supported child parsers.
- Change: Parser constructor
- Change: parameter of parser handlers
- Added APIs:
- parser.exec()
- parser.find()
- parser.findAll()
- parser.state()
- (#12) Inference of type in parser.map() fails caused by T.alt not returning a Parser type.
- Add api: parser.many(min, terminator)
- Add api: T.sof
- Improves rules validation for T.createLanguage()
- Change api: T.regexp(RegExp) -> T.str(RegExp)
- When all input strings could not be consumed, an error is now generated.
- Now returns index value on match failure.
- Improves type inference
- T.seq (#8 by @ThinaticSystem)
- T.alt
- Improves type declaration
- T.regexp
- T.sep
- T.notMatch
- Add api: T.eof
- Add api: T.cond
- Add api: T.succeeded
- Add api: parser.parse
- Add api: T.match
- Add api: T.lazy
- Change api: parser.sep(separator, min) -> T.sep(item, separator, min)
- Add api: newline
- Change api: parser.sep1(separator) -> parser.sep(separator, min)
- Change api: T.option(parser) -> parser.option()
- Rename api: parser.atLeast(n) -> parser.many(min)
- Rename api: T.any -> T.char
Initial release.