value: (function(){}())
}, AST_Atom);
+var AST_Infinity = DEFNODE("Infinity", null, {
+ $documentation: "The `Infinity` value",
+ value: 1/0
+}, AST_Atom);
+
var AST_Boolean = DEFNODE("Boolean", null, {
$documentation: "Base class for booleans",
}, AST_Atom);
return make_node(AST_Undefined, self);
case "NaN":
return make_node(AST_NaN, self);
+ case "Infinity":
+ return make_node(AST_Infinity, self);
}
}
return self;
output.print_name(def ? def.mangled_name || def.name : self.name);
});
DEFPRINT(AST_Undefined, function(self, output){
- // XXX: should add more options for this
output.print("void 0");
- //output.print("[][0]");
+ });
+ DEFPRINT(AST_Infinity, function(self, output){
+ output.print("1/0");
});
DEFPRINT(AST_NaN, function(self, output){
output.print("0/0");