File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ //===----------------------------------------------------------------------===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+ // Licensed under Apache License v2.0 with Runtime Library Exception
7+ //
8+ // See https://swift.org/LICENSE.txt for license information
9+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+ //
11+ //===----------------------------------------------------------------------===//
12+
13+ /// Specifies the module and type name for an externally-defined macro, which
14+ /// must conform to the appropriate set of `Macro` protocols.
15+ ///
16+ /// This macro can only be used to define other macros. For example:
17+ ///
18+ /// macro stringify<T>(_ value: T) -> (T, String) =
19+ /// #externalMacro(module: "ExampleMacros", type :"StringifyMacro")
20+ ///
21+ /// Use of this macro in any other context is an error.
22+ @expression
23+ public macro externalMacro< T> ( module: String , type: String ) -> T =
24+ Builtin . ExternalMacro
25+
You can’t perform that action at this time.
0 commit comments