-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Inconsistency between if
and elseif
parsing
#15763
Comments
i got in several places the comment: Julia syntax is correct, if the parser accepts it (no, there is no formal syntax definition). So why not just accepting this? |
The way we encode the syntax, and what we want the syntax to be, are totally separate issues. It's perfectly possible to specify an undesirable syntax in BNF. |
I suppose we should deprecate |
I suspect you can just make it an error – I really doubt a lot of people are using this syntax. |
There are definitely uses of it in packages as I had disallowed this in JuliaParser and it came up while running against all packages, so a deprecation is in order. |
fix #15763, disallow newline immediately after `if`
For this (and in general), is JuliaParser.jl thought of? I do not see a commit here (or a label for it, similar to "backport to 0.4"..). |
This is legal syntax:
but this is not:
(
missing condition in elseif
). It seems like either both should be allowed or both disallowed.The text was updated successfully, but these errors were encountered: