File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
SwiftCompilerSources/Sources/SIL Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ extension StringParser {
471
471
472
472
mutating func parseProjectionPathFromSIL( ) throws -> SmallProjectionPath {
473
473
var entries : [ ( SmallProjectionPath . FieldKind , Int ) ] = [ ]
474
- repeat {
474
+ while true {
475
475
if consume ( " ** " ) {
476
476
entries. append ( ( . anything, 0 ) )
477
477
} else if consume ( " c* " ) {
@@ -497,12 +497,10 @@ extension StringParser {
497
497
entries. append ( ( . structField, idx) )
498
498
} else if let tupleElemIdx = consumeInt ( ) {
499
499
entries. append ( ( . tupleField, tupleElemIdx) )
500
- } else {
501
- try throwError ( " expected selection path component " )
500
+ } else if !consume ( " . " ) {
501
+ return try createPath ( from : entries )
502
502
}
503
- } while consume ( " . " )
504
-
505
- return try createPath ( from: entries)
503
+ }
506
504
}
507
505
508
506
private func createPath( from entries: [ ( SmallProjectionPath . FieldKind , Int ) ] ) throws -> SmallProjectionPath {
You can’t perform that action at this time.
0 commit comments