@sdeverywhere/parse 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This package contains the parsing layer used by the [SDEverywhere](https://github.com/climateinteractive/SDEverywhere) compiler.
|
|
4
4
|
It defines an AST (abstract syntax tree) structure that can be used to express a system dynamics model, and provides an API for parsing a model into an AST structure.
|
|
5
|
-
|
|
5
|
+
The currently supported input formats are Vensim's `mdl` format and the XMILE format (as used by Stella products).
|
|
6
6
|
|
|
7
7
|
Note: The `parse` API has not yet stabilized, and the package is primarily intended as an implementation detail of the `compile` package, so documentation is not provided at this time.
|
|
8
8
|
If you would like to help with the task of stabilizing and formalizing the API for external consumption, please get in touch on the [discussion board](https://github.com/climateinteractive/SDEverywhere/discussions).
|
package/dist/index.cjs
CHANGED
|
@@ -1538,7 +1538,7 @@ ${def.def}
|
|
|
1538
1538
|
|
|
1539
1539
|
Detail:
|
|
1540
1540
|
${e.message}`;
|
|
1541
|
-
throw new Error(msg);
|
|
1541
|
+
throw new Error(msg, { cause: e });
|
|
1542
1542
|
}
|
|
1543
1543
|
for (const dimensionDef of parsedModel.dimensions) {
|
|
1544
1544
|
const group = def.group;
|
|
@@ -2018,7 +2018,7 @@ function parseXmileModel(input) {
|
|
|
2018
2018
|
const msg = `Failed to parse XMILE model definition:
|
|
2019
2019
|
|
|
2020
2020
|
${e.message}`;
|
|
2021
|
-
throw new Error(msg);
|
|
2021
|
+
throw new Error(msg, { cause: e });
|
|
2022
2022
|
}
|
|
2023
2023
|
const simulationSpec = parseSimSpecs(xml.root, input);
|
|
2024
2024
|
const dimensions = parseDimensionDefs(xml.root, input);
|