Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pegs module compatible with javascript backend #4247

Closed
nigredo-tori opened this issue Jun 1, 2016 · 1 comment · Fixed by #14095
Closed

Make pegs module compatible with javascript backend #4247

nigredo-tori opened this issue Jun 1, 2016 · 1 comment · Fixed by #14095

Comments

@nigredo-tori
Copy link
Contributor

It would be nice to have a regex-like library working consistently across targets. Pegs seems to be the best candidate, since it is pure.

Right now there are two problems I see:

  1. transformFile uses readFile, which is missing in JS. Easily solved by wrapping the whole proc in when.
  2. After that the module compiles, but fails for even the most basic cases. E.g. this throws an exception:
import pegs

assert "x".match(peg"x")
@timotheecour
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants