We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c27f97 commit 3d60e55Copy full SHA for 3d60e55
Syntax.swift
@@ -152,6 +152,12 @@ extension Syntax {
152
return raw.trailingTrivia
153
}
154
155
+ /// When isImplicit is true, the syntax node doesn't include any
156
+ /// underlying tokens, e.g. an empty CodeBlockItemList.
157
+ public var isImplicit: Bool {
158
+ return leadingTrivia == nil
159
+ }
160
+
161
/// The textual byte length of this node exluding leading and trailing trivia.
162
public var byteSizeAfterTrimmingTrivia: Int {
163
return data.byteSize - (leadingTrivia?.byteSize ?? 0) -
0 commit comments