/** * An enum containing the different types of AST nodes that will be present in the JSON AST. This * will be serialized and loaded into the emitter so that the SyntaxKinds are always consistent * between the TS and Dart halves of this tool. */ export enum ConvertedSyntaxKind { // TODO(derekx): This should only contain SyntaxKinds that we will use in the emitter. I have // removed some kinds that we certainly won't need, but there are still more that can be removed. Unknown = 0, NumericLiteral = 8, BigIntLiteral = 9, StringLiteral = 10, RegularExpressionLiteral = 13, NoSubstitutionTemplateLiteral = 14, TemplateHead = 15, TemplateMiddle = 16, TemplateTail = 17, Identifier = 75, ConstModifier = 80, ContinueKeyword = 81, DefaultModifier = 83, EnumKeyword = 87, ExportModifier = 88, FinallyKeyword = 91, ForKeyword = 92, FunctionKeyword = 93, ImportKeyword = 95, InKeyword = 96, InstanceOfKeyword = 97, NewKeyword = 98, ReturnKeyword = 100, SuperKeyword = 101, TypeOfKeyword = 107, WithKeyword = 111, PackageKeyword = 115, PrivateModifier = 116, ProtectedModifier = 117, PublicModifier = 118, StaticModifier = 119, YieldKeyword = 120, AbstractModifier = 121, AsKeyword = 122, AssertsKeyword = 123, KeywordType = 124, AsyncModifier = 125, AwaitKeyword = 126, ConstructorKeyword = 128, DeclareKeyword = 129, GetKeyword = 130, InferKeyword = 131, IsKeyword = 132, KeyOfKeyword = 133, ModuleKeyword = 134, NamespaceKeyword = 135, ReadonlyModifier = 137, RequireKeyword = 138, SetKeyword = 141, TypeKeyword = 144, UniqueKeyword = 146, FromKeyword = 148, GlobalKeyword = 149, OfKeyword = 151, QualifiedName = 152, ComputedPropertyName = 153, TypeParameter = 154, Parameter = 155, Decorator = 156, PropertyDeclaration = 158, MethodDeclaration = 160, Constructor = 161, GetAccessor = 162, SetAccessor = 163, CallSignature = 164, ConstructSignature = 165, IndexSignature = 166, TypePredicate = 167, TypeReference = 168, FunctionType = 169, ConstructorType = 170, TypeQuery = 171, TypeLiteral = 172, ArrayType = 173, TupleType = 174, OptionalType = 175, RestType = 176, UnionType = 177, IntersectionType = 178, ConditionalType = 179, InferType = 180, ParenthesizedType = 181, ThisType = 182, TypeOperator = 183, IndexedAccessType = 184, MappedType = 185, LiteralType = 186, ImportType = 187, ObjectBindingPattern = 188, ArrayBindingPattern = 189, BindingElement = 190, ArrayLiteralExpression = 191, ObjectLiteralExpression = 192, PropertyAccessExpression = 193, ElementAccessExpression = 194, CallExpression = 195, NewExpression = 196, TaggedTemplateExpression = 197, TypeAssertionExpression = 198, ParenthesizedExpression = 199, FunctionExpression = 200, ArrowFunction = 201, DeleteExpression = 202, TypeOfExpression = 203, VoidExpression = 204, AwaitExpression = 205, PrefixUnaryExpression = 206, PostfixUnaryExpression = 207, BinaryExpression = 208, ConditionalExpression = 209, TemplateExpression = 210, YieldExpression = 211, SpreadElement = 212, OmittedExpression = 214, ExpressionWithTypeArguments = 215, AsExpression = 216, NonNullExpression = 217, MetaProperty = 218, SyntheticExpression = 219, TemplateSpan = 220, SemicolonClassElement = 221, Block = 222, EmptyStatement = 223, VariableStatement = 224, VariableDeclaration = 241, FunctionDeclaration = 243, ClassDeclaration = 244, InterfaceDeclaration = 245, TypeAliasDeclaration = 246, EnumDeclaration = 247, ModuleDeclaration = 248, ModuleBlock = 249, NamespaceExportDeclaration = 251, ImportEqualsDeclaration = 252, ImportDeclaration = 253, ImportClause = 254, NamespaceImport = 255, NamedImports = 256, ImportSpecifier = 257, ExportAssignment = 258, ExportDeclaration = 259, NamedExports = 260, ExportSpecifier = 261, MissingDeclaration = 262, ExternalModuleReference = 263, CaseClause = 275, DefaultClause = 276, HeritageClause = 277, CatchClause = 278, PropertyAssignment = 279, ShorthandPropertyAssignment = 280, SpreadAssignment = 281, EnumMember = 282, SourceFile = 288, Bundle = 289, InputFiles = 291, // JSDocTypeExpression = 292, // JSDocAllType = 293, // JSDocUnknownType = 294, // JSDocNullableType = 295, // JSDocNonNullableType = 296, // JSDocOptionalType = 297, // JSDocFunctionType = 298, // JSDocVariadicType = 299, // JSDocNamepathType = 300, // JSDocComment = 301, // JSDocTypeLiteral = 302, // JSDocSignature = 303, // JSDocTag = 304, // JSDocAugmentsTag = 305, // JSDocAuthorTag = 306, // JSDocClassTag = 307, // JSDocCallbackTag = 308, // JSDocEnumTag = 309, // JSDocParameterTag = 310, // JSDocReturnTag = 311, // JSDocThisTag = 312, // JSDocTypeTag = 313, // JSDocTemplateTag = 314, // JSDocTypedefTag = 315, // JSDocPropertyTag = 316, SyntaxList = 317, NotEmittedStatement = 318, PartiallyEmittedExpression = 319, CommaListExpression = 320, MergeDeclarationMarker = 321, EndOfDeclarationMarker = 322, SyntheticReferenceExpression = 323, Count = 324, } export type ConvertedModifierKind = ConvertedSyntaxKind.AbstractModifier|ConvertedSyntaxKind.AsyncModifier| ConvertedSyntaxKind.ConstModifier|ConvertedSyntaxKind.DefaultModifier| ConvertedSyntaxKind.ExportModifier|ConvertedSyntaxKind.PublicModifier| ConvertedSyntaxKind.PrivateModifier|ConvertedSyntaxKind.ProtectedModifier| ConvertedSyntaxKind.ReadonlyModifier|ConvertedSyntaxKind.StaticModifier; export type ConvertedKeywordType = 'any'|'unknown'|'number'|'bigint'|'object'|'boolean'|'string'| 'symbol'|'this'|'void'|'undefined'|'null'|'never'; export type ConvertedNamedDeclarationKind = ConvertedSyntaxKind.ImportSpecifier|ConvertedSyntaxKind.ExportSpecifier| ConvertedSyntaxKind.VariableDeclaration| ConvertedSyntaxKind.FunctionDeclaration|ConvertedSyntaxKind.Parameter| ConvertedSyntaxKind.InterfaceDeclaration| ConvertedSyntaxKind.ClassDeclaration|ConvertedSyntaxKind.PropertyDeclaration| ConvertedSyntaxKind.MethodDeclaration| ConvertedSyntaxKind.TypeAliasDeclaration|ConvertedSyntaxKind.TypeParameter| ConvertedSignatureKind; export type ConvertedSignatureKind = ConvertedSyntaxKind.FunctionType|ConvertedSyntaxKind.FunctionDeclaration| ConvertedSyntaxKind.GetAccessor|ConvertedSyntaxKind.SetAccessor| ConvertedSyntaxKind.Constructor|ConvertedSyntaxKind.CallSignature| ConvertedSyntaxKind.ConstructSignature|ConvertedSyntaxKind.IndexSignature;