UNPKG

@zsnout/ithkuil

Version:

A set of tools which can generate and parse romanized Ithkuil text and which can generate Ithkuil script from text and JSON data.

36 lines (35 loc) 1.68 kB
import type { PartialFormative } from "../../generate/formative/index.js"; import { type Stress } from "../transform.js"; /** * Builds a non-shortcut formative. * * @param word The word to be built. * @param stress The stress of the formative. * @returns Either a parsed `PartialFormative` indicating a success, or * `undefined` indicating a tokenization failure. Throws if the formative was * successfully tokenized but had another error in it (e.g. invalid Vn slot, * invalid referential affix, etc.). */ export declare function buildNonShortcutFormative(word: string, stress: Stress): PartialFormative | undefined; /** * Builds a formative with a Cn shortcut (where Cn replaces Ca). * * @param word The word to be built. * @param stress The stress of the formative. * @returns Either a parsed `PartialFormative` indicating a success, or * `undefined` indicating a tokenization failure. Throws if the formative was * successfully tokenized but had another error in it (e.g. invalid Vn slot, * invalid referential affix, etc.). */ export declare function buildCnShortcutFormative(word: string, stress: Stress): PartialFormative | undefined; /** * Builds a shortcut formative. * * @param word The word to be built. * @param stress The stress of the formative. * @returns Either a parsed `PartialFormative` indicating a success, or * `undefined` indicating a tokenization failure. Throws if the formative was * successfully tokenized but had another error in it (e.g. invalid Vn slot, * invalid referential affix, etc.). */ export declare function buildShortcutFormative(word: string, stress: Stress): PartialFormative | undefined;