mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
NEXT_ELLPSIS.test
This commit is contained in:
@@ -235,7 +235,7 @@
|
||||
return true;
|
||||
};
|
||||
Lexer.prototype.lineToken = function() {
|
||||
var _ref2, diff, indent, match, nextCharacter, nextEllipsis, noNewlines, prev, size;
|
||||
var diff, indent, match, nextCharacter, noNewlines, prev, size;
|
||||
if (!(match = MULTI_DENT.exec(this.chunk))) {
|
||||
return false;
|
||||
}
|
||||
@@ -245,8 +245,7 @@
|
||||
prev = last(this.tokens, 1);
|
||||
size = indent.length - 1 - indent.lastIndexOf('\n');
|
||||
nextCharacter = NEXT_CHARACTER.exec(this.chunk)[1];
|
||||
nextEllipsis = (((_ref2 = NEXT_ELLIPSIS.exec(this.chunk)) != null) ? _ref2[1] : undefined);
|
||||
noNewlines = (('.' === nextCharacter || ',' === nextCharacter) && !nextEllipsis) || this.unfinished();
|
||||
noNewlines = (('.' === nextCharacter || ',' === nextCharacter) && !NEXT_ELLIPSIS.test(this.chunk)) || this.unfinished();
|
||||
if (size - this.indebt === this.indent) {
|
||||
if (noNewlines) {
|
||||
return this.suppressNewlines();
|
||||
@@ -616,7 +615,7 @@
|
||||
HEREDOC_INDENT = /\n+([ \t]*)/g;
|
||||
ASSIGNED = /^\s*@?[$A-Za-z_][$\w]*[ \t]*?[:=][^:=>]/;
|
||||
NEXT_CHARACTER = /^\s*(\S?)/;
|
||||
NEXT_ELLIPSIS = /^\s*(\.\.\.?)/;
|
||||
NEXT_ELLIPSIS = /^\s*\.\.\.?/;
|
||||
LEADING_SPACES = /^\s+/;
|
||||
TRAILING_SPACES = /\s+$/;
|
||||
NO_NEWLINE = /^(?:[-+*&|\/%=<>!.\\][<>=&|]*|and|or|is(?:nt)?|n(?:ot|ew)|delete|typeof|instanceof)$/;
|
||||
|
||||
Reference in New Issue
Block a user