From aa54b23713280a3d55014ad45ef9319841a4bec8 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Sun, 27 Feb 2011 02:11:35 -0500 Subject: [PATCH] fixes #1168: leading floating point suppresses newline (thanks, satyr) --- lib/lexer.js | 2 +- src/lexer.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lexer.js b/lib/lexer.js index fd5c08ab..945f11d7 100644 --- a/lib/lexer.js +++ b/lib/lexer.js @@ -624,7 +624,7 @@ HEREDOC_INDENT = /\n+([^\n\S]*)/g; HEREDOC_ILLEGAL = /\*\//; ASSIGNED = /^\s*@?([$A-Za-z_][$\w\x7f-\uffff]*|['"].*['"])[^\n\S]*?[:=][^:=>]/; - LINE_CONTINUER = /^\s*(?:,|\??\.(?!\.)|::)/; + LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; TRAILING_SPACES = /\s+$/; NO_NEWLINE = /^(?:[-+*&|\/%=<>!.\\][<>=&|]*|and|or|is(?:nt)?|n(?:ot|ew)|delete|typeof|instanceof)$/; COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']; diff --git a/src/lexer.coffee b/src/lexer.coffee index f29ec69b..35196535 100644 --- a/src/lexer.coffee +++ b/src/lexer.coffee @@ -601,7 +601,7 @@ HEREDOC_ILLEGAL = /\*\// ASSIGNED = /^\s*@?([$A-Za-z_][$\w\x7f-\uffff]*|['"].*['"])[^\n\S]*?[:=][^:=>]/ -LINE_CONTINUER = /// ^ \s* (?: , | \??\.(?!\.) | :: ) /// +LINE_CONTINUER = /// ^ \s* (?: , | \??\.(?![.\d]) | :: ) /// TRAILING_SPACES = /\s+$/