Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: fix multiline binary operator/parentheses indentation (#8719)
Fixes #8666, fixes #8717, fixes #8710 Previously, the logic for indenting multiline parenthesized expressions assumed that the indentation of every token in the expression other than the first was dependent on the first token. However, this assumption is not always correct. This led to bugs with multiline parenthesized expressions (#8710). Additionally, the BinaryExpression listener attempted to account for this assumption by always linking its tokens' indentation to the first token's indentation, even when it didn't make sense to do so. This led to other bugs (#8666, #8717). This commit updates the parenthesis logic to avoid making that assumption and check the indentation of all the tokens properly.
- Loading branch information
1 parent
ab8b016
commit b5a70b4
Showing
2 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters