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

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

Issue 2647343003: Update dart2js unit tests to dart_parser and dart_scanner. (Closed)
Patch Set: Created 3 years, 10 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) 2015, the Dart project authors. Please see the AUTHORS file 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 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 dart2js.diagnostic_reporter.helper; 5 library dart2js.diagnostic_reporter.helper;
6 6
7 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; 7 import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
8 import 'package:compiler/src/diagnostics/messages.dart'; 8 import 'package:compiler/src/diagnostics/messages.dart';
9 import 'package:compiler/src/diagnostics/spannable.dart'; 9 import 'package:compiler/src/diagnostics/spannable.dart';
10 import 'package:compiler/src/diagnostics/source_span.dart'; 10 import 'package:compiler/src/diagnostics/source_span.dart';
11 import 'package:compiler/src/elements/elements.dart'; 11 import 'package:compiler/src/elements/elements.dart';
12 import 'options_helper.dart'; 12 import 'options_helper.dart';
13 import 'package:dart_scanner/dart_scanner.dart';
Siggi Cherem (dart-lang) 2017/01/24 21:27:38 nit: sort imports
ahe 2017/01/25 07:46:37 Done (assuming dart, package, local, then alphabet
13 14
14 abstract class DiagnosticReporterWrapper extends DiagnosticReporter { 15 abstract class DiagnosticReporterWrapper extends DiagnosticReporter {
15 DiagnosticReporter get reporter; 16 DiagnosticReporter get reporter;
16 17
17 @override 18 @override
18 DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind, 19 DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind,
19 [Map arguments = const {}]) { 20 [Map arguments = const {}]) {
20 return reporter.createMessage(spannable, messageKind, arguments); 21 return reporter.createMessage(spannable, messageKind, arguments);
21 } 22 }
22 23
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) { 57 [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
57 reporter.reportWarning(message, infos); 58 reporter.reportWarning(message, infos);
58 } 59 }
59 60
60 @override 61 @override
61 SourceSpan spanFromSpannable(Spannable node) { 62 SourceSpan spanFromSpannable(Spannable node) {
62 return reporter.spanFromSpannable(node); 63 return reporter.spanFromSpannable(node);
63 } 64 }
64 65
65 @override 66 @override
67 SourceSpan spanFromToken(Token token) => reporter.spanFromToken(token);
68
69 @override
66 withCurrentElement(Element element, f()) { 70 withCurrentElement(Element element, f()) {
67 return reporter.withCurrentElement(element, f); 71 return reporter.withCurrentElement(element, f);
68 } 72 }
69 73
70 @override 74 @override
71 bool get hasReportedError => reporter.hasReportedError; 75 bool get hasReportedError => reporter.hasReportedError;
72 } 76 }
OLDNEW
« no previous file with comments | « pkg/dart_parser/lib/src/parser.dart ('k') | tests/compiler/dart2js/incremental/compile_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698