import { ABIEncoderVersion } from "../../../types"; import { ASTNode, ASTNodeWithChildren } from "../../ast_node"; import { EventDefinition } from "../declaration"; import { ContractDefinition } from "../declaration/contract_definition"; import { EnumDefinition } from "../declaration/enum_definition"; import { ErrorDefinition } from "../declaration/error_definition"; import { FunctionDefinition } from "../declaration/function_definition"; import { StructDefinition } from "../declaration/struct_definition"; import { UserDefinedValueTypeDefinition } from "../declaration/user_defined_value_type_definition"; import { VariableDeclaration } from "../declaration/variable_declaration"; import { ImportDirective } from "./import_directive"; import { PragmaDirective } from "./pragma_directive"; import { UsingForDirective } from "./using_for_directive"; export type ExportedSymbol = ContractDefinition | StructDefinition | EnumDefinition | ErrorDefinition | FunctionDefinition | EventDefinition | UserDefinedValueTypeDefinition | VariableDeclaration | ImportDirective; export declare class SourceUnit extends ASTNodeWithChildren { /** * Original "sources" key, that corresponds to current AST entry. */ sourceEntryKey: string; /** * Index of the source unit in the "sourceList". */ sourceListIndex: number; /** * File path to the source file */ absolutePath: string; /** * Exported symbols dictionary, e.g. `{ "A": 74, "B": 34, ... }` */ exportedSymbols: Map; /** * SPDX license identifier (if provided) */ license?: string; constructor(id: number, src: string, sourceEntryKey: string, sourceListIndex: number, absolutePath: string, exportedSymbols: Map, children?: Iterable, license?: string, raw?: any); /** * References to pragma directives */ get vPragmaDirectives(): readonly PragmaDirective[]; /** * References to import directives */ get vImportDirectives(): readonly ImportDirective[]; /** * References to contract definitions */ get vContracts(): readonly ContractDefinition[]; /** * References to file-level enum definitions */ get vEnums(): readonly EnumDefinition[]; /** * References to file-level error definitions */ get vErrors(): readonly ErrorDefinition[]; /** * References to file-level struct definitions */ get vStructs(): readonly StructDefinition[]; /** * References to file-level function definitions (free functions) */ get vFunctions(): readonly FunctionDefinition[]; /** * References to file-level event definitions */ get vEvents(): readonly EventDefinition[]; /** * References to file-level constant variable definitions */ get vVariables(): readonly VariableDeclaration[]; /** * References to file-level user-defined value type definitions */ get vUserDefinedValueTypes(): readonly UserDefinedValueTypeDefinition[]; /** * References to file-level using-for directives */ get vUsingForDirectives(): readonly UsingForDirective[]; /** * Referenced exported symbols */ get vExportedSymbols(): ReadonlyMap; /** * Returns user-defined ABI encoder version for the source unit. * If there is no encoder version defined in the pragma directives, * then returns `undefined`. */ get abiEncoderVersion(): ABIEncoderVersion | undefined; } //# sourceMappingURL=source_unit.d.ts.map