зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1424946
- Move GeneralParser::noteDestructuredPositionalFormalParameter into a baser class. r=arai
This commit is contained in:
Родитель
c299536825
Коммит
0dea96b398
|
@ -1182,10 +1182,9 @@ GeneralParser<ParseHandler, CharT>::notePositionalFormalParameter(Node fn, Handl
|
|||
return true;
|
||||
}
|
||||
|
||||
template <class ParseHandler, typename CharT>
|
||||
template <class ParseHandler>
|
||||
bool
|
||||
GeneralParser<ParseHandler, CharT>::noteDestructuredPositionalFormalParameter(Node fn,
|
||||
Node destruct)
|
||||
PerHandlerParser<ParseHandler>::noteDestructuredPositionalFormalParameter(Node fn, Node destruct)
|
||||
{
|
||||
// Append an empty name to the positional formals vector to keep track of
|
||||
// argument slots when making FunctionScope::Data.
|
||||
|
|
|
@ -289,6 +289,8 @@ class PerHandlerParser
|
|||
|
||||
const char* nameIsArgumentsOrEval(Node node);
|
||||
|
||||
bool noteDestructuredPositionalFormalParameter(Node fn, Node destruct);
|
||||
|
||||
public:
|
||||
bool isValidSimpleAssignmentTarget(Node node,
|
||||
FunctionCallBehavior behavior = ForbidAssignmentToFunctionCalls);
|
||||
|
@ -366,6 +368,9 @@ class GeneralParser
|
|||
using Base::pc;
|
||||
using Base::usedNames;
|
||||
|
||||
private:
|
||||
using Base::noteDestructuredPositionalFormalParameter;
|
||||
|
||||
private:
|
||||
inline FinalParser* asFinalParser();
|
||||
inline const FinalParser* asFinalParser() const;
|
||||
|
@ -864,7 +869,6 @@ class GeneralParser
|
|||
uint32_t prevPos);
|
||||
bool notePositionalFormalParameter(Node fn, HandlePropertyName name, uint32_t beginPos,
|
||||
bool disallowDuplicateParams, bool* duplicatedParam);
|
||||
bool noteDestructuredPositionalFormalParameter(Node fn, Node destruct);
|
||||
|
||||
bool checkLexicalDeclarationDirectlyWithinBlock(ParseContext::Statement& stmt,
|
||||
DeclarationKind kind, TokenPos pos);
|
||||
|
|
Загрузка…
Ссылка в новой задаче