Skip to content

Commit ecea402

Browse files
TorkelEisaacsas
andauthored
Update src/dsl.jl
Co-authored-by: Sam Isaacson <[email protected]>
1 parent 3c9942b commit ecea402

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dsl.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,9 @@ function make_reaction_system(ex::Expr, name)
273273
options = Dict(Symbol(String(arg.args[1])[2:end]) => arg for arg in option_lines)
274274
allunique(arg.args[1] for arg in option_lines) ||
275275
error("Some options where given multiple times.")
276-
(sum(length, [reaction_lines, option_lines]) != length(ex.args)) &&
277-
error("@reaction_network input contain $(length(ex.args) - sum(length.([reaction_lines,option_lines]))) malformed lines.")
276+
numlines = length(reaction_lines) + length(option_lines)
277+
(numlines != length(ex.args)) &&
278+
error("@reaction_network input contain $(length(ex.args) - $numlines) malformed lines.")
278279
any(!in(option_keys), keys(options)) &&
279280
error("The following unsupported options were used: $(filter(opt_in->!in(opt_in,option_keys), keys(options)))")
280281

0 commit comments

Comments
 (0)