7d277c4a32
The AST refactor for "UI as code" left behind a few things whose names ended in "2". This CL deprecates those things and creates replacements that don't end in "2", so that we keep the API clean. In a future breaking change release of the analyzer we'll remove the deprecated things. The following methods and classes are added: - ForStatement and ForStatementImpl - ListLiteral.elements - SetOrMapLiteral.elements - AstVisitor.visitForStatement - AstFactory.forStatement - NodeLintRegistry.addForStatement The following methods and classes are deprecated: - ForStatement2 and ForStatement2Impl - ListLiteral.elements2 - SetOrMapLiteral.elements2 - AstVisitor.visitForStatement2 - AstFactory.forStatement2 - NodeLintRegistry.addForStatement2 In a similar way to how we did the previous stage of AST migration, the existing visitors have been modified so that the default implementation of visitForStatement2 redirects to visitForStatement; this allows clients to change their overrides of visitForStatement2 to override visitForStatement instead. Once all clients have been migrated we will be able to delete the visitForStatement2 method. Change-Id: Ife5949071fe4cb50791cd4f2f4b99a1bfaad54c1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97360 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>