mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Merge branch 'stable' of github.com:jashkenas/coffee-script into stable
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user