File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Sources/SwiftParser/Lexer Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -649,26 +649,6 @@ extension Lexer.Cursor {
649649 return nil
650650 }
651651
652- /// If this is the opening delimiter of a raw string literal, return the number
653- /// of `#` in the raw string delimiter.
654- /// Assumes that the parser is currently pointing at the character after the first `#`.
655- /// In other words, the first `#` is expected to already be consumed.
656- mutating func legacyAdvanceIfOpeningRawStringDelimiter( ) -> Int ? {
657- assert ( self . previous == UInt8 ( ascii: " # " ) )
658-
659- var tmp = self
660- var length = 1
661- while tmp. advance ( matching: " # " ) {
662- length += 1
663- }
664-
665- if tmp. is ( at: #"""# ) {
666- self = tmp
667- return length
668- }
669- return nil
670- }
671-
672652 /// If we are positioned at the start of a multiline string delimiter, consume
673653 /// that delimiter and return `true`, otherwise return `false`.
674654 ///
@@ -1515,8 +1495,6 @@ extension Lexer.Cursor {
15151495 /// Lexes a single character in a string literal, handling escape sequences
15161496 /// like `\n` or `\u{1234}` as a a single character.
15171497 mutating func lexCharacterInStringLiteral( stringLiteralKind: StringLiteralKind , delimiterLength: Int ) -> CharacterLex {
1518- let charStart = self
1519-
15201498 switch self . peek ( ) {
15211499 case UInt8 ( ascii: #"""# ) :
15221500 let quote = Unicode . Scalar ( self . advance ( ) !)
@@ -1578,8 +1556,6 @@ extension Lexer.Cursor {
15781556 return . error( kind)
15791557 }
15801558 default :
1581- _ = self . advance ( )
1582- self = charStart
15831559 guard let charValue = self . advanceValidatingUTF8Character ( ) else {
15841560 return . error( . invalidUtf8)
15851561 }
You can’t perform that action at this time.
0 commit comments