Skip to content

Commit

Permalink
Explicitly convert to Symbol when doing expression parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 authored Nov 24, 2023
1 parent 43f93d0 commit 07d4147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ function parse_expr_to_symbolic(x::Symbol, mod::Module)
end
function parse_expr_to_symbolic(ex, mod::Module)
if ex.head == :call
if isdefined(mod, ex.args[1])
return getfield(mod,ex.args[1])(parse_expr_to_symbolic.(ex.args[2:end],(mod,))...)
if isdefined(mod, Symbol(ex.args[1]))
return getfield(mod,Symbol(ex.args[1]))(parse_expr_to_symbolic.(ex.args[2:end],(mod,))...)
else
x = parse_expr_to_symbolic(ex.args[1], mod)
ys = parse_expr_to_symbolic.(ex.args[2:end],(mod,))
Expand Down

0 comments on commit 07d4147

Please sign in to comment.