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

36 lines (31 loc) 683 B
import { Scope } from "../scopes/index.js" import { VoidType } from "../typecheck/index.js" import { Expr } from "./Expr.js" /** * @typedef {import("@helios-lang/compiler-utils").Site} Site * @typedef {import("../typecheck/index.js").EvalEntity} EvalEntity */ /** * '()' which can only be used as return type of func */ export class VoidTypeExpr extends Expr { /** * @param {Site} site */ constructor(site) { super(site) } /** * @param {Scope} scope * @returns {EvalEntity} */ evalInternal(scope) { return new VoidType() } /** * @returns {string} */ toString() { return "()" } }