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

Bad error message when block is enclosed in parenthesis #305

Open
apblack opened this issue Sep 27, 2019 · 0 comments
Open

Bad error message when block is enclosed in parenthesis #305

apblack opened this issue Sep 27, 2019 · 0 comments

Comments

@apblack
Copy link
Contributor

apblack commented Sep 27, 2019

I accidentally used parenthesis instead of braces to enclose a block that has an argument. I get this message

ast.grace[4005:25-30]: Syntax error: an argument list beginning with a '(' must end with a ')'.
4004:     method newVisitImplicit(aNode) -> Done {
4005:         aNode.childrenDo(each -> each.newAccept(self))
------------------------------^^^^^^

The message is not much help because there is indeed a closing ). I believe that the parser sees the ->, notices that it's not a comma or a closing paren, and complains. This case is probably worth a custom error message.

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

No branches or pull requests

1 participant