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

Side by Side Diff: pkg/front_end/lib/src/fasta/parser/listener.dart

Issue 2985673002: Parse type variables of local functions before return type. (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.parser.listener; 5 library fasta.parser.listener;
6 6
7 import '../../scanner/token.dart' show Token, TokenType; 7 import '../../scanner/token.dart' show Token, TokenType;
8 8
9 import '../fasta_codes.dart' show Message; 9 import '../fasta_codes.dart' show Message;
10 10
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 /// - Name 274 /// - Name
275 /// - Type variables 275 /// - Type variables
276 /// - Formals 276 /// - Formals
277 /// - Initializers 277 /// - Initializers
278 /// - Async modifier 278 /// - Async modifier
279 /// - Function body (block or arrow expression). 279 /// - Function body (block or arrow expression).
280 void endNamedFunctionExpression(Token endToken) { 280 void endNamedFunctionExpression(Token endToken) {
281 logEvent("NamedFunctionExpression"); 281 logEvent("NamedFunctionExpression");
282 } 282 }
283 283
284 /// Handle the beginning of a local function declaration. 284 /// Handle the beginning of a local function declaration. Substructures:
285 /// - Type variables
285 void beginLocalFunctionDeclaration(Token token) {} 286 void beginLocalFunctionDeclaration(Token token) {}
286 287
287 /// A function declaration. 288 /// A function declaration.
288 /// 289 ///
289 /// Substructures: 290 /// Substructures:
290 /// - Modifiers 291 /// - Modifiers
291 /// - Return type 292 /// - Return type
292 /// - Name 293 /// - Name
293 /// - Type variables 294 /// - Type variables
294 /// - Formals 295 /// - Formals
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 void discardTypeReplacedWithCommentTypeAssign() {} 1102 void discardTypeReplacedWithCommentTypeAssign() {}
1102 1103
1103 /// Creates a new synthetic token whose `next` pointer points to [next]. 1104 /// Creates a new synthetic token whose `next` pointer points to [next].
1104 /// 1105 ///
1105 /// If [next] is `null`, `null` is returned. 1106 /// If [next] is `null`, `null` is returned.
1106 Token newSyntheticToken(Token next) { 1107 Token newSyntheticToken(Token next) {
1107 if (next == null) return null; 1108 if (next == null) return null;
1108 return new Token(TokenType.RECOVERY, next.charOffset)..next = next; 1109 return new Token(TokenType.RECOVERY, next.charOffset)..next = next;
1109 } 1110 }
1110 } 1111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698