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

Side by Side Diff: tests/compiler/dart2js/diagnostic_reporter_helper.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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
« no previous file with comments | « tests/compiler/dart2js/compiler_test.dart ('k') | tests/compiler/dart2js/exit_code_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 library dart2js.diagnostic_reporter.helper;
6
7 import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
8 import 'package:compiler/src/diagnostics/messages.dart';
9 import 'package:compiler/src/diagnostics/spannable.dart';
10 import 'package:compiler/src/diagnostics/source_span.dart';
11 import 'package:compiler/src/elements/elements.dart';
12
13 abstract class DiagnosticReporterWrapper extends DiagnosticReporter {
14 DiagnosticReporter get reporter;
15
16 @override
17 DiagnosticMessage createMessage(
18 Spannable spannable,
19 MessageKind messageKind,
20 [Map arguments = const {}]) {
21 return reporter.createMessage(spannable, messageKind, arguments);
22 }
23
24 @override
25 internalError(Spannable spannable, message) {
26 return reporter.internalError(spannable, message);
27 }
28
29 @override
30 void log(message) {
31 return reporter.log(message);
32 }
33
34 @override
35 DiagnosticOptions get options => reporter.options;
36
37 @override
38 void reportError(
39 DiagnosticMessage message,
40 [List<DiagnosticMessage> infos = const <DiagnosticMessage> []]) {
41 reporter.reportError(message, infos);
42 }
43
44 @override
45 void reportHint(
46 DiagnosticMessage message,
47 [List<DiagnosticMessage> infos = const <DiagnosticMessage> []]) {
48 reporter.reportHint(message, infos);
49 }
50
51 @override
52 void reportInfo(
53 Spannable node,
54 MessageKind errorCode,
55 [Map arguments = const {}]) {
56 reporter.reportInfo(node, errorCode, arguments);
57 }
58
59 @override
60 void reportWarning(
61 DiagnosticMessage message,
62 [List<DiagnosticMessage> infos = const <DiagnosticMessage> []]) {
63 reporter.reportWarning(message, infos);
64 }
65
66 @override
67 SourceSpan spanFromSpannable(Spannable node) {
68 return reporter.spanFromSpannable(node);
69 }
70
71 @override
72 withCurrentElement(Element element, f()) {
73 return reporter.withCurrentElement(element, f);
74 }
75 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/compiler_test.dart ('k') | tests/compiler/dart2js/exit_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698