How to use the moo.error function in moo

To help you get started, we’ve selected a few moo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tracespace / tracespace / packages / parser / src / lexer / rules.ts View on Github external
match: /(?:[CFSBHZ][\d.]+)+/,
    value: text => {
      const diameterMatch = text.match(/C[\d.]+/)
      return diameterMatch ? diameterMatch[0] : ''
    },
  },
  [Tokens.COORD_CHAR]: /[XYZIJA]/,
  [Tokens.NUMBER]: /(?:[+-])?[\d.]+/,
  [Tokens.WORD]: /[a-zA-Z]+/,
  [Tokens.WHITESPACE]: /[ \t]+/,
  [Tokens.NEWLINE]: {
    match: /\r?\n/,
    lineBreaks: true,
  },
  [Tokens.CATCHALL]: /[\S]/,
  [Tokens.ERROR]: moo.error,
}

moo

Optimised tokenizer/lexer generator! 🐄 Much performance. Moo!

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

77 / 100
Full package analysis