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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 }; | 1450 }; |
1451 | 1451 |
1452 template <typename Traits> | 1452 template <typename Traits> |
1453 void SetParserFlags(i::ParserBase<Traits>* parser, | 1453 void SetParserFlags(i::ParserBase<Traits>* parser, |
1454 i::EnumSet<ParserFlag> flags) { | 1454 i::EnumSet<ParserFlag> flags) { |
1455 parser->set_allow_lazy(flags.Contains(kAllowLazy)); | 1455 parser->set_allow_lazy(flags.Contains(kAllowLazy)); |
1456 parser->set_allow_natives(flags.Contains(kAllowNatives)); | 1456 parser->set_allow_natives(flags.Contains(kAllowNatives)); |
1457 parser->set_allow_harmony_modules(flags.Contains(kAllowHarmonyModules)); | 1457 parser->set_allow_harmony_modules(flags.Contains(kAllowHarmonyModules)); |
1458 parser->set_allow_harmony_arrow_functions( | 1458 parser->set_allow_harmony_arrow_functions( |
1459 flags.Contains(kAllowHarmonyArrowFunctions)); | 1459 flags.Contains(kAllowHarmonyArrowFunctions)); |
1460 parser->set_allow_harmony_rest_params( | 1460 parser->set_allow_harmony_rest_parameters( |
1461 flags.Contains(kAllowHarmonyRestParameters)); | 1461 flags.Contains(kAllowHarmonyRestParameters)); |
1462 parser->set_allow_harmony_spreadcalls( | 1462 parser->set_allow_harmony_spreadcalls( |
1463 flags.Contains(kAllowHarmonySpreadCalls)); | 1463 flags.Contains(kAllowHarmonySpreadCalls)); |
1464 parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy)); | 1464 parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy)); |
1465 parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet)); | 1465 parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet)); |
1466 parser->set_allow_harmony_unicode(flags.Contains(kAllowHarmonyUnicode)); | 1466 parser->set_allow_harmony_unicode(flags.Contains(kAllowHarmonyUnicode)); |
1467 parser->set_allow_harmony_computed_property_names( | 1467 parser->set_allow_harmony_computed_property_names( |
1468 flags.Contains(kAllowHarmonyComputedPropertyNames)); | 1468 flags.Contains(kAllowHarmonyComputedPropertyNames)); |
1469 parser->set_allow_harmony_destructuring( | 1469 parser->set_allow_harmony_destructuring( |
1470 flags.Contains(kAllowHarmonyDestructuring)); | 1470 flags.Contains(kAllowHarmonyDestructuring)); |
(...skipping 5370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6841 "for (let x of []) {}", | 6841 "for (let x of []) {}", |
6842 NULL | 6842 NULL |
6843 }; | 6843 }; |
6844 // clang-format on | 6844 // clang-format on |
6845 | 6845 |
6846 static const ParserFlag always_flags[] = {kAllowHarmonySloppy, | 6846 static const ParserFlag always_flags[] = {kAllowHarmonySloppy, |
6847 kAllowHarmonySloppyLet}; | 6847 kAllowHarmonySloppyLet}; |
6848 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, | 6848 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, |
6849 arraysize(always_flags)); | 6849 arraysize(always_flags)); |
6850 } | 6850 } |
OLD | NEW |