OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 6802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6813 "[x, y] = 'str'", | 6813 "[x, y] = 'str'", |
6814 "[(x,y) => z]", | 6814 "[(x,y) => z]", |
6815 "{x: (y) => z}", | 6815 "{x: (y) => z}", |
6816 "[x, ...y, z]", | 6816 "[x, ...y, z]", |
6817 "[...x,]", | 6817 "[...x,]", |
6818 "[x, y, ...z = 1]", | 6818 "[x, y, ...z = 1]", |
6819 "[...z = 1]", | 6819 "[...z = 1]", |
6820 "[x, y, ...[z] = [1]]", | 6820 "[x, y, ...[z] = [1]]", |
6821 "[...[z] = [1]]", | 6821 "[...[z] = [1]]", |
6822 | 6822 |
| 6823 "[...++x]", |
| 6824 "[...x--]", |
| 6825 "[...!x]", |
| 6826 "[...x + y]", |
| 6827 |
6823 // v8:4657 | 6828 // v8:4657 |
6824 "({ x: x4, x: (x+=1e4) })", | 6829 "({ x: x4, x: (x+=1e4) })", |
6825 "(({ x: x4, x: (x+=1e4) }))", | 6830 "(({ x: x4, x: (x+=1e4) }))", |
6826 "({ x: x4, x: (x+=1e4) } = {})", | 6831 "({ x: x4, x: (x+=1e4) } = {})", |
6827 "(({ x: x4, x: (x+=1e4) } = {}))", | 6832 "(({ x: x4, x: (x+=1e4) } = {}))", |
6828 "(({ x: x4, x: (x+=1e4) }) = {})", | 6833 "(({ x: x4, x: (x+=1e4) }) = {})", |
6829 "({ x: y } = {})", | 6834 "({ x: y } = {})", |
6830 "(({ x: y } = {}))", | 6835 "(({ x: y } = {}))", |
6831 "(({ x: y }) = {})", | 6836 "(({ x: y }) = {})", |
6832 "([a])", | 6837 "([a])", |
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8212 "(a,);", | 8217 "(a,);", |
8213 "(a,b,c,);", | 8218 "(a,b,c,);", |
8214 NULL | 8219 NULL |
8215 }; | 8220 }; |
8216 // clang-format on | 8221 // clang-format on |
8217 | 8222 |
8218 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; | 8223 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; |
8219 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 8224 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
8220 arraysize(always_flags)); | 8225 arraysize(always_flags)); |
8221 } | 8226 } |
OLD | NEW |