| OLD | NEW |
| 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 '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip; | 9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip; |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 import '../errors.dart' show internalError; | 21 import '../errors.dart' show internalError; |
| 22 | 22 |
| 23 import '../builder/builder.dart'; | 23 import '../builder/builder.dart'; |
| 24 | 24 |
| 25 import '../modifier.dart' show Modifier; | 25 import '../modifier.dart' show Modifier; |
| 26 | 26 |
| 27 import 'source_library_builder.dart' show SourceLibraryBuilder; | 27 import 'source_library_builder.dart' show SourceLibraryBuilder; |
| 28 | 28 |
| 29 import 'unhandled_listener.dart' show NullValue, Unhandled, UnhandledListener; | 29 import 'unhandled_listener.dart' show NullValue, Unhandled, UnhandledListener; |
| 30 | 30 |
| 31 import '../parser/dart_vm_native.dart' show removeNativeClause; | 31 import '../parser/dart_vm_native.dart' |
| 32 show removeNativeClause, skipNativeClause; |
| 32 | 33 |
| 33 import '../operator.dart' | 34 import '../operator.dart' |
| 34 show | 35 show |
| 35 Operator, | 36 Operator, |
| 36 operatorFromString, | 37 operatorFromString, |
| 37 operatorToString, | 38 operatorToString, |
| 38 operatorRequiredArgumentCount; | 39 operatorRequiredArgumentCount; |
| 39 | 40 |
| 40 import '../quote.dart' show unescapeString; | 41 import '../quote.dart' show unescapeString; |
| 41 | 42 |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 | 801 |
| 801 @override | 802 @override |
| 802 void handleModifiers(int count) { | 803 void handleModifiers(int count) { |
| 803 debugEvent("Modifiers"); | 804 debugEvent("Modifiers"); |
| 804 push(popList(count) ?? NullValue.Modifiers); | 805 push(popList(count) ?? NullValue.Modifiers); |
| 805 } | 806 } |
| 806 | 807 |
| 807 @override | 808 @override |
| 808 Token handleUnrecoverableError(Token token, FastaMessage message) { | 809 Token handleUnrecoverableError(Token token, FastaMessage message) { |
| 809 if (isDartLibrary && message.code == codeExpectedBlockToSkip) { | 810 if (isDartLibrary && message.code == codeExpectedBlockToSkip) { |
| 810 var target = library.loader.target; | 811 Token recover = skipNativeClause(token); |
| 811 Token recover = target.skipNativeClause(token); | |
| 812 if (recover != null) { | 812 if (recover != null) { |
| 813 nativeMethodName = target.extractNativeMethodName(token); | 813 nativeMethodName = unescapeString(token.next.lexeme); |
| 814 return recover; | 814 return recover; |
| 815 } | 815 } |
| 816 } | 816 } |
| 817 return super.handleUnrecoverableError(token, message); | 817 return super.handleUnrecoverableError(token, message); |
| 818 } | 818 } |
| 819 | 819 |
| 820 @override | 820 @override |
| 821 Link<Token> handleMemberName(Link<Token> identifiers) { | 821 Link<Token> handleMemberName(Link<Token> identifiers) { |
| 822 if (!isDartLibrary || identifiers.isEmpty) return identifiers; | 822 if (!isDartLibrary || identifiers.isEmpty) return identifiers; |
| 823 return removeNativeClause(identifiers); | 823 return removeNativeClause(identifiers); |
| 824 } | 824 } |
| 825 | 825 |
| 826 @override | 826 @override |
| 827 void debugEvent(String name) { | 827 void debugEvent(String name) { |
| 828 // printEvent(name); | 828 // printEvent(name); |
| 829 } | 829 } |
| 830 } | 830 } |
| OLD | NEW |