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

Unified Diff: src/parsing/preparser.cc

Issue 1849803002: Add parsing for interface declarations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-1850663002-class-decl
Patch Set: Add more tests 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
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index fd125e8919a04642a21b5a128cb956bc75a77c1e..2be6301db258e2bcd8c84316c09ed4187a09dd25 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -193,15 +193,17 @@ PreParser::Statement PreParser::ParseStatementListItem(bool* ok) {
return ParseVariableStatement(kStatementListItem, ok);
}
break;
- case Token::IDENTIFIER: {
+ case Token::IDENTIFIER:
+ case Token::FUTURE_STRICT_RESERVED_WORD: {
if (!scope_->typed()) break;
int pos = peek_position();
if (CheckContextualKeyword(CStrVector("type"))) {
return ParseTypeAliasDeclaration(pos, ok);
+ } else if (CheckContextualKeyword(CStrVector("interface"))) {
+ return ParseInterfaceDeclaration(pos, ok);
}
break;
}
- // TODO(nikolaos): interface
// TODO(nikolaos): ambient
default:
break;
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698