Merge branch 'stable' of github.com:jashkenas/coffee-script into stable

This commit is contained in:
Jeremy Ashkenas
2011-04-09 16:01:20 -07:00
5 changed files with 16 additions and 10 deletions

View File

@@ -12,7 +12,7 @@
options.bare = true;
return Function(CoffeeScript.compile(code, options))();
};
if (typeof window == "undefined" || window === null) {
if (typeof window == "undefined" || window == null) {
return;
}
CoffeeScript.load = function(url, options) {

View File

@@ -1167,9 +1167,6 @@
value = this.value;
objects = this.variable.base.objects;
if (!(olen = objects.length)) {
if (top) {
return false;
}
code = value.compile(o);
if (o.level >= LEVEL_OP) {
return "(" + code + ")";
@@ -1244,7 +1241,7 @@
if (!top) {
assigns.push(vvar);
}
code = (compact(assigns)).join(', ');
code = assigns.join(', ');
if (o.level < LEVEL_LIST) {
return code;
} else {
@@ -1805,7 +1802,7 @@
Existence.prototype.compileNode = function(o) {
var code, sym;
code = this.expression.compile(o, LEVEL_OP);
code = IDENTIFIER.test(code) && !o.scope.check(code) ? this.negated ? "typeof " + code + " == \"undefined\" || " + code + " === null" : "typeof " + code + " != \"undefined\" && " + code + " !== null" : (sym = this.negated ? '==' : '!=', "" + code + " " + sym + " null");
code = IDENTIFIER.test(code) && !o.scope.check(code) ? this.negated ? "typeof " + code + " == \"undefined\" || " + code + " == null" : "typeof " + code + " != \"undefined\" && " + code + " != null" : (sym = this.negated ? '==' : '!=', "" + code + " " + sym + " null");
if (o.level <= LEVEL_COND) {
return code;
} else {