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

Unified Diff: src/parsing/parser.h

Issue 1801633003: Add parsing for type queries (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types
Patch Set: Created 4 years, 9 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/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index e2f6b6e739255866a74d6a87f490b669579b4915..a3f51c5cd062cab4380d3c5b2584e01acd320503 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -339,6 +339,7 @@ class ParserTraits {
// Return types for traversing functions.
typedef const AstRawString* Identifier;
+ typedef ZoneList<const AstRawString*>* IdentifierList;
typedef v8::internal::Expression* Expression;
typedef Yield* YieldExpression;
typedef v8::internal::FunctionLiteral* FunctionLiteral;
@@ -511,6 +512,8 @@ class ParserTraits {
V8_INLINE ZoneList<typesystem::TypeParameter*>* EmptyTypeParameters() const;
V8_INLINE ZoneList<typesystem::FormalParameter*>* EmptyFormalParameters()
const;
+ static ZoneList<const AstRawString*>* NullIdentifierList() { return nullptr; }
+ V8_INLINE ZoneList<const AstRawString*>* EmptyIdentifierList() const;
// Used in error return values.
static ZoneList<Expression*>* NullExpressionList() {
@@ -1128,6 +1131,12 @@ ZoneList<typesystem::FormalParameter*>* ParserTraits::EmptyFormalParameters()
}
+ZoneList<const AstRawString*>* ParserTraits::EmptyIdentifierList() const {
+ return new (parser_->zone())
+ ZoneList<const AstRawString*>(1, parser_->zone());
+}
+
+
const AstRawString* ParserTraits::EmptyIdentifierString() {
return parser_->ast_value_factory()->empty_string();
}
« no previous file with comments | « src/ast/ast.h ('k') | src/parsing/parser-base.h » ('j') | src/parsing/parser-base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698