You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiler.jl
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -404,21 +404,21 @@ function replace_tilde!(model_info)
404
404
ex = model_info[:main_body]
405
405
ex = MacroTools.postwalk(ex) do x
406
406
if @capture(x, @M_ L_ ~ R_) && M == Symbol("@__dot__")
407
-
dot_tilde(L, R, model_info)
407
+
generate_dot_tilde(L, R, model_info)
408
408
else
409
409
x
410
410
end
411
411
end
412
412
$(VERSION>=v"1.1"?"ex = MacroTools.postwalk(ex) do x
413
413
if @capture(x, L_ .~ R_)
414
-
dot_tilde(L, R, model_info)
414
+
generate_dot_tilde(L, R, model_info)
415
415
else
416
416
x
417
417
end
418
418
end":"")
419
419
ex = MacroTools.postwalk(ex) do x
420
420
if @capture(x, L_ ~ R_)
421
-
tilde(L, R, model_info)
421
+
generate_tilde(L, R, model_info)
422
422
else
423
423
x
424
424
end
@@ -429,12 +429,12 @@ end
429
429
"""|> Meta.parse |> eval
430
430
431
431
"""
432
-
tilde(left, right, model_info)
432
+
generate_tilde(left, right, model_info)
433
433
434
434
The `tilde` function generates `observe` expression for data variables and `assume`
435
435
expressions for parameter variables, updating `model_info` in the process.
436
436
"""
437
-
functiontilde(left, right, model_info)
437
+
functiongenerate_tilde(left, right, model_info)
438
438
arg_syms =Val((model_info[:arg_syms]...,))
439
439
model = model_info[:main_body_names][:model]
440
440
vi = model_info[:main_body_names][:vi]
@@ -478,11 +478,11 @@ function tilde(left, right, model_info)
478
478
end
479
479
480
480
"""
481
-
dot_tilde(left, right, model_info)
481
+
generate_dot_tilde(left, right, model_info)
482
482
483
483
This function returns the expression that replaces `left .~ right` in the model body. If `preprocessed isa VarName`, then a `dot_assume` block will be run. Otherwise, a `dot_observe` block will be run.
0 commit comments