Added constants to the UI and Computation Engine

This commit is contained in:
Stefan Zermatten
2021-02-11 13:03:31 +02:00
parent 25fd5c18e8
commit 3313ed0297
21 changed files with 243 additions and 54 deletions

View File

@@ -18,7 +18,12 @@ export default function evaluateString(string, scope, fn = 'compile'){
errors.push(e);
return {result: string, errors};
}
// Parsing failed
if (node === null){
errors.push('...');
return {result: string, errors};
}
console.log(node);
let context = new CompilationContext();
let result = node[fn](scope, context);
if (result instanceof ConstantNode){