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

Unified Diff: pkg/compiler/lib/src/scanner/parser.dart

Issue 864643006: Allow sync *, async * and yield * in dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/scanner/parser.dart
diff --git a/pkg/compiler/lib/src/scanner/parser.dart b/pkg/compiler/lib/src/scanner/parser.dart
index fb4919661152492a143c82a3f265931da1f2f4b9..00e599f55b13e4b16b54a6fe34313dfb5bd6b972 100644
--- a/pkg/compiler/lib/src/scanner/parser.dart
+++ b/pkg/compiler/lib/src/scanner/parser.dart
@@ -1512,15 +1512,6 @@ class Parser {
return token;
}
- /// `async*` and `sync*` are parsed a two tokens, [token] and [star]. This
- /// method checks that there is no whitespace between [token] and [star].
- void checkStarredModifier(Token token, Token star, String name) {
- if (star.charOffset > token.charOffset + token.charCount) {
- listener.reportError(new TokenPair(token, star),
- MessageKind.INVALID_STARRED_KEYWORD, {'keyword': name});
- }
- }
-
Token parseAsyncModifier(Token token) {
Token async;
Token star;
@@ -1534,7 +1525,6 @@ class Parser {
yieldIsKeyword = true;
star = token;
token = token.next;
- checkStarredModifier(async, star, 'async*');
}
} else if (optional('sync', token)) {
async = token;
@@ -1543,8 +1533,6 @@ class Parser {
yieldIsKeyword = true;
star = token;
token = token.next;
-
- checkStarredModifier(async, star, 'sync*');
} else {
listener.reportError(async,
MessageKind.INVALID_SYNC_MODIFIER);
@@ -1617,7 +1605,6 @@ class Parser {
if (optional('*', token)) {
starToken = token;
token = token.next;
- checkStarredModifier(begin, starToken, 'yield*');
}
token = parseExpression(token);
listener.endYieldStatement(begin, starToken, token);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698