Skip to content

Commit

Permalink
defineFunction support in SLV
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Jun 20, 2024
1 parent d3aabf5 commit e68fce7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion export-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ Each namespace in separate file.
|Const: `Infinity`, `NaN` |- |- |+ |+ |+ |+ |+ |+ |+ |na
|`@Scenario` support |- |- |- |- |- |- |- |+ |+ |na
|`@Record {ss: true, ...}` |- |- |+ |- |- |- |- |+ |+ |na
|`#defineFunction` support |- |- |- |- |+ |- |+ |+ |+ |na
|`#defineFunction`, (sub) means substitution |+ (sub) |+ (sub) |- |- |+ |- |+ |+ |+ |na

## Math expressions conversions

Expand Down
3 changes: 1 addition & 2 deletions src/dbsolve-export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ class DBSolveExport extends AbstractExport{
* @return {string} Text code of exported format.
*/
makeText() {
let logger = this._container.logger;

//let logger = this._container.logger;

let selectedNamespaces = this.selectedNamespaces();

Expand Down
12 changes: 2 additions & 10 deletions src/slv-export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,8 @@ class SLVExport extends AbstractExport{
*
* @return {string} Text code of exported format.
*/
makeText(){
let logger = this._container.logger;

// display that function definition is not supported
let userDefinedFunctions = [...this._container.functionDefStorage]
.filter(([id, functionDef]) => !functionDef.isCore)
.map(([id, functionDef]) => id);
if (userDefinedFunctions.length > 0) {
logger.warn(`User defined functions: ${userDefinedFunctions.join(', ')} are presented in platform but not supported by SLV export.`);
}
makeText() {
//let logger = this._container.logger;

// filter namespaces if set
let selectedNamespaces = this.selectedNamespaces();
Expand Down

0 comments on commit e68fce7

Please sign in to comment.