Skip to content

Commit a5274f2

Browse files
committed
[Macros] Add a default implementation of MacroExpansionContext.lexicalContext.
1 parent 2f5dd64 commit a5274f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/SwiftSyntaxMacros/MacroExpansionContext.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ extension MacroExpansionContext {
8181
) -> AbstractSourceLocation? {
8282
return location(of: node, at: .afterLeadingTrivia, filePathMode: .fileID)
8383
}
84+
85+
public var lexicalContext: [Syntax] {
86+
fatalError(
87+
"`MacroExpansionContext` conformance must implement `lexicalContext`"
88+
)
89+
}
8490
}
8591

8692
/// Diagnostic message used for thrown errors.

0 commit comments

Comments
 (0)