зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1405760 - Remove ParseHandler::newNullary, replacing the one use with a new method. r=Waldo
--HG-- extra : rebase_source : 7ef6ca92e439e815e7352102b8e4fe9be11b3ed4
This commit is contained in:
Родитель
a9b8193313
Коммит
c80673f70b
|
@ -199,10 +199,6 @@ class FullParseHandler
|
|||
return new_<UnaryNode>(kind, JSOP_NOP, pos, kid);
|
||||
}
|
||||
|
||||
ParseNode* newNullary(ParseNodeKind kind, JSOp op, const TokenPos& pos) {
|
||||
return new_<NullaryNode>(kind, op, pos);
|
||||
}
|
||||
|
||||
ParseNode* newUnary(ParseNodeKind kind, JSOp op, uint32_t begin, ParseNode* kid) {
|
||||
TokenPos pos(begin, kid ? kid->pn_pos.end : begin + 1);
|
||||
return new_<UnaryNode>(kind, op, pos, kid);
|
||||
|
@ -532,6 +528,10 @@ class FullParseHandler
|
|||
return new_<BinaryNode>(PNK_EXPORT_DEFAULT, JSOP_NOP, pos, kid, maybeBinding);
|
||||
}
|
||||
|
||||
ParseNode* newExportBatchSpec(const TokenPos& pos) {
|
||||
return new_<NullaryNode>(PNK_EXPORT_BATCH_SPEC, JSOP_NOP, pos);
|
||||
}
|
||||
|
||||
ParseNode* newExprStatement(ParseNode* expr, uint32_t end) {
|
||||
MOZ_ASSERT(expr->pn_pos.end <= end);
|
||||
return new_<UnaryNode>(PNK_SEMI, JSOP_NOP, TokenPos(expr->pn_pos.begin, end), expr);
|
||||
|
|
|
@ -5490,7 +5490,7 @@ Parser<ParseHandler, CharT>::exportBatch(uint32_t begin)
|
|||
|
||||
// Handle the form |export *| by adding a special export batch
|
||||
// specifier to the list.
|
||||
Node exportSpec = handler.newNullary(PNK_EXPORT_BATCH_SPEC, JSOP_NOP, pos());
|
||||
Node exportSpec = handler.newExportBatchSpec(pos());
|
||||
if (!exportSpec)
|
||||
return null();
|
||||
|
||||
|
|
|
@ -237,10 +237,6 @@ class SyntaxParseHandler
|
|||
return NodeUnparenthesizedUnary;
|
||||
}
|
||||
|
||||
Node newNullary(ParseNodeKind kind, JSOp op, const TokenPos& pos) {
|
||||
return NodeGeneric;
|
||||
}
|
||||
|
||||
Node newUnary(ParseNodeKind kind, JSOp op, uint32_t begin, Node kid) {
|
||||
return NodeUnparenthesizedUnary;
|
||||
}
|
||||
|
@ -317,6 +313,9 @@ class SyntaxParseHandler
|
|||
Node newExportDefaultDeclaration(Node kid, Node maybeBinding, const TokenPos& pos) {
|
||||
return NodeGeneric;
|
||||
}
|
||||
Node newExportBatchSpec(const TokenPos& pos) {
|
||||
return NodeGeneric;
|
||||
}
|
||||
|
||||
Node newSetThis(Node thisName, Node value) { return value; }
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче