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

Unified Diff: src/parsing/preparser.h

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/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 3f60b69307fb7d2e3a953b29e04dcdd73a06c395..bb6f2284d6656caac276748b864897ec122cdda9 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -745,11 +745,11 @@ class PreParserTraits {
}
// Reporting errors.
- void ReportMessageAt(Scanner::Location location,
+ void ReportMessageAt(Scanner::Location source_location,
MessageTemplate::Template message,
const char* arg = NULL,
ParseErrorType error_type = kSyntaxError);
- void ReportMessageAt(Scanner::Location location,
+ void ReportMessageAt(Scanner::Location source_location,
MessageTemplate::Template message,
const AstRawString* arg,
ParseErrorType error_type = kSyntaxError);
@@ -777,7 +777,7 @@ class PreParserTraits {
static PreParserExpressionList NullExpressionList() {
return PreParserExpressionList();
}
- static PreParserIdentifier EmptyIdentifierString() {
+ PreParserIdentifier EmptyIdentifierString() const {
return PreParserIdentifier::Default();
}
@@ -788,13 +788,13 @@ class PreParserTraits {
}
// Producing data during the recursive descent.
- PreParserIdentifier GetSymbol(Scanner* scanner);
+ PreParserIdentifier GetSymbol(Scanner* scanner) const;
PreParserIdentifier GetNextSymbol(Scanner* scanner) const {
return PreParserIdentifier::Default();
}
- PreParserIdentifier GetNumberAsSymbol(Scanner* scanner) {
+ PreParserIdentifier GetNumberAsSymbol(Scanner* scanner) const {
return PreParserIdentifier::Default();
}
@@ -834,7 +834,7 @@ class PreParserTraits {
}
PreParserExpression ExpressionFromString(int pos, Scanner* scanner,
- PreParserFactory* factory);
+ PreParserFactory* factory) const;
PreParserExpression GetIterator(PreParserExpression iterable,
PreParserFactory* factory, int pos) {
@@ -854,7 +854,7 @@ class PreParserTraits {
}
void AddParameterInitializationBlock(
- const PreParserFormalParameters& parameters, PreParserStatementList list,
+ const PreParserFormalParameters& parameters, PreParserStatementList body,
bool is_async, bool* ok) const {}
void ParseAsyncArrowSingleExpressionBody(
@@ -878,7 +878,7 @@ class PreParserTraits {
}
V8_INLINE void ParseArrowFunctionFormalParameterList(
- PreParserFormalParameters* parameters, PreParserExpression expression,
+ PreParserFormalParameters* parameters, PreParserExpression params,
const Scanner::Location& params_loc, Scanner::Location* duplicate_loc,
const Scope::Snapshot& scope_snapshot, bool* ok);
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698