Settling on a data structure to balance compatibility
with not being wrong
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
const error = {
|
||||
create({node, error}) {
|
||||
create({ node, error }) {
|
||||
return {
|
||||
parseType: 'error',
|
||||
node,
|
||||
error,
|
||||
}
|
||||
},
|
||||
compile(node, scope, context){
|
||||
return {result: node, context};
|
||||
compile(node, scope, context) {
|
||||
return { result: node, context };
|
||||
},
|
||||
toString(node){
|
||||
return node.error.toString();
|
||||
toString(node) {
|
||||
return `${node.error.type} error: ${node.error.message}`;
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user