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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 2749253003: Add here-be-dragons comments. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 23f9e3a15a66443b6c418cdf549c8b96b9fbd05e..888e8c065fe47d8204a3b7c06421c52eba564597 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -1353,6 +1353,13 @@ class Parser {
/// ['(', '*', 'operator']
///
Link<Token> findMemberName(Token token) {
+ // TODO(ahe): This method is rather broken for examples like this:
+ //
+ // get<T>(){}
+ //
+ // In addition, the loop below will include things that can't be
+ // identifiers. This may be desirable (for error recovery), or
+ // not. Regardless, this method probably needs an overhaul.
Link<Token> identifiers = const Link<Token>();
// `true` if 'get' has been seen.
@@ -1542,6 +1549,11 @@ class Parser {
}
Token parseModifiers(Token token) {
+ // TODO(ahe): The calling convention of this method probably needs to
+ // change. For example, this is parsed as a local variable declaration:
+ // `abstract foo;`. Ideally, this example should be handled as a local
+ // variable having the type `abstract` (which should be reported as
+ // `ErrorKind.BuiltInIdentifierAsType` by [parseIdentifier]).
int count = 0;
while (identical(token.kind, KEYWORD_TOKEN)) {
if (!isModifier(token)) break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698