@@ -50,12 +50,14 @@ export issym
5050Returns the head of the S-expression.
5151"""
5252function head end
53+ export head
5354
5455"""
5556 children(x)
5657Returns the children (aka tail) of the S-expression.
5758"""
5859function children end
60+ export children
5961
6062"""
6163 operation(x)
@@ -119,20 +121,20 @@ end
119121 similarterm(x, op, args, symtype=nothing; metadata=nothing)
120122
121123"""
122- function similarterm (x, op, args, symtype = nothing ; metadata = nothing )
123- Base. depwarn (""" `similarterm` is deprecated, use `maketerm` instead.
124- See https://github.com/JuliaSymbolics/TermInterface.jl for details.
125- The present call can be replaced by
126- `maketerm(typeof(x), $(callhead (x)) , [op, args...], symtype, metadata)`""" , :similarterm )
124+ function similarterm (x, op, args, symtype= nothing ; metadata= nothing )
125+ Base. depwarn (""" `similarterm` is deprecated, use `maketerm` instead.
126+ See https://github.com/JuliaSymbolics/TermInterface.jl for details.
127+ The present call can be replaced by
128+ `maketerm(typeof(x), $(head (x)) , [op, args...], symtype, metadata)`""" , :similarterm )
127129
128- maketerm (typeof (x), callhead (x), [op, args... ], symtype, metadata)
130+ maketerm (typeof (x), callhead (x), [op, args... ], symtype, metadata)
129131end
130132
131133# Old fallback
132- function similarterm (T:: Type , op, args, symtype = nothing ; metadata = nothing )
133- Base. depwarn (" `similarterm` is deprecated, use `maketerm` instead." *
134- " See https://github.com/JuliaSymbolics/TermInterface.jl for details." , :similarterm )
135- op (args... )
134+ function similarterm (T:: Type , op, args, symtype= nothing ; metadata= nothing )
135+ Base. depwarn (" `similarterm` is deprecated, use `maketerm` instead." *
136+ " See https://github.com/JuliaSymbolics/TermInterface.jl for details." , :similarterm )
137+ op (args... )
136138end
137139
138140export similarterm
@@ -141,7 +143,7 @@ export similarterm
141143"""
142144 callhead(x)
143145Used in this deprecation cycle of `similarterm` to find the `head` argument to
144- `makterm `. Do not implement this, or use `similarterm` if you're using this package.
146+ `maketerm `. Do not implement this, or use `similarterm` if you're using this package.
145147"""
146148callhead (x) = typeof (x)
147149
@@ -166,9 +168,10 @@ If your types do not support type information or metadata, you still need to acc
166168these arguments and may choose to not use them.
167169"""
168170
169- function maketerm (T:: Type , head, children, type, metadata)
170- error (" maketerm for $T is not implemented" )
171+ function maketerm (T:: Type , head, children, type= nothing , metadata= nothing )
172+ error (" maketerm for $T is not implemented" )
171173end
174+ export maketerm
172175
173176include (" utils.jl" )
174177
0 commit comments