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

Unified Diff: src/parsing/preparser.h

Issue 1871923003: Add parsing for ambient declarations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-devel
Patch Set: Minor fixes to address code review comments Created 4 years, 8 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
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 5ceb6c8b7df00db914b883fcd4e2ab012de04791..988e03b2cf6a813f457d52534e4eba779120e65e 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -1219,7 +1219,7 @@ class PreParserTraits {
PreParserExpression ParseClassLiteral(PreParserIdentifier name,
Scanner::Location class_name_location,
bool name_is_strict_reserved, int pos,
- bool* ok);
+ bool ambient, bool* ok);
PreParserExpressionList PrepareSpreadArguments(PreParserExpressionList list) {
return list;
@@ -1358,17 +1358,17 @@ class PreParser : public ParserBase<PreParserTraits> {
Statement ParseSubStatement(AllowLabelledFunctionStatement allow_function,
bool* ok);
Statement ParseScopedStatement(bool legacy, bool* ok);
- Statement ParseFunctionDeclaration(bool* ok);
- Statement ParseClassDeclaration(bool* ok);
+ Statement ParseFunctionDeclaration(bool ambient, bool* ok);
+ Statement ParseClassDeclaration(bool ambient, bool* ok);
Statement ParseBlock(bool* ok);
Statement ParseVariableStatement(VariableDeclarationContext var_context,
- bool* ok);
+ bool ambient, bool* ok);
Statement ParseVariableDeclarations(VariableDeclarationContext var_context,
int* num_decl, bool* is_lexical,
bool* is_binding_pattern,
Scanner::Location* first_initializer_loc,
Scanner::Location* bindings_loc,
- bool* ok);
+ bool ambient, bool* ok);
Statement ParseExpressionOrLabelledStatement(
AllowLabelledFunctionStatement allow_function, bool* ok);
Statement ParseIfStatement(bool* ok);
@@ -1408,7 +1408,7 @@ class PreParser : public ParserBase<PreParserTraits> {
PreParserExpression ParseClassLiteral(PreParserIdentifier name,
Scanner::Location class_name_location,
bool name_is_strict_reserved, int pos,
- bool* ok);
+ bool ambient, bool* ok);
};
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | src/parsing/preparser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698