-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed as not planned
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdeclarationsFeature: declarationsFeature: declarationsexpressionsFeature: expressionsFeature: expressionsfeatureA feature request or implementationA feature request or implementationoperatorsFeature: operatorsFeature: operatorsprecedence groupsFeature → operators: precedence groupsFeature → operators: precedence groupsstaleResolution: No longer relevant, staleResolution: No longer relevant, stale† libswiftSyntaxArchive • Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntaxArchive • Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntax
Description
| Previous ID | SR-6909 |
| Radar | None |
| Original Reporter | @dabrahams |
| Type | Bug |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Source Tooling |
| Labels | Bug, Syntax |
| Assignee | None |
| Priority | Medium |
md5: 2493838608afee26863c2c17f96fb301
Issue Description:
If you want to line-break an expression, you want to break it near lower-precedence operators, so you end up with
longThing1 * longThing2
+ longThing3 * longThing4rather than
longThing1 * longThing2 + longThing3
* longThing4or worse:
longThing1
* longThing2 + longThing3
* longThing4But libSyntax is flattening all of that into SequenceExprSyntax so that information is lost. I realize that file-at-a-time processing can't always do this reliably, but... it could try. And it could know about the precedences in the standard library.
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdeclarationsFeature: declarationsFeature: declarationsexpressionsFeature: expressionsFeature: expressionsfeatureA feature request or implementationA feature request or implementationoperatorsFeature: operatorsFeature: operatorsprecedence groupsFeature → operators: precedence groupsFeature → operators: precedence groupsstaleResolution: No longer relevant, staleResolution: No longer relevant, stale† libswiftSyntaxArchive • Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntaxArchive • Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntax