Sort declarations in fix_aggregator.dart

Change-Id: I19c8370fc38fbebc104dca3b6108db10660c5b9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145620
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
Paul Berry 2020-04-30 21:07:22 +00:00 committed by commit-bot@chromium.org
parent e572bed03e
commit 28952641d5

View file

@ -194,6 +194,17 @@ class FixAggregator extends UnifyingAstVisitor<void> {
}
}
/// Reasons that a variable declaration is to be made late.
enum LateAdditionReason {
/// It was inferred that the associated variable declaration is to be made
/// late through the late-inferring algorithm.
inference,
/// It was inferred that the associated variable declaration is to be made
/// late, because it is a test variable which is assigned during setup.
testVariableInference,
}
/// Base class representing a kind of change that [FixAggregator] might make to
/// a particular AST node.
abstract class NodeChange<N extends AstNode> {
@ -699,17 +710,6 @@ class NodeChangeForTypeAnnotation extends NodeChange<TypeAnnotation> {
}
}
/// Reasons that a variable declaration is to be made late.
enum LateAdditionReason {
/// It was inferred that the associated variable declaration is to be made
/// late through the late-inferring algorithm.
inference,
/// It was inferred that the associated variable declaration is to be made
/// late, because it is a test variable which is assigned during setup.
testVariableInference,
}
/// Implementation of [NodeChange] specialized for operating on
/// [VariableDeclarationList] nodes.
class NodeChangeForVariableDeclarationList