From 0320d1eeb37f1382059729d1b4b560ea80b96d15 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Mon, 10 Nov 2025 12:16:30 +0100 Subject: [PATCH] Wrap the characters mentioned in the descriptions of `TriviaPieces` in backticks Fixes #3185 --- .../Sources/SyntaxSupport/Trivia.swift | 28 +++++++++---------- .../SwiftSyntax/generated/TriviaPieces.swift | 24 ++++++++-------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CodeGeneration/Sources/SyntaxSupport/Trivia.swift b/CodeGeneration/Sources/SyntaxSupport/Trivia.swift index ee3f8397b33..fc145c08cf9 100644 --- a/CodeGeneration/Sources/SyntaxSupport/Trivia.swift +++ b/CodeGeneration/Sources/SyntaxSupport/Trivia.swift @@ -97,73 +97,73 @@ public let TRIVIAS: [Trivia] = [ Trivia( name: "BlockComment", - comment: #"A developer block comment, starting with '/*' and ending with '*/'."#, + comment: #"A developer block comment, starting with `/*` and ending with `*/`."#, traits: [.comment] ), Trivia( name: "CarriageReturn", - comment: #"A newline '\r' character."#, + comment: #"A newline `\r` character."#, characters: "\r", traits: [.whitespace, .newline] ), Trivia( name: "CarriageReturnLineFeed", - comment: #"A newline consists of contiguous '\r' and '\n' characters."#, + comment: #"A newline consists of contiguous `\r` and `\n` characters."#, characters: "\r\n", traits: [.whitespace, .newline] ), Trivia( name: "DocBlockComment", - comment: #"A documentation block comment, starting with '/**' and ending with '*/'."#, + comment: #"A documentation block comment, starting with `/**` and ending with `*/`."#, traits: [.comment] ), Trivia( name: "DocLineComment", - comment: #"A documentation line comment, starting with '///' and excluding the trailing newline."#, + comment: #"A documentation line comment, starting with `///` and excluding the trailing newline."#, traits: [.comment] ), - // Swift don't support form feed '\f' so we use the raw unicode + // Swift doesn't support form feed `\f` so we use the raw unicode Trivia( name: "Formfeed", - comment: #"A form-feed 'f' character."#, + comment: #"A form-feed `f` character."#, characters: "\u{000C}", traits: [.whitespace] ), Trivia( name: "LineComment", - comment: #"A developer line comment, starting with '//' and excluding the trailing newline."#, + comment: #"A developer line comment, starting with `//` and excluding the trailing newline."#, traits: [.comment] ), Trivia( name: "Newline", - comment: #"A newline '\n' character."#, + comment: #"A newline `\n` character."#, characters: "\n", traits: [.whitespace, .newline] ), Trivia( name: "Pound", - comment: #"A '#' that is at the end of a line in a multi-line string literal to escape the newline."#, + comment: #"A `#` that is at the end of a line in a multi-line string literal to escape the newline."#, characters: "#" ), Trivia( name: "Space", - comment: #"A space ' ' character."#, + comment: #"A space ` ` character."#, characters: " ", traits: [.whitespace, .spaceOrTab] ), Trivia( name: "Tab", - comment: #"A tab '\t' character."#, + comment: #"A tab `\t` character."#, characters: "\t", traits: [.whitespace, .spaceOrTab] ), @@ -173,10 +173,10 @@ public let TRIVIAS: [Trivia] = [ comment: #"Any skipped unexpected text."# ), - // Swift don't support vertical tab '\v' so we use the raw unicode + // Swift doesn't support vertical tab `\v` so we use the raw unicode Trivia( name: "VerticalTab", - comment: #"A vertical tab '\v' character."#, + comment: #"A vertical tab `\v` character."#, characters: "\u{000B}", traits: [.whitespace] ), diff --git a/Sources/SwiftSyntax/generated/TriviaPieces.swift b/Sources/SwiftSyntax/generated/TriviaPieces.swift index 448a692506a..00115416a09 100644 --- a/Sources/SwiftSyntax/generated/TriviaPieces.swift +++ b/Sources/SwiftSyntax/generated/TriviaPieces.swift @@ -24,31 +24,31 @@ public enum TriviaPiece: Sendable { /// A backslash that is at the end of a line in a multi-line string literal to escape the newline. case backslashes(Int) - /// A developer block comment, starting with '/*' and ending with '*/'. + /// A developer block comment, starting with `/*` and ending with `*/`. case blockComment(String) - /// A newline '\r' character. + /// A newline `\r` character. case carriageReturns(Int) - /// A newline consists of contiguous '\r' and '\n' characters. + /// A newline consists of contiguous `\r` and `\n` characters. case carriageReturnLineFeeds(Int) - /// A documentation block comment, starting with '/**' and ending with '*/'. + /// A documentation block comment, starting with `/**` and ending with `*/`. case docBlockComment(String) - /// A documentation line comment, starting with '///' and excluding the trailing newline. + /// A documentation line comment, starting with `///` and excluding the trailing newline. case docLineComment(String) - /// A form-feed 'f' character. + /// A form-feed `f` character. case formfeeds(Int) - /// A developer line comment, starting with '//' and excluding the trailing newline. + /// A developer line comment, starting with `//` and excluding the trailing newline. case lineComment(String) - /// A newline '\n' character. + /// A newline `\n` character. case newlines(Int) - /// A '#' that is at the end of a line in a multi-line string literal to escape the newline. + /// A `#` that is at the end of a line in a multi-line string literal to escape the newline. case pounds(Int) - /// A space ' ' character. + /// A space ` ` character. case spaces(Int) - /// A tab '\t' character. + /// A tab `\t` character. case tabs(Int) /// Any skipped unexpected text. case unexpectedText(String) - /// A vertical tab '\v' character. + /// A vertical tab `\v` character. case verticalTabs(Int) }