mevento 1.9.5 → 1.9.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.
@@ -1380,7 +1380,7 @@ class MEvento extends NodeVisitor {
1380
1380
  const callee = node.callee;
1381
1381
  const args = node.arguments;
1382
1382
  const calleeName = callee.value;
1383
- const fn = this._functionsRegistry[calleeName];
1383
+ const fn = this.resolveFunction(calleeName);
1384
1384
  const argValues = args.map((e) => this.visit(e));
1385
1385
  // print("argValues::", argValues)
1386
1386
  return fn?.(argValues, this);
@@ -1640,6 +1640,12 @@ class MEvento extends NodeVisitor {
1640
1640
  return this.visit(it);
1641
1641
  });
1642
1642
  }
1643
+ setFunctionResolver(resolver) {
1644
+ this._functionResolver = resolver;
1645
+ }
1646
+ resolveFunction(name) {
1647
+ return this._functionsRegistry[name] ?? this._functionResolver?.(name);
1648
+ }
1643
1649
  registerFunction(id, fn) {
1644
1650
  this._functionsRegistry[id] = fn;
1645
1651
  }