no-context / moo

Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.
BSD 3-Clause "New" or "Revised" License
817 stars 65 forks source link

Fast doesn't work with fallback #106

Closed nathan closed 5 years ago

nathan commented 5 years ago

Oops.

const lexer = moo.compile({
  fast: '.',
  text: moo.fallback,
})
lexer.reset('foo.bar')
console.log([...lexer])
tjvr commented 5 years ago

Fixed: we'll disable fast if there is a fallback token. I don't think we can do anything else.