@@ -82,9 +82,6 @@ extension Lexer.Cursor {
82
82
/// `stringInterpolationStart` points to the first character inside the interpolation.
83
83
case inStringInterpolation( stringLiteralKind: StringLiteralKind , parenCount: Int )
84
84
85
- /// We have parsed a string interpolation segment and are now expecting the closing `)`.
86
- case afterStringInterpolation
87
-
88
85
/// The mode in which leading trivia should be lexed for this state or `nil`
89
86
/// if no trivia should be lexed.
90
87
func leadingTriviaLexingMode( cursor: Lexer . Cursor ) -> TriviaLexingMode ? {
@@ -102,7 +99,6 @@ extension Lexer.Cursor {
102
99
case . singleLine, . singleQuote: return . noNewlines
103
100
case . multiLine: return . normal
104
101
}
105
- case . afterStringInterpolation: return . normal
106
102
}
107
103
}
108
104
@@ -117,7 +113,6 @@ extension Lexer.Cursor {
117
113
case . afterClosingStringQuote: return nil
118
114
case . inStringInterpolationStart: return nil
119
115
case . inStringInterpolation: return . noNewlines
120
- case . afterStringInterpolation: return . noNewlines
121
116
}
122
117
}
123
118
@@ -134,7 +129,6 @@ extension Lexer.Cursor {
134
129
case . afterClosingStringQuote: return false
135
130
case . inStringInterpolationStart: return false
136
131
case . inStringInterpolation: return false
137
- case . afterStringInterpolation: return false
138
132
}
139
133
}
140
134
}
@@ -333,8 +327,6 @@ extension Lexer.Cursor {
333
327
result = lexInStringInterpolationStart ( stringLiteralKind: stringLiteralKind)
334
328
case . inStringInterpolation( stringLiteralKind: let stringLiteralKind, parenCount: let parenCount) :
335
329
result = lexInStringInterpolation ( stringLiteralKind: stringLiteralKind, parenCount: parenCount, sourceBufferStart: sourceBufferStart)
336
- case . afterStringInterpolation:
337
- result = lexAfterStringInterpolation ( )
338
330
}
339
331
340
332
if let stateTransition = result. stateTransition {
@@ -973,18 +965,6 @@ extension Lexer.Cursor {
973
965
return self . lexNormal ( sourceBufferStart: sourceBufferStart)
974
966
}
975
967
}
976
-
977
- private mutating func lexAfterStringInterpolation( ) -> Lexer . Result {
978
- switch self . peek ( ) {
979
- case UInt8 ( ascii: " ) " ) :
980
- _ = self . advance ( )
981
- return Lexer . Result ( . rightParen, stateTransition: . pop)
982
- case nil :
983
- return Lexer . Result ( . eof)
984
- default :
985
- preconditionFailure ( " state 'isAfterStringInterpolation' expects to be positoned at ')' " )
986
- }
987
- }
988
968
}
989
969
990
970
// MARK: - Trivia
0 commit comments