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

15 lines (12 loc) 369 B
import { oneOf, word } from "@helios-lang/compiler-utils" /** * @typedef {(typeof topLevelKeywords) extends ReadonlyArray<infer T> ? T: never} TopLevelKeyword */ export const topLevelKeywords = /** @type {const} */ ([ "const", "enum", "func", "import", "struct" ]) export const anyTopLevelKeyword = oneOf(topLevelKeywords.map((kw) => word(kw)))