Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: src/parsing/preparser.cc

Issue 2258123002: [parser] Refactor parser and preparser traits (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@nickie-2264483003-ord-traits
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index d90d943d9fb70ac6b1b7377590ca68388ee3a50e..bdb817b4b4da6b38f143c1ff9ac17b32395524e3 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -41,15 +41,16 @@ namespace internal {
#define DUMMY ) // to make indentation work
#undef DUMMY
-void PreParserTraits::ReportMessageAt(Scanner::Location location,
+void PreParserTraits::ReportMessageAt(Scanner::Location source_location,
MessageTemplate::Template message,
const char* arg,
ParseErrorType error_type) {
- pre_parser_->log_->LogMessage(location.beg_pos, location.end_pos, message,
- arg, error_type);
+ pre_parser_->log_->LogMessage(source_location.beg_pos,
+ source_location.end_pos, message, arg,
+ error_type);
}
-void PreParserTraits::ReportMessageAt(Scanner::Location location,
+void PreParserTraits::ReportMessageAt(Scanner::Location source_location,
MessageTemplate::Template message,
const AstRawString* arg,
ParseErrorType error_type) {
@@ -57,7 +58,7 @@ void PreParserTraits::ReportMessageAt(Scanner::Location location,
}
-PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) {
+PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) const {
switch (scanner->current_token()) {
case Token::ENUM:
return PreParserIdentifier::Enum();
@@ -90,7 +91,7 @@ PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) {
PreParserExpression PreParserTraits::ExpressionFromString(
- int pos, Scanner* scanner, PreParserFactory* factory) {
+ int pos, Scanner* scanner, PreParserFactory* factory) const {
if (scanner->UnescapedLiteralMatches("use strict", 10)) {
return PreParserExpression::UseStrictStringLiteral();
}
« no previous file with comments | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698