diff --git a/crates/oxc_traverse/scripts/lib/ancestor.mjs b/crates/oxc_traverse/scripts/lib/ancestor.mjs index 98d7bcb40..e0156afe9 100644 --- a/crates/oxc_traverse/scripts/lib/ancestor.mjs +++ b/crates/oxc_traverse/scripts/lib/ancestor.mjs @@ -2,7 +2,8 @@ import {camelToSnake, snakeToCamel} from './utils.mjs'; export default function generateAncestorsCode(types) { const variantNamesForEnums = Object.create(null); - let enumVariants = '', + let ancestorTypeEnumVariants = '', + ancestorEnumVariants = '', isFunctions = '', ancestorTypes = '', discriminant = 1; @@ -62,8 +63,8 @@ export default function generateAncestorsCode(types) { const variantName = `${type.name}${fieldNameCamel}`; variantNames.push(variantName); - enumVariants += `${variantName}(${structName}) = ${discriminant},\n`; - field.ancestorDiscriminant = discriminant; + ancestorTypeEnumVariants += `${variantName} = ${discriminant},\n`; + ancestorEnumVariants += `${variantName}(${structName}) = AncestorType::${variantName} as u16,\n`; discriminant++; if (fieldType.kind === 'enum') { @@ -96,8 +97,6 @@ export default function generateAncestorsCode(types) { `; } - const discriminantType = discriminant <= 256 ? 'u8' : 'u16'; - return ` #![allow( unsafe_code, @@ -117,20 +116,34 @@ export default function generateAncestorsCode(types) { AssignmentOperator, BinaryOperator, LogicalOperator, UnaryOperator, UpdateOperator, }; - pub(crate) type AncestorDiscriminant = ${discriminantType}; + /// Type of [\`Ancestor\`]. + /// Used in [\`crate::TraverseCtx::retag_stack\`]. + #[repr(u16)] + #[derive(Clone, Copy)] + #[allow(dead_code)] + pub(crate) enum AncestorType { + None = 0, + ${ancestorTypeEnumVariants} + } /// Ancestor type used in AST traversal. /// /// Encodes both the type of the parent, and child's location in the parent. /// i.e. variants for \`BinaryExpressionLeft\` and \`BinaryExpressionRight\`, not just \`BinaryExpression\`. // - // SAFETY: This type MUST be \`#[repr(u8)]\` or \`#[repr(u16)]\` (depending on number of variants) - // to maintain the safety of \`TraverseCtx::retag_stack\`. - #[repr(C, ${discriminantType})] + // SAFETY: + // * This type must be \`#[repr(u16)]\`. + // * Variant discriminants must correspond to those in \`AncestorType\`. + // + // These invariants make it possible to set the discriminant of an \`Ancestor\` without altering + // the "payload" pointer with: + // \`*(ancestor as *mut _ as *mut AncestorType) = AncestorType::Program\`. + // \`TraverseCtx::retag_stack\` uses this technique. + #[repr(C, u16)] #[derive(Debug)] pub enum Ancestor<'a> { - None = 0, - ${enumVariants} + None = AncestorType::None as u16, + ${ancestorEnumVariants} } impl<'a> Ancestor<'a> { diff --git a/crates/oxc_traverse/scripts/lib/walk.mjs b/crates/oxc_traverse/scripts/lib/walk.mjs index 953189a81..fd84e1321 100644 --- a/crates/oxc_traverse/scripts/lib/walk.mjs +++ b/crates/oxc_traverse/scripts/lib/walk.mjs @@ -27,7 +27,7 @@ export default function generateWalkFunctionsCode(types) { #[allow(clippy::wildcard_imports)] use oxc_ast::ast::*; - use crate::{ancestor, Ancestor, Traverse, TraverseCtx}; + use crate::{ancestor::{self, AncestorType}, Ancestor, Traverse, TraverseCtx}; ${walkMethods} @@ -51,8 +51,10 @@ function generateWalkForStruct(type, types) { const fieldsCodes = visitedFields.map((field, index) => { const fieldWalkName = `walk_${camelToSnake(field.innerTypeName)}`; - const retagCode = index === 0 ? '' : `ctx.retag_stack(${field.ancestorDiscriminant});`, - fieldCode = `(node as *mut u8).add(ancestor::${field.offsetVarName}) as *mut ${field.typeName}`; + const retagCode = index === 0 + ? '' + : `ctx.retag_stack(AncestorType::${type.name}${snakeToCamel(field.name)});`; + const fieldCode = `(node as *mut u8).add(ancestor::${field.offsetVarName}) as *mut ${field.typeName}`; if (field.wrappers[0] === 'Option') { let walkCode; diff --git a/crates/oxc_traverse/src/ancestor.rs b/crates/oxc_traverse/src/ancestor.rs index a34ec5d82..5f2516255 100644 --- a/crates/oxc_traverse/src/ancestor.rs +++ b/crates/oxc_traverse/src/ancestor.rs @@ -18,318 +18,841 @@ use oxc_syntax::operator::{ AssignmentOperator, BinaryOperator, LogicalOperator, UnaryOperator, UpdateOperator, }; -pub(crate) type AncestorDiscriminant = u16; +/// Type of [`Ancestor`]. +/// Used in [`crate::TraverseCtx::retag_stack`]. +#[repr(u16)] +#[derive(Clone, Copy)] +#[allow(dead_code)] +pub(crate) enum AncestorType { + None = 0, + ProgramDirectives = 1, + ProgramHashbang = 2, + ProgramBody = 3, + ArrayExpressionElements = 4, + ObjectExpressionProperties = 5, + ObjectPropertyKey = 6, + ObjectPropertyValue = 7, + ObjectPropertyInit = 8, + TemplateLiteralQuasis = 9, + TemplateLiteralExpressions = 10, + TaggedTemplateExpressionTag = 11, + TaggedTemplateExpressionQuasi = 12, + TaggedTemplateExpressionTypeParameters = 13, + ComputedMemberExpressionObject = 14, + ComputedMemberExpressionExpression = 15, + StaticMemberExpressionObject = 16, + StaticMemberExpressionProperty = 17, + PrivateFieldExpressionObject = 18, + PrivateFieldExpressionField = 19, + CallExpressionCallee = 20, + CallExpressionArguments = 21, + CallExpressionTypeParameters = 22, + NewExpressionCallee = 23, + NewExpressionArguments = 24, + NewExpressionTypeParameters = 25, + MetaPropertyMeta = 26, + MetaPropertyProperty = 27, + SpreadElementArgument = 28, + UpdateExpressionArgument = 29, + UnaryExpressionArgument = 30, + BinaryExpressionLeft = 31, + BinaryExpressionRight = 32, + PrivateInExpressionLeft = 33, + PrivateInExpressionRight = 34, + LogicalExpressionLeft = 35, + LogicalExpressionRight = 36, + ConditionalExpressionTest = 37, + ConditionalExpressionConsequent = 38, + ConditionalExpressionAlternate = 39, + AssignmentExpressionLeft = 40, + AssignmentExpressionRight = 41, + ArrayAssignmentTargetElements = 42, + ArrayAssignmentTargetRest = 43, + ObjectAssignmentTargetProperties = 44, + ObjectAssignmentTargetRest = 45, + AssignmentTargetRestTarget = 46, + AssignmentTargetWithDefaultBinding = 47, + AssignmentTargetWithDefaultInit = 48, + AssignmentTargetPropertyIdentifierBinding = 49, + AssignmentTargetPropertyIdentifierInit = 50, + AssignmentTargetPropertyPropertyName = 51, + AssignmentTargetPropertyPropertyBinding = 52, + SequenceExpressionExpressions = 53, + AwaitExpressionArgument = 54, + ChainExpressionExpression = 55, + ParenthesizedExpressionExpression = 56, + DirectiveExpression = 57, + BlockStatementBody = 58, + VariableDeclarationDeclarations = 59, + VariableDeclaratorId = 60, + VariableDeclaratorInit = 61, + UsingDeclarationDeclarations = 62, + ExpressionStatementExpression = 63, + IfStatementTest = 64, + IfStatementConsequent = 65, + IfStatementAlternate = 66, + DoWhileStatementBody = 67, + DoWhileStatementTest = 68, + WhileStatementTest = 69, + WhileStatementBody = 70, + ForStatementInit = 71, + ForStatementTest = 72, + ForStatementUpdate = 73, + ForStatementBody = 74, + ForInStatementLeft = 75, + ForInStatementRight = 76, + ForInStatementBody = 77, + ForOfStatementLeft = 78, + ForOfStatementRight = 79, + ForOfStatementBody = 80, + ContinueStatementLabel = 81, + BreakStatementLabel = 82, + ReturnStatementArgument = 83, + WithStatementObject = 84, + WithStatementBody = 85, + SwitchStatementDiscriminant = 86, + SwitchStatementCases = 87, + SwitchCaseTest = 88, + SwitchCaseConsequent = 89, + LabeledStatementLabel = 90, + LabeledStatementBody = 91, + ThrowStatementArgument = 92, + TryStatementBlock = 93, + TryStatementHandler = 94, + TryStatementFinalizer = 95, + CatchClauseParam = 96, + CatchClauseBody = 97, + CatchParameterPattern = 98, + BindingPatternKind = 99, + BindingPatternTypeAnnotation = 100, + AssignmentPatternLeft = 101, + AssignmentPatternRight = 102, + ObjectPatternProperties = 103, + ObjectPatternRest = 104, + BindingPropertyKey = 105, + BindingPropertyValue = 106, + ArrayPatternElements = 107, + ArrayPatternRest = 108, + BindingRestElementArgument = 109, + FunctionId = 110, + FunctionThisParam = 111, + FunctionParams = 112, + FunctionBody = 113, + FunctionTypeParameters = 114, + FunctionReturnType = 115, + FormalParametersItems = 116, + FormalParametersRest = 117, + FormalParameterPattern = 118, + FormalParameterDecorators = 119, + FunctionBodyDirectives = 120, + FunctionBodyStatements = 121, + ArrowFunctionExpressionParams = 122, + ArrowFunctionExpressionBody = 123, + ArrowFunctionExpressionTypeParameters = 124, + ArrowFunctionExpressionReturnType = 125, + YieldExpressionArgument = 126, + ClassId = 127, + ClassSuperClass = 128, + ClassBody = 129, + ClassTypeParameters = 130, + ClassSuperTypeParameters = 131, + ClassImplements = 132, + ClassDecorators = 133, + ClassBodyBody = 134, + MethodDefinitionKey = 135, + MethodDefinitionValue = 136, + MethodDefinitionDecorators = 137, + PropertyDefinitionKey = 138, + PropertyDefinitionValue = 139, + PropertyDefinitionTypeAnnotation = 140, + PropertyDefinitionDecorators = 141, + StaticBlockBody = 142, + AccessorPropertyKey = 143, + AccessorPropertyValue = 144, + AccessorPropertyDecorators = 145, + ImportExpressionSource = 146, + ImportExpressionArguments = 147, + ImportDeclarationSpecifiers = 148, + ImportDeclarationSource = 149, + ImportDeclarationWithClause = 150, + ImportSpecifierImported = 151, + ImportSpecifierLocal = 152, + ImportDefaultSpecifierLocal = 153, + ImportNamespaceSpecifierLocal = 154, + WithClauseAttributesKeyword = 155, + WithClauseWithEntries = 156, + ImportAttributeKey = 157, + ImportAttributeValue = 158, + ExportNamedDeclarationDeclaration = 159, + ExportNamedDeclarationSpecifiers = 160, + ExportNamedDeclarationSource = 161, + ExportNamedDeclarationWithClause = 162, + ExportDefaultDeclarationDeclaration = 163, + ExportDefaultDeclarationExported = 164, + ExportAllDeclarationExported = 165, + ExportAllDeclarationSource = 166, + ExportAllDeclarationWithClause = 167, + ExportSpecifierLocal = 168, + ExportSpecifierExported = 169, + JSXElementOpeningElement = 170, + JSXElementClosingElement = 171, + JSXElementChildren = 172, + JSXOpeningElementName = 173, + JSXOpeningElementAttributes = 174, + JSXOpeningElementTypeParameters = 175, + JSXClosingElementName = 176, + JSXFragmentChildren = 177, + JSXNamespacedNameNamespace = 178, + JSXNamespacedNameProperty = 179, + JSXMemberExpressionObject = 180, + JSXMemberExpressionProperty = 181, + JSXExpressionContainerExpression = 182, + JSXAttributeName = 183, + JSXAttributeValue = 184, + JSXSpreadAttributeArgument = 185, + JSXSpreadChildExpression = 186, + TSThisParameterThis = 187, + TSThisParameterTypeAnnotation = 188, + TSEnumDeclarationId = 189, + TSEnumDeclarationMembers = 190, + TSEnumMemberId = 191, + TSEnumMemberInitializer = 192, + TSTypeAnnotationTypeAnnotation = 193, + TSLiteralTypeLiteral = 194, + TSConditionalTypeCheckType = 195, + TSConditionalTypeExtendsType = 196, + TSConditionalTypeTrueType = 197, + TSConditionalTypeFalseType = 198, + TSUnionTypeTypes = 199, + TSIntersectionTypeTypes = 200, + TSTypeOperatorTypeAnnotation = 201, + TSArrayTypeElementType = 202, + TSIndexedAccessTypeObjectType = 203, + TSIndexedAccessTypeIndexType = 204, + TSTupleTypeElementTypes = 205, + TSNamedTupleMemberElementType = 206, + TSNamedTupleMemberLabel = 207, + TSOptionalTypeTypeAnnotation = 208, + TSRestTypeTypeAnnotation = 209, + TSTypeReferenceTypeName = 210, + TSTypeReferenceTypeParameters = 211, + TSQualifiedNameLeft = 212, + TSQualifiedNameRight = 213, + TSTypeParameterInstantiationParams = 214, + TSTypeParameterName = 215, + TSTypeParameterConstraint = 216, + TSTypeParameterDefault = 217, + TSTypeParameterDeclarationParams = 218, + TSTypeAliasDeclarationId = 219, + TSTypeAliasDeclarationTypeAnnotation = 220, + TSTypeAliasDeclarationTypeParameters = 221, + TSClassImplementsExpression = 222, + TSClassImplementsTypeParameters = 223, + TSInterfaceDeclarationId = 224, + TSInterfaceDeclarationBody = 225, + TSInterfaceDeclarationTypeParameters = 226, + TSInterfaceDeclarationExtends = 227, + TSInterfaceBodyBody = 228, + TSPropertySignatureKey = 229, + TSPropertySignatureTypeAnnotation = 230, + TSIndexSignatureParameters = 231, + TSIndexSignatureTypeAnnotation = 232, + TSCallSignatureDeclarationThisParam = 233, + TSCallSignatureDeclarationParams = 234, + TSCallSignatureDeclarationReturnType = 235, + TSCallSignatureDeclarationTypeParameters = 236, + TSMethodSignatureKey = 237, + TSMethodSignatureThisParam = 238, + TSMethodSignatureParams = 239, + TSMethodSignatureReturnType = 240, + TSMethodSignatureTypeParameters = 241, + TSConstructSignatureDeclarationParams = 242, + TSConstructSignatureDeclarationReturnType = 243, + TSConstructSignatureDeclarationTypeParameters = 244, + TSIndexSignatureNameTypeAnnotation = 245, + TSInterfaceHeritageExpression = 246, + TSInterfaceHeritageTypeParameters = 247, + TSTypePredicateParameterName = 248, + TSTypePredicateTypeAnnotation = 249, + TSModuleDeclarationId = 250, + TSModuleDeclarationBody = 251, + TSModuleBlockBody = 252, + TSTypeLiteralMembers = 253, + TSInferTypeTypeParameter = 254, + TSTypeQueryExprName = 255, + TSTypeQueryTypeParameters = 256, + TSImportTypeArgument = 257, + TSImportTypeQualifier = 258, + TSImportTypeAttributes = 259, + TSImportTypeTypeParameters = 260, + TSImportAttributesElements = 261, + TSImportAttributeName = 262, + TSImportAttributeValue = 263, + TSFunctionTypeThisParam = 264, + TSFunctionTypeParams = 265, + TSFunctionTypeReturnType = 266, + TSFunctionTypeTypeParameters = 267, + TSConstructorTypeParams = 268, + TSConstructorTypeReturnType = 269, + TSConstructorTypeTypeParameters = 270, + TSMappedTypeTypeParameter = 271, + TSMappedTypeNameType = 272, + TSMappedTypeTypeAnnotation = 273, + TSTemplateLiteralTypeQuasis = 274, + TSTemplateLiteralTypeTypes = 275, + TSAsExpressionExpression = 276, + TSAsExpressionTypeAnnotation = 277, + TSSatisfiesExpressionExpression = 278, + TSSatisfiesExpressionTypeAnnotation = 279, + TSTypeAssertionExpression = 280, + TSTypeAssertionTypeAnnotation = 281, + TSImportEqualsDeclarationId = 282, + TSImportEqualsDeclarationModuleReference = 283, + TSExternalModuleReferenceExpression = 284, + TSNonNullExpressionExpression = 285, + DecoratorExpression = 286, + TSExportAssignmentExpression = 287, + TSNamespaceExportDeclarationId = 288, + TSInstantiationExpressionExpression = 289, + TSInstantiationExpressionTypeParameters = 290, + JSDocNullableTypeTypeAnnotation = 291, +} /// Ancestor type used in AST traversal. /// /// Encodes both the type of the parent, and child's location in the parent. /// i.e. variants for `BinaryExpressionLeft` and `BinaryExpressionRight`, not just `BinaryExpression`. // -// SAFETY: This type MUST be `#[repr(u8)]` or `#[repr(u16)]` (depending on number of variants) -// to maintain the safety of `TraverseCtx::retag_stack`. +// SAFETY: +// * This type must be `#[repr(u16)]`. +// * Variant discriminants must correspond to those in `AncestorType`. +// +// These invariants make it possible to set the discriminant of an `Ancestor` without altering +// the "payload" pointer with: +// `*(ancestor as *mut _ as *mut AncestorType) = AncestorType::Program`. +// `TraverseCtx::retag_stack` uses this technique. #[repr(C, u16)] #[derive(Debug)] pub enum Ancestor<'a> { - None = 0, - ProgramDirectives(ProgramWithoutDirectives<'a>) = 1, - ProgramHashbang(ProgramWithoutHashbang<'a>) = 2, - ProgramBody(ProgramWithoutBody<'a>) = 3, - ArrayExpressionElements(ArrayExpressionWithoutElements<'a>) = 4, - ObjectExpressionProperties(ObjectExpressionWithoutProperties<'a>) = 5, - ObjectPropertyKey(ObjectPropertyWithoutKey<'a>) = 6, - ObjectPropertyValue(ObjectPropertyWithoutValue<'a>) = 7, - ObjectPropertyInit(ObjectPropertyWithoutInit<'a>) = 8, - TemplateLiteralQuasis(TemplateLiteralWithoutQuasis<'a>) = 9, - TemplateLiteralExpressions(TemplateLiteralWithoutExpressions<'a>) = 10, - TaggedTemplateExpressionTag(TaggedTemplateExpressionWithoutTag<'a>) = 11, - TaggedTemplateExpressionQuasi(TaggedTemplateExpressionWithoutQuasi<'a>) = 12, - TaggedTemplateExpressionTypeParameters(TaggedTemplateExpressionWithoutTypeParameters<'a>) = 13, - ComputedMemberExpressionObject(ComputedMemberExpressionWithoutObject<'a>) = 14, - ComputedMemberExpressionExpression(ComputedMemberExpressionWithoutExpression<'a>) = 15, - StaticMemberExpressionObject(StaticMemberExpressionWithoutObject<'a>) = 16, - StaticMemberExpressionProperty(StaticMemberExpressionWithoutProperty<'a>) = 17, - PrivateFieldExpressionObject(PrivateFieldExpressionWithoutObject<'a>) = 18, - PrivateFieldExpressionField(PrivateFieldExpressionWithoutField<'a>) = 19, - CallExpressionCallee(CallExpressionWithoutCallee<'a>) = 20, - CallExpressionArguments(CallExpressionWithoutArguments<'a>) = 21, - CallExpressionTypeParameters(CallExpressionWithoutTypeParameters<'a>) = 22, - NewExpressionCallee(NewExpressionWithoutCallee<'a>) = 23, - NewExpressionArguments(NewExpressionWithoutArguments<'a>) = 24, - NewExpressionTypeParameters(NewExpressionWithoutTypeParameters<'a>) = 25, - MetaPropertyMeta(MetaPropertyWithoutMeta<'a>) = 26, - MetaPropertyProperty(MetaPropertyWithoutProperty<'a>) = 27, - SpreadElementArgument(SpreadElementWithoutArgument<'a>) = 28, - UpdateExpressionArgument(UpdateExpressionWithoutArgument<'a>) = 29, - UnaryExpressionArgument(UnaryExpressionWithoutArgument<'a>) = 30, - BinaryExpressionLeft(BinaryExpressionWithoutLeft<'a>) = 31, - BinaryExpressionRight(BinaryExpressionWithoutRight<'a>) = 32, - PrivateInExpressionLeft(PrivateInExpressionWithoutLeft<'a>) = 33, - PrivateInExpressionRight(PrivateInExpressionWithoutRight<'a>) = 34, - LogicalExpressionLeft(LogicalExpressionWithoutLeft<'a>) = 35, - LogicalExpressionRight(LogicalExpressionWithoutRight<'a>) = 36, - ConditionalExpressionTest(ConditionalExpressionWithoutTest<'a>) = 37, - ConditionalExpressionConsequent(ConditionalExpressionWithoutConsequent<'a>) = 38, - ConditionalExpressionAlternate(ConditionalExpressionWithoutAlternate<'a>) = 39, - AssignmentExpressionLeft(AssignmentExpressionWithoutLeft<'a>) = 40, - AssignmentExpressionRight(AssignmentExpressionWithoutRight<'a>) = 41, - ArrayAssignmentTargetElements(ArrayAssignmentTargetWithoutElements<'a>) = 42, - ArrayAssignmentTargetRest(ArrayAssignmentTargetWithoutRest<'a>) = 43, - ObjectAssignmentTargetProperties(ObjectAssignmentTargetWithoutProperties<'a>) = 44, - ObjectAssignmentTargetRest(ObjectAssignmentTargetWithoutRest<'a>) = 45, - AssignmentTargetRestTarget(AssignmentTargetRestWithoutTarget<'a>) = 46, - AssignmentTargetWithDefaultBinding(AssignmentTargetWithDefaultWithoutBinding<'a>) = 47, - AssignmentTargetWithDefaultInit(AssignmentTargetWithDefaultWithoutInit<'a>) = 48, + None = AncestorType::None as u16, + ProgramDirectives(ProgramWithoutDirectives<'a>) = AncestorType::ProgramDirectives as u16, + ProgramHashbang(ProgramWithoutHashbang<'a>) = AncestorType::ProgramHashbang as u16, + ProgramBody(ProgramWithoutBody<'a>) = AncestorType::ProgramBody as u16, + ArrayExpressionElements(ArrayExpressionWithoutElements<'a>) = + AncestorType::ArrayExpressionElements as u16, + ObjectExpressionProperties(ObjectExpressionWithoutProperties<'a>) = + AncestorType::ObjectExpressionProperties as u16, + ObjectPropertyKey(ObjectPropertyWithoutKey<'a>) = AncestorType::ObjectPropertyKey as u16, + ObjectPropertyValue(ObjectPropertyWithoutValue<'a>) = AncestorType::ObjectPropertyValue as u16, + ObjectPropertyInit(ObjectPropertyWithoutInit<'a>) = AncestorType::ObjectPropertyInit as u16, + TemplateLiteralQuasis(TemplateLiteralWithoutQuasis<'a>) = + AncestorType::TemplateLiteralQuasis as u16, + TemplateLiteralExpressions(TemplateLiteralWithoutExpressions<'a>) = + AncestorType::TemplateLiteralExpressions as u16, + TaggedTemplateExpressionTag(TaggedTemplateExpressionWithoutTag<'a>) = + AncestorType::TaggedTemplateExpressionTag as u16, + TaggedTemplateExpressionQuasi(TaggedTemplateExpressionWithoutQuasi<'a>) = + AncestorType::TaggedTemplateExpressionQuasi as u16, + TaggedTemplateExpressionTypeParameters(TaggedTemplateExpressionWithoutTypeParameters<'a>) = + AncestorType::TaggedTemplateExpressionTypeParameters as u16, + ComputedMemberExpressionObject(ComputedMemberExpressionWithoutObject<'a>) = + AncestorType::ComputedMemberExpressionObject as u16, + ComputedMemberExpressionExpression(ComputedMemberExpressionWithoutExpression<'a>) = + AncestorType::ComputedMemberExpressionExpression as u16, + StaticMemberExpressionObject(StaticMemberExpressionWithoutObject<'a>) = + AncestorType::StaticMemberExpressionObject as u16, + StaticMemberExpressionProperty(StaticMemberExpressionWithoutProperty<'a>) = + AncestorType::StaticMemberExpressionProperty as u16, + PrivateFieldExpressionObject(PrivateFieldExpressionWithoutObject<'a>) = + AncestorType::PrivateFieldExpressionObject as u16, + PrivateFieldExpressionField(PrivateFieldExpressionWithoutField<'a>) = + AncestorType::PrivateFieldExpressionField as u16, + CallExpressionCallee(CallExpressionWithoutCallee<'a>) = + AncestorType::CallExpressionCallee as u16, + CallExpressionArguments(CallExpressionWithoutArguments<'a>) = + AncestorType::CallExpressionArguments as u16, + CallExpressionTypeParameters(CallExpressionWithoutTypeParameters<'a>) = + AncestorType::CallExpressionTypeParameters as u16, + NewExpressionCallee(NewExpressionWithoutCallee<'a>) = AncestorType::NewExpressionCallee as u16, + NewExpressionArguments(NewExpressionWithoutArguments<'a>) = + AncestorType::NewExpressionArguments as u16, + NewExpressionTypeParameters(NewExpressionWithoutTypeParameters<'a>) = + AncestorType::NewExpressionTypeParameters as u16, + MetaPropertyMeta(MetaPropertyWithoutMeta<'a>) = AncestorType::MetaPropertyMeta as u16, + MetaPropertyProperty(MetaPropertyWithoutProperty<'a>) = + AncestorType::MetaPropertyProperty as u16, + SpreadElementArgument(SpreadElementWithoutArgument<'a>) = + AncestorType::SpreadElementArgument as u16, + UpdateExpressionArgument(UpdateExpressionWithoutArgument<'a>) = + AncestorType::UpdateExpressionArgument as u16, + UnaryExpressionArgument(UnaryExpressionWithoutArgument<'a>) = + AncestorType::UnaryExpressionArgument as u16, + BinaryExpressionLeft(BinaryExpressionWithoutLeft<'a>) = + AncestorType::BinaryExpressionLeft as u16, + BinaryExpressionRight(BinaryExpressionWithoutRight<'a>) = + AncestorType::BinaryExpressionRight as u16, + PrivateInExpressionLeft(PrivateInExpressionWithoutLeft<'a>) = + AncestorType::PrivateInExpressionLeft as u16, + PrivateInExpressionRight(PrivateInExpressionWithoutRight<'a>) = + AncestorType::PrivateInExpressionRight as u16, + LogicalExpressionLeft(LogicalExpressionWithoutLeft<'a>) = + AncestorType::LogicalExpressionLeft as u16, + LogicalExpressionRight(LogicalExpressionWithoutRight<'a>) = + AncestorType::LogicalExpressionRight as u16, + ConditionalExpressionTest(ConditionalExpressionWithoutTest<'a>) = + AncestorType::ConditionalExpressionTest as u16, + ConditionalExpressionConsequent(ConditionalExpressionWithoutConsequent<'a>) = + AncestorType::ConditionalExpressionConsequent as u16, + ConditionalExpressionAlternate(ConditionalExpressionWithoutAlternate<'a>) = + AncestorType::ConditionalExpressionAlternate as u16, + AssignmentExpressionLeft(AssignmentExpressionWithoutLeft<'a>) = + AncestorType::AssignmentExpressionLeft as u16, + AssignmentExpressionRight(AssignmentExpressionWithoutRight<'a>) = + AncestorType::AssignmentExpressionRight as u16, + ArrayAssignmentTargetElements(ArrayAssignmentTargetWithoutElements<'a>) = + AncestorType::ArrayAssignmentTargetElements as u16, + ArrayAssignmentTargetRest(ArrayAssignmentTargetWithoutRest<'a>) = + AncestorType::ArrayAssignmentTargetRest as u16, + ObjectAssignmentTargetProperties(ObjectAssignmentTargetWithoutProperties<'a>) = + AncestorType::ObjectAssignmentTargetProperties as u16, + ObjectAssignmentTargetRest(ObjectAssignmentTargetWithoutRest<'a>) = + AncestorType::ObjectAssignmentTargetRest as u16, + AssignmentTargetRestTarget(AssignmentTargetRestWithoutTarget<'a>) = + AncestorType::AssignmentTargetRestTarget as u16, + AssignmentTargetWithDefaultBinding(AssignmentTargetWithDefaultWithoutBinding<'a>) = + AncestorType::AssignmentTargetWithDefaultBinding as u16, + AssignmentTargetWithDefaultInit(AssignmentTargetWithDefaultWithoutInit<'a>) = + AncestorType::AssignmentTargetWithDefaultInit as u16, AssignmentTargetPropertyIdentifierBinding(AssignmentTargetPropertyIdentifierWithoutBinding<'a>) = - 49, - AssignmentTargetPropertyIdentifierInit(AssignmentTargetPropertyIdentifierWithoutInit<'a>) = 50, - AssignmentTargetPropertyPropertyName(AssignmentTargetPropertyPropertyWithoutName<'a>) = 51, + AncestorType::AssignmentTargetPropertyIdentifierBinding as u16, + AssignmentTargetPropertyIdentifierInit(AssignmentTargetPropertyIdentifierWithoutInit<'a>) = + AncestorType::AssignmentTargetPropertyIdentifierInit as u16, + AssignmentTargetPropertyPropertyName(AssignmentTargetPropertyPropertyWithoutName<'a>) = + AncestorType::AssignmentTargetPropertyPropertyName as u16, AssignmentTargetPropertyPropertyBinding(AssignmentTargetPropertyPropertyWithoutBinding<'a>) = - 52, - SequenceExpressionExpressions(SequenceExpressionWithoutExpressions<'a>) = 53, - AwaitExpressionArgument(AwaitExpressionWithoutArgument<'a>) = 54, - ChainExpressionExpression(ChainExpressionWithoutExpression<'a>) = 55, - ParenthesizedExpressionExpression(ParenthesizedExpressionWithoutExpression<'a>) = 56, - DirectiveExpression(DirectiveWithoutExpression<'a>) = 57, - BlockStatementBody(BlockStatementWithoutBody<'a>) = 58, - VariableDeclarationDeclarations(VariableDeclarationWithoutDeclarations<'a>) = 59, - VariableDeclaratorId(VariableDeclaratorWithoutId<'a>) = 60, - VariableDeclaratorInit(VariableDeclaratorWithoutInit<'a>) = 61, - UsingDeclarationDeclarations(UsingDeclarationWithoutDeclarations<'a>) = 62, - ExpressionStatementExpression(ExpressionStatementWithoutExpression<'a>) = 63, - IfStatementTest(IfStatementWithoutTest<'a>) = 64, - IfStatementConsequent(IfStatementWithoutConsequent<'a>) = 65, - IfStatementAlternate(IfStatementWithoutAlternate<'a>) = 66, - DoWhileStatementBody(DoWhileStatementWithoutBody<'a>) = 67, - DoWhileStatementTest(DoWhileStatementWithoutTest<'a>) = 68, - WhileStatementTest(WhileStatementWithoutTest<'a>) = 69, - WhileStatementBody(WhileStatementWithoutBody<'a>) = 70, - ForStatementInit(ForStatementWithoutInit<'a>) = 71, - ForStatementTest(ForStatementWithoutTest<'a>) = 72, - ForStatementUpdate(ForStatementWithoutUpdate<'a>) = 73, - ForStatementBody(ForStatementWithoutBody<'a>) = 74, - ForInStatementLeft(ForInStatementWithoutLeft<'a>) = 75, - ForInStatementRight(ForInStatementWithoutRight<'a>) = 76, - ForInStatementBody(ForInStatementWithoutBody<'a>) = 77, - ForOfStatementLeft(ForOfStatementWithoutLeft<'a>) = 78, - ForOfStatementRight(ForOfStatementWithoutRight<'a>) = 79, - ForOfStatementBody(ForOfStatementWithoutBody<'a>) = 80, - ContinueStatementLabel(ContinueStatementWithoutLabel<'a>) = 81, - BreakStatementLabel(BreakStatementWithoutLabel<'a>) = 82, - ReturnStatementArgument(ReturnStatementWithoutArgument<'a>) = 83, - WithStatementObject(WithStatementWithoutObject<'a>) = 84, - WithStatementBody(WithStatementWithoutBody<'a>) = 85, - SwitchStatementDiscriminant(SwitchStatementWithoutDiscriminant<'a>) = 86, - SwitchStatementCases(SwitchStatementWithoutCases<'a>) = 87, - SwitchCaseTest(SwitchCaseWithoutTest<'a>) = 88, - SwitchCaseConsequent(SwitchCaseWithoutConsequent<'a>) = 89, - LabeledStatementLabel(LabeledStatementWithoutLabel<'a>) = 90, - LabeledStatementBody(LabeledStatementWithoutBody<'a>) = 91, - ThrowStatementArgument(ThrowStatementWithoutArgument<'a>) = 92, - TryStatementBlock(TryStatementWithoutBlock<'a>) = 93, - TryStatementHandler(TryStatementWithoutHandler<'a>) = 94, - TryStatementFinalizer(TryStatementWithoutFinalizer<'a>) = 95, - CatchClauseParam(CatchClauseWithoutParam<'a>) = 96, - CatchClauseBody(CatchClauseWithoutBody<'a>) = 97, - CatchParameterPattern(CatchParameterWithoutPattern<'a>) = 98, - BindingPatternKind(BindingPatternWithoutKind<'a>) = 99, - BindingPatternTypeAnnotation(BindingPatternWithoutTypeAnnotation<'a>) = 100, - AssignmentPatternLeft(AssignmentPatternWithoutLeft<'a>) = 101, - AssignmentPatternRight(AssignmentPatternWithoutRight<'a>) = 102, - ObjectPatternProperties(ObjectPatternWithoutProperties<'a>) = 103, - ObjectPatternRest(ObjectPatternWithoutRest<'a>) = 104, - BindingPropertyKey(BindingPropertyWithoutKey<'a>) = 105, - BindingPropertyValue(BindingPropertyWithoutValue<'a>) = 106, - ArrayPatternElements(ArrayPatternWithoutElements<'a>) = 107, - ArrayPatternRest(ArrayPatternWithoutRest<'a>) = 108, - BindingRestElementArgument(BindingRestElementWithoutArgument<'a>) = 109, - FunctionId(FunctionWithoutId<'a>) = 110, - FunctionThisParam(FunctionWithoutThisParam<'a>) = 111, - FunctionParams(FunctionWithoutParams<'a>) = 112, - FunctionBody(FunctionWithoutBody<'a>) = 113, - FunctionTypeParameters(FunctionWithoutTypeParameters<'a>) = 114, - FunctionReturnType(FunctionWithoutReturnType<'a>) = 115, - FormalParametersItems(FormalParametersWithoutItems<'a>) = 116, - FormalParametersRest(FormalParametersWithoutRest<'a>) = 117, - FormalParameterPattern(FormalParameterWithoutPattern<'a>) = 118, - FormalParameterDecorators(FormalParameterWithoutDecorators<'a>) = 119, - FunctionBodyDirectives(FunctionBodyWithoutDirectives<'a>) = 120, - FunctionBodyStatements(FunctionBodyWithoutStatements<'a>) = 121, - ArrowFunctionExpressionParams(ArrowFunctionExpressionWithoutParams<'a>) = 122, - ArrowFunctionExpressionBody(ArrowFunctionExpressionWithoutBody<'a>) = 123, - ArrowFunctionExpressionTypeParameters(ArrowFunctionExpressionWithoutTypeParameters<'a>) = 124, - ArrowFunctionExpressionReturnType(ArrowFunctionExpressionWithoutReturnType<'a>) = 125, - YieldExpressionArgument(YieldExpressionWithoutArgument<'a>) = 126, - ClassId(ClassWithoutId<'a>) = 127, - ClassSuperClass(ClassWithoutSuperClass<'a>) = 128, - ClassBody(ClassWithoutBody<'a>) = 129, - ClassTypeParameters(ClassWithoutTypeParameters<'a>) = 130, - ClassSuperTypeParameters(ClassWithoutSuperTypeParameters<'a>) = 131, - ClassImplements(ClassWithoutImplements<'a>) = 132, - ClassDecorators(ClassWithoutDecorators<'a>) = 133, - ClassBodyBody(ClassBodyWithoutBody<'a>) = 134, - MethodDefinitionKey(MethodDefinitionWithoutKey<'a>) = 135, - MethodDefinitionValue(MethodDefinitionWithoutValue<'a>) = 136, - MethodDefinitionDecorators(MethodDefinitionWithoutDecorators<'a>) = 137, - PropertyDefinitionKey(PropertyDefinitionWithoutKey<'a>) = 138, - PropertyDefinitionValue(PropertyDefinitionWithoutValue<'a>) = 139, - PropertyDefinitionTypeAnnotation(PropertyDefinitionWithoutTypeAnnotation<'a>) = 140, - PropertyDefinitionDecorators(PropertyDefinitionWithoutDecorators<'a>) = 141, - StaticBlockBody(StaticBlockWithoutBody<'a>) = 142, - AccessorPropertyKey(AccessorPropertyWithoutKey<'a>) = 143, - AccessorPropertyValue(AccessorPropertyWithoutValue<'a>) = 144, - AccessorPropertyDecorators(AccessorPropertyWithoutDecorators<'a>) = 145, - ImportExpressionSource(ImportExpressionWithoutSource<'a>) = 146, - ImportExpressionArguments(ImportExpressionWithoutArguments<'a>) = 147, - ImportDeclarationSpecifiers(ImportDeclarationWithoutSpecifiers<'a>) = 148, - ImportDeclarationSource(ImportDeclarationWithoutSource<'a>) = 149, - ImportDeclarationWithClause(ImportDeclarationWithoutWithClause<'a>) = 150, - ImportSpecifierImported(ImportSpecifierWithoutImported<'a>) = 151, - ImportSpecifierLocal(ImportSpecifierWithoutLocal<'a>) = 152, - ImportDefaultSpecifierLocal(ImportDefaultSpecifierWithoutLocal<'a>) = 153, - ImportNamespaceSpecifierLocal(ImportNamespaceSpecifierWithoutLocal<'a>) = 154, - WithClauseAttributesKeyword(WithClauseWithoutAttributesKeyword<'a>) = 155, - WithClauseWithEntries(WithClauseWithoutWithEntries<'a>) = 156, - ImportAttributeKey(ImportAttributeWithoutKey<'a>) = 157, - ImportAttributeValue(ImportAttributeWithoutValue<'a>) = 158, - ExportNamedDeclarationDeclaration(ExportNamedDeclarationWithoutDeclaration<'a>) = 159, - ExportNamedDeclarationSpecifiers(ExportNamedDeclarationWithoutSpecifiers<'a>) = 160, - ExportNamedDeclarationSource(ExportNamedDeclarationWithoutSource<'a>) = 161, - ExportNamedDeclarationWithClause(ExportNamedDeclarationWithoutWithClause<'a>) = 162, - ExportDefaultDeclarationDeclaration(ExportDefaultDeclarationWithoutDeclaration<'a>) = 163, - ExportDefaultDeclarationExported(ExportDefaultDeclarationWithoutExported<'a>) = 164, - ExportAllDeclarationExported(ExportAllDeclarationWithoutExported<'a>) = 165, - ExportAllDeclarationSource(ExportAllDeclarationWithoutSource<'a>) = 166, - ExportAllDeclarationWithClause(ExportAllDeclarationWithoutWithClause<'a>) = 167, - ExportSpecifierLocal(ExportSpecifierWithoutLocal<'a>) = 168, - ExportSpecifierExported(ExportSpecifierWithoutExported<'a>) = 169, - JSXElementOpeningElement(JSXElementWithoutOpeningElement<'a>) = 170, - JSXElementClosingElement(JSXElementWithoutClosingElement<'a>) = 171, - JSXElementChildren(JSXElementWithoutChildren<'a>) = 172, - JSXOpeningElementName(JSXOpeningElementWithoutName<'a>) = 173, - JSXOpeningElementAttributes(JSXOpeningElementWithoutAttributes<'a>) = 174, - JSXOpeningElementTypeParameters(JSXOpeningElementWithoutTypeParameters<'a>) = 175, - JSXClosingElementName(JSXClosingElementWithoutName<'a>) = 176, - JSXFragmentChildren(JSXFragmentWithoutChildren<'a>) = 177, - JSXNamespacedNameNamespace(JSXNamespacedNameWithoutNamespace<'a>) = 178, - JSXNamespacedNameProperty(JSXNamespacedNameWithoutProperty<'a>) = 179, - JSXMemberExpressionObject(JSXMemberExpressionWithoutObject<'a>) = 180, - JSXMemberExpressionProperty(JSXMemberExpressionWithoutProperty<'a>) = 181, - JSXExpressionContainerExpression(JSXExpressionContainerWithoutExpression<'a>) = 182, - JSXAttributeName(JSXAttributeWithoutName<'a>) = 183, - JSXAttributeValue(JSXAttributeWithoutValue<'a>) = 184, - JSXSpreadAttributeArgument(JSXSpreadAttributeWithoutArgument<'a>) = 185, - JSXSpreadChildExpression(JSXSpreadChildWithoutExpression<'a>) = 186, - TSThisParameterThis(TSThisParameterWithoutThis<'a>) = 187, - TSThisParameterTypeAnnotation(TSThisParameterWithoutTypeAnnotation<'a>) = 188, - TSEnumDeclarationId(TSEnumDeclarationWithoutId<'a>) = 189, - TSEnumDeclarationMembers(TSEnumDeclarationWithoutMembers<'a>) = 190, - TSEnumMemberId(TSEnumMemberWithoutId<'a>) = 191, - TSEnumMemberInitializer(TSEnumMemberWithoutInitializer<'a>) = 192, - TSTypeAnnotationTypeAnnotation(TSTypeAnnotationWithoutTypeAnnotation<'a>) = 193, - TSLiteralTypeLiteral(TSLiteralTypeWithoutLiteral<'a>) = 194, - TSConditionalTypeCheckType(TSConditionalTypeWithoutCheckType<'a>) = 195, - TSConditionalTypeExtendsType(TSConditionalTypeWithoutExtendsType<'a>) = 196, - TSConditionalTypeTrueType(TSConditionalTypeWithoutTrueType<'a>) = 197, - TSConditionalTypeFalseType(TSConditionalTypeWithoutFalseType<'a>) = 198, - TSUnionTypeTypes(TSUnionTypeWithoutTypes<'a>) = 199, - TSIntersectionTypeTypes(TSIntersectionTypeWithoutTypes<'a>) = 200, - TSTypeOperatorTypeAnnotation(TSTypeOperatorWithoutTypeAnnotation<'a>) = 201, - TSArrayTypeElementType(TSArrayTypeWithoutElementType<'a>) = 202, - TSIndexedAccessTypeObjectType(TSIndexedAccessTypeWithoutObjectType<'a>) = 203, - TSIndexedAccessTypeIndexType(TSIndexedAccessTypeWithoutIndexType<'a>) = 204, - TSTupleTypeElementTypes(TSTupleTypeWithoutElementTypes<'a>) = 205, - TSNamedTupleMemberElementType(TSNamedTupleMemberWithoutElementType<'a>) = 206, - TSNamedTupleMemberLabel(TSNamedTupleMemberWithoutLabel<'a>) = 207, - TSOptionalTypeTypeAnnotation(TSOptionalTypeWithoutTypeAnnotation<'a>) = 208, - TSRestTypeTypeAnnotation(TSRestTypeWithoutTypeAnnotation<'a>) = 209, - TSTypeReferenceTypeName(TSTypeReferenceWithoutTypeName<'a>) = 210, - TSTypeReferenceTypeParameters(TSTypeReferenceWithoutTypeParameters<'a>) = 211, - TSQualifiedNameLeft(TSQualifiedNameWithoutLeft<'a>) = 212, - TSQualifiedNameRight(TSQualifiedNameWithoutRight<'a>) = 213, - TSTypeParameterInstantiationParams(TSTypeParameterInstantiationWithoutParams<'a>) = 214, - TSTypeParameterName(TSTypeParameterWithoutName<'a>) = 215, - TSTypeParameterConstraint(TSTypeParameterWithoutConstraint<'a>) = 216, - TSTypeParameterDefault(TSTypeParameterWithoutDefault<'a>) = 217, - TSTypeParameterDeclarationParams(TSTypeParameterDeclarationWithoutParams<'a>) = 218, - TSTypeAliasDeclarationId(TSTypeAliasDeclarationWithoutId<'a>) = 219, - TSTypeAliasDeclarationTypeAnnotation(TSTypeAliasDeclarationWithoutTypeAnnotation<'a>) = 220, - TSTypeAliasDeclarationTypeParameters(TSTypeAliasDeclarationWithoutTypeParameters<'a>) = 221, - TSClassImplementsExpression(TSClassImplementsWithoutExpression<'a>) = 222, - TSClassImplementsTypeParameters(TSClassImplementsWithoutTypeParameters<'a>) = 223, - TSInterfaceDeclarationId(TSInterfaceDeclarationWithoutId<'a>) = 224, - TSInterfaceDeclarationBody(TSInterfaceDeclarationWithoutBody<'a>) = 225, - TSInterfaceDeclarationTypeParameters(TSInterfaceDeclarationWithoutTypeParameters<'a>) = 226, - TSInterfaceDeclarationExtends(TSInterfaceDeclarationWithoutExtends<'a>) = 227, - TSInterfaceBodyBody(TSInterfaceBodyWithoutBody<'a>) = 228, - TSPropertySignatureKey(TSPropertySignatureWithoutKey<'a>) = 229, - TSPropertySignatureTypeAnnotation(TSPropertySignatureWithoutTypeAnnotation<'a>) = 230, - TSIndexSignatureParameters(TSIndexSignatureWithoutParameters<'a>) = 231, - TSIndexSignatureTypeAnnotation(TSIndexSignatureWithoutTypeAnnotation<'a>) = 232, - TSCallSignatureDeclarationThisParam(TSCallSignatureDeclarationWithoutThisParam<'a>) = 233, - TSCallSignatureDeclarationParams(TSCallSignatureDeclarationWithoutParams<'a>) = 234, - TSCallSignatureDeclarationReturnType(TSCallSignatureDeclarationWithoutReturnType<'a>) = 235, + AncestorType::AssignmentTargetPropertyPropertyBinding as u16, + SequenceExpressionExpressions(SequenceExpressionWithoutExpressions<'a>) = + AncestorType::SequenceExpressionExpressions as u16, + AwaitExpressionArgument(AwaitExpressionWithoutArgument<'a>) = + AncestorType::AwaitExpressionArgument as u16, + ChainExpressionExpression(ChainExpressionWithoutExpression<'a>) = + AncestorType::ChainExpressionExpression as u16, + ParenthesizedExpressionExpression(ParenthesizedExpressionWithoutExpression<'a>) = + AncestorType::ParenthesizedExpressionExpression as u16, + DirectiveExpression(DirectiveWithoutExpression<'a>) = AncestorType::DirectiveExpression as u16, + BlockStatementBody(BlockStatementWithoutBody<'a>) = AncestorType::BlockStatementBody as u16, + VariableDeclarationDeclarations(VariableDeclarationWithoutDeclarations<'a>) = + AncestorType::VariableDeclarationDeclarations as u16, + VariableDeclaratorId(VariableDeclaratorWithoutId<'a>) = + AncestorType::VariableDeclaratorId as u16, + VariableDeclaratorInit(VariableDeclaratorWithoutInit<'a>) = + AncestorType::VariableDeclaratorInit as u16, + UsingDeclarationDeclarations(UsingDeclarationWithoutDeclarations<'a>) = + AncestorType::UsingDeclarationDeclarations as u16, + ExpressionStatementExpression(ExpressionStatementWithoutExpression<'a>) = + AncestorType::ExpressionStatementExpression as u16, + IfStatementTest(IfStatementWithoutTest<'a>) = AncestorType::IfStatementTest as u16, + IfStatementConsequent(IfStatementWithoutConsequent<'a>) = + AncestorType::IfStatementConsequent as u16, + IfStatementAlternate(IfStatementWithoutAlternate<'a>) = + AncestorType::IfStatementAlternate as u16, + DoWhileStatementBody(DoWhileStatementWithoutBody<'a>) = + AncestorType::DoWhileStatementBody as u16, + DoWhileStatementTest(DoWhileStatementWithoutTest<'a>) = + AncestorType::DoWhileStatementTest as u16, + WhileStatementTest(WhileStatementWithoutTest<'a>) = AncestorType::WhileStatementTest as u16, + WhileStatementBody(WhileStatementWithoutBody<'a>) = AncestorType::WhileStatementBody as u16, + ForStatementInit(ForStatementWithoutInit<'a>) = AncestorType::ForStatementInit as u16, + ForStatementTest(ForStatementWithoutTest<'a>) = AncestorType::ForStatementTest as u16, + ForStatementUpdate(ForStatementWithoutUpdate<'a>) = AncestorType::ForStatementUpdate as u16, + ForStatementBody(ForStatementWithoutBody<'a>) = AncestorType::ForStatementBody as u16, + ForInStatementLeft(ForInStatementWithoutLeft<'a>) = AncestorType::ForInStatementLeft as u16, + ForInStatementRight(ForInStatementWithoutRight<'a>) = AncestorType::ForInStatementRight as u16, + ForInStatementBody(ForInStatementWithoutBody<'a>) = AncestorType::ForInStatementBody as u16, + ForOfStatementLeft(ForOfStatementWithoutLeft<'a>) = AncestorType::ForOfStatementLeft as u16, + ForOfStatementRight(ForOfStatementWithoutRight<'a>) = AncestorType::ForOfStatementRight as u16, + ForOfStatementBody(ForOfStatementWithoutBody<'a>) = AncestorType::ForOfStatementBody as u16, + ContinueStatementLabel(ContinueStatementWithoutLabel<'a>) = + AncestorType::ContinueStatementLabel as u16, + BreakStatementLabel(BreakStatementWithoutLabel<'a>) = AncestorType::BreakStatementLabel as u16, + ReturnStatementArgument(ReturnStatementWithoutArgument<'a>) = + AncestorType::ReturnStatementArgument as u16, + WithStatementObject(WithStatementWithoutObject<'a>) = AncestorType::WithStatementObject as u16, + WithStatementBody(WithStatementWithoutBody<'a>) = AncestorType::WithStatementBody as u16, + SwitchStatementDiscriminant(SwitchStatementWithoutDiscriminant<'a>) = + AncestorType::SwitchStatementDiscriminant as u16, + SwitchStatementCases(SwitchStatementWithoutCases<'a>) = + AncestorType::SwitchStatementCases as u16, + SwitchCaseTest(SwitchCaseWithoutTest<'a>) = AncestorType::SwitchCaseTest as u16, + SwitchCaseConsequent(SwitchCaseWithoutConsequent<'a>) = + AncestorType::SwitchCaseConsequent as u16, + LabeledStatementLabel(LabeledStatementWithoutLabel<'a>) = + AncestorType::LabeledStatementLabel as u16, + LabeledStatementBody(LabeledStatementWithoutBody<'a>) = + AncestorType::LabeledStatementBody as u16, + ThrowStatementArgument(ThrowStatementWithoutArgument<'a>) = + AncestorType::ThrowStatementArgument as u16, + TryStatementBlock(TryStatementWithoutBlock<'a>) = AncestorType::TryStatementBlock as u16, + TryStatementHandler(TryStatementWithoutHandler<'a>) = AncestorType::TryStatementHandler as u16, + TryStatementFinalizer(TryStatementWithoutFinalizer<'a>) = + AncestorType::TryStatementFinalizer as u16, + CatchClauseParam(CatchClauseWithoutParam<'a>) = AncestorType::CatchClauseParam as u16, + CatchClauseBody(CatchClauseWithoutBody<'a>) = AncestorType::CatchClauseBody as u16, + CatchParameterPattern(CatchParameterWithoutPattern<'a>) = + AncestorType::CatchParameterPattern as u16, + BindingPatternKind(BindingPatternWithoutKind<'a>) = AncestorType::BindingPatternKind as u16, + BindingPatternTypeAnnotation(BindingPatternWithoutTypeAnnotation<'a>) = + AncestorType::BindingPatternTypeAnnotation as u16, + AssignmentPatternLeft(AssignmentPatternWithoutLeft<'a>) = + AncestorType::AssignmentPatternLeft as u16, + AssignmentPatternRight(AssignmentPatternWithoutRight<'a>) = + AncestorType::AssignmentPatternRight as u16, + ObjectPatternProperties(ObjectPatternWithoutProperties<'a>) = + AncestorType::ObjectPatternProperties as u16, + ObjectPatternRest(ObjectPatternWithoutRest<'a>) = AncestorType::ObjectPatternRest as u16, + BindingPropertyKey(BindingPropertyWithoutKey<'a>) = AncestorType::BindingPropertyKey as u16, + BindingPropertyValue(BindingPropertyWithoutValue<'a>) = + AncestorType::BindingPropertyValue as u16, + ArrayPatternElements(ArrayPatternWithoutElements<'a>) = + AncestorType::ArrayPatternElements as u16, + ArrayPatternRest(ArrayPatternWithoutRest<'a>) = AncestorType::ArrayPatternRest as u16, + BindingRestElementArgument(BindingRestElementWithoutArgument<'a>) = + AncestorType::BindingRestElementArgument as u16, + FunctionId(FunctionWithoutId<'a>) = AncestorType::FunctionId as u16, + FunctionThisParam(FunctionWithoutThisParam<'a>) = AncestorType::FunctionThisParam as u16, + FunctionParams(FunctionWithoutParams<'a>) = AncestorType::FunctionParams as u16, + FunctionBody(FunctionWithoutBody<'a>) = AncestorType::FunctionBody as u16, + FunctionTypeParameters(FunctionWithoutTypeParameters<'a>) = + AncestorType::FunctionTypeParameters as u16, + FunctionReturnType(FunctionWithoutReturnType<'a>) = AncestorType::FunctionReturnType as u16, + FormalParametersItems(FormalParametersWithoutItems<'a>) = + AncestorType::FormalParametersItems as u16, + FormalParametersRest(FormalParametersWithoutRest<'a>) = + AncestorType::FormalParametersRest as u16, + FormalParameterPattern(FormalParameterWithoutPattern<'a>) = + AncestorType::FormalParameterPattern as u16, + FormalParameterDecorators(FormalParameterWithoutDecorators<'a>) = + AncestorType::FormalParameterDecorators as u16, + FunctionBodyDirectives(FunctionBodyWithoutDirectives<'a>) = + AncestorType::FunctionBodyDirectives as u16, + FunctionBodyStatements(FunctionBodyWithoutStatements<'a>) = + AncestorType::FunctionBodyStatements as u16, + ArrowFunctionExpressionParams(ArrowFunctionExpressionWithoutParams<'a>) = + AncestorType::ArrowFunctionExpressionParams as u16, + ArrowFunctionExpressionBody(ArrowFunctionExpressionWithoutBody<'a>) = + AncestorType::ArrowFunctionExpressionBody as u16, + ArrowFunctionExpressionTypeParameters(ArrowFunctionExpressionWithoutTypeParameters<'a>) = + AncestorType::ArrowFunctionExpressionTypeParameters as u16, + ArrowFunctionExpressionReturnType(ArrowFunctionExpressionWithoutReturnType<'a>) = + AncestorType::ArrowFunctionExpressionReturnType as u16, + YieldExpressionArgument(YieldExpressionWithoutArgument<'a>) = + AncestorType::YieldExpressionArgument as u16, + ClassId(ClassWithoutId<'a>) = AncestorType::ClassId as u16, + ClassSuperClass(ClassWithoutSuperClass<'a>) = AncestorType::ClassSuperClass as u16, + ClassBody(ClassWithoutBody<'a>) = AncestorType::ClassBody as u16, + ClassTypeParameters(ClassWithoutTypeParameters<'a>) = AncestorType::ClassTypeParameters as u16, + ClassSuperTypeParameters(ClassWithoutSuperTypeParameters<'a>) = + AncestorType::ClassSuperTypeParameters as u16, + ClassImplements(ClassWithoutImplements<'a>) = AncestorType::ClassImplements as u16, + ClassDecorators(ClassWithoutDecorators<'a>) = AncestorType::ClassDecorators as u16, + ClassBodyBody(ClassBodyWithoutBody<'a>) = AncestorType::ClassBodyBody as u16, + MethodDefinitionKey(MethodDefinitionWithoutKey<'a>) = AncestorType::MethodDefinitionKey as u16, + MethodDefinitionValue(MethodDefinitionWithoutValue<'a>) = + AncestorType::MethodDefinitionValue as u16, + MethodDefinitionDecorators(MethodDefinitionWithoutDecorators<'a>) = + AncestorType::MethodDefinitionDecorators as u16, + PropertyDefinitionKey(PropertyDefinitionWithoutKey<'a>) = + AncestorType::PropertyDefinitionKey as u16, + PropertyDefinitionValue(PropertyDefinitionWithoutValue<'a>) = + AncestorType::PropertyDefinitionValue as u16, + PropertyDefinitionTypeAnnotation(PropertyDefinitionWithoutTypeAnnotation<'a>) = + AncestorType::PropertyDefinitionTypeAnnotation as u16, + PropertyDefinitionDecorators(PropertyDefinitionWithoutDecorators<'a>) = + AncestorType::PropertyDefinitionDecorators as u16, + StaticBlockBody(StaticBlockWithoutBody<'a>) = AncestorType::StaticBlockBody as u16, + AccessorPropertyKey(AccessorPropertyWithoutKey<'a>) = AncestorType::AccessorPropertyKey as u16, + AccessorPropertyValue(AccessorPropertyWithoutValue<'a>) = + AncestorType::AccessorPropertyValue as u16, + AccessorPropertyDecorators(AccessorPropertyWithoutDecorators<'a>) = + AncestorType::AccessorPropertyDecorators as u16, + ImportExpressionSource(ImportExpressionWithoutSource<'a>) = + AncestorType::ImportExpressionSource as u16, + ImportExpressionArguments(ImportExpressionWithoutArguments<'a>) = + AncestorType::ImportExpressionArguments as u16, + ImportDeclarationSpecifiers(ImportDeclarationWithoutSpecifiers<'a>) = + AncestorType::ImportDeclarationSpecifiers as u16, + ImportDeclarationSource(ImportDeclarationWithoutSource<'a>) = + AncestorType::ImportDeclarationSource as u16, + ImportDeclarationWithClause(ImportDeclarationWithoutWithClause<'a>) = + AncestorType::ImportDeclarationWithClause as u16, + ImportSpecifierImported(ImportSpecifierWithoutImported<'a>) = + AncestorType::ImportSpecifierImported as u16, + ImportSpecifierLocal(ImportSpecifierWithoutLocal<'a>) = + AncestorType::ImportSpecifierLocal as u16, + ImportDefaultSpecifierLocal(ImportDefaultSpecifierWithoutLocal<'a>) = + AncestorType::ImportDefaultSpecifierLocal as u16, + ImportNamespaceSpecifierLocal(ImportNamespaceSpecifierWithoutLocal<'a>) = + AncestorType::ImportNamespaceSpecifierLocal as u16, + WithClauseAttributesKeyword(WithClauseWithoutAttributesKeyword<'a>) = + AncestorType::WithClauseAttributesKeyword as u16, + WithClauseWithEntries(WithClauseWithoutWithEntries<'a>) = + AncestorType::WithClauseWithEntries as u16, + ImportAttributeKey(ImportAttributeWithoutKey<'a>) = AncestorType::ImportAttributeKey as u16, + ImportAttributeValue(ImportAttributeWithoutValue<'a>) = + AncestorType::ImportAttributeValue as u16, + ExportNamedDeclarationDeclaration(ExportNamedDeclarationWithoutDeclaration<'a>) = + AncestorType::ExportNamedDeclarationDeclaration as u16, + ExportNamedDeclarationSpecifiers(ExportNamedDeclarationWithoutSpecifiers<'a>) = + AncestorType::ExportNamedDeclarationSpecifiers as u16, + ExportNamedDeclarationSource(ExportNamedDeclarationWithoutSource<'a>) = + AncestorType::ExportNamedDeclarationSource as u16, + ExportNamedDeclarationWithClause(ExportNamedDeclarationWithoutWithClause<'a>) = + AncestorType::ExportNamedDeclarationWithClause as u16, + ExportDefaultDeclarationDeclaration(ExportDefaultDeclarationWithoutDeclaration<'a>) = + AncestorType::ExportDefaultDeclarationDeclaration as u16, + ExportDefaultDeclarationExported(ExportDefaultDeclarationWithoutExported<'a>) = + AncestorType::ExportDefaultDeclarationExported as u16, + ExportAllDeclarationExported(ExportAllDeclarationWithoutExported<'a>) = + AncestorType::ExportAllDeclarationExported as u16, + ExportAllDeclarationSource(ExportAllDeclarationWithoutSource<'a>) = + AncestorType::ExportAllDeclarationSource as u16, + ExportAllDeclarationWithClause(ExportAllDeclarationWithoutWithClause<'a>) = + AncestorType::ExportAllDeclarationWithClause as u16, + ExportSpecifierLocal(ExportSpecifierWithoutLocal<'a>) = + AncestorType::ExportSpecifierLocal as u16, + ExportSpecifierExported(ExportSpecifierWithoutExported<'a>) = + AncestorType::ExportSpecifierExported as u16, + JSXElementOpeningElement(JSXElementWithoutOpeningElement<'a>) = + AncestorType::JSXElementOpeningElement as u16, + JSXElementClosingElement(JSXElementWithoutClosingElement<'a>) = + AncestorType::JSXElementClosingElement as u16, + JSXElementChildren(JSXElementWithoutChildren<'a>) = AncestorType::JSXElementChildren as u16, + JSXOpeningElementName(JSXOpeningElementWithoutName<'a>) = + AncestorType::JSXOpeningElementName as u16, + JSXOpeningElementAttributes(JSXOpeningElementWithoutAttributes<'a>) = + AncestorType::JSXOpeningElementAttributes as u16, + JSXOpeningElementTypeParameters(JSXOpeningElementWithoutTypeParameters<'a>) = + AncestorType::JSXOpeningElementTypeParameters as u16, + JSXClosingElementName(JSXClosingElementWithoutName<'a>) = + AncestorType::JSXClosingElementName as u16, + JSXFragmentChildren(JSXFragmentWithoutChildren<'a>) = AncestorType::JSXFragmentChildren as u16, + JSXNamespacedNameNamespace(JSXNamespacedNameWithoutNamespace<'a>) = + AncestorType::JSXNamespacedNameNamespace as u16, + JSXNamespacedNameProperty(JSXNamespacedNameWithoutProperty<'a>) = + AncestorType::JSXNamespacedNameProperty as u16, + JSXMemberExpressionObject(JSXMemberExpressionWithoutObject<'a>) = + AncestorType::JSXMemberExpressionObject as u16, + JSXMemberExpressionProperty(JSXMemberExpressionWithoutProperty<'a>) = + AncestorType::JSXMemberExpressionProperty as u16, + JSXExpressionContainerExpression(JSXExpressionContainerWithoutExpression<'a>) = + AncestorType::JSXExpressionContainerExpression as u16, + JSXAttributeName(JSXAttributeWithoutName<'a>) = AncestorType::JSXAttributeName as u16, + JSXAttributeValue(JSXAttributeWithoutValue<'a>) = AncestorType::JSXAttributeValue as u16, + JSXSpreadAttributeArgument(JSXSpreadAttributeWithoutArgument<'a>) = + AncestorType::JSXSpreadAttributeArgument as u16, + JSXSpreadChildExpression(JSXSpreadChildWithoutExpression<'a>) = + AncestorType::JSXSpreadChildExpression as u16, + TSThisParameterThis(TSThisParameterWithoutThis<'a>) = AncestorType::TSThisParameterThis as u16, + TSThisParameterTypeAnnotation(TSThisParameterWithoutTypeAnnotation<'a>) = + AncestorType::TSThisParameterTypeAnnotation as u16, + TSEnumDeclarationId(TSEnumDeclarationWithoutId<'a>) = AncestorType::TSEnumDeclarationId as u16, + TSEnumDeclarationMembers(TSEnumDeclarationWithoutMembers<'a>) = + AncestorType::TSEnumDeclarationMembers as u16, + TSEnumMemberId(TSEnumMemberWithoutId<'a>) = AncestorType::TSEnumMemberId as u16, + TSEnumMemberInitializer(TSEnumMemberWithoutInitializer<'a>) = + AncestorType::TSEnumMemberInitializer as u16, + TSTypeAnnotationTypeAnnotation(TSTypeAnnotationWithoutTypeAnnotation<'a>) = + AncestorType::TSTypeAnnotationTypeAnnotation as u16, + TSLiteralTypeLiteral(TSLiteralTypeWithoutLiteral<'a>) = + AncestorType::TSLiteralTypeLiteral as u16, + TSConditionalTypeCheckType(TSConditionalTypeWithoutCheckType<'a>) = + AncestorType::TSConditionalTypeCheckType as u16, + TSConditionalTypeExtendsType(TSConditionalTypeWithoutExtendsType<'a>) = + AncestorType::TSConditionalTypeExtendsType as u16, + TSConditionalTypeTrueType(TSConditionalTypeWithoutTrueType<'a>) = + AncestorType::TSConditionalTypeTrueType as u16, + TSConditionalTypeFalseType(TSConditionalTypeWithoutFalseType<'a>) = + AncestorType::TSConditionalTypeFalseType as u16, + TSUnionTypeTypes(TSUnionTypeWithoutTypes<'a>) = AncestorType::TSUnionTypeTypes as u16, + TSIntersectionTypeTypes(TSIntersectionTypeWithoutTypes<'a>) = + AncestorType::TSIntersectionTypeTypes as u16, + TSTypeOperatorTypeAnnotation(TSTypeOperatorWithoutTypeAnnotation<'a>) = + AncestorType::TSTypeOperatorTypeAnnotation as u16, + TSArrayTypeElementType(TSArrayTypeWithoutElementType<'a>) = + AncestorType::TSArrayTypeElementType as u16, + TSIndexedAccessTypeObjectType(TSIndexedAccessTypeWithoutObjectType<'a>) = + AncestorType::TSIndexedAccessTypeObjectType as u16, + TSIndexedAccessTypeIndexType(TSIndexedAccessTypeWithoutIndexType<'a>) = + AncestorType::TSIndexedAccessTypeIndexType as u16, + TSTupleTypeElementTypes(TSTupleTypeWithoutElementTypes<'a>) = + AncestorType::TSTupleTypeElementTypes as u16, + TSNamedTupleMemberElementType(TSNamedTupleMemberWithoutElementType<'a>) = + AncestorType::TSNamedTupleMemberElementType as u16, + TSNamedTupleMemberLabel(TSNamedTupleMemberWithoutLabel<'a>) = + AncestorType::TSNamedTupleMemberLabel as u16, + TSOptionalTypeTypeAnnotation(TSOptionalTypeWithoutTypeAnnotation<'a>) = + AncestorType::TSOptionalTypeTypeAnnotation as u16, + TSRestTypeTypeAnnotation(TSRestTypeWithoutTypeAnnotation<'a>) = + AncestorType::TSRestTypeTypeAnnotation as u16, + TSTypeReferenceTypeName(TSTypeReferenceWithoutTypeName<'a>) = + AncestorType::TSTypeReferenceTypeName as u16, + TSTypeReferenceTypeParameters(TSTypeReferenceWithoutTypeParameters<'a>) = + AncestorType::TSTypeReferenceTypeParameters as u16, + TSQualifiedNameLeft(TSQualifiedNameWithoutLeft<'a>) = AncestorType::TSQualifiedNameLeft as u16, + TSQualifiedNameRight(TSQualifiedNameWithoutRight<'a>) = + AncestorType::TSQualifiedNameRight as u16, + TSTypeParameterInstantiationParams(TSTypeParameterInstantiationWithoutParams<'a>) = + AncestorType::TSTypeParameterInstantiationParams as u16, + TSTypeParameterName(TSTypeParameterWithoutName<'a>) = AncestorType::TSTypeParameterName as u16, + TSTypeParameterConstraint(TSTypeParameterWithoutConstraint<'a>) = + AncestorType::TSTypeParameterConstraint as u16, + TSTypeParameterDefault(TSTypeParameterWithoutDefault<'a>) = + AncestorType::TSTypeParameterDefault as u16, + TSTypeParameterDeclarationParams(TSTypeParameterDeclarationWithoutParams<'a>) = + AncestorType::TSTypeParameterDeclarationParams as u16, + TSTypeAliasDeclarationId(TSTypeAliasDeclarationWithoutId<'a>) = + AncestorType::TSTypeAliasDeclarationId as u16, + TSTypeAliasDeclarationTypeAnnotation(TSTypeAliasDeclarationWithoutTypeAnnotation<'a>) = + AncestorType::TSTypeAliasDeclarationTypeAnnotation as u16, + TSTypeAliasDeclarationTypeParameters(TSTypeAliasDeclarationWithoutTypeParameters<'a>) = + AncestorType::TSTypeAliasDeclarationTypeParameters as u16, + TSClassImplementsExpression(TSClassImplementsWithoutExpression<'a>) = + AncestorType::TSClassImplementsExpression as u16, + TSClassImplementsTypeParameters(TSClassImplementsWithoutTypeParameters<'a>) = + AncestorType::TSClassImplementsTypeParameters as u16, + TSInterfaceDeclarationId(TSInterfaceDeclarationWithoutId<'a>) = + AncestorType::TSInterfaceDeclarationId as u16, + TSInterfaceDeclarationBody(TSInterfaceDeclarationWithoutBody<'a>) = + AncestorType::TSInterfaceDeclarationBody as u16, + TSInterfaceDeclarationTypeParameters(TSInterfaceDeclarationWithoutTypeParameters<'a>) = + AncestorType::TSInterfaceDeclarationTypeParameters as u16, + TSInterfaceDeclarationExtends(TSInterfaceDeclarationWithoutExtends<'a>) = + AncestorType::TSInterfaceDeclarationExtends as u16, + TSInterfaceBodyBody(TSInterfaceBodyWithoutBody<'a>) = AncestorType::TSInterfaceBodyBody as u16, + TSPropertySignatureKey(TSPropertySignatureWithoutKey<'a>) = + AncestorType::TSPropertySignatureKey as u16, + TSPropertySignatureTypeAnnotation(TSPropertySignatureWithoutTypeAnnotation<'a>) = + AncestorType::TSPropertySignatureTypeAnnotation as u16, + TSIndexSignatureParameters(TSIndexSignatureWithoutParameters<'a>) = + AncestorType::TSIndexSignatureParameters as u16, + TSIndexSignatureTypeAnnotation(TSIndexSignatureWithoutTypeAnnotation<'a>) = + AncestorType::TSIndexSignatureTypeAnnotation as u16, + TSCallSignatureDeclarationThisParam(TSCallSignatureDeclarationWithoutThisParam<'a>) = + AncestorType::TSCallSignatureDeclarationThisParam as u16, + TSCallSignatureDeclarationParams(TSCallSignatureDeclarationWithoutParams<'a>) = + AncestorType::TSCallSignatureDeclarationParams as u16, + TSCallSignatureDeclarationReturnType(TSCallSignatureDeclarationWithoutReturnType<'a>) = + AncestorType::TSCallSignatureDeclarationReturnType as u16, TSCallSignatureDeclarationTypeParameters(TSCallSignatureDeclarationWithoutTypeParameters<'a>) = - 236, - TSMethodSignatureKey(TSMethodSignatureWithoutKey<'a>) = 237, - TSMethodSignatureThisParam(TSMethodSignatureWithoutThisParam<'a>) = 238, - TSMethodSignatureParams(TSMethodSignatureWithoutParams<'a>) = 239, - TSMethodSignatureReturnType(TSMethodSignatureWithoutReturnType<'a>) = 240, - TSMethodSignatureTypeParameters(TSMethodSignatureWithoutTypeParameters<'a>) = 241, - TSConstructSignatureDeclarationParams(TSConstructSignatureDeclarationWithoutParams<'a>) = 242, + AncestorType::TSCallSignatureDeclarationTypeParameters as u16, + TSMethodSignatureKey(TSMethodSignatureWithoutKey<'a>) = + AncestorType::TSMethodSignatureKey as u16, + TSMethodSignatureThisParam(TSMethodSignatureWithoutThisParam<'a>) = + AncestorType::TSMethodSignatureThisParam as u16, + TSMethodSignatureParams(TSMethodSignatureWithoutParams<'a>) = + AncestorType::TSMethodSignatureParams as u16, + TSMethodSignatureReturnType(TSMethodSignatureWithoutReturnType<'a>) = + AncestorType::TSMethodSignatureReturnType as u16, + TSMethodSignatureTypeParameters(TSMethodSignatureWithoutTypeParameters<'a>) = + AncestorType::TSMethodSignatureTypeParameters as u16, + TSConstructSignatureDeclarationParams(TSConstructSignatureDeclarationWithoutParams<'a>) = + AncestorType::TSConstructSignatureDeclarationParams as u16, TSConstructSignatureDeclarationReturnType(TSConstructSignatureDeclarationWithoutReturnType<'a>) = - 243, + AncestorType::TSConstructSignatureDeclarationReturnType as u16, TSConstructSignatureDeclarationTypeParameters( TSConstructSignatureDeclarationWithoutTypeParameters<'a>, - ) = 244, - TSIndexSignatureNameTypeAnnotation(TSIndexSignatureNameWithoutTypeAnnotation<'a>) = 245, - TSInterfaceHeritageExpression(TSInterfaceHeritageWithoutExpression<'a>) = 246, - TSInterfaceHeritageTypeParameters(TSInterfaceHeritageWithoutTypeParameters<'a>) = 247, - TSTypePredicateParameterName(TSTypePredicateWithoutParameterName<'a>) = 248, - TSTypePredicateTypeAnnotation(TSTypePredicateWithoutTypeAnnotation<'a>) = 249, - TSModuleDeclarationId(TSModuleDeclarationWithoutId<'a>) = 250, - TSModuleDeclarationBody(TSModuleDeclarationWithoutBody<'a>) = 251, - TSModuleBlockBody(TSModuleBlockWithoutBody<'a>) = 252, - TSTypeLiteralMembers(TSTypeLiteralWithoutMembers<'a>) = 253, - TSInferTypeTypeParameter(TSInferTypeWithoutTypeParameter<'a>) = 254, - TSTypeQueryExprName(TSTypeQueryWithoutExprName<'a>) = 255, - TSTypeQueryTypeParameters(TSTypeQueryWithoutTypeParameters<'a>) = 256, - TSImportTypeArgument(TSImportTypeWithoutArgument<'a>) = 257, - TSImportTypeQualifier(TSImportTypeWithoutQualifier<'a>) = 258, - TSImportTypeAttributes(TSImportTypeWithoutAttributes<'a>) = 259, - TSImportTypeTypeParameters(TSImportTypeWithoutTypeParameters<'a>) = 260, - TSImportAttributesElements(TSImportAttributesWithoutElements<'a>) = 261, - TSImportAttributeName(TSImportAttributeWithoutName<'a>) = 262, - TSImportAttributeValue(TSImportAttributeWithoutValue<'a>) = 263, - TSFunctionTypeThisParam(TSFunctionTypeWithoutThisParam<'a>) = 264, - TSFunctionTypeParams(TSFunctionTypeWithoutParams<'a>) = 265, - TSFunctionTypeReturnType(TSFunctionTypeWithoutReturnType<'a>) = 266, - TSFunctionTypeTypeParameters(TSFunctionTypeWithoutTypeParameters<'a>) = 267, - TSConstructorTypeParams(TSConstructorTypeWithoutParams<'a>) = 268, - TSConstructorTypeReturnType(TSConstructorTypeWithoutReturnType<'a>) = 269, - TSConstructorTypeTypeParameters(TSConstructorTypeWithoutTypeParameters<'a>) = 270, - TSMappedTypeTypeParameter(TSMappedTypeWithoutTypeParameter<'a>) = 271, - TSMappedTypeNameType(TSMappedTypeWithoutNameType<'a>) = 272, - TSMappedTypeTypeAnnotation(TSMappedTypeWithoutTypeAnnotation<'a>) = 273, - TSTemplateLiteralTypeQuasis(TSTemplateLiteralTypeWithoutQuasis<'a>) = 274, - TSTemplateLiteralTypeTypes(TSTemplateLiteralTypeWithoutTypes<'a>) = 275, - TSAsExpressionExpression(TSAsExpressionWithoutExpression<'a>) = 276, - TSAsExpressionTypeAnnotation(TSAsExpressionWithoutTypeAnnotation<'a>) = 277, - TSSatisfiesExpressionExpression(TSSatisfiesExpressionWithoutExpression<'a>) = 278, - TSSatisfiesExpressionTypeAnnotation(TSSatisfiesExpressionWithoutTypeAnnotation<'a>) = 279, - TSTypeAssertionExpression(TSTypeAssertionWithoutExpression<'a>) = 280, - TSTypeAssertionTypeAnnotation(TSTypeAssertionWithoutTypeAnnotation<'a>) = 281, - TSImportEqualsDeclarationId(TSImportEqualsDeclarationWithoutId<'a>) = 282, + ) = AncestorType::TSConstructSignatureDeclarationTypeParameters as u16, + TSIndexSignatureNameTypeAnnotation(TSIndexSignatureNameWithoutTypeAnnotation<'a>) = + AncestorType::TSIndexSignatureNameTypeAnnotation as u16, + TSInterfaceHeritageExpression(TSInterfaceHeritageWithoutExpression<'a>) = + AncestorType::TSInterfaceHeritageExpression as u16, + TSInterfaceHeritageTypeParameters(TSInterfaceHeritageWithoutTypeParameters<'a>) = + AncestorType::TSInterfaceHeritageTypeParameters as u16, + TSTypePredicateParameterName(TSTypePredicateWithoutParameterName<'a>) = + AncestorType::TSTypePredicateParameterName as u16, + TSTypePredicateTypeAnnotation(TSTypePredicateWithoutTypeAnnotation<'a>) = + AncestorType::TSTypePredicateTypeAnnotation as u16, + TSModuleDeclarationId(TSModuleDeclarationWithoutId<'a>) = + AncestorType::TSModuleDeclarationId as u16, + TSModuleDeclarationBody(TSModuleDeclarationWithoutBody<'a>) = + AncestorType::TSModuleDeclarationBody as u16, + TSModuleBlockBody(TSModuleBlockWithoutBody<'a>) = AncestorType::TSModuleBlockBody as u16, + TSTypeLiteralMembers(TSTypeLiteralWithoutMembers<'a>) = + AncestorType::TSTypeLiteralMembers as u16, + TSInferTypeTypeParameter(TSInferTypeWithoutTypeParameter<'a>) = + AncestorType::TSInferTypeTypeParameter as u16, + TSTypeQueryExprName(TSTypeQueryWithoutExprName<'a>) = AncestorType::TSTypeQueryExprName as u16, + TSTypeQueryTypeParameters(TSTypeQueryWithoutTypeParameters<'a>) = + AncestorType::TSTypeQueryTypeParameters as u16, + TSImportTypeArgument(TSImportTypeWithoutArgument<'a>) = + AncestorType::TSImportTypeArgument as u16, + TSImportTypeQualifier(TSImportTypeWithoutQualifier<'a>) = + AncestorType::TSImportTypeQualifier as u16, + TSImportTypeAttributes(TSImportTypeWithoutAttributes<'a>) = + AncestorType::TSImportTypeAttributes as u16, + TSImportTypeTypeParameters(TSImportTypeWithoutTypeParameters<'a>) = + AncestorType::TSImportTypeTypeParameters as u16, + TSImportAttributesElements(TSImportAttributesWithoutElements<'a>) = + AncestorType::TSImportAttributesElements as u16, + TSImportAttributeName(TSImportAttributeWithoutName<'a>) = + AncestorType::TSImportAttributeName as u16, + TSImportAttributeValue(TSImportAttributeWithoutValue<'a>) = + AncestorType::TSImportAttributeValue as u16, + TSFunctionTypeThisParam(TSFunctionTypeWithoutThisParam<'a>) = + AncestorType::TSFunctionTypeThisParam as u16, + TSFunctionTypeParams(TSFunctionTypeWithoutParams<'a>) = + AncestorType::TSFunctionTypeParams as u16, + TSFunctionTypeReturnType(TSFunctionTypeWithoutReturnType<'a>) = + AncestorType::TSFunctionTypeReturnType as u16, + TSFunctionTypeTypeParameters(TSFunctionTypeWithoutTypeParameters<'a>) = + AncestorType::TSFunctionTypeTypeParameters as u16, + TSConstructorTypeParams(TSConstructorTypeWithoutParams<'a>) = + AncestorType::TSConstructorTypeParams as u16, + TSConstructorTypeReturnType(TSConstructorTypeWithoutReturnType<'a>) = + AncestorType::TSConstructorTypeReturnType as u16, + TSConstructorTypeTypeParameters(TSConstructorTypeWithoutTypeParameters<'a>) = + AncestorType::TSConstructorTypeTypeParameters as u16, + TSMappedTypeTypeParameter(TSMappedTypeWithoutTypeParameter<'a>) = + AncestorType::TSMappedTypeTypeParameter as u16, + TSMappedTypeNameType(TSMappedTypeWithoutNameType<'a>) = + AncestorType::TSMappedTypeNameType as u16, + TSMappedTypeTypeAnnotation(TSMappedTypeWithoutTypeAnnotation<'a>) = + AncestorType::TSMappedTypeTypeAnnotation as u16, + TSTemplateLiteralTypeQuasis(TSTemplateLiteralTypeWithoutQuasis<'a>) = + AncestorType::TSTemplateLiteralTypeQuasis as u16, + TSTemplateLiteralTypeTypes(TSTemplateLiteralTypeWithoutTypes<'a>) = + AncestorType::TSTemplateLiteralTypeTypes as u16, + TSAsExpressionExpression(TSAsExpressionWithoutExpression<'a>) = + AncestorType::TSAsExpressionExpression as u16, + TSAsExpressionTypeAnnotation(TSAsExpressionWithoutTypeAnnotation<'a>) = + AncestorType::TSAsExpressionTypeAnnotation as u16, + TSSatisfiesExpressionExpression(TSSatisfiesExpressionWithoutExpression<'a>) = + AncestorType::TSSatisfiesExpressionExpression as u16, + TSSatisfiesExpressionTypeAnnotation(TSSatisfiesExpressionWithoutTypeAnnotation<'a>) = + AncestorType::TSSatisfiesExpressionTypeAnnotation as u16, + TSTypeAssertionExpression(TSTypeAssertionWithoutExpression<'a>) = + AncestorType::TSTypeAssertionExpression as u16, + TSTypeAssertionTypeAnnotation(TSTypeAssertionWithoutTypeAnnotation<'a>) = + AncestorType::TSTypeAssertionTypeAnnotation as u16, + TSImportEqualsDeclarationId(TSImportEqualsDeclarationWithoutId<'a>) = + AncestorType::TSImportEqualsDeclarationId as u16, TSImportEqualsDeclarationModuleReference(TSImportEqualsDeclarationWithoutModuleReference<'a>) = - 283, - TSExternalModuleReferenceExpression(TSExternalModuleReferenceWithoutExpression<'a>) = 284, - TSNonNullExpressionExpression(TSNonNullExpressionWithoutExpression<'a>) = 285, - DecoratorExpression(DecoratorWithoutExpression<'a>) = 286, - TSExportAssignmentExpression(TSExportAssignmentWithoutExpression<'a>) = 287, - TSNamespaceExportDeclarationId(TSNamespaceExportDeclarationWithoutId<'a>) = 288, - TSInstantiationExpressionExpression(TSInstantiationExpressionWithoutExpression<'a>) = 289, + AncestorType::TSImportEqualsDeclarationModuleReference as u16, + TSExternalModuleReferenceExpression(TSExternalModuleReferenceWithoutExpression<'a>) = + AncestorType::TSExternalModuleReferenceExpression as u16, + TSNonNullExpressionExpression(TSNonNullExpressionWithoutExpression<'a>) = + AncestorType::TSNonNullExpressionExpression as u16, + DecoratorExpression(DecoratorWithoutExpression<'a>) = AncestorType::DecoratorExpression as u16, + TSExportAssignmentExpression(TSExportAssignmentWithoutExpression<'a>) = + AncestorType::TSExportAssignmentExpression as u16, + TSNamespaceExportDeclarationId(TSNamespaceExportDeclarationWithoutId<'a>) = + AncestorType::TSNamespaceExportDeclarationId as u16, + TSInstantiationExpressionExpression(TSInstantiationExpressionWithoutExpression<'a>) = + AncestorType::TSInstantiationExpressionExpression as u16, TSInstantiationExpressionTypeParameters(TSInstantiationExpressionWithoutTypeParameters<'a>) = - 290, - JSDocNullableTypeTypeAnnotation(JSDocNullableTypeWithoutTypeAnnotation<'a>) = 291, + AncestorType::TSInstantiationExpressionTypeParameters as u16, + JSDocNullableTypeTypeAnnotation(JSDocNullableTypeWithoutTypeAnnotation<'a>) = + AncestorType::JSDocNullableTypeTypeAnnotation as u16, } impl<'a> Ancestor<'a> { diff --git a/crates/oxc_traverse/src/context.rs b/crates/oxc_traverse/src/context.rs index 5e1c0f342..d1b744759 100644 --- a/crates/oxc_traverse/src/context.rs +++ b/crates/oxc_traverse/src/context.rs @@ -1,7 +1,7 @@ use oxc_allocator::{Allocator, Box}; use oxc_ast::AstBuilder; -use crate::ancestor::{Ancestor, AncestorDiscriminant}; +use crate::ancestor::{Ancestor, AncestorType}; const INITIAL_STACK_CAPACITY: usize = 64; @@ -119,25 +119,21 @@ impl<'a> TraverseCtx<'a> { /// of pointer to the ancestor node. /// /// This is purely a performance optimization. If the last item on stack already contains the - /// correct pointer, then `ctx.retag_stack(3)` is equivalent to: + /// correct pointer, then `ctx.retag_stack(AncestorType::ProgramBody)` is equivalent to: /// /// ```nocompile /// ctx.pop_stack(); /// ctx.push_stack(Ancestor::ProgramBody(ProgramWithoutBody(node_ptr))); /// ``` /// - /// (3 is the discriminant for `Ancestor::ProgramBody`) - /// /// `retag_stack` is only a single 2-byte write operation. /// /// # SAFETY /// * Stack must not be empty. - /// * `discriminant` must be valid discriminant value for `Ancestor` enum. - /// * Last item on stack must contain pointer to type corresponding to provided discriminant. + /// * Last item on stack must contain pointer to type corresponding to provided `AncestorType`. #[inline] #[allow(unsafe_code, clippy::ptr_as_ptr, clippy::ref_as_ptr)] - pub(crate) unsafe fn retag_stack(&mut self, discriminant: AncestorDiscriminant) { - *(self.stack.last_mut().unwrap_unchecked() as *mut _ as *mut AncestorDiscriminant) = - discriminant; + pub(crate) unsafe fn retag_stack(&mut self, ty: AncestorType) { + *(self.stack.last_mut().unwrap_unchecked() as *mut _ as *mut AncestorType) = ty; } } diff --git a/crates/oxc_traverse/src/walk.rs b/crates/oxc_traverse/src/walk.rs index 052455ff5..e197a104a 100644 --- a/crates/oxc_traverse/src/walk.rs +++ b/crates/oxc_traverse/src/walk.rs @@ -15,7 +15,10 @@ use oxc_allocator::Vec; #[allow(clippy::wildcard_imports)] use oxc_ast::ast::*; -use crate::{ancestor, Ancestor, Traverse, TraverseCtx}; +use crate::{ + ancestor::{self, AncestorType}, + Ancestor, Traverse, TraverseCtx, +}; pub(crate) unsafe fn walk_program<'a, Tr: Traverse<'a>>( traverser: &mut Tr, @@ -33,10 +36,10 @@ pub(crate) unsafe fn walk_program<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_PROGRAM_HASHBANG) as *mut Option) { - ctx.retag_stack(2); + ctx.retag_stack(AncestorType::ProgramHashbang); walk_hashbang(traverser, field as *mut _, ctx); } - ctx.retag_stack(3); + ctx.retag_stack(AncestorType::ProgramBody); walk_statements( traverser, (node as *mut u8).add(ancestor::OFFSET_PROGRAM_BODY) as *mut Vec, @@ -349,7 +352,7 @@ pub(crate) unsafe fn walk_object_property<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_OBJECT_PROPERTY_KEY) as *mut PropertyKey, ctx, ); - ctx.retag_stack(7); + ctx.retag_stack(AncestorType::ObjectPropertyValue); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_OBJECT_PROPERTY_VALUE) as *mut Expression, @@ -358,7 +361,7 @@ pub(crate) unsafe fn walk_object_property<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_OBJECT_PROPERTY_INIT) as *mut Option) { - ctx.retag_stack(8); + ctx.retag_stack(AncestorType::ObjectPropertyInit); walk_expression(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -437,7 +440,7 @@ pub(crate) unsafe fn walk_template_literal<'a, Tr: Traverse<'a>>( { walk_template_element(traverser, item as *mut _, ctx); } - ctx.retag_stack(10); + ctx.retag_stack(AncestorType::TemplateLiteralExpressions); for item in (*((node as *mut u8).add(ancestor::OFFSET_TEMPLATE_LITERAL_EXPRESSIONS) as *mut Vec)) .iter_mut() @@ -462,7 +465,7 @@ pub(crate) unsafe fn walk_tagged_template_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TAGGED_TEMPLATE_EXPRESSION_TAG) as *mut Expression, ctx, ); - ctx.retag_stack(12); + ctx.retag_stack(AncestorType::TaggedTemplateExpressionQuasi); walk_template_literal( traverser, (node as *mut u8).add(ancestor::OFFSET_TAGGED_TEMPLATE_EXPRESSION_QUASI) @@ -473,7 +476,7 @@ pub(crate) unsafe fn walk_tagged_template_expression<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(13); + ctx.retag_stack(AncestorType::TaggedTemplateExpressionTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -524,7 +527,7 @@ pub(crate) unsafe fn walk_computed_member_expression<'a, Tr: Traverse<'a>>( as *mut Expression, ctx, ); - ctx.retag_stack(15); + ctx.retag_stack(AncestorType::ComputedMemberExpressionExpression); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_COMPUTED_MEMBER_EXPRESSION_EXPRESSION) @@ -549,7 +552,7 @@ pub(crate) unsafe fn walk_static_member_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_STATIC_MEMBER_EXPRESSION_OBJECT) as *mut Expression, ctx, ); - ctx.retag_stack(17); + ctx.retag_stack(AncestorType::StaticMemberExpressionProperty); walk_identifier_name( traverser, (node as *mut u8).add(ancestor::OFFSET_STATIC_MEMBER_EXPRESSION_PROPERTY) @@ -574,7 +577,7 @@ pub(crate) unsafe fn walk_private_field_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_PRIVATE_FIELD_EXPRESSION_OBJECT) as *mut Expression, ctx, ); - ctx.retag_stack(19); + ctx.retag_stack(AncestorType::PrivateFieldExpressionField); walk_private_identifier( traverser, (node as *mut u8).add(ancestor::OFFSET_PRIVATE_FIELD_EXPRESSION_FIELD) @@ -597,7 +600,7 @@ pub(crate) unsafe fn walk_call_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_CALL_EXPRESSION_CALLEE) as *mut Expression, ctx, ); - ctx.retag_stack(21); + ctx.retag_stack(AncestorType::CallExpressionArguments); for item in (*((node as *mut u8).add(ancestor::OFFSET_CALL_EXPRESSION_ARGUMENTS) as *mut Vec)) .iter_mut() @@ -608,7 +611,7 @@ pub(crate) unsafe fn walk_call_expression<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_CALL_EXPRESSION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(22); + ctx.retag_stack(AncestorType::CallExpressionTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -627,7 +630,7 @@ pub(crate) unsafe fn walk_new_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_NEW_EXPRESSION_CALLEE) as *mut Expression, ctx, ); - ctx.retag_stack(24); + ctx.retag_stack(AncestorType::NewExpressionArguments); for item in (*((node as *mut u8).add(ancestor::OFFSET_NEW_EXPRESSION_ARGUMENTS) as *mut Vec)) .iter_mut() @@ -638,7 +641,7 @@ pub(crate) unsafe fn walk_new_expression<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_NEW_EXPRESSION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(25); + ctx.retag_stack(AncestorType::NewExpressionTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -657,7 +660,7 @@ pub(crate) unsafe fn walk_meta_property<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_META_PROPERTY_META) as *mut IdentifierName, ctx, ); - ctx.retag_stack(27); + ctx.retag_stack(AncestorType::MetaPropertyProperty); walk_identifier_name( traverser, (node as *mut u8).add(ancestor::OFFSET_META_PROPERTY_PROPERTY) as *mut IdentifierName, @@ -788,7 +791,7 @@ pub(crate) unsafe fn walk_binary_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_BINARY_EXPRESSION_LEFT) as *mut Expression, ctx, ); - ctx.retag_stack(32); + ctx.retag_stack(AncestorType::BinaryExpressionRight); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_BINARY_EXPRESSION_RIGHT) as *mut Expression, @@ -813,7 +816,7 @@ pub(crate) unsafe fn walk_private_in_expression<'a, Tr: Traverse<'a>>( as *mut PrivateIdentifier, ctx, ); - ctx.retag_stack(34); + ctx.retag_stack(AncestorType::PrivateInExpressionRight); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_PRIVATE_IN_EXPRESSION_RIGHT) as *mut Expression, @@ -835,7 +838,7 @@ pub(crate) unsafe fn walk_logical_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_LOGICAL_EXPRESSION_LEFT) as *mut Expression, ctx, ); - ctx.retag_stack(36); + ctx.retag_stack(AncestorType::LogicalExpressionRight); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_LOGICAL_EXPRESSION_RIGHT) as *mut Expression, @@ -859,14 +862,14 @@ pub(crate) unsafe fn walk_conditional_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_CONDITIONAL_EXPRESSION_TEST) as *mut Expression, ctx, ); - ctx.retag_stack(38); + ctx.retag_stack(AncestorType::ConditionalExpressionConsequent); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_CONDITIONAL_EXPRESSION_CONSEQUENT) as *mut Expression, ctx, ); - ctx.retag_stack(39); + ctx.retag_stack(AncestorType::ConditionalExpressionAlternate); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_CONDITIONAL_EXPRESSION_ALTERNATE) as *mut Expression, @@ -890,7 +893,7 @@ pub(crate) unsafe fn walk_assignment_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_ASSIGNMENT_EXPRESSION_LEFT) as *mut AssignmentTarget, ctx, ); - ctx.retag_stack(41); + ctx.retag_stack(AncestorType::AssignmentExpressionRight); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_ASSIGNMENT_EXPRESSION_RIGHT) as *mut Expression, @@ -992,7 +995,7 @@ pub(crate) unsafe fn walk_array_assignment_target<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_ARRAY_ASSIGNMENT_TARGET_REST) as *mut Option) { - ctx.retag_stack(43); + ctx.retag_stack(AncestorType::ArrayAssignmentTargetRest); walk_assignment_target_rest(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -1018,7 +1021,7 @@ pub(crate) unsafe fn walk_object_assignment_target<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_OBJECT_ASSIGNMENT_TARGET_REST) as *mut Option) { - ctx.retag_stack(45); + ctx.retag_stack(AncestorType::ObjectAssignmentTargetRest); walk_assignment_target_rest(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -1085,7 +1088,7 @@ pub(crate) unsafe fn walk_assignment_target_with_default<'a, Tr: Traverse<'a>>( as *mut AssignmentTarget, ctx, ); - ctx.retag_stack(48); + ctx.retag_stack(AncestorType::AssignmentTargetWithDefaultInit); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_ASSIGNMENT_TARGET_WITH_DEFAULT_INIT) @@ -1132,7 +1135,7 @@ pub(crate) unsafe fn walk_assignment_target_property_identifier<'a, Tr: Traverse .add(ancestor::OFFSET_ASSIGNMENT_TARGET_PROPERTY_IDENTIFIER_INIT) as *mut Option) { - ctx.retag_stack(50); + ctx.retag_stack(AncestorType::AssignmentTargetPropertyIdentifierInit); walk_expression(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -1154,7 +1157,7 @@ pub(crate) unsafe fn walk_assignment_target_property_property<'a, Tr: Traverse<' as *mut PropertyKey, ctx, ); - ctx.retag_stack(52); + ctx.retag_stack(AncestorType::AssignmentTargetPropertyPropertyBinding); walk_assignment_target_maybe_default( traverser, (node as *mut u8).add(ancestor::OFFSET_ASSIGNMENT_TARGET_PROPERTY_PROPERTY_BINDING) @@ -1460,7 +1463,7 @@ pub(crate) unsafe fn walk_variable_declarator<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_VARIABLE_DECLARATOR_INIT) as *mut Option) { - ctx.retag_stack(61); + ctx.retag_stack(AncestorType::VariableDeclaratorInit); walk_expression(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -1525,7 +1528,7 @@ pub(crate) unsafe fn walk_if_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_IF_STATEMENT_TEST) as *mut Expression, ctx, ); - ctx.retag_stack(65); + ctx.retag_stack(AncestorType::IfStatementConsequent); walk_statement( traverser, (node as *mut u8).add(ancestor::OFFSET_IF_STATEMENT_CONSEQUENT) as *mut Statement, @@ -1534,7 +1537,7 @@ pub(crate) unsafe fn walk_if_statement<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_IF_STATEMENT_ALTERNATE) as *mut Option) { - ctx.retag_stack(66); + ctx.retag_stack(AncestorType::IfStatementAlternate); walk_statement(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -1553,7 +1556,7 @@ pub(crate) unsafe fn walk_do_while_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_DO_WHILE_STATEMENT_BODY) as *mut Statement, ctx, ); - ctx.retag_stack(68); + ctx.retag_stack(AncestorType::DoWhileStatementTest); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_DO_WHILE_STATEMENT_TEST) as *mut Expression, @@ -1575,7 +1578,7 @@ pub(crate) unsafe fn walk_while_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_WHILE_STATEMENT_TEST) as *mut Expression, ctx, ); - ctx.retag_stack(70); + ctx.retag_stack(AncestorType::WhileStatementBody); walk_statement( traverser, (node as *mut u8).add(ancestor::OFFSET_WHILE_STATEMENT_BODY) as *mut Statement, @@ -1600,16 +1603,16 @@ pub(crate) unsafe fn walk_for_statement<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_FOR_STATEMENT_TEST) as *mut Option) { - ctx.retag_stack(72); + ctx.retag_stack(AncestorType::ForStatementTest); walk_expression(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_FOR_STATEMENT_UPDATE) as *mut Option) { - ctx.retag_stack(73); + ctx.retag_stack(AncestorType::ForStatementUpdate); walk_expression(traverser, field as *mut _, ctx); } - ctx.retag_stack(74); + ctx.retag_stack(AncestorType::ForStatementBody); walk_statement( traverser, (node as *mut u8).add(ancestor::OFFSET_FOR_STATEMENT_BODY) as *mut Statement, @@ -1692,13 +1695,13 @@ pub(crate) unsafe fn walk_for_in_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_FOR_IN_STATEMENT_LEFT) as *mut ForStatementLeft, ctx, ); - ctx.retag_stack(76); + ctx.retag_stack(AncestorType::ForInStatementRight); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_FOR_IN_STATEMENT_RIGHT) as *mut Expression, ctx, ); - ctx.retag_stack(77); + ctx.retag_stack(AncestorType::ForInStatementBody); walk_statement( traverser, (node as *mut u8).add(ancestor::OFFSET_FOR_IN_STATEMENT_BODY) as *mut Statement, @@ -1720,13 +1723,13 @@ pub(crate) unsafe fn walk_for_of_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_FOR_OF_STATEMENT_LEFT) as *mut ForStatementLeft, ctx, ); - ctx.retag_stack(79); + ctx.retag_stack(AncestorType::ForOfStatementRight); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_FOR_OF_STATEMENT_RIGHT) as *mut Expression, ctx, ); - ctx.retag_stack(80); + ctx.retag_stack(AncestorType::ForOfStatementBody); walk_statement( traverser, (node as *mut u8).add(ancestor::OFFSET_FOR_OF_STATEMENT_BODY) as *mut Statement, @@ -1827,7 +1830,7 @@ pub(crate) unsafe fn walk_with_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_WITH_STATEMENT_OBJECT) as *mut Expression, ctx, ); - ctx.retag_stack(85); + ctx.retag_stack(AncestorType::WithStatementBody); walk_statement( traverser, (node as *mut u8).add(ancestor::OFFSET_WITH_STATEMENT_BODY) as *mut Statement, @@ -1851,7 +1854,7 @@ pub(crate) unsafe fn walk_switch_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_SWITCH_STATEMENT_DISCRIMINANT) as *mut Expression, ctx, ); - ctx.retag_stack(87); + ctx.retag_stack(AncestorType::SwitchStatementCases); for item in (*((node as *mut u8).add(ancestor::OFFSET_SWITCH_STATEMENT_CASES) as *mut Vec)) .iter_mut() @@ -1874,7 +1877,7 @@ pub(crate) unsafe fn walk_switch_case<'a, Tr: Traverse<'a>>( { walk_expression(traverser, field as *mut _, ctx); } - ctx.retag_stack(89); + ctx.retag_stack(AncestorType::SwitchCaseConsequent); walk_statements( traverser, (node as *mut u8).add(ancestor::OFFSET_SWITCH_CASE_CONSEQUENT) as *mut Vec, @@ -1896,7 +1899,7 @@ pub(crate) unsafe fn walk_labeled_statement<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_LABELED_STATEMENT_LABEL) as *mut LabelIdentifier, ctx, ); - ctx.retag_stack(91); + ctx.retag_stack(AncestorType::LabeledStatementBody); walk_statement( traverser, (node as *mut u8).add(ancestor::OFFSET_LABELED_STATEMENT_BODY) as *mut Statement, @@ -1938,13 +1941,13 @@ pub(crate) unsafe fn walk_try_statement<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TRY_STATEMENT_HANDLER) as *mut Option>) { - ctx.retag_stack(94); + ctx.retag_stack(AncestorType::TryStatementHandler); walk_catch_clause(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TRY_STATEMENT_FINALIZER) as *mut Option>) { - ctx.retag_stack(95); + ctx.retag_stack(AncestorType::TryStatementFinalizer); walk_block_statement(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -1963,7 +1966,7 @@ pub(crate) unsafe fn walk_catch_clause<'a, Tr: Traverse<'a>>( { walk_catch_parameter(traverser, field as *mut _, ctx); } - ctx.retag_stack(97); + ctx.retag_stack(AncestorType::CatchClauseBody); walk_block_statement( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_CATCH_CLAUSE_BODY) @@ -2015,7 +2018,7 @@ pub(crate) unsafe fn walk_binding_pattern<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_BINDING_PATTERN_TYPE_ANNOTATION) as *mut Option>) { - ctx.retag_stack(100); + ctx.retag_stack(AncestorType::BindingPatternTypeAnnotation); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -2057,7 +2060,7 @@ pub(crate) unsafe fn walk_assignment_pattern<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_ASSIGNMENT_PATTERN_LEFT) as *mut BindingPattern, ctx, ); - ctx.retag_stack(102); + ctx.retag_stack(AncestorType::AssignmentPatternRight); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_ASSIGNMENT_PATTERN_RIGHT) as *mut Expression, @@ -2085,7 +2088,7 @@ pub(crate) unsafe fn walk_object_pattern<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_OBJECT_PATTERN_REST) as *mut Option>) { - ctx.retag_stack(104); + ctx.retag_stack(AncestorType::ObjectPatternRest); walk_binding_rest_element(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -2104,7 +2107,7 @@ pub(crate) unsafe fn walk_binding_property<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_BINDING_PROPERTY_KEY) as *mut PropertyKey, ctx, ); - ctx.retag_stack(106); + ctx.retag_stack(AncestorType::BindingPropertyValue); walk_binding_pattern( traverser, (node as *mut u8).add(ancestor::OFFSET_BINDING_PROPERTY_VALUE) as *mut BindingPattern, @@ -2131,7 +2134,7 @@ pub(crate) unsafe fn walk_array_pattern<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_ARRAY_PATTERN_REST) as *mut Option>) { - ctx.retag_stack(108); + ctx.retag_stack(AncestorType::ArrayPatternRest); walk_binding_rest_element(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -2172,10 +2175,10 @@ pub(crate) unsafe fn walk_function<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_FUNCTION_THIS_PARAM) as *mut Option) { - ctx.retag_stack(111); + ctx.retag_stack(AncestorType::FunctionThisParam); walk_ts_this_parameter(traverser, field as *mut _, ctx); } - ctx.retag_stack(112); + ctx.retag_stack(AncestorType::FunctionParams); walk_formal_parameters( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_FUNCTION_PARAMS) @@ -2185,19 +2188,19 @@ pub(crate) unsafe fn walk_function<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_FUNCTION_BODY) as *mut Option>) { - ctx.retag_stack(113); + ctx.retag_stack(AncestorType::FunctionBody); walk_function_body(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_FUNCTION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(114); + ctx.retag_stack(AncestorType::FunctionTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_FUNCTION_RETURN_TYPE) as *mut Option>) { - ctx.retag_stack(115); + ctx.retag_stack(AncestorType::FunctionReturnType); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -2220,7 +2223,7 @@ pub(crate) unsafe fn walk_formal_parameters<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_FORMAL_PARAMETERS_REST) as *mut Option>) { - ctx.retag_stack(117); + ctx.retag_stack(AncestorType::FormalParametersRest); walk_binding_rest_element(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -2239,7 +2242,7 @@ pub(crate) unsafe fn walk_formal_parameter<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_FORMAL_PARAMETER_PATTERN) as *mut BindingPattern, ctx, ); - ctx.retag_stack(119); + ctx.retag_stack(AncestorType::FormalParameterDecorators); for item in (*((node as *mut u8).add(ancestor::OFFSET_FORMAL_PARAMETER_DECORATORS) as *mut Vec)) .iter_mut() @@ -2263,7 +2266,7 @@ pub(crate) unsafe fn walk_function_body<'a, Tr: Traverse<'a>>( { walk_directive(traverser, item as *mut _, ctx); } - ctx.retag_stack(121); + ctx.retag_stack(AncestorType::FunctionBodyStatements); walk_statements( traverser, (node as *mut u8).add(ancestor::OFFSET_FUNCTION_BODY_STATEMENTS) as *mut Vec, @@ -2288,7 +2291,7 @@ pub(crate) unsafe fn walk_arrow_function_expression<'a, Tr: Traverse<'a>>( as *mut Box)) as *mut _, ctx, ); - ctx.retag_stack(123); + ctx.retag_stack(AncestorType::ArrowFunctionExpressionBody); walk_function_body( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_ARROW_FUNCTION_EXPRESSION_BODY) @@ -2299,14 +2302,14 @@ pub(crate) unsafe fn walk_arrow_function_expression<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_ARROW_FUNCTION_EXPRESSION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(124); + ctx.retag_stack(AncestorType::ArrowFunctionExpressionTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_ARROW_FUNCTION_EXPRESSION_RETURN_TYPE) as *mut Option>) { - ctx.retag_stack(125); + ctx.retag_stack(AncestorType::ArrowFunctionExpressionReturnType); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -2346,10 +2349,10 @@ pub(crate) unsafe fn walk_class<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_CLASS_SUPER_CLASS) as *mut Option) { - ctx.retag_stack(128); + ctx.retag_stack(AncestorType::ClassSuperClass); walk_expression(traverser, field as *mut _, ctx); } - ctx.retag_stack(129); + ctx.retag_stack(AncestorType::ClassBody); walk_class_body( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_CLASS_BODY) as *mut Box)) @@ -2359,24 +2362,24 @@ pub(crate) unsafe fn walk_class<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_CLASS_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(130); + ctx.retag_stack(AncestorType::ClassTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_CLASS_SUPER_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(131); + ctx.retag_stack(AncestorType::ClassSuperTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_CLASS_IMPLEMENTS) as *mut Option>) { - ctx.retag_stack(132); + ctx.retag_stack(AncestorType::ClassImplements); for item in field.iter_mut() { walk_ts_class_implements(traverser, item as *mut _, ctx); } } - ctx.retag_stack(133); + ctx.retag_stack(AncestorType::ClassDecorators); for item in (*((node as *mut u8).add(ancestor::OFFSET_CLASS_DECORATORS) as *mut Vec)) .iter_mut() { @@ -2441,14 +2444,14 @@ pub(crate) unsafe fn walk_method_definition<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_METHOD_DEFINITION_KEY) as *mut PropertyKey, ctx, ); - ctx.retag_stack(136); + ctx.retag_stack(AncestorType::MethodDefinitionValue); walk_function( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_METHOD_DEFINITION_VALUE) as *mut Box)) as *mut _, ctx, ); - ctx.retag_stack(137); + ctx.retag_stack(AncestorType::MethodDefinitionDecorators); for item in (*((node as *mut u8).add(ancestor::OFFSET_METHOD_DEFINITION_DECORATORS) as *mut Vec)) .iter_mut() @@ -2474,17 +2477,17 @@ pub(crate) unsafe fn walk_property_definition<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_PROPERTY_DEFINITION_VALUE) as *mut Option) { - ctx.retag_stack(139); + ctx.retag_stack(AncestorType::PropertyDefinitionValue); walk_expression(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_PROPERTY_DEFINITION_TYPE_ANNOTATION) as *mut Option>) { - ctx.retag_stack(140); + ctx.retag_stack(AncestorType::PropertyDefinitionTypeAnnotation); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } - ctx.retag_stack(141); + ctx.retag_stack(AncestorType::PropertyDefinitionDecorators); for item in (*((node as *mut u8).add(ancestor::OFFSET_PROPERTY_DEFINITION_DECORATORS) as *mut Vec)) .iter_mut() @@ -2564,10 +2567,10 @@ pub(crate) unsafe fn walk_accessor_property<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_ACCESSOR_PROPERTY_VALUE) as *mut Option) { - ctx.retag_stack(144); + ctx.retag_stack(AncestorType::AccessorPropertyValue); walk_expression(traverser, field as *mut _, ctx); } - ctx.retag_stack(145); + ctx.retag_stack(AncestorType::AccessorPropertyDecorators); for item in (*((node as *mut u8).add(ancestor::OFFSET_ACCESSOR_PROPERTY_DECORATORS) as *mut Vec)) .iter_mut() @@ -2590,7 +2593,7 @@ pub(crate) unsafe fn walk_import_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_IMPORT_EXPRESSION_SOURCE) as *mut Expression, ctx, ); - ctx.retag_stack(147); + ctx.retag_stack(AncestorType::ImportExpressionArguments); for item in (*((node as *mut u8).add(ancestor::OFFSET_IMPORT_EXPRESSION_ARGUMENTS) as *mut Vec)) .iter_mut() @@ -2618,7 +2621,7 @@ pub(crate) unsafe fn walk_import_declaration<'a, Tr: Traverse<'a>>( walk_import_declaration_specifier(traverser, item as *mut _, ctx); } } - ctx.retag_stack(149); + ctx.retag_stack(AncestorType::ImportDeclarationSource); walk_string_literal( traverser, (node as *mut u8).add(ancestor::OFFSET_IMPORT_DECLARATION_SOURCE) as *mut StringLiteral, @@ -2628,7 +2631,7 @@ pub(crate) unsafe fn walk_import_declaration<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_IMPORT_DECLARATION_WITH_CLAUSE) as *mut Option) { - ctx.retag_stack(150); + ctx.retag_stack(AncestorType::ImportDeclarationWithClause); walk_with_clause(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -2669,7 +2672,7 @@ pub(crate) unsafe fn walk_import_specifier<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_IMPORT_SPECIFIER_IMPORTED) as *mut ModuleExportName, ctx, ); - ctx.retag_stack(152); + ctx.retag_stack(AncestorType::ImportSpecifierLocal); walk_binding_identifier( traverser, (node as *mut u8).add(ancestor::OFFSET_IMPORT_SPECIFIER_LOCAL) as *mut BindingIdentifier, @@ -2732,7 +2735,7 @@ pub(crate) unsafe fn walk_with_clause<'a, Tr: Traverse<'a>>( as *mut IdentifierName, ctx, ); - ctx.retag_stack(156); + ctx.retag_stack(AncestorType::WithClauseWithEntries); for item in (*((node as *mut u8).add(ancestor::OFFSET_WITH_CLAUSE_WITH_ENTRIES) as *mut Vec)) .iter_mut() @@ -2755,7 +2758,7 @@ pub(crate) unsafe fn walk_import_attribute<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_IMPORT_ATTRIBUTE_KEY) as *mut ImportAttributeKey, ctx, ); - ctx.retag_stack(158); + ctx.retag_stack(AncestorType::ImportAttributeValue); walk_string_literal( traverser, (node as *mut u8).add(ancestor::OFFSET_IMPORT_ATTRIBUTE_VALUE) as *mut StringLiteral, @@ -2797,7 +2800,7 @@ pub(crate) unsafe fn walk_export_named_declaration<'a, Tr: Traverse<'a>>( { walk_declaration(traverser, field as *mut _, ctx); } - ctx.retag_stack(160); + ctx.retag_stack(AncestorType::ExportNamedDeclarationSpecifiers); for item in (*((node as *mut u8).add(ancestor::OFFSET_EXPORT_NAMED_DECLARATION_SPECIFIERS) as *mut Vec)) .iter_mut() @@ -2808,14 +2811,14 @@ pub(crate) unsafe fn walk_export_named_declaration<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_EXPORT_NAMED_DECLARATION_SOURCE) as *mut Option) { - ctx.retag_stack(161); + ctx.retag_stack(AncestorType::ExportNamedDeclarationSource); walk_string_literal(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_EXPORT_NAMED_DECLARATION_WITH_CLAUSE) as *mut Option) { - ctx.retag_stack(162); + ctx.retag_stack(AncestorType::ExportNamedDeclarationWithClause); walk_with_clause(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -2837,7 +2840,7 @@ pub(crate) unsafe fn walk_export_default_declaration<'a, Tr: Traverse<'a>>( as *mut ExportDefaultDeclarationKind, ctx, ); - ctx.retag_stack(164); + ctx.retag_stack(AncestorType::ExportDefaultDeclarationExported); walk_module_export_name( traverser, (node as *mut u8).add(ancestor::OFFSET_EXPORT_DEFAULT_DECLARATION_EXPORTED) @@ -2863,7 +2866,7 @@ pub(crate) unsafe fn walk_export_all_declaration<'a, Tr: Traverse<'a>>( { walk_module_export_name(traverser, field as *mut _, ctx); } - ctx.retag_stack(166); + ctx.retag_stack(AncestorType::ExportAllDeclarationSource); walk_string_literal( traverser, (node as *mut u8).add(ancestor::OFFSET_EXPORT_ALL_DECLARATION_SOURCE) as *mut StringLiteral, @@ -2873,7 +2876,7 @@ pub(crate) unsafe fn walk_export_all_declaration<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_EXPORT_ALL_DECLARATION_WITH_CLAUSE) as *mut Option) { - ctx.retag_stack(167); + ctx.retag_stack(AncestorType::ExportAllDeclarationWithClause); walk_with_clause(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -2892,7 +2895,7 @@ pub(crate) unsafe fn walk_export_specifier<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_EXPORT_SPECIFIER_LOCAL) as *mut ModuleExportName, ctx, ); - ctx.retag_stack(169); + ctx.retag_stack(AncestorType::ExportSpecifierExported); walk_module_export_name( traverser, (node as *mut u8).add(ancestor::OFFSET_EXPORT_SPECIFIER_EXPORTED) as *mut ModuleExportName, @@ -3002,10 +3005,10 @@ pub(crate) unsafe fn walk_jsx_element<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_JSX_ELEMENT_CLOSING_ELEMENT) as *mut Option>) { - ctx.retag_stack(171); + ctx.retag_stack(AncestorType::JSXElementClosingElement); walk_jsx_closing_element(traverser, (&mut **field) as *mut _, ctx); } - ctx.retag_stack(172); + ctx.retag_stack(AncestorType::JSXElementChildren); for item in (*((node as *mut u8).add(ancestor::OFFSET_JSX_ELEMENT_CHILDREN) as *mut Vec)) .iter_mut() @@ -3028,7 +3031,7 @@ pub(crate) unsafe fn walk_jsx_opening_element<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_JSX_OPENING_ELEMENT_NAME) as *mut JSXElementName, ctx, ); - ctx.retag_stack(174); + ctx.retag_stack(AncestorType::JSXOpeningElementAttributes); for item in (*((node as *mut u8).add(ancestor::OFFSET_JSX_OPENING_ELEMENT_ATTRIBUTES) as *mut Vec)) .iter_mut() @@ -3039,7 +3042,7 @@ pub(crate) unsafe fn walk_jsx_opening_element<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_JSX_OPENING_ELEMENT_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(175); + ctx.retag_stack(AncestorType::JSXOpeningElementTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -3113,7 +3116,7 @@ pub(crate) unsafe fn walk_jsx_namespaced_name<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_JSX_NAMESPACED_NAME_NAMESPACE) as *mut JSXIdentifier, ctx, ); - ctx.retag_stack(179); + ctx.retag_stack(AncestorType::JSXNamespacedNameProperty); walk_jsx_identifier( traverser, (node as *mut u8).add(ancestor::OFFSET_JSX_NAMESPACED_NAME_PROPERTY) as *mut JSXIdentifier, @@ -3138,7 +3141,7 @@ pub(crate) unsafe fn walk_jsx_member_expression<'a, Tr: Traverse<'a>>( as *mut JSXMemberExpressionObject, ctx, ); - ctx.retag_stack(181); + ctx.retag_stack(AncestorType::JSXMemberExpressionProperty); walk_jsx_identifier( traverser, (node as *mut u8).add(ancestor::OFFSET_JSX_MEMBER_EXPRESSION_PROPERTY) @@ -3284,7 +3287,7 @@ pub(crate) unsafe fn walk_jsx_attribute<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_JSX_ATTRIBUTE_VALUE) as *mut Option) { - ctx.retag_stack(184); + ctx.retag_stack(AncestorType::JSXAttributeValue); walk_jsx_attribute_value(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -3473,7 +3476,7 @@ pub(crate) unsafe fn walk_ts_this_parameter<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_THIS_PARAMETER_TYPE_ANNOTATION) as *mut Option>) { - ctx.retag_stack(188); + ctx.retag_stack(AncestorType::TSThisParameterTypeAnnotation); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -3492,7 +3495,7 @@ pub(crate) unsafe fn walk_ts_enum_declaration<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_ENUM_DECLARATION_ID) as *mut BindingIdentifier, ctx, ); - ctx.retag_stack(190); + ctx.retag_stack(AncestorType::TSEnumDeclarationMembers); for item in (*((node as *mut u8).add(ancestor::OFFSET_TS_ENUM_DECLARATION_MEMBERS) as *mut Vec)) .iter_mut() @@ -3518,7 +3521,7 @@ pub(crate) unsafe fn walk_ts_enum_member<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_ENUM_MEMBER_INITIALIZER) as *mut Option) { - ctx.retag_stack(192); + ctx.retag_stack(AncestorType::TSEnumMemberInitializer); walk_expression(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -3768,19 +3771,19 @@ pub(crate) unsafe fn walk_ts_conditional_type<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_CONDITIONAL_TYPE_CHECK_TYPE) as *mut TSType, ctx, ); - ctx.retag_stack(196); + ctx.retag_stack(AncestorType::TSConditionalTypeExtendsType); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_CONDITIONAL_TYPE_EXTENDS_TYPE) as *mut TSType, ctx, ); - ctx.retag_stack(197); + ctx.retag_stack(AncestorType::TSConditionalTypeTrueType); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_CONDITIONAL_TYPE_TRUE_TYPE) as *mut TSType, ctx, ); - ctx.retag_stack(198); + ctx.retag_stack(AncestorType::TSConditionalTypeFalseType); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_CONDITIONAL_TYPE_FALSE_TYPE) as *mut TSType, @@ -3873,7 +3876,7 @@ pub(crate) unsafe fn walk_ts_indexed_access_type<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_INDEXED_ACCESS_TYPE_OBJECT_TYPE) as *mut TSType, ctx, ); - ctx.retag_stack(204); + ctx.retag_stack(AncestorType::TSIndexedAccessTypeIndexType); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_INDEXED_ACCESS_TYPE_INDEX_TYPE) as *mut TSType, @@ -3916,7 +3919,7 @@ pub(crate) unsafe fn walk_ts_named_tuple_member<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_NAMED_TUPLE_MEMBER_ELEMENT_TYPE) as *mut TSType, ctx, ); - ctx.retag_stack(207); + ctx.retag_stack(AncestorType::TSNamedTupleMemberLabel); walk_identifier_name( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_NAMED_TUPLE_MEMBER_LABEL) as *mut IdentifierName, @@ -4149,7 +4152,7 @@ pub(crate) unsafe fn walk_ts_type_reference<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_TYPE_REFERENCE_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(211); + ctx.retag_stack(AncestorType::TSTypeReferenceTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4185,7 +4188,7 @@ pub(crate) unsafe fn walk_ts_qualified_name<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_QUALIFIED_NAME_LEFT) as *mut TSTypeName, ctx, ); - ctx.retag_stack(213); + ctx.retag_stack(AncestorType::TSQualifiedNameRight); walk_identifier_name( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_QUALIFIED_NAME_RIGHT) as *mut IdentifierName, @@ -4229,13 +4232,13 @@ pub(crate) unsafe fn walk_ts_type_parameter<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_TYPE_PARAMETER_CONSTRAINT) as *mut Option) { - ctx.retag_stack(216); + ctx.retag_stack(AncestorType::TSTypeParameterConstraint); walk_ts_type(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_TYPE_PARAMETER_DEFAULT) as *mut Option) { - ctx.retag_stack(217); + ctx.retag_stack(AncestorType::TSTypeParameterDefault); walk_ts_type(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -4276,7 +4279,7 @@ pub(crate) unsafe fn walk_ts_type_alias_declaration<'a, Tr: Traverse<'a>>( as *mut BindingIdentifier, ctx, ); - ctx.retag_stack(220); + ctx.retag_stack(AncestorType::TSTypeAliasDeclarationTypeAnnotation); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_TYPE_ALIAS_DECLARATION_TYPE_ANNOTATION) @@ -4287,7 +4290,7 @@ pub(crate) unsafe fn walk_ts_type_alias_declaration<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_TYPE_ALIAS_DECLARATION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(221); + ctx.retag_stack(AncestorType::TSTypeAliasDeclarationTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4312,7 +4315,7 @@ pub(crate) unsafe fn walk_ts_class_implements<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_CLASS_IMPLEMENTS_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(223); + ctx.retag_stack(AncestorType::TSClassImplementsTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4334,7 +4337,7 @@ pub(crate) unsafe fn walk_ts_interface_declaration<'a, Tr: Traverse<'a>>( as *mut BindingIdentifier, ctx, ); - ctx.retag_stack(225); + ctx.retag_stack(AncestorType::TSInterfaceDeclarationBody); walk_ts_interface_body( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_INTERFACE_DECLARATION_BODY) @@ -4345,14 +4348,14 @@ pub(crate) unsafe fn walk_ts_interface_declaration<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_INTERFACE_DECLARATION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(226); + ctx.retag_stack(AncestorType::TSInterfaceDeclarationTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_TS_INTERFACE_DECLARATION_EXTENDS) as *mut Option>) { - ctx.retag_stack(227); + ctx.retag_stack(AncestorType::TSInterfaceDeclarationExtends); for item in field.iter_mut() { walk_ts_interface_heritage(traverser, item as *mut _, ctx); } @@ -4394,7 +4397,7 @@ pub(crate) unsafe fn walk_ts_property_signature<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_PROPERTY_SIGNATURE_TYPE_ANNOTATION) as *mut Option>) { - ctx.retag_stack(230); + ctx.retag_stack(AncestorType::TSPropertySignatureTypeAnnotation); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4442,7 +4445,7 @@ pub(crate) unsafe fn walk_ts_index_signature<'a, Tr: Traverse<'a>>( { walk_ts_index_signature_name(traverser, item as *mut _, ctx); } - ctx.retag_stack(232); + ctx.retag_stack(AncestorType::TSIndexSignatureTypeAnnotation); walk_ts_type_annotation( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_INDEX_SIGNATURE_TYPE_ANNOTATION) @@ -4468,7 +4471,7 @@ pub(crate) unsafe fn walk_ts_call_signature_declaration<'a, Tr: Traverse<'a>>( { walk_ts_this_parameter(traverser, field as *mut _, ctx); } - ctx.retag_stack(234); + ctx.retag_stack(AncestorType::TSCallSignatureDeclarationParams); walk_formal_parameters( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_CALL_SIGNATURE_DECLARATION_PARAMS) @@ -4479,14 +4482,14 @@ pub(crate) unsafe fn walk_ts_call_signature_declaration<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_CALL_SIGNATURE_DECLARATION_RETURN_TYPE) as *mut Option>) { - ctx.retag_stack(235); + ctx.retag_stack(AncestorType::TSCallSignatureDeclarationReturnType); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_TS_CALL_SIGNATURE_DECLARATION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(236); + ctx.retag_stack(AncestorType::TSCallSignatureDeclarationTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4509,10 +4512,10 @@ pub(crate) unsafe fn walk_ts_method_signature<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_METHOD_SIGNATURE_THIS_PARAM) as *mut Option) { - ctx.retag_stack(238); + ctx.retag_stack(AncestorType::TSMethodSignatureThisParam); walk_ts_this_parameter(traverser, field as *mut _, ctx); } - ctx.retag_stack(239); + ctx.retag_stack(AncestorType::TSMethodSignatureParams); walk_formal_parameters( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_METHOD_SIGNATURE_PARAMS) @@ -4523,14 +4526,14 @@ pub(crate) unsafe fn walk_ts_method_signature<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_METHOD_SIGNATURE_RETURN_TYPE) as *mut Option>) { - ctx.retag_stack(240); + ctx.retag_stack(AncestorType::TSMethodSignatureReturnType); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_TS_METHOD_SIGNATURE_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(241); + ctx.retag_stack(AncestorType::TSMethodSignatureTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4556,14 +4559,14 @@ pub(crate) unsafe fn walk_ts_construct_signature_declaration<'a, Tr: Traverse<'a .add(ancestor::OFFSET_TS_CONSTRUCT_SIGNATURE_DECLARATION_RETURN_TYPE) as *mut Option>) { - ctx.retag_stack(243); + ctx.retag_stack(AncestorType::TSConstructSignatureDeclarationReturnType); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_TS_CONSTRUCT_SIGNATURE_DECLARATION_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(244); + ctx.retag_stack(AncestorType::TSConstructSignatureDeclarationTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4607,7 +4610,7 @@ pub(crate) unsafe fn walk_ts_interface_heritage<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_INTERFACE_HERITAGE_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(247); + ctx.retag_stack(AncestorType::TSInterfaceHeritageTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4633,7 +4636,7 @@ pub(crate) unsafe fn walk_ts_type_predicate<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_TYPE_PREDICATE_TYPE_ANNOTATION) as *mut Option>) { - ctx.retag_stack(249); + ctx.retag_stack(AncestorType::TSTypePredicateTypeAnnotation); walk_ts_type_annotation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4671,7 +4674,7 @@ pub(crate) unsafe fn walk_ts_module_declaration<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_MODULE_DECLARATION_BODY) as *mut Option) { - ctx.retag_stack(251); + ctx.retag_stack(AncestorType::TSModuleDeclarationBody); walk_ts_module_declaration_body(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -4780,7 +4783,7 @@ pub(crate) unsafe fn walk_ts_type_query<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_TYPE_QUERY_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(256); + ctx.retag_stack(AncestorType::TSTypeQueryTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4819,20 +4822,20 @@ pub(crate) unsafe fn walk_ts_import_type<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_IMPORT_TYPE_QUALIFIER) as *mut Option) { - ctx.retag_stack(258); + ctx.retag_stack(AncestorType::TSImportTypeQualifier); walk_ts_type_name(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_IMPORT_TYPE_ATTRIBUTES) as *mut Option) { - ctx.retag_stack(259); + ctx.retag_stack(AncestorType::TSImportTypeAttributes); walk_ts_import_attributes(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_TS_IMPORT_TYPE_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(260); + ctx.retag_stack(AncestorType::TSImportTypeTypeParameters); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4871,7 +4874,7 @@ pub(crate) unsafe fn walk_ts_import_attribute<'a, Tr: Traverse<'a>>( as *mut TSImportAttributeName, ctx, ); - ctx.retag_stack(263); + ctx.retag_stack(AncestorType::TSImportAttributeValue); walk_expression( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_IMPORT_ATTRIBUTE_VALUE) as *mut Expression, @@ -4912,14 +4915,14 @@ pub(crate) unsafe fn walk_ts_function_type<'a, Tr: Traverse<'a>>( { walk_ts_this_parameter(traverser, field as *mut _, ctx); } - ctx.retag_stack(265); + ctx.retag_stack(AncestorType::TSFunctionTypeParams); walk_formal_parameters( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_FUNCTION_TYPE_PARAMS) as *mut Box)) as *mut _, ctx, ); - ctx.retag_stack(266); + ctx.retag_stack(AncestorType::TSFunctionTypeReturnType); walk_ts_type_annotation( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_FUNCTION_TYPE_RETURN_TYPE) @@ -4930,7 +4933,7 @@ pub(crate) unsafe fn walk_ts_function_type<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_FUNCTION_TYPE_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(267); + ctx.retag_stack(AncestorType::TSFunctionTypeTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4952,7 +4955,7 @@ pub(crate) unsafe fn walk_ts_constructor_type<'a, Tr: Traverse<'a>>( as *mut Box)) as *mut _, ctx, ); - ctx.retag_stack(269); + ctx.retag_stack(AncestorType::TSConstructorTypeReturnType); walk_ts_type_annotation( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_CONSTRUCTOR_TYPE_RETURN_TYPE) @@ -4963,7 +4966,7 @@ pub(crate) unsafe fn walk_ts_constructor_type<'a, Tr: Traverse<'a>>( .add(ancestor::OFFSET_TS_CONSTRUCTOR_TYPE_TYPE_PARAMETERS) as *mut Option>) { - ctx.retag_stack(270); + ctx.retag_stack(AncestorType::TSConstructorTypeTypeParameters); walk_ts_type_parameter_declaration(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(); @@ -4988,14 +4991,14 @@ pub(crate) unsafe fn walk_ts_mapped_type<'a, Tr: Traverse<'a>>( if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_MAPPED_TYPE_NAME_TYPE) as *mut Option) { - ctx.retag_stack(272); + ctx.retag_stack(AncestorType::TSMappedTypeNameType); walk_ts_type(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_TS_MAPPED_TYPE_TYPE_ANNOTATION) as *mut Option) { - ctx.retag_stack(273); + ctx.retag_stack(AncestorType::TSMappedTypeTypeAnnotation); walk_ts_type(traverser, field as *mut _, ctx); } ctx.pop_stack(); @@ -5017,7 +5020,7 @@ pub(crate) unsafe fn walk_ts_template_literal_type<'a, Tr: Traverse<'a>>( { walk_template_element(traverser, item as *mut _, ctx); } - ctx.retag_stack(275); + ctx.retag_stack(AncestorType::TSTemplateLiteralTypeTypes); for item in (*((node as *mut u8).add(ancestor::OFFSET_TS_TEMPLATE_LITERAL_TYPE_TYPES) as *mut Vec)) .iter_mut() @@ -5042,7 +5045,7 @@ pub(crate) unsafe fn walk_ts_as_expression<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_AS_EXPRESSION_EXPRESSION) as *mut Expression, ctx, ); - ctx.retag_stack(277); + ctx.retag_stack(AncestorType::TSAsExpressionTypeAnnotation); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_AS_EXPRESSION_TYPE_ANNOTATION) as *mut TSType, @@ -5067,7 +5070,7 @@ pub(crate) unsafe fn walk_ts_satisfies_expression<'a, Tr: Traverse<'a>>( as *mut Expression, ctx, ); - ctx.retag_stack(279); + ctx.retag_stack(AncestorType::TSSatisfiesExpressionTypeAnnotation); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_SATISFIES_EXPRESSION_TYPE_ANNOTATION) @@ -5092,7 +5095,7 @@ pub(crate) unsafe fn walk_ts_type_assertion<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_TYPE_ASSERTION_EXPRESSION) as *mut Expression, ctx, ); - ctx.retag_stack(281); + ctx.retag_stack(AncestorType::TSTypeAssertionTypeAnnotation); walk_ts_type( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_TYPE_ASSERTION_TYPE_ANNOTATION) as *mut TSType, @@ -5117,7 +5120,7 @@ pub(crate) unsafe fn walk_ts_import_equals_declaration<'a, Tr: Traverse<'a>>( as *mut BindingIdentifier, ctx, ); - ctx.retag_stack(283); + ctx.retag_stack(AncestorType::TSImportEqualsDeclarationModuleReference); walk_ts_module_reference( traverser, (node as *mut u8).add(ancestor::OFFSET_TS_IMPORT_EQUALS_DECLARATION_MODULE_REFERENCE) @@ -5251,7 +5254,7 @@ pub(crate) unsafe fn walk_ts_instantiation_expression<'a, Tr: Traverse<'a>>( as *mut Expression, ctx, ); - ctx.retag_stack(290); + ctx.retag_stack(AncestorType::TSInstantiationExpressionTypeParameters); walk_ts_type_parameter_instantiation( traverser, (&mut **((node as *mut u8).add(ancestor::OFFSET_TS_INSTANTIATION_EXPRESSION_TYPE_PARAMETERS)