Skip to content

Commit 0320d1e

Browse files
committed
Wrap the characters mentioned in the descriptions of TriviaPieces in backticks
Fixes #3185
1 parent ef367f7 commit 0320d1e

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

CodeGeneration/Sources/SyntaxSupport/Trivia.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,73 +97,73 @@ public let TRIVIAS: [Trivia] = [
9797

9898
Trivia(
9999
name: "BlockComment",
100-
comment: #"A developer block comment, starting with '/*' and ending with '*/'."#,
100+
comment: #"A developer block comment, starting with `/*` and ending with `*/`."#,
101101
traits: [.comment]
102102
),
103103

104104
Trivia(
105105
name: "CarriageReturn",
106-
comment: #"A newline '\r' character."#,
106+
comment: #"A newline `\r` character."#,
107107
characters: "\r",
108108
traits: [.whitespace, .newline]
109109
),
110110

111111
Trivia(
112112
name: "CarriageReturnLineFeed",
113-
comment: #"A newline consists of contiguous '\r' and '\n' characters."#,
113+
comment: #"A newline consists of contiguous `\r` and `\n` characters."#,
114114
characters: "\r\n",
115115
traits: [.whitespace, .newline]
116116
),
117117

118118
Trivia(
119119
name: "DocBlockComment",
120-
comment: #"A documentation block comment, starting with '/**' and ending with '*/'."#,
120+
comment: #"A documentation block comment, starting with `/**` and ending with `*/`."#,
121121
traits: [.comment]
122122
),
123123

124124
Trivia(
125125
name: "DocLineComment",
126-
comment: #"A documentation line comment, starting with '///' and excluding the trailing newline."#,
126+
comment: #"A documentation line comment, starting with `///` and excluding the trailing newline."#,
127127
traits: [.comment]
128128
),
129129

130-
// Swift don't support form feed '\f' so we use the raw unicode
130+
// Swift doesn't support form feed `\f` so we use the raw unicode
131131
Trivia(
132132
name: "Formfeed",
133-
comment: #"A form-feed 'f' character."#,
133+
comment: #"A form-feed `f` character."#,
134134
characters: "\u{000C}",
135135
traits: [.whitespace]
136136
),
137137

138138
Trivia(
139139
name: "LineComment",
140-
comment: #"A developer line comment, starting with '//' and excluding the trailing newline."#,
140+
comment: #"A developer line comment, starting with `//` and excluding the trailing newline."#,
141141
traits: [.comment]
142142
),
143143

144144
Trivia(
145145
name: "Newline",
146-
comment: #"A newline '\n' character."#,
146+
comment: #"A newline `\n` character."#,
147147
characters: "\n",
148148
traits: [.whitespace, .newline]
149149
),
150150

151151
Trivia(
152152
name: "Pound",
153-
comment: #"A '#' that is at the end of a line in a multi-line string literal to escape the newline."#,
153+
comment: #"A `#` that is at the end of a line in a multi-line string literal to escape the newline."#,
154154
characters: "#"
155155
),
156156

157157
Trivia(
158158
name: "Space",
159-
comment: #"A space ' ' character."#,
159+
comment: #"A space ` ` character."#,
160160
characters: " ",
161161
traits: [.whitespace, .spaceOrTab]
162162
),
163163

164164
Trivia(
165165
name: "Tab",
166-
comment: #"A tab '\t' character."#,
166+
comment: #"A tab `\t` character."#,
167167
characters: "\t",
168168
traits: [.whitespace, .spaceOrTab]
169169
),
@@ -173,10 +173,10 @@ public let TRIVIAS: [Trivia] = [
173173
comment: #"Any skipped unexpected text."#
174174
),
175175

176-
// Swift don't support vertical tab '\v' so we use the raw unicode
176+
// Swift doesn't support vertical tab `\v` so we use the raw unicode
177177
Trivia(
178178
name: "VerticalTab",
179-
comment: #"A vertical tab '\v' character."#,
179+
comment: #"A vertical tab `\v` character."#,
180180
characters: "\u{000B}",
181181
traits: [.whitespace]
182182
),

Sources/SwiftSyntax/generated/TriviaPieces.swift

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)