import { DataLocation, Expression, TypeName, VariableDeclaration } from "../ast"; import { TypeIdentifier } from "./ast"; /** * Return the parsed `TypeIdentifier` for the given node. */ export declare function typeOf(nd: Expression | VariableDeclaration | TypeName): TypeIdentifier; /** * Given a `TypeIdentifier` `t` return a new `TypeIdentifier` with all pointer locations changed to `loc`. * @param t * @param loc * @returns */ export declare function changeLocationTo(t: TypeIdentifier, loc: DataLocation): TypeIdentifier; /** * Given a public state variable declaration `v` return the ABI types of the arguments and the returns for this var. * This will account for: * - indexing into arrays/maps * - converting returned structs to tuples * - omitting arrays and maps * * @param t * @param loc * @returns */ export declare function getterArgsAndReturn(v: VariableDeclaration): [TypeIdentifier[], TypeIdentifier]; /** * Given a `TypeIdentifier` `t` return a new generalized `TypeIdentifier` with all pointers removed (i.e. no specifications for locations) * @param t * @param loc * @returns */ export declare function generalize(t: TypeIdentifier): TypeIdentifier; /** * Given an already generalized `TypeIdentifier` `t` and a location return a new * specialized `TypeIdentifier` with all reference types wrapped in a pointer to * the given location * @param t * @param loc * @returns */ export declare function specialize(t: TypeIdentifier, loc: DataLocation): TypeIdentifier; /** * Return true IFF the `TypeIdentifier` `t` must live in storage. * @param t * @returns */ export declare function isTypeInStorage(t: TypeIdentifier): boolean; //# sourceMappingURL=utils.d.ts.map