moo icon indicating copy to clipboard operation
moo copied to clipboard

Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.

Results 35 moo issues
Sort by recently updated
recently updated
newest added

I did some looking and couldn't find a tool that generated syntax highlighting plugins for Emacs/Vim/TextMate/CodeMirror/Atom/your-favorite-editor-here. It would be neat if you could take an existing moo lexer, maybe add...

enhancement

Currently `Lexer.prototype.reset` and `Lexer.prototype.save` reference three `queued` fields: `queuedToken`, `queuedText` (added in #169) and `queuedThrow`. There only appear to be references to `queuedText` and `queuedGroup` elsewhere, so this MR removes...

I noticed the travis CI config no longer works, and thought I'd make an MR with a similar GitHub actions build which should just work out of the box. It's...

* Mark the final regex as `/i`, if every RegExp sets the `/i` flag, to solve . Note that this implicitly handles string literals; we might want to add a...

If i have the following token defined: ` ARITHMETIC: ['+' , '-'],` And all my regular expressions are using the `u` flag `moo` will output an an invalid regex escape...

bug
help wanted

I am converting my custom tokenizer to `moo` and ran into a problem case: ```js // a pattern that used to look like this: '(?\\$\\w*\\$)[\\s\\S]*?(?:\\k|$)' // as regex literal: /(?\$\w*\$)[\s\S]*?(?:\k|$)/...

I'm looking to generate a lexer and parser for a Lisp-like language. Generally this should be a pretty simple task, since Lisp is really easy to parse, but there's one...

Hi! First of all, I'd like to thank You for creating such fast lexer. I've been using it along with nearley.js in various projects. It really changed my way of...

question

Hi, this is more of a question than an issue about Moo, so here goes: I have the following lexer: ```javascript const lexer = moo.compile({ TERM: /[a-z]+/, PREFIXTERM: /\*|(?:[a-z]+\*)/, });...

question

In version 0.5.0, it appears that moo deprecated **method has** and it now always returns true. Since the Nearley parser uses [**method has**](https://nearley.js.org/docs/tokenizers#lexing-with-moo), the code it generates now always succeeds...