Added @dynare macro.

time-shift
Stéphane Adjemian (Charybdis) 2015-08-13 11:11:50 +02:00
parent 9556d37fd6
commit ed12ea429b
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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"