import * as declaration from "./declaration"; import * as expression from "./expression"; import * as meta from "./meta"; import * as statement from "./statement"; import * as type from "./type"; import * as yul from "./yul"; export * from "./declaration"; export * from "./expression"; export * from "./meta"; export * from "./statement"; export * from "./type"; export * from "./yul"; export declare const ASTNodeConstructorsList: readonly [typeof declaration.ContractDefinition, typeof declaration.EnumDefinition, typeof declaration.EnumValue, typeof declaration.ErrorDefinition, typeof declaration.EventDefinition, typeof declaration.FunctionDefinition, typeof declaration.ModifierDefinition, typeof declaration.StructDefinition, typeof declaration.UserDefinedValueTypeDefinition, typeof declaration.VariableDeclaration, typeof expression.Assignment, typeof expression.BinaryOperation, typeof expression.Conditional, typeof expression.ElementaryTypeNameExpression, typeof expression.FunctionCallOptions, typeof expression.FunctionCall, typeof expression.Identifier, typeof expression.IndexAccess, typeof expression.IndexRangeAccess, typeof expression.Literal, typeof expression.MemberAccess, typeof expression.NewExpression, typeof expression.TupleExpression, typeof expression.UnaryOperation, typeof meta.IdentifierPath, typeof meta.ImportDirective, typeof meta.InheritanceSpecifier, typeof meta.ModifierInvocation, typeof meta.OverrideSpecifier, typeof meta.ParameterList, typeof meta.PragmaDirective, typeof meta.SourceUnit, typeof meta.StructuredDocumentation, typeof meta.UsingForDirective, typeof statement.Block, typeof statement.Break, typeof statement.Continue, typeof statement.DoWhileStatement, typeof statement.EmitStatement, typeof statement.ExpressionStatement, typeof statement.ForStatement, typeof statement.IfStatement, typeof statement.InlineAssembly, typeof statement.PlaceholderStatement, typeof statement.Return, typeof statement.RevertStatement, typeof statement.Throw, typeof statement.TryCatchClause, typeof statement.TryStatement, typeof statement.UncheckedBlock, typeof statement.VariableDeclarationStatement, typeof statement.WhileStatement, typeof type.ArrayTypeName, typeof type.ElementaryTypeName, typeof type.FunctionTypeName, typeof type.Mapping, typeof type.UserDefinedTypeName, typeof yul.YulFunctionCall, typeof yul.YulIdentifier, typeof yul.YulLiteral, typeof yul.YulTypedName, typeof yul.YulAssignment, typeof yul.YulBlock, typeof yul.YulBreak, typeof yul.YulCase, typeof yul.YulCode, typeof yul.YulContinue, typeof yul.YulData, typeof yul.YulExpressionStatement, typeof yul.YulFunctionDefinition, typeof yul.YulForLoop, typeof yul.YulIf, typeof yul.YulLeave, typeof yul.YulObject, typeof yul.YulSwitch, typeof yul.YulVariableDeclaration]; export type ExtractConstructorClass = ConstructorType extends new (id: number, src: string, ...args: any[]) => infer Class ? Class extends ASTNodeType ? Class : never : never; export declare const ASTNodeClassEntries: [["ContractDefinition", typeof declaration.ContractDefinition], ["EnumDefinition", typeof declaration.EnumDefinition], ["EnumValue", typeof declaration.EnumValue], ["ErrorDefinition", typeof declaration.ErrorDefinition], ["EventDefinition", typeof declaration.EventDefinition], ["FunctionDefinition", typeof declaration.FunctionDefinition], ["ModifierDefinition", typeof declaration.ModifierDefinition], ["StructDefinition", typeof declaration.StructDefinition], ["UserDefinedValueTypeDefinition", typeof declaration.UserDefinedValueTypeDefinition], ["VariableDeclaration", typeof declaration.VariableDeclaration], ["Assignment", typeof expression.Assignment], ["BinaryOperation", typeof expression.BinaryOperation], ["Conditional", typeof expression.Conditional], ["ElementaryTypeNameExpression", typeof expression.ElementaryTypeNameExpression], ["FunctionCallOptions", typeof expression.FunctionCallOptions], ["FunctionCall", typeof expression.FunctionCall], ["Identifier", typeof expression.Identifier], ["IndexAccess", typeof expression.IndexAccess], ["IndexRangeAccess", typeof expression.IndexRangeAccess], ["Literal", typeof expression.Literal], ["MemberAccess", typeof expression.MemberAccess], ["NewExpression", typeof expression.NewExpression], ["TupleExpression", typeof expression.TupleExpression], ["UnaryOperation", typeof expression.UnaryOperation], ["IdentifierPath", typeof meta.IdentifierPath], ["ImportDirective", typeof meta.ImportDirective], ["InheritanceSpecifier", typeof meta.InheritanceSpecifier], ["ModifierInvocation", typeof meta.ModifierInvocation], ["OverrideSpecifier", typeof meta.OverrideSpecifier], ["ParameterList", typeof meta.ParameterList], ["PragmaDirective", typeof meta.PragmaDirective], ["SourceUnit", typeof meta.SourceUnit], ["StructuredDocumentation", typeof meta.StructuredDocumentation], ["UsingForDirective", typeof meta.UsingForDirective], ["Block", typeof statement.Block], ["Break", typeof statement.Break], ["Continue", typeof statement.Continue], ["DoWhileStatement", typeof statement.DoWhileStatement], ["EmitStatement", typeof statement.EmitStatement], ["ExpressionStatement", typeof statement.ExpressionStatement], ["ForStatement", typeof statement.ForStatement], ["IfStatement", typeof statement.IfStatement], ["InlineAssembly", typeof statement.InlineAssembly], ["PlaceholderStatement", typeof statement.PlaceholderStatement], ["Return", typeof statement.Return], ["RevertStatement", typeof statement.RevertStatement], ["Throw", typeof statement.Throw], ["TryCatchClause", typeof statement.TryCatchClause], ["TryStatement", typeof statement.TryStatement], ["UncheckedBlock", typeof statement.UncheckedBlock], ["VariableDeclarationStatement", typeof statement.VariableDeclarationStatement], ["WhileStatement", typeof statement.WhileStatement], ["ArrayTypeName", typeof type.ArrayTypeName], ["ElementaryTypeName", typeof type.ElementaryTypeName], ["FunctionTypeName", typeof type.FunctionTypeName], ["Mapping", typeof type.Mapping], ["UserDefinedTypeName", typeof type.UserDefinedTypeName], ["YulFunctionCall", typeof yul.YulFunctionCall], ["YulIdentifier", typeof yul.YulIdentifier], ["YulLiteral", typeof yul.YulLiteral], ["YulTypedName", typeof yul.YulTypedName], ["YulAssignment", typeof yul.YulAssignment], ["YulBlock", typeof yul.YulBlock], ["YulBreak", typeof yul.YulBreak], ["YulCase", typeof yul.YulCase], ["YulCode", typeof yul.YulCode], ["YulContinue", typeof yul.YulContinue], ["YulData", typeof yul.YulData], ["YulExpressionStatement", typeof yul.YulExpressionStatement], ["YulFunctionDefinition", typeof yul.YulFunctionDefinition], ["YulForLoop", typeof yul.YulForLoop], ["YulIf", typeof yul.YulIf], ["YulLeave", typeof yul.YulLeave], ["YulObject", typeof yul.YulObject], ["YulSwitch", typeof yul.YulSwitch], ["YulVariableDeclaration", typeof yul.YulVariableDeclaration]]; export declare const astNodeConstructorMap: ASTNodeConstructorMap; type TupleSplit = O["length"] extends N ? [O, T] : T extends readonly [infer F, ...infer R] ? TupleSplit : [O, T]; type TakeFirst = TupleSplit[0]; type SkipFirst = TupleSplit[1]; type TupleSlice = SkipFirst, S>; export type ASTNodeConstructorOf = Extract>; export type ExtractedArguments = SkipFirst, 2>; type ClassesList = typeof ASTNodeConstructorsList; type ASTNodeClassEntriesType = [ ...ArrayToEntriesWithKey, "type">, ...ArrayToEntriesWithKey, "type">, ...ArrayToEntriesWithKey, "type">, ...ArrayToEntriesWithKey, "type"> ]; export type ASTNodeClassEntry = ASTNodeClassEntriesType[number]; export type ASTNodeConstructorType = ASTNodeClassEntry[1]; export type ASTNodeType = InstanceType; export type ASTNodeKind = ASTNodeType["type"]; export type ASTNodeConstructorMap = { [K in ASTNodeKind]: Extract>; }; export type ASTNodeMap = { [K in ASTNodeKind]: Extract, { type: K; }>; }; type Constructor = new (...args: any[]) => C; type ConstructorToEntryByKey = C extends Constructor ? K extends keyof Obj ? [[Obj[K], C]] : [] : []; type ArrayToEntriesWithKey = T extends ReadonlyArray> ? T extends readonly [infer O1, ...infer Rest] ? [...ConstructorToEntryByKey, ...ArrayToEntriesWithKey] : [] : []; //# sourceMappingURL=index.d.ts.map