Issue #587 ... Removing the Attempted Removal of Erroneous Double Parens.

This commit is contained in:
Jeremy Ashkenas
2010-08-07 08:13:36 -04:00
parent cc10641f38
commit 0ada5a7734
8 changed files with 12 additions and 18 deletions

View File

@@ -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