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

parsing errors: expected identifier, got ast.ExpressionList #54

Open
mpictor opened this issue Dec 8, 2018 · 1 comment
Open

parsing errors: expected identifier, got ast.ExpressionList #54

mpictor opened this issue Dec 8, 2018 · 1 comment

Comments

@mpictor
Copy link

mpictor commented Dec 8, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10.3 linux/amd64

What operating system and processor architecture are you using (go env)?

linux / amd64

What version of GoRuby are you using (git show -s --format=%H or goruby -version)?

ee5b727 (which is HEAD)

What did you do?

I want goruby to produce an AST I can walk, but it's encountering errors with files rake accepts.

go run main.go -e "d w{}.o, w{}.o"

What did you expect to see?

If it parsed, I'd expect complaints of undefined variables or methods, such as

undefined local variable or method `p' for main:Object

What did you see instead?

syntax error, Parsing errors:
        could not parse call expression: expected identifier, got token 'ast.ExpressionList'
        1:12: no prefix parse function for type . found

exit status 1

When I hit the error in issue #53, I didn't see an easy fix, so I started pre-processing the ruby to remove newlines following commas. That led me to this error.

@mitch000001
Copy link
Member

Hey @mpictor, no surprise here. The AST/Parser is not yet done. There are still a lot of missing cases. I am sure it's the same reason for #53.

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