File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ function _implements_inner(interface, objtype; show=false)
57
57
end
58
58
quote
59
59
# Define a `implements` trait stating that `objtype` implements `interface`
60
- Interfaces. implements (:: Type{<:$interfacetype} , :: Type{<:$objtype} ) = true
61
- Interfaces. implements (T:: Type{<:$interfacetype{Options}} , O:: Type{<:$objtype} ) where Options =
62
- Interfaces. _all_in (Options, Interfaces. optional_keys (T, O))
60
+ $ Interfaces. implements (:: Type{<:$interfacetype} , :: Type{<:$objtype} ) = true
61
+ $ Interfaces. implements (T:: Type{<:$interfacetype{Options}} , O:: Type{<:$objtype} ) where Options =
62
+ $ Interfaces. _all_in (Options, $ Interfaces. optional_keys (T, O))
63
63
# Define which optional components the object implements
64
- Interfaces. optional_keys (:: Type{<:$interfacetype} , :: Type{<:$objtype} ) = $ optional_keys
64
+ $ Interfaces. optional_keys (:: Type{<:$interfacetype} , :: Type{<:$objtype} ) = $ optional_keys
65
65
nothing
66
66
end |> esc
67
67
end
Original file line number Diff line number Diff line change @@ -56,17 +56,17 @@ description = "A description of the interface"
56
56
macro interface (interface:: Symbol , components, description)
57
57
quote
58
58
# Define the interface type (should it be concrete?)
59
- abstract type $ interface{Components} <: Interfaces.Interface{Components} end
59
+ abstract type $ interface{Components} <: $ Interfaces.Interface{Components} end
60
60
# Define the interface component methods
61
61
@assert $ components isa NamedTuple{(:mandatory ,:optional )}
62
- Interfaces. components (:: Type{<:$interface} ) = $ components
62
+ $ Interfaces. components (:: Type{<:$interface} ) = $ components
63
63
@assert $ description isa String
64
- Interfaces. description (:: Type{<:$interface} ) = $ description
64
+ $ Interfaces. description (:: Type{<:$interface} ) = $ description
65
65
# Generate a docstring for the interface
66
66
let description= $ description,
67
67
interfacesym= $ (QuoteNode (interface)),
68
- m_keys= Interfaces. mandatory_keys ($ interface),
69
- o_keys= Interfaces. optional_keys ($ interface)
68
+ m_keys= $ Interfaces. mandatory_keys ($ interface),
69
+ o_keys= $ Interfaces. optional_keys ($ interface)
70
70
@doc """
71
71
$(" " ) $interfacesym
72
72
You can’t perform that action at this time.
0 commit comments