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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2738903002: Change the calling conventions for handleUnrecoverableError. (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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.outline_builder; 5 library fasta.outline_builder;
6 6
7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; 7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind;
8 8
9 import '../parser/parser.dart' show FormalParameterType, optional; 9 import '../parser/parser.dart' show FormalParameterType, optional;
10 10
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 debugEvent("Modifiers"); 682 debugEvent("Modifiers");
683 push(popList(count) ?? NullValue.Modifiers); 683 push(popList(count) ?? NullValue.Modifiers);
684 } 684 }
685 685
686 @override 686 @override
687 Token handleUnrecoverableError(Token token, ErrorKind kind, Map arguments) { 687 Token handleUnrecoverableError(Token token, ErrorKind kind, Map arguments) {
688 if (isDartLibrary && kind == ErrorKind.ExpectedBlockToSkip) { 688 if (isDartLibrary && kind == ErrorKind.ExpectedBlockToSkip) {
689 Token recover = skipNativeClause(token); 689 Token recover = skipNativeClause(token);
690 if (recover != null) { 690 if (recover != null) {
691 nativeMethodName = unescapeString(token.next.value); 691 nativeMethodName = unescapeString(token.next.value);
692 return recover; 692 return newSyntheticToken(recover);
693 } 693 }
694 } 694 }
695 return super.handleUnrecoverableError(token, kind, arguments); 695 return super.handleUnrecoverableError(token, kind, arguments);
696 } 696 }
697 697
698 @override 698 @override
699 Link<Token> handleMemberName(Link<Token> identifiers) { 699 Link<Token> handleMemberName(Link<Token> identifiers) {
700 if (!isDartLibrary || identifiers.isEmpty) return identifiers; 700 if (!isDartLibrary || identifiers.isEmpty) return identifiers;
701 return removeNativeClause(identifiers); 701 return removeNativeClause(identifiers);
702 } 702 }
703 703
704 @override 704 @override
705 void debugEvent(String name) { 705 void debugEvent(String name) {
706 // printEvent(name); 706 // printEvent(name);
707 } 707 }
708 } 708 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698