From 5873bf4207192ee38366c9542e6939b40fce50ab Mon Sep 17 00:00:00 2001 From: Todd Fincannon Date: Thu, 14 Oct 2021 15:57:38 -0700 Subject: [PATCH] set model directory in the sde causes command --- src/sde-causes.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sde-causes.js b/src/sde-causes.js index bb9efd42..bca06087 100644 --- a/src/sde-causes.js +++ b/src/sde-causes.js @@ -15,18 +15,20 @@ let builder = { } } let handler = argv => { - causes(argv.model, argv.varname, argv) + causes(argv.model, argv.c_varname, argv) } let causes = (model, varname, opts) => { // Get the model name and directory from the model argument. let { modelDirname, modelName, modelPathname } = modelPathProps(model) + let extData = new Map() + let directData = new Map() let spec = parseSpec(opts.spec) // Preprocess model text into parser input. let input = preprocessModel(modelPathname, spec) // Parse the model to get variable and subscript information. let parseTree = parseModel(input) let operation = 'printRefGraph' - codeGenerator(parseTree, { spec, operation, varname }).generate() + codeGenerator(parseTree, { spec, operation, extData, directData, modelDirname, varname }).generate() } let parseModel = input => { // Read the model text and return a parse tree.