Open Freddson opened 4 years ago
I'm making a nearley parser, and when I try to do a basic var + math with it, like n=1 + 1 in code, it shows this error:
n=1 + 1
`An error has occured while parsing! Syntax error at line 1 col 8:
n=1 + 1 ^ Unexpected "\r". Instead, I was expecting to see one of the following:`
The code is: https://pastebin.com/D3NzWhLc
If someone would help me, i'd be really grateful.
FYI; I ran into this issue in my Jest tests, and I was able to resolve it by creating a new parser instance for each test. It looks like the parser is stateful and you have to create a new one every time
I'm making a nearley parser, and when I try to do a basic var + math with it, like
n=1 + 1
in code, it shows this error:`An error has occured while parsing! Syntax error at line 1 col 8:
n=1 + 1 ^ Unexpected "\r". Instead, I was expecting to see one of the following:`
The code is: https://pastebin.com/D3NzWhLc
If someone would help me, i'd be really grateful.