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

Unified Diff: pkg/fletchc/lib/src/fletch_diagnostic_reporter.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 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
« no previous file with comments | « pkg/fletchc/lib/src/fletch_context.dart ('k') | pkg/fletchc/lib/src/fletch_enqueuer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fletchc/lib/src/fletch_diagnostic_reporter.dart
diff --git a/pkg/fletchc/lib/src/fletch_diagnostic_reporter.dart b/pkg/fletchc/lib/src/fletch_diagnostic_reporter.dart
deleted file mode 100644
index 5049ee5f0b2c66cc9c9d29603ea65b94f8de573f..0000000000000000000000000000000000000000
--- a/pkg/fletchc/lib/src/fletch_diagnostic_reporter.dart
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-library fletchc.fletch_diagnostic_reporter;
-
-import 'package:compiler/src/tokens/token.dart' show
- Token;
-
-import 'package:compiler/src/compiler.dart' show
- CompilerDiagnosticReporter;
-
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart' show
- DiagnosticOptions;
-
-import 'package:compiler/src/diagnostics/source_span.dart' show
- SourceSpan;
-
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart' show
- DiagnosticMessage;
-
-import 'fletch_compiler_implementation.dart' show
- FletchCompilerImplementation;
-
-import 'package:compiler/src/diagnostics/messages.dart' show
- MessageKind;
-
-import 'please_report_crash.dart' show
- crashReportRequested,
- requestBugReportOnCompilerCrashMessage;
-
-class FletchDiagnosticReporter extends CompilerDiagnosticReporter {
- FletchDiagnosticReporter(
- FletchCompilerImplementation compiler,
- DiagnosticOptions options)
- : super(compiler, options);
-
- FletchCompilerImplementation get compiler => super.compiler;
-
- @override
- SourceSpan spanFromTokens(Token begin, Token end, [Uri uri]) {
- // Note: Except for last line, this method is copied from
- // third_party/dart/pkg/compiler/lib/src/compiler.dart
- if (begin == null || end == null) {
- // TODO(ahe): We can almost always do better. Often it is only
- // end that is null. Otherwise, we probably know the current
- // URI.
- throw 'Cannot find tokens to produce error message.';
- }
- if (uri == null && currentElement != null) {
- uri = currentElement.compilationUnit.script.resourceUri;
- }
- return compiler.incrementalCompiler.createSourceSpan(
- begin, end, uri, currentElement);
- }
-
- @override
- void reportError(DiagnosticMessage message,
- [List<DiagnosticMessage> infos = const <DiagnosticMessage> []]) {
- if (message.message.kind ==
- MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND) {
- const String noMirrors =
- "Fletch doesn't support 'dart:mirrors'. See https://goo.gl/Kwrd0O";
- message = createMessage(message.spannable,
- MessageKind.GENERIC,
- {'text': message});
- }
- super.reportError(message, infos);
- }
-
- @override
- void pleaseReportCrash() {
- if (crashReportRequested) return;
- crashReportRequested = true;
- print(requestBugReportOnCompilerCrashMessage);
- }
-
- static FletchDiagnosticReporter createInstance(
- FletchCompilerImplementation compiler,
- DiagnosticOptions options) {
- return new FletchDiagnosticReporter(compiler, options);
- }
-}
« no previous file with comments | « pkg/fletchc/lib/src/fletch_context.dart ('k') | pkg/fletchc/lib/src/fletch_enqueuer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698