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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 " more;", i::BLOCK_SCOPE, i::STRICT }, | 1204 " more;", i::BLOCK_SCOPE, i::STRICT }, |
1205 { " start;\n" | 1205 { " start;\n" |
1206 " function fun", "(a,b) { infunction; }", " more;", | 1206 " function fun", "(a,b) { infunction; }", " more;", |
1207 i::FUNCTION_SCOPE, i::SLOPPY }, | 1207 i::FUNCTION_SCOPE, i::SLOPPY }, |
1208 { " start;\n" | 1208 { " start;\n" |
1209 " function fun", "(a,b) {\n" | 1209 " function fun", "(a,b) {\n" |
1210 " infunction;\n" | 1210 " infunction;\n" |
1211 " }", "\n" | 1211 " }", "\n" |
1212 " more;", i::FUNCTION_SCOPE, i::SLOPPY }, | 1212 " more;", i::FUNCTION_SCOPE, i::SLOPPY }, |
1213 { " start;\n", "(a,b) => a + b", "; more;", | 1213 { " start;\n", "(a,b) => a + b", "; more;", |
1214 i::ARROW_SCOPE, i::SLOPPY }, | 1214 i::FUNCTION_SCOPE, i::SLOPPY }, |
1215 { " start;\n", "(a,b) => { return a+b; }", "\nmore;", | 1215 { " start;\n", "(a,b) => { return a+b; }", "\nmore;", |
1216 i::ARROW_SCOPE, i::SLOPPY }, | 1216 i::FUNCTION_SCOPE, i::SLOPPY }, |
1217 { " start;\n" | 1217 { " start;\n" |
1218 " (function fun", "(a,b) { infunction; }", ")();", | 1218 " (function fun", "(a,b) { infunction; }", ")();", |
1219 i::FUNCTION_SCOPE, i::SLOPPY }, | 1219 i::FUNCTION_SCOPE, i::SLOPPY }, |
1220 { " for ", "(let x = 1 ; x < 10; ++ x) { block; }", " more;", | 1220 { " for ", "(let x = 1 ; x < 10; ++ x) { block; }", " more;", |
1221 i::BLOCK_SCOPE, i::STRICT }, | 1221 i::BLOCK_SCOPE, i::STRICT }, |
1222 { " for ", "(let x = 1 ; x < 10; ++ x) { block; }", "; more;", | 1222 { " for ", "(let x = 1 ; x < 10; ++ x) { block; }", "; more;", |
1223 i::BLOCK_SCOPE, i::STRICT }, | 1223 i::BLOCK_SCOPE, i::STRICT }, |
1224 { " for ", "(let x = 1 ; x < 10; ++ x) {\n" | 1224 { " for ", "(let x = 1 ; x < 10; ++ x) {\n" |
1225 " block;\n" | 1225 " block;\n" |
1226 " }", "\n" | 1226 " }", "\n" |
(...skipping 5992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7219 NULL | 7219 NULL |
7220 }; | 7220 }; |
7221 // clang-format on | 7221 // clang-format on |
7222 | 7222 |
7223 static const ParserFlag fail_flags[] = { | 7223 static const ParserFlag fail_flags[] = { |
7224 kAllowHarmonySloppy, kAllowHarmonySloppyLet, kNoLegacyConst, | 7224 kAllowHarmonySloppy, kAllowHarmonySloppyLet, kNoLegacyConst, |
7225 kAllowHarmonyDestructuring}; | 7225 kAllowHarmonyDestructuring}; |
7226 RunParserSyncTest(context_data, fail_data, kError, NULL, 0, fail_flags, | 7226 RunParserSyncTest(context_data, fail_data, kError, NULL, 0, fail_flags, |
7227 arraysize(fail_flags)); | 7227 arraysize(fail_flags)); |
7228 } | 7228 } |
OLD | NEW |