Skip to content

Commit a52649e

Browse files
committed
fix: evaluate the metadata expr
- Ex: units are now stored as a Unitlike term instead of an expression.
1 parent a69570a commit a52649e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/systems/model_parsing.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,13 @@ function set_var_metadata(a, ms)
198198
end
199199

200200
function get_var(mod::Module, b)
201-
b isa Symbol ? getproperty(mod, b) : b
201+
if b isa Symbol
202+
getproperty(mod, b)
203+
elseif b isa Expr
204+
Core.eval(mod, b)
205+
else
206+
b
207+
end
202208
end
203209

204210
function mtkmodel_macro(mod, name, expr)

0 commit comments

Comments
 (0)