functionalscript
Version:
FunctionalScript is a purely functional subset of JavaScript
15 lines (14 loc) • 480 B
TypeScript
import type { Rule as FRule } from '../module.f.ts';
export type TerminalRange = number;
export type Sequence = readonly string[];
/** A variant of rule names. */
export type Variant = {
readonly [k in string]: string;
};
export type Rule = Variant | Sequence | TerminalRange;
/** The full grammar */
export type RuleSet = Readonly<Record<string, Rule>>;
export declare const toData: (fr: FRule) => readonly [RuleSet, string];
/**
* Either `{ variantItem: id }` or `id`.
*/