mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
NEXT_ELLPSIS.test
This commit is contained in:
@@ -237,8 +237,7 @@ exports.Lexer = class Lexer
|
||||
prev = last @tokens, 1
|
||||
size = indent.length - 1 - indent.lastIndexOf '\n'
|
||||
nextCharacter = NEXT_CHARACTER.exec(@chunk)[1]
|
||||
nextEllipsis = NEXT_ELLIPSIS.exec(@chunk)?[1]
|
||||
noNewlines = (nextCharacter in ['.', ','] and not nextEllipsis) or @unfinished()
|
||||
noNewlines = (nextCharacter in ['.', ','] and not NEXT_ELLIPSIS.test(@chunk)) or @unfinished()
|
||||
if size - @indebt is @indent
|
||||
return @suppressNewlines() if noNewlines
|
||||
return @newlineToken indent
|
||||
@@ -579,7 +578,7 @@ MULTILINER = /\n/g
|
||||
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 = /// ^
|
||||
|
||||
Reference in New Issue
Block a user