@@ -2411,7 +2411,8 @@ function parse($TEXT, options) {
|
||||
unexpected(tmp);
|
||||
}
|
||||
case "name":
|
||||
if (tmp.value === "yield" && S.input.has_directive("use strict") && !is_in_generator()) {
|
||||
if (tmp.value == "yield" && !is_token(peek(), "punc", ":")
|
||||
&& S.input.has_directive("use strict") && !is_in_generator()) {
|
||||
token_error(tmp, "Unexpected yield identifier inside strict mode");
|
||||
}
|
||||
case "string":
|
||||
|
||||
Reference in New Issue
Block a user