Let invalids eval. Works on #124.
This commit is contained in:
parent
90fbe75213
commit
fe0cc34f8f
@ -5,4 +5,16 @@ tree.Invalid = function Invalid(chunk, index, message) {
|
||||
this.type = 'syntax';
|
||||
this.message = message || "Invalid code: " + this.chunk;
|
||||
};
|
||||
|
||||
tree.Invalid.prototype.eval = function(env) {
|
||||
env.error({
|
||||
chunk: this.chunk,
|
||||
index: this.index,
|
||||
type: 'syntax',
|
||||
message: this.message || "Invalid code: " + this.chunk
|
||||
});
|
||||
return {
|
||||
is: 'undefined'
|
||||
};
|
||||
};
|
||||
})(require('../tree'));
|
||||
|
Loading…
Reference in New Issue
Block a user