Parser now uses context to store details of the computation
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
import ParseNode from '/imports/parser/parseTree/ParseNode.js';
|
||||
|
||||
export default class ErrorNode extends ParseNode {
|
||||
constructor({node, error}) {
|
||||
constructor({node, error, context}) {
|
||||
super(...arguments);
|
||||
this.node = node;
|
||||
this.error = error;
|
||||
if (context){
|
||||
context.storeError({
|
||||
type: 'error',
|
||||
message: error,
|
||||
});
|
||||
}
|
||||
}
|
||||
compile(){
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user