Skip to content

Commit d6c4054

Browse files
authored
Switch Sym printer to use Julia's syntax printer
Since SymbolicUtils puns on julia's syntax, it should probably use the Julia symbol printer to make sure that non-identifier symbols can be entered back. Before: ``` julia> @syms var"f(x)" (f(x),) ``` After: ``` julia> @syms var"f(x)" (var"f(x)",) ```
1 parent cbe3258 commit d6c4054

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Base.hash(s::Sym{T}, u::UInt) where {T} = hash(T, hash(s.name, u))
146146

147147
Base.isequal(v1::Sym{T}, v2::Sym{T}) where {T} = v1 === v2
148148

149-
Base.show(io::IO, v::Sym) = print(io, v.name)
149+
Base.show(io::IO, v::Sym) = Base.show_unquoted(io, v.name)
150150

151151
#---------------------------
152152
#---------------------------

0 commit comments

Comments
 (0)