@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
77 lines • 2.54 kB
TypeScript
/**
* @import { Site, Word } from "@helios-lang/compiler-utils"
* @typedef {import("@helios-lang/ir").SourceMappedStringI} SourceMappedStringI
* @typedef {import("@helios-lang/uplc").UplcData} UplcData
* @typedef {import("../codegen/index.js").Definitions} Definitions
* @typedef {import("../typecheck/index.js").DataType} DataType
* @typedef {import("../typecheck/index.js").EvalEntity} EvalEntity
*/
/**
* Const value statement
*/
export class ConstStatement extends Statement {
/**
* @param {Site} site
* @param {Word} name
* @param {Expr | undefined} typeExpr - can be null in case of type inference
* @param {Expr | undefined} valueExpr
*/
constructor(site: Site, name: Word, typeExpr: Expr | undefined, valueExpr: Expr | undefined);
/**
* @private
* @readonly
* @type {Expr | undefined}
*/
private readonly _typeExpr;
/**
* @private
* @type {Expr | undefined}
*/
private _valueExpr;
/**
* @type {DataType}
*/
get type(): import("../typecheck/common.js").DataType;
/**
* @returns {boolean}
*/
isSet(): boolean;
/**
* Use this to change a value of something that is already typechecked.
* @param {UplcData} data
*/
changeValueSafe(data: UplcData): void;
/**
* @param {Scope} scope
* @returns {DataType}
*/
evalType(scope: Scope): DataType;
/**
* @param {Scope} scope
* @returns {EvalEntity}
*/
evalInternal(scope: Scope): EvalEntity;
/**
* Evaluates rhs and adds to scope
* @param {TopScope} scope
*/
eval(scope: TopScope): void;
/**
* @param {ToIRContext} ctx
* @returns {SourceMappedStringI}
*/
toIRInternal(ctx: ToIRContext): SourceMappedStringI;
}
export type SourceMappedStringI = import("@helios-lang/ir").SourceMappedStringI;
export type UplcData = import("@helios-lang/uplc").UplcData;
export type Definitions = import("../codegen/index.js").Definitions;
export type DataType = import("../typecheck/index.js").DataType;
export type EvalEntity = import("../typecheck/index.js").EvalEntity;
import { Statement } from "./Statement.js";
import { Scope } from "../scopes/index.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 { Expr } from "../expressions/index.js";
//# sourceMappingURL=ConstStatement.d.ts.map