nodes: made ExistenceNode omit typeof for known variables

This commit is contained in:
satyr
2010-09-29 11:30:05 +09:00
parent 9bc613e4a7
commit b5261abb6b
3 changed files with 27 additions and 27 deletions

View File

@@ -547,14 +547,14 @@
if (!(tok = last(this.tokens, index))) {
return null;
}
return (tok[0] = (typeof newTag !== "undefined" && newTag !== null) ? newTag : tok[0]);
return (tok[0] = (newTag != null) ? newTag : tok[0]);
};
Lexer.prototype.value = function(index, val) {
var tok;
if (!(tok = last(this.tokens, index))) {
return null;
}
return (tok[1] = (typeof val !== "undefined" && val !== null) ? val : tok[1]);
return (tok[1] = (val != null) ? val : tok[1]);
};
Lexer.prototype.unfinished = function() {
var prev, value;