mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
For invalid code, lexer is forgiving enough to allow single quote '\'' as the starting point of string literals. Later, parser assumes the string literals are always using double quote "\"", and passes such knowledge to SwiftSyntax side, leading to the round-trip failure we observed in the radar. This commit fixes the issue by introducing another token kind for single quote. rdar://51071021
8 lines
267 B
Swift
8 lines
267 B
Swift
// RUN: rm -rf %t
|
|
// RUN: %swift-syntax-test -input-source-filename %s -parse-gen > %t
|
|
// RUN: diff -u %s %t
|
|
|
|
"abc"
|
|
|
|
RoundedRectangle(cornerRadius: 6.0)lengthlength'Integer' field' [binding value: \(int.value)]int'Double' field [binding value: \(double.value)]double
|