Removed unused function

This commit is contained in:
Stefan Zermatten
2021-03-01 12:11:22 +02:00
parent 7daab97297
commit 1276f872a0
2 changed files with 2 additions and 13 deletions

View File

@@ -1,6 +1,8 @@
import { parse, CompilationContext } from '/imports/parser/parser.js';
import ConstantNode from '/imports/parser/parseTree/ConstantNode.js';
//TODO replace constants with their parsed node
export default function evaluateString(string, scope, fn = 'compile', context){
let errors = [];
if (!string){

View File

@@ -1,13 +0,0 @@
import evaluateString from '/imports/api/creature/computation/afterComputation/evaluateString.js';
// Strings can have computations in bracers like so: {computation}
export default function evalutateStringWithEmbeddedCalculations(string, scope){
console.warn('evalutateStringWithEmbeddedCalculations should be replaced with ' +
'fetching the result from the compuations on the property doc');
if (!string) return string;
// Compute everything inside bracers
return string.replace(/\{([^{}]*)\}/g, function(match, p1){
let {result} = evaluateString(p1, scope);
return result;
});
}