mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Allow freestanding macros to be used at top-level. - Parse top-level `#…` as `MacroExpansionDecl` when we are not in scripting mode. - Add macro expansion decls to the source lookup cache with name-driven lazy expansion. Not supporting arbitrary name yet. - Experimental support for script mode and brace-level declaration macro expansions: When type-checking a `MacroExpansionExpr`, assign it a substitute `MacroExpansionDecl` if the macro reference resolves to a declaration macro. This doesn’t work quite fully yet and will be enabled in a future fix.