mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
1339963 - Part 2: Use MUST_MATCH_TOKEN for contextual keyword where it can be used.
This commit is contained in:
parent
942760e3c4
commit
e36ea05a8b
1 changed files with 2 additions and 14 deletions
|
|
@ -4915,13 +4915,7 @@ Parser<FullParseHandler>::importDeclaration()
|
|||
return null();
|
||||
}
|
||||
|
||||
if (!tokenStream.getToken(&tt))
|
||||
return null();
|
||||
|
||||
if (tt != TOK_FROM) {
|
||||
error(JSMSG_FROM_AFTER_IMPORT_CLAUSE);
|
||||
return null();
|
||||
}
|
||||
MUST_MATCH_TOKEN(TOK_FROM, JSMSG_FROM_AFTER_IMPORT_CLAUSE);
|
||||
|
||||
MUST_MATCH_TOKEN(TOK_STRING, JSMSG_MODULE_SPEC_AFTER_FROM);
|
||||
}
|
||||
|
|
@ -5125,13 +5119,7 @@ Parser<ParseHandler>::exportBatch(uint32_t begin)
|
|||
|
||||
handler.addList(kid, exportSpec);
|
||||
|
||||
TokenKind tt;
|
||||
if (!tokenStream.getToken(&tt))
|
||||
return null();
|
||||
if (tt != TOK_FROM) {
|
||||
error(JSMSG_FROM_AFTER_EXPORT_STAR);
|
||||
return null();
|
||||
}
|
||||
MUST_MATCH_TOKEN(TOK_FROM, JSMSG_FROM_AFTER_EXPORT_STAR);
|
||||
|
||||
return exportFrom(begin, kid);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue