@@ -4512,7 +4512,7 @@ class ResolverVisitor extends ThrowingAstVisitor<void>
45124512class ScopeResolverVisitor extends UnifyingAstVisitor <void > {
45134513 /// The error reporter that will be informed of any errors that are found
45144514 /// during resolution.
4515- final ErrorReporter _errorReporter ;
4515+ final ErrorReporter errorReporter ;
45164516
45174517 /// The scope used to resolve identifiers.
45184518 Scope nameScope;
@@ -4537,21 +4537,15 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
45374537
45384538 /// Initialize a newly created visitor to resolve the nodes in an AST node.
45394539 ///
4540- /// [source] is the source representing the compilation unit containing the
4541- /// node being visited.
4542- /// [errorListener] is the error listener that will be informed of any errors
4540+ /// [errorReporter] is the error reporter that will be informed of any errors
45434541 /// that are found during resolution.
45444542 /// [nameScope] is the scope used to resolve identifiers in the node that will
45454543 /// first be visited.
4546- /// [docImportLibraries] are the `@docImport` imported elements of this node's
4547- /// library.
45484544 ScopeResolverVisitor (
4549- Source source,
4550- AnalysisErrorListener errorListener, {
4545+ this .errorReporter, {
45514546 required this .nameScope,
45524547 required CompilationUnitElementImpl unitElement,
4553- }) : _errorReporter = ErrorReporter (errorListener, source),
4554- _docImportScope = DocumentationCommentScope (nameScope, unitElement);
4548+ }) : _docImportScope = DocumentationCommentScope (nameScope, unitElement);
45554549
45564550 /// Return the implicit label scope in which the current node is being
45574551 /// resolved.
@@ -5231,7 +5225,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
52315225 if (node.inSetterContext ()) {
52325226 if (element is PatternVariableElementImpl &&
52335227 element.isVisitingWhenClause) {
5234- _errorReporter .atNode (
5228+ errorReporter .atNode (
52355229 node,
52365230 CompileTimeErrorCode .PATTERN_VARIABLE_ASSIGNMENT_INSIDE_GUARD ,
52375231 );
@@ -5364,7 +5358,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
53645358 if (labelScope == null ) {
53655359 // There are no labels in scope, so by definition the label is
53665360 // undefined.
5367- _errorReporter .atNode (
5361+ errorReporter .atNode (
53685362 labelNode,
53695363 CompileTimeErrorCode .LABEL_UNDEFINED ,
53705364 arguments: [labelNode.name],
@@ -5375,7 +5369,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
53755369 if (definingScope == null ) {
53765370 // No definition of the given label name could be found in any
53775371 // enclosing scope.
5378- _errorReporter .atNode (
5372+ errorReporter .atNode (
53795373 labelNode,
53805374 CompileTimeErrorCode .LABEL_UNDEFINED ,
53815375 arguments: [labelNode.name],
@@ -5388,7 +5382,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
53885382 definingScope.element.thisOrAncestorOfType ();
53895383 if (_enclosingClosure != null &&
53905384 ! identical (labelContainer, _enclosingClosure)) {
5391- _errorReporter .atNode (
5385+ errorReporter .atNode (
53925386 labelNode,
53935387 CompileTimeErrorCode .LABEL_IN_OUTER_SCOPE ,
53945388 arguments: [labelNode.name],
@@ -5400,7 +5394,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
54005394 node is ! ForStatement &&
54015395 node is ! SwitchMember &&
54025396 node is ! WhileStatement ) {
5403- _errorReporter .atNode (
5397+ errorReporter .atNode (
54045398 parentNode,
54055399 CompileTimeErrorCode .CONTINUE_LABEL_INVALID ,
54065400 );
0 commit comments