Releases: no-context/moo
Releases · no-context/moo
Content-Security-Policy, etc
Changes:
- Avoid fall through in the keyword transform, thanks to @lrowe in #164
- Replace the keyword transform with a Map, to avoid triggering
unsafe-eval
Content-Security-Policy warnings, thanks to @jsharkey13 in #173 - Fix a bug in
reset()
relating toqueuedText
, thanks to @hikerpig in #169 - Improve error reporting and add additional context lines, thanks to @airportyh in #129
Documentation tweaks:
- Correct states example to use
pop: 1
, thanks to @evanpurkhiser in #140 - Replace itt example with modern js example, thanks to @AlansCodeLog in #147
Full Changelog: v0.5.1...v0.5.2
Add Unicode support
Fallback, inheritance, keywords
Version 0.5.0
is now published to NPM.
Highlights:
- Add keywords function
- Add fallback tokens
- Add inheritance for stateful lexers
- Add optimization for single-character tokens
- Let
type
be a function - Fix: save and restore state stack
- Rename
name
->type
when specifying rules in an array - Deprecate
Lexer.has()
v0.4.1
Breaking changes:
- Keyword support is now explicit.
- Capture groups are no longer supported. Use
slice()
yourself, or use thevalue
transform. {pop: 1}
will now throw an error; use{pop: true}
.- The
size
property has been removed. Usetext.length
instead.