Index: src/parsing/preparser.cc |
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc |
index 9fa94a362e4085e10b3eba3ef77de059af11b500..461e853bbc7dbc869fb2f79da36d9784199bafa6 100644 |
--- a/src/parsing/preparser.cc |
+++ b/src/parsing/preparser.cc |
@@ -41,9 +41,8 @@ namespace internal { |
#define DUMMY ) // to make indentation work |
#undef DUMMY |
-PreParserIdentifier ParserBaseTraits<PreParser>::GetSymbol( |
- Scanner* scanner) const { |
- switch (scanner->current_token()) { |
+PreParserIdentifier PreParser::GetSymbol() const { |
+ switch (scanner()->current_token()) { |
case Token::ENUM: |
return PreParserIdentifier::Enum(); |
case Token::AWAIT: |
@@ -59,28 +58,20 @@ PreParserIdentifier ParserBaseTraits<PreParser>::GetSymbol( |
case Token::ASYNC: |
return PreParserIdentifier::Async(); |
default: |
- if (scanner->UnescapedLiteralMatches("eval", 4)) |
+ if (scanner()->UnescapedLiteralMatches("eval", 4)) |
return PreParserIdentifier::Eval(); |
- if (scanner->UnescapedLiteralMatches("arguments", 9)) |
+ if (scanner()->UnescapedLiteralMatches("arguments", 9)) |
return PreParserIdentifier::Arguments(); |
- if (scanner->UnescapedLiteralMatches("undefined", 9)) |
+ if (scanner()->UnescapedLiteralMatches("undefined", 9)) |
return PreParserIdentifier::Undefined(); |
- if (scanner->LiteralMatches("prototype", 9)) |
+ if (scanner()->LiteralMatches("prototype", 9)) |
return PreParserIdentifier::Prototype(); |
- if (scanner->LiteralMatches("constructor", 11)) |
+ if (scanner()->LiteralMatches("constructor", 11)) |
return PreParserIdentifier::Constructor(); |
return PreParserIdentifier::Default(); |
} |
} |
-PreParserExpression ParserBaseTraits<PreParser>::ExpressionFromString( |
- int pos, Scanner* scanner, PreParserFactory* factory) const { |
- if (scanner->UnescapedLiteralMatches("use strict", 10)) { |
- return PreParserExpression::UseStrictStringLiteral(); |
- } |
- return PreParserExpression::StringLiteral(); |
-} |
- |
PreParser::PreParseResult PreParser::PreParseLazyFunction( |
LanguageMode language_mode, FunctionKind kind, bool has_simple_parameters, |
bool parsing_module, ParserRecorder* log, Scanner::BookmarkScope* bookmark, |