UNPKG

@helios-lang/compiler

Version:

Helios is a Domain Specific Language that compiles to Plutus-Core (i.e. Cardano on-chain validator scripts). Helios is a non-Haskell alternative to Plutus. With this library you can compile Helios scripts and build Cardano transactions, all you need to bu

78 lines 2.62 kB
/** * @import { Site, Word } from "@helios-lang/compiler-utils" * @typedef {import("../codegen/index.js").Definitions} Definitions * @typedef {import("../typecheck/index.js").GenericTypeProps} GenericTypeProps * @typedef {import("../typecheck/index.js").Type} Type * @typedef {import("../typecheck/index.js").TypeSchema} TypeSchema * @typedef {import("../typecheck/index.js").StructTypeSchema} StructTypeSchema */ /** * Struct statement */ export class StructStatement extends Statement { /** * @param {Site} site * @param {Word} name * @param {TypeParameters} parameters * @param {DataField[]} fields * @param {ImplDefinition} impl */ constructor(site: Site, name: Word, parameters: TypeParameters, fields: DataField[], impl: ImplDefinition); /** * @private * @readonly * @type {TypeParameters} */ private readonly _parameters; /** * @private * @readonly * @type {DataDefinition} */ private readonly _dataDef; /** * @private * @readonly * @type {ImplDefinition} */ private readonly _impl; /** * Evaluates own type and adds to scope * @param {TopScope} scope */ eval(scope: TopScope): void; /** * @param {ToIRContext} ctx * @param {Definitions} map */ toIR_mStructEq(ctx: ToIRContext, map: Definitions): void; /** * @param {ToIRContext} ctx * @param {Definitions} map */ toIR_mStructNeq(ctx: ToIRContext, map: Definitions): void; /** * @param {ToIRContext} ctx * @param {Definitions} map */ toIR_mStruct(ctx: ToIRContext, map: Definitions): void; /** * @param {ToIRContext} ctx * @param {Definitions} map */ toIR_fStruct(ctx: ToIRContext, map: Definitions): void; } export type Definitions = import("../codegen/index.js").Definitions; export type GenericTypeProps = import("../typecheck/index.js").GenericTypeProps; export type Type = import("../typecheck/index.js").Type; export type TypeSchema = import("../typecheck/index.js").TypeSchema; export type StructTypeSchema = import("../typecheck/index.js").StructTypeSchema; import { Statement } from "./Statement.js"; import { TopScope } from "../scopes/index.js"; import { ToIRContext } from "../codegen/index.js"; import type { Site } from "@helios-lang/compiler-utils"; import type { Word } from "@helios-lang/compiler-utils"; import { TypeParameters } from "./TypeParameters.js"; import { DataField } from "./DataField.js"; import { ImplDefinition } from "./ImplDefinition.js"; //# sourceMappingURL=StructStatement.d.ts.map