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 5492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5503 "export function func() { };", | 5503 "export function func() { };", |
5504 "export class C { };", | 5504 "export class C { };", |
5505 "export { };", | 5505 "export { };", |
5506 "function f() {}; f(); export { f };", | 5506 "function f() {}; f(); export { f };", |
5507 "var a, b, c; export { a, b as baz, c };", | 5507 "var a, b, c; export { a, b as baz, c };", |
5508 "var d, e; export { d as dreary, e, };", | 5508 "var d, e; export { d as dreary, e, };", |
5509 "export default function f() {}", | 5509 "export default function f() {}", |
5510 "export default function() {}", | 5510 "export default function() {}", |
5511 "export default function*() {}", | 5511 "export default function*() {}", |
5512 "export default class C {}", | 5512 "export default class C {}", |
5513 "export default class {}" | 5513 "export default class {}", |
5514 "export default class extends C {}" | 5514 "export default class extends C {}", |
5515 "export default 42", | 5515 "export default 42", |
5516 "var x; export default x = 7", | 5516 "var x; export default x = 7", |
5517 "export { Q } from 'somemodule.js';", | 5517 "export { Q } from 'somemodule.js';", |
5518 "export * from 'somemodule.js';", | 5518 "export * from 'somemodule.js';", |
5519 "var foo; export { foo as for };", | 5519 "var foo; export { foo as for };", |
5520 "export { arguments } from 'm.js';", | 5520 "export { arguments } from 'm.js';", |
5521 "export { for } from 'm.js';", | 5521 "export { for } from 'm.js';", |
5522 "export { yield } from 'm.js'", | 5522 "export { yield } from 'm.js'", |
5523 "export { static } from 'm.js'", | 5523 "export { static } from 'm.js'", |
5524 "export { let } from 'm.js'", | 5524 "export { let } from 'm.js'", |
(...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7940 "(a,);", | 7940 "(a,);", |
7941 "(a,b,c,);", | 7941 "(a,b,c,);", |
7942 NULL | 7942 NULL |
7943 }; | 7943 }; |
7944 // clang-format on | 7944 // clang-format on |
7945 | 7945 |
7946 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; | 7946 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; |
7947 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 7947 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
7948 arraysize(always_flags)); | 7948 arraysize(always_flags)); |
7949 } | 7949 } |
OLD | NEW |