@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
39 lines • 1.4 kB
TypeScript
/**
* `entryPointIndex` is the index in the `statements` array of the `main` function
* `entryPointIndex` is set to -1 for modules
* If a `main` function isn't found for a non-module script an error is thrown
* @typedef {{
* purpose: Word
* name: Word
* statements: Statement[]
* entryPointIndex: number
* }} ParsedScript
*/
/**
* @param {string | Source} src
* @param {ErrorCollector | undefined} errorCollector
* @returns {ParsedScript}
*/
export function parseScript(src: string | Source, errorCollector?: ErrorCollector | undefined): ParsedScript;
/**
* @param {string | Source} rawSrc
* @returns {Source}
*/
export function createSource(rawSrc: string | Source): Source;
/**
* `entryPointIndex` is the index in the `statements` array of the `main` function
* `entryPointIndex` is set to -1 for modules
* If a `main` function isn't found for a non-module script an error is thrown
*/
export type ParsedScript = {
purpose: Word;
name: Word;
statements: Statement[];
entryPointIndex: number;
};
export type ScriptPurpose = import("./ScriptPurpose.js").ScriptPurpose;
import type { Source } from "@helios-lang/compiler-utils";
import type { ErrorCollector } from "@helios-lang/compiler-utils";
import type { Word } from "@helios-lang/compiler-utils";
import { Statement } from "../statements/index.js";
//# sourceMappingURL=parseScript.d.ts.map