Bug 1428863 - Add non-qualified Position typenames to various parser structs. r=arai

--HG--
extra : rebase_source : 943e151f8df48273cdaf4b89630ccbf50d9428cb
This commit is contained in:
Jeff Walden 2017-12-23 13:47:18 -05:00
Родитель 5553aa4882
Коммит bfe1aeae23
2 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -3410,7 +3410,7 @@ GeneralParser<ParseHandler, CharT>::functionDefinition(Node funcNode, uint32_t t
Directives directives(pc);
Directives newDirectives = directives;
typename TokenStream::Position start(keepAtoms);
Position start(keepAtoms);
tokenStream.tell(&start);
// Parse the inner function. The following is a loop as we may attempt to
@ -3477,7 +3477,7 @@ Parser<FullParseHandler, CharT>::trySyntaxParseInnerFunction(ParseNode* funcNode
UsedNameTracker::RewindToken token = usedNames.getRewindToken();
// Move the syntax parser to the current position in the stream.
typename TokenStream::Position position(keepAtoms);
Position position(keepAtoms);
tokenStream.tell(&position);
if (!syntaxParser->tokenStream.seek(position, anyChars))
return false;
@ -8081,7 +8081,7 @@ GeneralParser<ParseHandler, CharT>::assignExpr(InHandling inHandling, YieldHandl
// Save the tokenizer state in case we find an arrow function and have to
// rewind.
typename TokenStream::Position start(keepAtoms);
Position start(keepAtoms);
tokenStream.tell(&start);
PossibleError possibleErrorInner(*this);

Просмотреть файл

@ -648,6 +648,9 @@ template <class ParseHandler, typename CharT>
class GeneralParser
: public PerHandlerParser<ParseHandler>
{
public:
using TokenStream = TokenStreamSpecific<CharT, ParserAnyCharsAccess<GeneralParser>>;
private:
using Base = PerHandlerParser<ParseHandler>;
using FinalParser = Parser<ParseHandler, CharT>;
@ -657,6 +660,7 @@ class GeneralParser
protected:
using Modifier = TokenStreamShared::Modifier;
using Position = typename TokenStream::Position;
using Base::PredictUninvoked;
using Base::PredictInvoked;
@ -866,7 +870,6 @@ class GeneralParser
}
public:
using TokenStream = TokenStreamSpecific<CharT, ParserAnyCharsAccess<GeneralParser>>;
TokenStream tokenStream;
public:
@ -1276,6 +1279,8 @@ class Parser<SyntaxParseHandler, CharT> final
// Inherited types, listed here to have non-dependent names.
using typename Base::Modifier;
using typename Base::Position;
using typename Base::TokenStream;
// Inherited functions, listed here to have non-dependent names.
@ -1381,6 +1386,8 @@ class Parser<FullParseHandler, CharT> final
// Inherited types, listed here to have non-dependent names.
using typename Base::Modifier;
using typename Base::Position;
using typename Base::TokenStream;
// Inherited functions, listed here to have non-dependent names.