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