File tree Expand file tree Collapse file tree 2 files changed +29
-30
lines changed Expand file tree Collapse file tree 2 files changed +29
-30
lines changed Original file line number Diff line number Diff line change @@ -96,36 +96,6 @@ public struct EngineConfiguration {
9696 }
9797}
9898
99- @_documentation ( visibility: internal)
100- public protocol EngineInterceptor {
101- func onEnterFunction( _ function: Function )
102- func onExitFunction( _ function: Function )
103- }
104-
105- /// An interceptor that multiplexes multiple interceptors
106- @_documentation ( visibility: internal)
107- public class MultiplexingInterceptor : EngineInterceptor {
108- private let interceptors : [ EngineInterceptor ]
109-
110- /// Creates a new multiplexing interceptor
111- /// - Parameter interceptors: The interceptors to multiplex
112- public init ( _ interceptors: [ EngineInterceptor ] ) {
113- self . interceptors = interceptors
114- }
115-
116- public func onEnterFunction( _ function: Function ) {
117- for interceptor in interceptors {
118- interceptor. onEnterFunction ( function)
119- }
120- }
121-
122- public func onExitFunction( _ function: Function ) {
123- for interceptor in interceptors {
124- interceptor. onExitFunction ( function)
125- }
126- }
127- }
128-
12999extension Engine {
130100 func resolveType( _ type: InternedFuncType ) -> FunctionType {
131101 return funcTypeInterner. resolve ( type)
Original file line number Diff line number Diff line change 1+ @_documentation ( visibility: internal)
2+ public protocol EngineInterceptor {
3+ func onEnterFunction( _ function: Function )
4+ func onExitFunction( _ function: Function )
5+ }
6+
7+ /// An interceptor that multiplexes multiple interceptors
8+ @_documentation ( visibility: internal)
9+ public class MultiplexingInterceptor : EngineInterceptor {
10+ private let interceptors : [ EngineInterceptor ]
11+
12+ /// Creates a new multiplexing interceptor
13+ /// - Parameter interceptors: The interceptors to multiplex
14+ public init ( _ interceptors: [ EngineInterceptor ] ) {
15+ self . interceptors = interceptors
16+ }
17+
18+ public func onEnterFunction( _ function: Function ) {
19+ for interceptor in interceptors {
20+ interceptor. onEnterFunction ( function)
21+ }
22+ }
23+
24+ public func onExitFunction( _ function: Function ) {
25+ for interceptor in interceptors {
26+ interceptor. onExitFunction ( function)
27+ }
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments