Issue 15163 - Parser bug on double function call#5165
Conversation
Add `allowAltSyntax` parameter to `isDeclarator`, and disable it from `parseStatement`.
|
My only request here would be to use self-documenting enums rather than continuing to use an integer for the |
|
Walter doesn't like to contain both refactoring and bugfix in a PR. So for the quick bugfix, I usually keep such the magic interger numbers in old code. And after the bugfix, the refactoring change will be ignored usually by Walter, because he doesn't like continuous refactoring changes! |
I could take that argument as ad-infintum. One day it's the number OK, I'll give this the 👍 for now, but I'll put strong emphasis on refactoring this in the next months. I'd have to reject anything which involves more magic numbers than I have fingers on my left hand (that excludes the thumb) though. Regardless of Walter's preferences on PR etiquette, so long as you keep each relevant change as a separate commit, others who review on a commit-by-commit basis will understand what's going on. |
|
Auto-merge toggled on |
Yeah, I think it's better to have the refactoring separate to the bugfix PR too. I don't have your knowledge of some parts of the compiler, and the more lines changed the harder it is to review. I will happily merge a followup PR that updates it to use an enum if you want to do that. |
Issue 15163 - Parser bug on double function call
https://issues.dlang.org/show_bug.cgi?id=15163
Add
allowAltSyntaxparameter toisDeclarator, and disable it fromparseStatement.