diff --git a/Project.toml b/Project.toml index 982689e6c..f9783e7da 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "JuliaBUGS" uuid = "ba9fb4c0-828e-4473-b6a1-cd2560fee5bf" -version = "0.6.5" +version = "0.7.0" [deps] AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001" diff --git a/src/parser/bugs_macro.jl b/src/parser/bugs_macro.jl index b54287d00..d50982df5 100644 --- a/src/parser/bugs_macro.jl +++ b/src/parser/bugs_macro.jl @@ -151,6 +151,8 @@ function bugs_expression(expr, line_num) error( "Keyword argument syntax is not supported in BUGS, error at $line_num: $(expr)" ) + elseif Meta.isexpr(expr, :.) + return expr else error("Invalid expression at $line_num: `$expr`") end diff --git a/test/compile.jl b/test/compile.jl index 067df5f70..a2af7942a 100644 --- a/test/compile.jl +++ b/test/compile.jl @@ -87,3 +87,11 @@ end @test AbstractPPL.get(model_init_1.evaluation_env, @varname(beta)) == 1 end end + +@testset "dot call" begin + model_def = @bugs begin + x[1:2] ~ Distributions.product_distribution(fill(Distributions.Normal(0, 1), 2)) + end + model = compile(model_def, (;)) + @test model.evaluation_env.x isa Vector{Float64} +end