Feature Request:
When pegjs produces an output .js
file, it is in common js format:
module.exports = {
SyntaxError: peg$SyntaxError,
parse: peg$parse
};
I want the output as an es module instead:
export { peg$parse as parse, peg$SyntaxError as SyntaxError };
I'm not sure, but from the PR description, this may have been resolved on the Peggy fork: https://github.com/peggyjs/peggy/pull/11
It looks like Peggy is gaining some momentum as an active replacement for pegjs.
Yes, it's resolved in Peggy. We're working toward a first release within days, I hope.
That's fantastic! Really nice to see this project coming back to life.
oh wow, that _is_ fantastic news. pegjs has one of the most pleasant syntaxes, so I'm really happy to see peggy breathe new life into it! Will head over there and start exploring. :)
We just did a pre-release version of peggy, 1.0.0-rc.0. Can a few of you try this out in your existing projects, please? We'll do a full release as soon as we have a few data points.
@hildjj I might try it, if it's suitable as a drop in replacement for PEGjs. Meaning if I don't have to change any of my grammars or actions, I'll give it a try
I've definitely been meaning to try this in my own project, just haven't gotten to it yet https://github.com/mreinstein/constraint-solver/issues/5
The intent is that you just s/pegjs/peggy/g
and nothing changes other than you get support. :)
An example, on one of my projects: https://github.com/hildjj/resolv-conf/commit/e175e131cee11410cd7e52c591e126039d4b9244
I'll try to find some time this afternoon to take it for a spin, I'm definitely keen/excited to try this, just overworked at the moment. :)
Well, as far as the online version goes, it all checks out, so consider me migrated
Same, I'm migragted to peggy!
Most helpful comment
Yes, it's resolved in Peggy. We're working toward a first release within days, I hope.