Joe Hildebrand
Joe Hildebrand
The code in `peg$SyntaxError` is pretty touchy. It needs to work in old versions of JS as well. It's just this conceptually: ```js class peg$SyntaxError extends Error { constructor(message, expected,...
I'm open to this, but I think I'd also like to do the code-generation refactor first (see #44), because the current state of play in `generate-js.js` is scary, from an...
Mingun's answer is good for today, but there's no reason why can't generate WASM directly from peggy one day. It could be done as a plugin to keep the runtime...
I was thinking the plugin could generate WASM directly, then either call back into JS for the actions, or use something like AssemblyScript to compile the actions themselves.
For generation, something like [binaryen.js](https://github.com/AssemblyScript/binaryen.js) probably gets us there with only a lot of work involved.
Can you check to see if this makes things any better? ```pegjs segment = _ segment:([a-zA-Z0-9+_][a-zA-Z0-9-+_]*) _ { return new matchers.SegmentMatcher(segment); } ``` (just removes the `+` from the first...
Leaving this open as the feature request for WASM support.
OK, we're ready to take this on peggy, if you send us a [PR](https://github.com/peggyjs/peggy/pulls) there.
Writing down my notes here as I research this. If anyone has a path forward to recommend, or is willing to send a PR, we can prioritize the work to...