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

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

Issue 2728773002: Fix parsing [a]sync[*] function body modifiers with Fasta. (Closed)
Patch Set: Use endExpressionFunctionBody() instead of endReturnStatement(). 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 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 BeginGroupToken, Token; 7 import '../scanner/token.dart' show BeginGroupToken, Token;
8 8
9 import '../util/link.dart' show Link; 9 import '../util/link.dart' show Link;
10 10
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 } 537 }
538 538
539 void beginRedirectingFactoryBody(Token token) {} 539 void beginRedirectingFactoryBody(Token token) {}
540 540
541 void endRedirectingFactoryBody(Token beginToken, Token endToken) { 541 void endRedirectingFactoryBody(Token beginToken, Token endToken) {
542 logEvent("RedirectingFactoryBody"); 542 logEvent("RedirectingFactoryBody");
543 } 543 }
544 544
545 void beginReturnStatement(Token token) {} 545 void beginReturnStatement(Token token) {}
546 546
547 void endExpressionFunctionBody(Token arrowToken, Token endToken) {
548 logEvent("ExpressionFunctionBody");
549 }
550
547 void endReturnStatement( 551 void endReturnStatement(
548 bool hasExpression, Token beginToken, Token endToken) { 552 bool hasExpression, Token beginToken, Token endToken) {
549 logEvent("ReturnStatement"); 553 logEvent("ReturnStatement");
550 } 554 }
551 555
552 void beginSend(Token token) {} 556 void beginSend(Token token) {}
553 557
554 void endSend(Token token) { 558 void endSend(Token token) {
555 logEvent("Send"); 559 logEvent("Send");
556 } 560 }
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 967
964 final Map arguments; 968 final Map arguments;
965 969
966 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments); 970 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments);
967 971
968 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments) 972 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments)
969 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments); 973 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments);
970 974
971 String toString() => "@${beginOffset}: $kind $arguments"; 975 String toString() => "@${beginOffset}: $kind $arguments";
972 } 976 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/parser/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698