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

Unified Diff: pkg/compiler/lib/src/parser/member_listener.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/compiler/lib/src/parser/node_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/parser/member_listener.dart
diff --git a/pkg/compiler/lib/src/parser/member_listener.dart b/pkg/compiler/lib/src/parser/member_listener.dart
index cd6de0e86e26717078103c77e42c6d272c6e9d38..4982d90bf5560751a73ad1cc81c26d4cb174507b 100644
--- a/pkg/compiler/lib/src/parser/member_listener.dart
+++ b/pkg/compiler/lib/src/parser/member_listener.dart
@@ -5,7 +5,7 @@
library dart2js.parser.member_listener;
import '../diagnostics/diagnostic_listener.dart' show
- DiagnosticListener;
+ DiagnosticReporter;
import '../diagnostics/messages.dart' show
MessageKind;
import '../elements/elements.dart' show
@@ -34,7 +34,7 @@ import 'node_listener.dart' show
class MemberListener extends NodeListener {
final ClassElementX enclosingClass;
- MemberListener(DiagnosticListener listener,
+ MemberListener(DiagnosticReporter listener,
ClassElementX enclosingElement)
: this.enclosingClass = enclosingElement,
super(listener, enclosingElement.compilationUnit);
@@ -72,7 +72,7 @@ class MemberListener extends NodeListener {
return Elements.constructOperatorName(operator.source, isUnary);
} else {
if (receiver == null || receiver.source != enclosingClass.name) {
- listener.reportErrorMessage(
+ reporter.reportErrorMessage(
send.receiver,
MessageKind.INVALID_CONSTRUCTOR_NAME,
{'name': enclosingClass.name});
@@ -113,7 +113,7 @@ class MemberListener extends NodeListener {
Identifier singleIdentifierName = method.name.asIdentifier();
if (singleIdentifierName != null && singleIdentifierName.source == name) {
if (name != enclosingClass.name) {
- listener.reportErrorMessage(
+ reporter.reportErrorMessage(
singleIdentifierName,
MessageKind.INVALID_UNNAMED_CONSTRUCTOR_NAME,
{'name': enclosingClass.name});
@@ -160,7 +160,7 @@ class MemberListener extends NodeListener {
void addMember(ElementX memberElement) {
addMetadata(memberElement);
- enclosingClass.addMember(memberElement, listener);
+ enclosingClass.addMember(memberElement, reporter);
}
void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/compiler/lib/src/parser/node_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698