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

Perhaps the silliest parse error in encore? #402

Closed
TheGrandmother opened this issue May 1, 2016 · 3 comments
Closed

Perhaps the silliest parse error in encore? #402

TheGrandmother opened this issue May 1, 2016 · 3 comments

Comments

@TheGrandmother
Copy link
Contributor

TheGrandmother commented May 1, 2016

Writing this:

for x in [420 .. this.lol]

Will work.
But:

for x in [this.lol .. 420]

Will cause a parse error since encore didn't expect that first .

@supercooldave
Copy link

Should be pretty easy to fix. Dive in!

@EliasC
Copy link
Contributor

EliasC commented May 2, 2016

Actually, this time I can understand why the parser is confused! It reads this . lol, so obviously it's parsing a path, so the next dot is also part of it, but then when it's expecting an identifier there's another dot! "Obviously there's something wrong" thinks the parser, and is unaware that the one who is wrong is the parser itself...

Try making .. a reservedOp in the parser!

@TheGrandmother
Copy link
Contributor Author

TheGrandmother commented May 2, 2016

@EliasC

and is unaware that the one who is wrong is the parser itself...

I fear the day when the Encore parser becomes self-aware.

tried making .. a reservedOp but that didn't fix it.
I didn't have much time to look into it last night but I'll examine it further when I get to school.

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

4 participants