Show
Ignore:
Timestamp:
02/08/08 21:17:06 (10 months ago)
Author:
oliver@apple.com
Message:

<rdar://problem/5731773> REGRESSION (r28973): Extraneous parentheses in function.toString()
https://bugs.webkit.org/show_bug.cgi?id=17214

Reviewed by Maciej

Make a subclass of CommaNode to provide the correct precedence for each expression in
a variable declaration list.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/fast/js/function-toString-parentheses-expected.txt

    r29815 r30105  
    482482PASS compileAndSerializeLeftmostTest('(function () { })()') is '(function () { })()' 
    483483PASS compileAndSerializeLeftmostTest('x = function () { }') is 'x = function () { }' 
     484PASS compileAndSerializeLeftmostTest('var a') is 'var a' 
     485PASS compileAndSerializeLeftmostTest('var a = 1') is 'var a = 1' 
     486PASS compileAndSerializeLeftmostTest('var a, b') is 'var a, b' 
     487PASS compileAndSerializeLeftmostTest('var a = 1, b = 2') is 'var a = 1, b = 2' 
     488PASS compileAndSerializeLeftmostTest('var a, b, c') is 'var a, b, c' 
     489PASS compileAndSerializeLeftmostTest('var a = 1, b = 2, c = 3') is 'var a = 1, b = 2, c = 3' 
    484490PASS successfullyParsed is true 
    485491