Skip to content

Commit 3f92a31

Browse files
committed
up
1 parent c5c00e6 commit 3f92a31

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/dsl.jl

+3-4
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,13 @@ function push_reactions!(reactions::Vector{ReactionInternal}, subs::ExprValues,
444444
push!(metadata_i.args, :(only_use_rate = $(in(arrow, pure_rate_arrows))))
445445
end
446446

447-
# Checks that metadata fields are unqiue.
447+
# Checks that metadata fields are unique.
448448
if !allunique(arg.args[1] for arg in metadata_i.args)
449449
error("Some reaction metadata fields where repeated: $(metadata_entries)")
450450
end
451451

452-
push!(reactions,
453-
ReactionStruct(get_tup_arg(sub_line, i),
454-
get_tup_arg(prod_line, i), get_tup_arg(rate, i), metadata_i))
452+
push!(reactions, ReactionInternal(get_tup_arg(subs, i),
453+
get_tup_arg(prods, i), get_tup_arg(rate, i), metadata_i))
455454
end
456455
end
457456

src/expression_utils.jl

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function esc_dollars!(ex)
1414
end
1515
end
1616

17-
return ex
17+
ex
1818
end
1919

2020
# Checks if an expression is an escaped expression (e.g. on the form `$(Expr(:escape, :Y))`)
@@ -42,9 +42,8 @@ end
4242

4343
# Checks that no symbol was sued for multiple purposes.
4444
function unique_symbol_check(syms)
45-
if !allunique(syms)
46-
error("Reaction network independent variables, parameters, species, and variables must all have distinct names, but a duplicate has been detected. ")
47-
end
45+
allunique(syms) && return
46+
error("Reaction network independent variables, parameters, species, and variables must all have distinct names, but a duplicate has been detected. ")
4847
end
4948

5049
### Catalyst-specific Expressions Manipulation ###

0 commit comments

Comments
 (0)