Closed darlanalves closed 8 months ago
The code in peg$SyntaxError
is pretty touchy. It needs to work in old versions of JS as well. It's just this conceptually:
class peg$SyntaxError extends Error {
constructor(message, expected, found, location) {
super(message)
this.expected = expected
...
}
}
See https://stackoverflow.com/questions/41102060/typescript-extending-error-class for some more hints. If you come up with a good fix, we'd very much appreciate it.
@darlanalves are you still having this issue?
Having not heard back, I think this problem has resolved itself. Please re-open if it still exists.
Hi! FOA thanks for reviving peg.js. I'm using for a hobby language and is great!
I recently switched to peggy and I'm writing a transpiler in Typescript that uses the output of Peggy parser. Now the problem is: the generated parser code causes this TS error:
I can help fixing it but I don't want to break anything. Any suggestions?
Some details: I'm using
commonjs
as format. This happens if I try to usees
as the output format.