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

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

Issue 2895983002: Read SDK and patches from a JSON file. (Closed)
Patch Set: Merged with 1333f97b9a0e3805f991578ef83b0ec4553ecf33 Created 3 years, 7 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
Index: pkg/front_end/lib/src/fasta/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 43f0f3b32c7aeadc929acbb1fd545608f519957d..04e1f671d369dcad9c465d3371ba9b31a6ffad5a 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -48,13 +48,13 @@ enum MethodBody {
class OutlineBuilder extends UnhandledListener {
final SourceLibraryBuilder library;
- final bool isDartLibrary;
+ final bool enableNative;
String nativeMethodName;
OutlineBuilder(SourceLibraryBuilder library)
: library = library,
- isDartLibrary = library.uri.scheme == "dart";
+ enableNative = (library.uri.scheme == "dart" || library.isPatch);
@override
Uri get uri => library.fileUri;
@@ -776,7 +776,7 @@ class OutlineBuilder extends UnhandledListener {
@override
Token handleUnrecoverableError(Token token, FastaMessage message) {
- if (isDartLibrary && message.code == codeExpectedBlockToSkip) {
+ if (enableNative && message.code == codeExpectedBlockToSkip) {
var target = library.loader.target;
Token recover = target.skipNativeClause(token);
if (recover != null) {
@@ -795,7 +795,7 @@ class OutlineBuilder extends UnhandledListener {
@override
Link<Token> handleMemberName(Link<Token> identifiers) {
- if (!isDartLibrary || identifiers.isEmpty) return identifiers;
+ if (!enableNative || identifiers.isEmpty) return identifiers;
return removeNativeClause(identifiers);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | pkg/front_end/lib/src/fasta/source/source_library_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698