File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -935,11 +935,8 @@ extension Parser {
935
935
936
936
if let openDelimiter = openDelimiter {
937
937
return RawTokenSyntax (
938
- kind : . rawStringDelimiter,
938
+ missing : . rawStringDelimiter,
939
939
text: openDelimiter. tokenText,
940
- leadingTriviaPieces: [ ] ,
941
- trailingTriviaPieces: [ ] ,
942
- presence: . missing,
943
940
arena: arena
944
941
)
945
942
}
Original file line number Diff line number Diff line change @@ -158,10 +158,14 @@ public struct RawTokenSyntax: RawSyntaxNodeProtocol {
158
158
/// If `text` is passed, it will be used to represent the missing token's text.
159
159
/// If `text` is `nil`, the `kind`'s default text will be used.
160
160
/// If that is also `nil`, the token will have empty text.
161
- public init ( missing kind: RawTokenKind , arena: __shared SyntaxArena) {
161
+ public init (
162
+ missing kind: RawTokenKind ,
163
+ text: SyntaxText ? = nil ,
164
+ arena: __shared SyntaxArena
165
+ ) {
162
166
self . init (
163
167
kind: kind,
164
- text: kind. defaultText ?? " " ,
168
+ text: text ?? kind. defaultText ?? " " ,
165
169
leadingTriviaPieces: [ ] ,
166
170
trailingTriviaPieces: [ ] ,
167
171
presence: . missing,
You can’t perform that action at this time.
0 commit comments