Added functions and ensured the context was being passed around correctly

This commit is contained in:
Stefan Zermatten
2020-09-18 11:52:44 +02:00
parent 06f17a6d33
commit 6570665c1e
12 changed files with 209 additions and 53 deletions

View File

@@ -5,8 +5,8 @@ export default class ParenthesisNode extends ParseNode {
super(...arguments);
this.content = content;
}
resolve(fn, scope){
let content = this.content[fn](scope);
resolve(fn, scope, context){
let content = this.content[fn](scope, context);
if (
content.constructor.name === 'IfNode' ||
content.constructor.name === 'OperatorNode'