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

Unified Diff: src/parsing/preparser.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/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index d88e5361b3e7bc1d13a5c82bf279a67085bdca62..3b7663c9407a1e99eedf192b1eac64bd49a95ae0 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -341,6 +341,7 @@ class PreParserList {
};
+typedef PreParserList<PreParserIdentifier> PreParserIdentifierList;
typedef PreParserList<PreParserExpression> PreParserExpressionList;
@@ -716,6 +717,12 @@ class PreParserFactory {
return typesystem::PreParserType::Reference(type_arguments.length() == 0);
}
+ typesystem::PreParserType NewQueryType(
+ const PreParserIdentifier& name,
+ const PreParserIdentifierList& property_names, int pos) {
+ return typesystem::PreParserType::Default();
+ }
+
typesystem::PreParserFormalParameter NewFormalParameter(
const PreParserIdentifier& name, bool optional, bool spread,
const typesystem::PreParserType& type, int pos) {
@@ -778,6 +785,7 @@ class PreParserTraits {
// Return types for traversing functions.
typedef PreParserIdentifier Identifier;
+ typedef PreParserIdentifierList IdentifierList;
typedef PreParserExpression Expression;
typedef PreParserExpression YieldExpression;
typedef PreParserExpression FunctionLiteral;
@@ -974,6 +982,12 @@ class PreParserTraits {
static typesystem::PreParserFormalParameters EmptyFormalParameters() {
return typesystem::PreParserFormalParameters();
}
+ static PreParserIdentifierList NullIdentifierList() {
+ return PreParserIdentifierList();
+ }
+ static PreParserIdentifierList EmptyIdentifierList() {
+ return PreParserIdentifierList();
+ }
// Odd-ball literal creators.
static PreParserExpression GetLiteralTheHole(int position,

Powered by Google App Engine
This is Rietveld 408576698