Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/generated/ast_changes_watch_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ src:
- '.github/generated/ast_changes_watch_list.yml'
- 'apps/oxlint/src-js/generated/constants.js'
- 'apps/oxlint/src-js/generated/types.d.ts'
- 'apps/oxlint/src-js/generated/types.js'
- 'apps/oxlint/src-js/generated/visitor.d.ts'
- 'apps/oxlint/src-js/generated/walk.js'
- 'apps/oxlint/src/generated/raw_transfer_constants.rs'
- 'crates/oxc_allocator/src/generated/assert_layouts.rs'
- 'crates/oxc_allocator/src/generated/fixed_size_constants.rs'
Expand Down
2 changes: 0 additions & 2 deletions apps/oxlint/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ const parserFilePaths = [
*/
'generated/deserialize/ts_range_loc_parent_no_parens.js',
'generated/visit/keys.js',
'generated/visit/types.js',
'generated/visit/walk.js',
];

for (const parserFilePath of parserFilePaths) {
Expand Down
176 changes: 176 additions & 0 deletions apps/oxlint/src-js/generated/types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
// Auto-generated code, DO NOT EDIT DIRECTLY!
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/estree_visit.rs`.

// Mapping from node type name to node type ID
export const NODE_TYPE_IDS_MAP = new Map([
// Leaf nodes
['DebuggerStatement', 0],
['EmptyStatement', 1],
['Literal', 2],
['PrivateIdentifier', 3],
['Super', 4],
['TemplateElement', 5],
['ThisExpression', 6],
['JSXClosingFragment', 7],
['JSXEmptyExpression', 8],
['JSXIdentifier', 9],
['JSXOpeningFragment', 10],
['JSXText', 11],
['TSAnyKeyword', 12],
['TSBigIntKeyword', 13],
['TSBooleanKeyword', 14],
['TSIntrinsicKeyword', 15],
['TSJSDocUnknownType', 16],
['TSNeverKeyword', 17],
['TSNullKeyword', 18],
['TSNumberKeyword', 19],
['TSObjectKeyword', 20],
['TSStringKeyword', 21],
['TSSymbolKeyword', 22],
['TSThisType', 23],
['TSUndefinedKeyword', 24],
['TSUnknownKeyword', 25],
['TSVoidKeyword', 26],
// Non-leaf nodes
['AccessorProperty', 27],
['ArrayExpression', 28],
['ArrayPattern', 29],
['ArrowFunctionExpression', 30],
['AssignmentExpression', 31],
['AssignmentPattern', 32],
['AwaitExpression', 33],
['BinaryExpression', 34],
['BlockStatement', 35],
['BreakStatement', 36],
['CallExpression', 37],
['CatchClause', 38],
['ChainExpression', 39],
['ClassBody', 40],
['ClassDeclaration', 41],
['ClassExpression', 42],
['ConditionalExpression', 43],
['ContinueStatement', 44],
['Decorator', 45],
['DoWhileStatement', 46],
['ExportAllDeclaration', 47],
['ExportDefaultDeclaration', 48],
['ExportNamedDeclaration', 49],
['ExportSpecifier', 50],
['ExpressionStatement', 51],
['ForInStatement', 52],
['ForOfStatement', 53],
['ForStatement', 54],
['FunctionDeclaration', 55],
['FunctionExpression', 56],
['Identifier', 57],
['IfStatement', 58],
['ImportAttribute', 59],
['ImportDeclaration', 60],
['ImportDefaultSpecifier', 61],
['ImportExpression', 62],
['ImportNamespaceSpecifier', 63],
['ImportSpecifier', 64],
['LabeledStatement', 65],
['LogicalExpression', 66],
['MemberExpression', 67],
['MetaProperty', 68],
['MethodDefinition', 69],
['NewExpression', 70],
['ObjectExpression', 71],
['ObjectPattern', 72],
['ParenthesizedExpression', 73],
['Program', 74],
['Property', 75],
['PropertyDefinition', 76],
['RestElement', 77],
['ReturnStatement', 78],
['SequenceExpression', 79],
['SpreadElement', 80],
['StaticBlock', 81],
['SwitchCase', 82],
['SwitchStatement', 83],
['TaggedTemplateExpression', 84],
['TemplateLiteral', 85],
['ThrowStatement', 86],
['TryStatement', 87],
['UnaryExpression', 88],
['UpdateExpression', 89],
['V8IntrinsicExpression', 90],
['VariableDeclaration', 91],
['VariableDeclarator', 92],
['WhileStatement', 93],
['WithStatement', 94],
['YieldExpression', 95],
['JSXAttribute', 96],
['JSXClosingElement', 97],
['JSXElement', 98],
['JSXExpressionContainer', 99],
['JSXFragment', 100],
['JSXMemberExpression', 101],
['JSXNamespacedName', 102],
['JSXOpeningElement', 103],
['JSXSpreadAttribute', 104],
['JSXSpreadChild', 105],
['TSAbstractAccessorProperty', 106],
['TSAbstractMethodDefinition', 107],
['TSAbstractPropertyDefinition', 108],
['TSArrayType', 109],
['TSAsExpression', 110],
['TSCallSignatureDeclaration', 111],
['TSClassImplements', 112],
['TSConditionalType', 113],
['TSConstructSignatureDeclaration', 114],
['TSConstructorType', 115],
['TSDeclareFunction', 116],
['TSEmptyBodyFunctionExpression', 117],
['TSEnumBody', 118],
['TSEnumDeclaration', 119],
['TSEnumMember', 120],
['TSExportAssignment', 121],
['TSExternalModuleReference', 122],
['TSFunctionType', 123],
['TSImportEqualsDeclaration', 124],
['TSImportType', 125],
['TSIndexSignature', 126],
['TSIndexedAccessType', 127],
['TSInferType', 128],
['TSInstantiationExpression', 129],
['TSInterfaceBody', 130],
['TSInterfaceDeclaration', 131],
['TSInterfaceHeritage', 132],
['TSIntersectionType', 133],
['TSJSDocNonNullableType', 134],
['TSJSDocNullableType', 135],
['TSLiteralType', 136],
['TSMappedType', 137],
['TSMethodSignature', 138],
['TSModuleBlock', 139],
['TSModuleDeclaration', 140],
['TSNamedTupleMember', 141],
['TSNamespaceExportDeclaration', 142],
['TSNonNullExpression', 143],
['TSOptionalType', 144],
['TSParameterProperty', 145],
['TSParenthesizedType', 146],
['TSPropertySignature', 147],
['TSQualifiedName', 148],
['TSRestType', 149],
['TSSatisfiesExpression', 150],
['TSTemplateLiteralType', 151],
['TSTupleType', 152],
['TSTypeAliasDeclaration', 153],
['TSTypeAnnotation', 154],
['TSTypeAssertion', 155],
['TSTypeLiteral', 156],
['TSTypeOperator', 157],
['TSTypeParameter', 158],
['TSTypeParameterDeclaration', 159],
['TSTypeParameterInstantiation', 160],
['TSTypePredicate', 161],
['TSTypeQuery', 162],
['TSTypeReference', 163],
['TSUnionType', 164],
]);

export const NODE_TYPES_COUNT = 165;
export const LEAF_NODE_TYPES_COUNT = 27;
Loading
Loading