Augment AST/element type matchers to include (almost) all types.

R=brianwilkerson@google.com

Change-Id: I6650ed6fd40ca794b04bacb643bef2c3a578ba43
Reviewed-on: https://dart-review.googlesource.com/c/87270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/src/test_utilities/ast_type_matchers.dart b/pkg/analyzer/lib/src/test_utilities/ast_type_matchers.dart
index 0ca336e..a56dddf 100644
--- a/pkg/analyzer/lib/src/test_utilities/ast_type_matchers.dart
+++ b/pkg/analyzer/lib/src/test_utilities/ast_type_matchers.dart
@@ -5,10 +5,22 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:test/test.dart';
 
+const isAdjacentStrings = const TypeMatcher<AdjacentStrings>();
+
+const isAnnotatedNode = const TypeMatcher<AnnotatedNode>();
+
+const isAnnotation = const TypeMatcher<Annotation>();
+
+const isArgumentList = const TypeMatcher<ArgumentList>();
+
 const isAsExpression = const TypeMatcher<AsExpression>();
 
 const isAssertInitializer = const TypeMatcher<AssertInitializer>();
 
+const isAssertion = const TypeMatcher<Assertion>();
+
+const isAssertStatement = const TypeMatcher<AssertStatement>();
+
 const isAssignmentExpression = const TypeMatcher<AssignmentExpression>();
 
 const isAwaitExpression = const TypeMatcher<AwaitExpression>();
@@ -19,35 +31,96 @@
 
 const isBlockFunctionBody = const TypeMatcher<BlockFunctionBody>();
 
+const isBooleanLiteral = const TypeMatcher<BooleanLiteral>();
+
+const isBreakStatement = const TypeMatcher<BreakStatement>();
+
+const isCascadeExpression = const TypeMatcher<CascadeExpression>();
+
+const isCatchClause = const TypeMatcher<CatchClause>();
+
 const isClassDeclaration = const TypeMatcher<ClassDeclaration>();
 
+const isClassMember = const TypeMatcher<ClassMember>();
+
+const isClassOrMixinDeclaration = const TypeMatcher<ClassOrMixinDeclaration>();
+
 const isClassTypeAlias = const TypeMatcher<ClassTypeAlias>();
 
+const isCombinator = const TypeMatcher<Combinator>();
+
+const isComment = const TypeMatcher<Comment>();
+
+const isCommentReference = const TypeMatcher<CommentReference>();
+
 const isCompilationUnit = const TypeMatcher<CompilationUnit>();
 
+const isCompilationUnitMember = const TypeMatcher<CompilationUnitMember>();
+
 const isConditionalExpression = const TypeMatcher<ConditionalExpression>();
 
+const isConfiguration = const TypeMatcher<Configuration>();
+
 const isConstructorDeclaration = const TypeMatcher<ConstructorDeclaration>();
 
 const isConstructorFieldInitializer =
     const TypeMatcher<ConstructorFieldInitializer>();
 
+const isConstructorInitializer = const TypeMatcher<ConstructorInitializer>();
+
+const isConstructorName = const TypeMatcher<ConstructorName>();
+
+const isConstructorReferenceNode =
+    const TypeMatcher<ConstructorReferenceNode>();
+
+const isContinueStatement = const TypeMatcher<ContinueStatement>();
+
+const isDeclaration = const TypeMatcher<Declaration>();
+
+const isDeclaredIdentifier = const TypeMatcher<DeclaredIdentifier>();
+
 const isDefaultFormalParameter = const TypeMatcher<DefaultFormalParameter>();
 
+const isDirective = const TypeMatcher<Directive>();
+
+const isDoStatement = const TypeMatcher<DoStatement>();
+
+const isDottedName = const TypeMatcher<DottedName>();
+
+const isDoubleLiteral = const TypeMatcher<DoubleLiteral>();
+
 const isEmptyFunctionBody = const TypeMatcher<EmptyFunctionBody>();
 
 const isEmptyStatement = const TypeMatcher<EmptyStatement>();
 
+const isEnumConstantDeclaration = const TypeMatcher<EnumConstantDeclaration>();
+
+const isEnumDeclaration = const TypeMatcher<EnumDeclaration>();
+
+const isExportDirective = const TypeMatcher<ExportDirective>();
+
+const isExpression = const TypeMatcher<Expression>();
+
 const isExpressionFunctionBody = const TypeMatcher<ExpressionFunctionBody>();
 
 const isExpressionStatement = const TypeMatcher<ExpressionStatement>();
 
+const isExtendsClause = const TypeMatcher<ExtendsClause>();
+
 const isFieldDeclaration = const TypeMatcher<FieldDeclaration>();
 
 const isFieldFormalParameter = const TypeMatcher<FieldFormalParameter>();
 
+const isForEachStatement = const TypeMatcher<ForEachStatement>();
+
+const isFormalParameter = const TypeMatcher<FormalParameter>();
+
+const isFormalParameterList = const TypeMatcher<FormalParameterList>();
+
 const isForStatement = const TypeMatcher<ForStatement>();
 
+const isFunctionBody = const TypeMatcher<FunctionBody>();
+
 const isFunctionDeclaration = const TypeMatcher<FunctionDeclaration>();
 
 const isFunctionDeclarationStatement =
@@ -55,6 +128,9 @@
 
 const isFunctionExpression = const TypeMatcher<FunctionExpression>();
 
+const isFunctionExpressionInvocation =
+    const TypeMatcher<FunctionExpressionInvocation>();
+
 const isFunctionTypeAlias = const TypeMatcher<FunctionTypeAlias>();
 
 const isFunctionTypedFormalParameter =
@@ -62,6 +138,18 @@
 
 const isGenericFunctionType = const TypeMatcher<GenericFunctionType>();
 
+const isGenericTypeAlias = const TypeMatcher<GenericTypeAlias>();
+
+const isHideCombinator = const TypeMatcher<HideCombinator>();
+
+const isIdentifier = const TypeMatcher<Identifier>();
+
+const isIfStatement = const TypeMatcher<IfStatement>();
+
+const isImplementsClause = const TypeMatcher<ImplementsClause>();
+
+const isImportDirective = const TypeMatcher<ImportDirective>();
+
 const isIndexExpression = const TypeMatcher<IndexExpression>();
 
 const isInstanceCreationExpression =
@@ -69,42 +157,150 @@
 
 const isIntegerLiteral = const TypeMatcher<IntegerLiteral>();
 
+const isInterpolationElement = const TypeMatcher<InterpolationElement>();
+
 const isInterpolationExpression = const TypeMatcher<InterpolationExpression>();
 
 const isInterpolationString = const TypeMatcher<InterpolationString>();
 
+const isInvocationExpression = const TypeMatcher<InvocationExpression>();
+
 const isIsExpression = const TypeMatcher<IsExpression>();
 
+const isLabel = const TypeMatcher<Label>();
+
+const isLabeledStatement = const TypeMatcher<LabeledStatement>();
+
 const isLibraryDirective = const TypeMatcher<LibraryDirective>();
 
+const isLibraryIdentifier = const TypeMatcher<LibraryIdentifier>();
+
+const isListLiteral = const TypeMatcher<ListLiteral>();
+
+const isLiteral = const TypeMatcher<Literal>();
+
+const isMapLiteral = const TypeMatcher<MapLiteral>();
+
+const isMapLiteralEntry = const TypeMatcher<MapLiteralEntry>();
+
 const isMethodDeclaration = const TypeMatcher<MethodDeclaration>();
 
 const isMethodInvocation = const TypeMatcher<MethodInvocation>();
 
+const isMethodReferenceExpression =
+    const TypeMatcher<MethodReferenceExpression>();
+
+const isMixinDeclaration = const TypeMatcher<MixinDeclaration>();
+
+const isNamedCompilationUnitMember =
+    const TypeMatcher<NamedCompilationUnitMember>();
+
+const isNamedExpression = const TypeMatcher<NamedExpression>();
+
+const isNamedType = const TypeMatcher<NamedType>();
+
+const isNamespaceDirective = const TypeMatcher<NamespaceDirective>();
+
+const isNativeClause = const TypeMatcher<NativeClause>();
+
+const isNativeFunctionBody = const TypeMatcher<NativeFunctionBody>();
+
+const isNormalFormalParameter = const TypeMatcher<NormalFormalParameter>();
+
 const isNullLiteral = const TypeMatcher<NullLiteral>();
 
+const isOnClause = const TypeMatcher<OnClause>();
+
 const isParenthesizedExpression = const TypeMatcher<ParenthesizedExpression>();
 
+const isPartDirective = const TypeMatcher<PartDirective>();
+
+const isPartOfDirective = const TypeMatcher<PartOfDirective>();
+
+const isPostfixExpression = const TypeMatcher<PostfixExpression>();
+
 const isPrefixedIdentifier = const TypeMatcher<PrefixedIdentifier>();
 
 const isPrefixExpression = const TypeMatcher<PrefixExpression>();
 
 const isPropertyAccess = const TypeMatcher<PropertyAccess>();
 
+const isRedirectingConstructorInvocation =
+    const TypeMatcher<RedirectingConstructorInvocation>();
+
+const isRethrowExpression = const TypeMatcher<RethrowExpression>();
+
 const isReturnStatement = const TypeMatcher<ReturnStatement>();
 
+const isScriptTag = const TypeMatcher<ScriptTag>();
+
+const isSetLiteral = const TypeMatcher<SetLiteral>();
+
+const isShowCombinator = const TypeMatcher<ShowCombinator>();
+
 const isSimpleFormalParameter = const TypeMatcher<SimpleFormalParameter>();
 
 const isSimpleIdentifier = const TypeMatcher<SimpleIdentifier>();
 
+const isSimpleStringLiteral = const TypeMatcher<SimpleStringLiteral>();
+
+const isSingleStringLiteral = const TypeMatcher<SingleStringLiteral>();
+
+const isStatement = const TypeMatcher<Statement>();
+
 const isStringInterpolation = const TypeMatcher<StringInterpolation>();
 
+const isStringLiteral = const TypeMatcher<StringLiteral>();
+
+const isSuperConstructorInvocation =
+    const TypeMatcher<SuperConstructorInvocation>();
+
 const isSuperExpression = const TypeMatcher<SuperExpression>();
 
+const isSwitchCase = const TypeMatcher<SwitchCase>();
+
+const isSwitchDefault = const TypeMatcher<SwitchDefault>();
+
+const isSwitchMember = const TypeMatcher<SwitchMember>();
+
+const isSwitchStatement = const TypeMatcher<SwitchStatement>();
+
+const isSymbolLiteral = const TypeMatcher<SymbolLiteral>();
+
+const isThisExpression = const TypeMatcher<ThisExpression>();
+
+const isThrowExpression = const TypeMatcher<ThrowExpression>();
+
 const isTopLevelVariableDeclaration =
     const TypeMatcher<TopLevelVariableDeclaration>();
 
+const isTryStatement = const TypeMatcher<TryStatement>();
+
+const isTypeAlias = const TypeMatcher<TypeAlias>();
+
+const isTypeAnnotation = const TypeMatcher<TypeAnnotation>();
+
+const isTypeArgumentList = const TypeMatcher<TypeArgumentList>();
+
+const isTypedLiteral = const TypeMatcher<TypedLiteral>();
+
 const isTypeName = const TypeMatcher<TypeName>();
 
+const isTypeParameter = const TypeMatcher<TypeParameter>();
+
+const isTypeParameterList = const TypeMatcher<TypeParameterList>();
+
+const isUriBasedDirective = const TypeMatcher<UriBasedDirective>();
+
+const isVariableDeclaration = const TypeMatcher<VariableDeclaration>();
+
+const isVariableDeclarationList = const TypeMatcher<VariableDeclarationList>();
+
 const isVariableDeclarationStatement =
     const TypeMatcher<VariableDeclarationStatement>();
+
+const isWhileStatement = const TypeMatcher<WhileStatement>();
+
+const isWithClause = const TypeMatcher<WithClause>();
+
+const isYieldStatement = const TypeMatcher<YieldStatement>();
diff --git a/pkg/analyzer/lib/src/test_utilities/element_type_matchers.dart b/pkg/analyzer/lib/src/test_utilities/element_type_matchers.dart
index ac11f12..c141414 100644
--- a/pkg/analyzer/lib/src/test_utilities/element_type_matchers.dart
+++ b/pkg/analyzer/lib/src/test_utilities/element_type_matchers.dart
@@ -7,24 +7,70 @@
 
 const isClassElement = const TypeMatcher<ClassElement>();
 
+const isClassMemberElement = const TypeMatcher<ClassMemberElement>();
+
 const isCompilationUnitElement = const TypeMatcher<CompilationUnitElement>();
 
 const isConstructorElement = const TypeMatcher<ConstructorElement>();
 
+const isElementAnnotation = const TypeMatcher<ElementAnnotation>();
+
+const isExecutableElement = const TypeMatcher<ExecutableElement>();
+
 const isExportElement = const TypeMatcher<ExportElement>();
 
 const isFieldElement = const TypeMatcher<FieldElement>();
 
+const isFieldFormalParameterElement =
+    const TypeMatcher<FieldFormalParameterElement>();
+
 const isFunctionElement = const TypeMatcher<FunctionElement>();
 
+const isFunctionTypeAliasElement =
+    const TypeMatcher<FunctionTypeAliasElement>();
+
+const isFunctionTypedElement = const TypeMatcher<FunctionTypedElement>();
+
+const isGenericFunctionTypeElement =
+    const TypeMatcher<GenericFunctionTypeElement>();
+
+const isGenericTypeAliasElement = const TypeMatcher<GenericTypeAliasElement>();
+
+const isHideElementCombinator = const TypeMatcher<HideElementCombinator>();
+
 const isImportElement = const TypeMatcher<ImportElement>();
 
+const isLabelElement = const TypeMatcher<LabelElement>();
+
 const isLibraryElement = const TypeMatcher<LibraryElement>();
 
+const isLocalElement = const TypeMatcher<LocalElement>();
+
+const isLocalVariableElement = const TypeMatcher<LocalVariableElement>();
+
 const isMethodElement = const TypeMatcher<MethodElement>();
 
+const isNamespaceCombinator = const TypeMatcher<NamespaceCombinator>();
+
+const isParameterElement = const TypeMatcher<ParameterElement>();
+
+const isPrefixElement = const TypeMatcher<PrefixElement>();
+
 const isPropertyAccessorElement = const TypeMatcher<PropertyAccessorElement>();
 
 const isPropertyInducingElement = const TypeMatcher<PropertyInducingElement>();
 
+const isShowElementCombinator = const TypeMatcher<ShowElementCombinator>();
+
 const isTopLevelVariableElement = const TypeMatcher<TopLevelVariableElement>();
+
+const isTypeDefiningElement = const TypeMatcher<TypeDefiningElement>();
+
+const isTypeParameterElement = const TypeMatcher<TypeParameterElement>();
+
+const isTypeParameterizedElement =
+    const TypeMatcher<TypeParameterizedElement>();
+
+const isUriReferencedElement = const TypeMatcher<UriReferencedElement>();
+
+const isVariableElement = const TypeMatcher<VariableElement>();