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

Unexpected "\r" #522

Open
Freddson opened this issue Jul 1, 2020 · 1 comment
Open

Unexpected "\r" #522

Freddson opened this issue Jul 1, 2020 · 1 comment

Comments

@Freddson
Copy link

Freddson commented Jul 1, 2020

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.

@darthtrevino
Copy link

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

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

No branches or pull requests

2 participants