Replaced old parser with new parser

This commit is contained in:
Stefan Zermatten
2020-11-10 14:07:22 +02:00
parent 1f0678b50b
commit 3024168e95
25 changed files with 117 additions and 426 deletions

View File

@@ -53,4 +53,9 @@ export default class OperatorNode extends ParseNode {
let {left, right, operator} = this;
return `${left.toString()} ${operator} ${right.toString()}`;
}
traverse(fn){
fn(this);
this.left.traverse(fn);
this.right.traverse(fn);
}
}