-
Notifications
You must be signed in to change notification settings - Fork 89
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
casting requires extra set of parentheses #22
Comments
I hear ya, but it seems to be the only way to parse without having to require type declarations. This is a problem with C style casting syntax. We actually have to parse assuming they are function calls and then disambiguate the casts after the parser is done. |
I don't know much about esprima, but how else can I guess it seems like you could parse |
Parsing C-style casts are really a pain in the ass. There are a couple of problems with C-style casts:
So there are a couple of solutions here:
I personally like (c), but that would be a radical syntactic departure from C. edit: formatting |
I actually didn't realize that I also didn't realize that lljs didn't require forward declarations, which is kind of neat. It makes sense that C-style casting is difficult without knowing all the types. |
It's annoying to have to write:
etc, every time I want to cast something. I should be able to just do:
but it seems to require the explicit parentheses.
The text was updated successfully, but these errors were encountered: