mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
Issue #587 ... Removing the Attempted Removal of Erroneous Double Parens.
This commit is contained in:
@@ -205,7 +205,6 @@ exports.Expressions = class Expressions extends BaseNode
|
||||
o.scope = new Scope(null, this, null)
|
||||
code = @compileWithDeclarations(o)
|
||||
code = code.replace(TRAILING_WHITESPACE, '')
|
||||
code = code.replace(DOUBLE_PARENS, '($1)')
|
||||
if o.noWrap then code else "(function() {\n#{code}\n})();\n"
|
||||
|
||||
# Compile the expressions body for the contents of a function, with
|
||||
@@ -1539,9 +1538,6 @@ TAB = ' '
|
||||
# with Git.
|
||||
TRAILING_WHITESPACE = /[ \t]+$/gm
|
||||
|
||||
# Obvious redundant parentheses should be removed.
|
||||
DOUBLE_PARENS = /\(\(([^\(\)\n]*)\)\)/g
|
||||
|
||||
# Keep these identifier regexes in sync with the Lexer.
|
||||
IDENTIFIER = /^[a-zA-Z\$_](\w|\$)*$/
|
||||
NUMBER = /^(((\b0(x|X)[0-9a-fA-F]+)|((\b[0-9]+(\.[0-9]+)?|\.[0-9]+)(e[+\-]?[0-9]+)?)))\b$/i
|
||||
|
||||
Reference in New Issue
Block a user