|
246 | 246 | # The comments indicate the syntax matched by a block; either when parsed directly
|
247 | 247 | # when it is called recursively for parsing a part of an expression.
|
248 | 248 | # These variable definitions are part of test suite in `test/model_parsing.jl`
|
249 |
| -function parse_variable_def!(dict, mod, arg, varclass, kwargs, where_types; |
| 249 | +Base.@nospecializeinfer function parse_variable_def!( |
| 250 | + dict, mod, arg, varclass, kwargs, where_types; |
250 | 251 | def = nothing, type::Type = Real, meta = Dict{DataType, Expr}())
|
| 252 | + @nospecialize |
251 | 253 | arg isa LineNumberNode && return
|
252 | 254 | MLStyle.@match arg begin
|
253 | 255 | # Parses: `a`
|
@@ -1355,7 +1357,9 @@ push_something!(v, x...) = push_something!.(Ref(v), x)
|
1355 | 1357 |
|
1356 | 1358 | define_blocks(branch) = [Expr(branch), Expr(branch), Expr(branch), Expr(branch)]
|
1357 | 1359 |
|
1358 |
| -function parse_top_level_branch(condition, x, y = nothing, branch = :if) |
| 1360 | +Base.@nospecializeinfer function parse_top_level_branch( |
| 1361 | + condition, x, y = nothing, branch::Symbol = :if) |
| 1362 | + @nospecialize |
1359 | 1363 | blocks::Vector{Union{Expr, Nothing}} = component_blk, equations_blk, parameter_blk, variable_blk = define_blocks(branch)
|
1360 | 1364 |
|
1361 | 1365 | for arg in x
|
|
0 commit comments