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 7143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7154 "tag`left${0}\\u{0`", | 7154 "tag`left${0}\\u{0`", |
7155 "tag`left${0}\\u{0${1}right`", | 7155 "tag`left${0}\\u{0${1}right`", |
7156 "tag`\\u{\\u{0}`", | 7156 "tag`\\u{\\u{0}`", |
7157 "tag`\\u{\\u{0}${0}right`", | 7157 "tag`\\u{\\u{0}${0}right`", |
7158 "tag`left${0}\\u{\\u{0}`", | 7158 "tag`left${0}\\u{\\u{0}`", |
7159 "tag`left${0}\\u{\\u{0}${1}right`", | 7159 "tag`left${0}\\u{\\u{0}${1}right`", |
7160 "tag`\\u{110000}`", | 7160 "tag`\\u{110000}`", |
7161 "tag`\\u{110000}${0}right`", | 7161 "tag`\\u{110000}${0}right`", |
7162 "tag`left${0}\\u{110000}`", | 7162 "tag`left${0}\\u{110000}`", |
7163 "tag`left${0}\\u{110000}${1}right`", | 7163 "tag`left${0}\\u{110000}${1}right`", |
| 7164 "tag` ${tag`\\u`}`", |
| 7165 "tag` ``\\u`", |
| 7166 "tag`\\u`` `", |
| 7167 "tag`\\u``\\u`", |
| 7168 "` ${tag`\\u`}`", |
| 7169 "` ``\\u`", |
7164 NULL}; | 7170 NULL}; |
7165 // clang-format on | 7171 // clang-format on |
7166 | 7172 |
7167 // No error with flag | 7173 // No error with flag |
7168 static const ParserFlag flags[] = {kAllowHarmonyTemplateEscapes}; | 7174 static const ParserFlag flags[] = {kAllowHarmonyTemplateEscapes}; |
7169 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags, | 7175 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags, |
7170 arraysize(flags)); | 7176 arraysize(flags)); |
7171 | 7177 |
7172 // Still an error without flag | 7178 // Still an error without flag |
7173 RunParserSyncTest(context_data, data, kError); | 7179 RunParserSyncTest(context_data, data, kError); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7232 "`left${0}\\u{0${1}right`", | 7238 "`left${0}\\u{0${1}right`", |
7233 "`\\u{\\u{0}`", | 7239 "`\\u{\\u{0}`", |
7234 "`\\u{\\u{0}${0}right`", | 7240 "`\\u{\\u{0}${0}right`", |
7235 "`left${0}\\u{\\u{0}`", | 7241 "`left${0}\\u{\\u{0}`", |
7236 "`left${0}\\u{\\u{0}${1}right`", | 7242 "`left${0}\\u{\\u{0}${1}right`", |
7237 "`\\u{110000}`", | 7243 "`\\u{110000}`", |
7238 "`\\u{110000}${0}right`", | 7244 "`\\u{110000}${0}right`", |
7239 "`left${0}\\u{110000}`", | 7245 "`left${0}\\u{110000}`", |
7240 "`left${0}\\u{110000}${1}right`", | 7246 "`left${0}\\u{110000}${1}right`", |
7241 "`\\1``\\2`", | 7247 "`\\1``\\2`", |
| 7248 "tag` ${`\\u`}`", |
| 7249 "`\\u```", |
7242 NULL}; | 7250 NULL}; |
7243 // clang-format on | 7251 // clang-format on |
7244 | 7252 |
7245 // Error with flag | 7253 // Error with flag |
7246 static const ParserFlag flags[] = {kAllowHarmonyTemplateEscapes}; | 7254 static const ParserFlag flags[] = {kAllowHarmonyTemplateEscapes}; |
7247 RunParserSyncTest(context_data, data, kError, NULL, 0, flags, | 7255 RunParserSyncTest(context_data, data, kError, NULL, 0, flags, |
7248 arraysize(flags)); | 7256 arraysize(flags)); |
7249 | 7257 |
7250 // Still an error without flag | 7258 // Still an error without flag |
7251 RunParserSyncTest(context_data, data, kError); | 7259 RunParserSyncTest(context_data, data, kError); |
(...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9928 // "for await (x of []) async function a() {};", | 9936 // "for await (x of []) async function a() {};", |
9929 // "for await (x of []) async function a() {}; return a;", | 9937 // "for await (x of []) async function a() {}; return a;", |
9930 NULL | 9938 NULL |
9931 }; | 9939 }; |
9932 | 9940 |
9933 // clang-format on | 9941 // clang-format on |
9934 static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration}; | 9942 static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration}; |
9935 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 9943 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
9936 arraysize(always_flags)); | 9944 arraysize(always_flags)); |
9937 } | 9945 } |
OLD | NEW |