Finished migrating parser to be object orientation free. All tests pass

This commit is contained in:
Stefan Zermatten
2021-10-03 13:54:17 +02:00
parent d30184434c
commit b78517b61f
35 changed files with 589 additions and 654 deletions

View File

@@ -1,13 +1,13 @@
const error = {
create({node, error}) {
return {
type: 'error',
parseType: 'error',
node,
error,
}
},
compile(node){
return node;
compile(node, scope, context){
return {result: node, context};
},
toString(node){
return node.error.toString();