Skip to content

Commit

Permalink
cleanup macro expression for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsas committed Aug 14, 2024
1 parent b0cf75e commit a64c2bf
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/dsl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -380,23 +380,28 @@ function make_reaction_system(ex::Expr; name = :(gensym(:ReactionSystem)))
end

quote
$ps
$ivexpr
$ps
$vars
$sps
$observed_vars
$comps
$diffexpr

sivs_vec = $sivs
rx_eq_vec = $rxexprs
vars = setdiff(union($spssym, $varssym, $compssym), $obs_syms)
obseqs = $observed_eqs
cevents = $continuous_events_expr
devents = $discrete_events_expr

Catalyst.remake_ReactionSystem_internal(
Catalyst.make_ReactionSystem_internal(
$rxexprs, $tiv, setdiff(union($spssym, $varssym, $compssym), $obs_syms),
$pssym; name = $name, spatial_ivs = $sivs, observed = $observed_eqs,
continuous_events = $continuous_events_expr,
discrete_events = $discrete_events_expr,
rx_eq_vec, $tiv, vars, $pssym;
name = $name, spatial_ivs = sivs_vec, observed = obseqs,
continuous_events = cevents, discrete_events = devents,
combinatoric_ratelaws = $combinatoric_ratelaws);
default_reaction_metadata = $default_reaction_metadata
)
default_reaction_metadata = $default_reaction_metadata)
end
end

Expand Down

0 comments on commit a64c2bf

Please sign in to comment.