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

Unified Diff: src/parsing/parser.h

Issue 2311903003: Move ParseHoistableDeclaration to ParserBase. (Closed)
Patch Set: rebased Created 4 years, 3 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 | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 1ef3e61eebe1afa12bbf09a273234227a1e865f7..8b1451e910174815f63785bad596d119560f5885 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -267,11 +267,6 @@ class Parser : public ParserBase<Parser> {
};
ZoneList<const NamedImport*>* ParseNamedImports(int pos, bool* ok);
Statement* ParseFunctionDeclaration(bool* ok);
- Statement* ParseHoistableDeclaration(ZoneList<const AstRawString*>* names,
- bool default_export, bool* ok);
- Statement* ParseHoistableDeclaration(int pos, ParseFunctionFlags flags,
- ZoneList<const AstRawString*>* names,
- bool default_export, bool* ok);
Statement* ParseAsyncFunctionDeclaration(ZoneList<const AstRawString*>* names,
bool default_export, bool* ok);
Expression* ParseAsyncFunctionExpression(bool* ok);
@@ -286,6 +281,11 @@ class Parser : public ParserBase<Parser> {
const DeclarationParsingResult::Declaration* declaration,
ZoneList<const AstRawString*>* names, bool* ok);
+ Statement* DeclareFunction(const AstRawString* variable_name,
+ FunctionLiteral* function, int pos,
+ bool is_generator, bool is_async,
+ ZoneList<const AstRawString*>* names, bool* ok);
+
DoExpression* ParseDoExpression(bool* ok);
Expression* ParseYieldStarExpression(bool* ok);
@@ -699,6 +699,13 @@ class Parser : public ParserBase<Parser> {
return property->value();
}
+ V8_INLINE void GetDefaultStrings(
+ const AstRawString** default_string,
+ const AstRawString** star_default_star_string) {
+ *default_string = ast_value_factory()->default_string();
+ *star_default_star_string = ast_value_factory()->star_default_star_string();
+ }
+
// Functions for encapsulating the differences between parsing and preparsing;
// operations interleaved with the recursive descent.
V8_INLINE void PushLiteralName(const AstRawString* id) {
@@ -720,6 +727,11 @@ class Parser : public ParserBase<Parser> {
}
}
+ V8_INLINE void PushEnclosingName(const AstRawString* name) {
+ DCHECK_NOT_NULL(fni_);
+ fni_->PushEnclosingName(name);
+ }
+
V8_INLINE void InferFunctionName(FunctionLiteral* func_to_infer) {
fni_->AddFunction(func_to_infer);
}
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698