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

Unified Diff: src/parsing/parser.cc

Issue 2245133003: [style] Rename some enum values with 'k' prefix (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 6384194445c34441bae1df8e15e6d06c9da5a16c..b762c26abeac85b8bde4dbf0ce66c3009668b070 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -768,7 +768,7 @@ Expression* ParserTraits::ExpressionFromIdentifier(const AstRawString* name,
int start_position,
int end_position,
InferName infer) {
- if (infer == InferName::Yes && parser_->fni_ != NULL) {
+ if (infer == InferName::kYes && parser_->fni_ != NULL) {
parser_->fni_->PushVariableName(name);
}
return parser_->NewUnresolved(name, start_position, end_position);
@@ -4112,14 +4112,15 @@ void ParserTraits::ParseAsyncArrowSingleExpressionBody(
Type::ExpressionClassifier* classifier, int pos, bool* ok) {
parser_->DesugarAsyncFunctionBody(
parser_->ast_value_factory()->empty_string(), parser_->scope(), body,
- classifier, kAsyncArrowFunction, FunctionBody::SingleExpression,
- accept_IN, pos, ok);
+ classifier, kAsyncArrowFunction,
+ Parser::FunctionBodyType::kSingleExpression, accept_IN, pos, ok);
}
void Parser::DesugarAsyncFunctionBody(const AstRawString* function_name,
Scope* scope, ZoneList<Statement*>* body,
ExpressionClassifier* classifier,
- FunctionKind kind, FunctionBody body_type,
+ FunctionKind kind,
+ FunctionBodyType body_type,
bool accept_IN, int pos, bool* ok) {
// function async_function() {
// try {
@@ -4146,7 +4147,7 @@ void Parser::DesugarAsyncFunctionBody(const AstRawString* function_name,
ZoneList<Statement*>* inner_body = try_block->statements();
Expression* return_value = nullptr;
- if (body_type == FunctionBody::Normal) {
+ if (body_type == FunctionBodyType::kNormal) {
ParseStatementList(inner_body, Token::RBRACE, CHECK_OK_VOID);
return_value = factory()->NewUndefinedLiteral(kNoSourcePosition);
} else {
@@ -4869,7 +4870,8 @@ ZoneList<Statement*>* Parser::ParseEagerFunctionBody(
} else if (IsAsyncFunction(kind)) {
const bool accept_IN = true;
DesugarAsyncFunctionBody(function_name, inner_scope, body, nullptr, kind,
- FunctionBody::Normal, accept_IN, pos, CHECK_OK);
+ FunctionBodyType::kNormal, accept_IN, pos,
+ CHECK_OK);
} else {
ParseStatementList(body, Token::RBRACE, CHECK_OK);
}
@@ -5040,7 +5042,7 @@ Expression* Parser::ParseClassLiteral(ExpressionClassifier* classifier,
ExpressionClassifier property_classifier(this);
const AstRawString* property_name = nullptr;
ObjectLiteral::Property* property = ParsePropertyDefinition(
- &checker, in_class, has_extends, MethodKind::Normal, &is_computed_name,
+ &checker, in_class, has_extends, MethodKind::kNormal, &is_computed_name,
&has_seen_constructor, &property_classifier, &property_name, CHECK_OK);
RewriteNonPattern(&property_classifier, CHECK_OK);
if (classifier != nullptr) {
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698