Added @dynare macro.
parent
9556d37fd6
commit
ed12ea429b
|
@ -18,7 +18,7 @@ module Dynare
|
|||
# along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
export dynare
|
||||
export dynare, @dynare
|
||||
|
||||
function dynare(modfile)
|
||||
# Add cd to path
|
||||
|
@ -34,4 +34,9 @@ function dynare(modfile)
|
|||
require(basename[1])
|
||||
end
|
||||
|
||||
|
||||
macro dynare(modelname)
|
||||
:(dynare($modelname))
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
unshift!(LOAD_PATH, abspath("../../../julia"))
|
||||
|
||||
# Load Dynare package
|
||||
using Dynare
|
||||
importall Dynare
|
||||
|
||||
# Compile the rbc.mod file -> produce a module with the model definition.
|
||||
Dynare.dynare("rbc.mod")
|
||||
@dynare "rbc.mod"
|
||||
|
|
Loading…
Reference in New Issue