mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fixes #1871, close implicit objects in implicit returns
This commit is contained in:
@@ -386,7 +386,6 @@
|
||||
moveOut -= dent;
|
||||
}
|
||||
}
|
||||
this.indent = decreasedIndent;
|
||||
if (dent) {
|
||||
this.outdebt -= moveOut;
|
||||
}
|
||||
@@ -396,6 +395,7 @@
|
||||
if (!(this.tag() === 'TERMINATOR' || noNewlines)) {
|
||||
this.token('TERMINATOR', '\n', outdentLength, 0);
|
||||
}
|
||||
this.indent = decreasedIndent;
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
_ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine);
|
||||
if (inImplicitCall() && prevTag !== ',') {
|
||||
endImplicitCall();
|
||||
} else if (inImplicitObject() && sameLine && !startsLine) {
|
||||
} else if (inImplicitObject() && sameLine && tag !== 'TERMINATOR' && prevTag !== ':') {
|
||||
endImplicitObject();
|
||||
} else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) {
|
||||
endImplicitObject();
|
||||
|
||||
Reference in New Issue
Block a user