UNPKG

@thi.ng/sexpr

Version:

Extensible S-Expression parser & runtime infrastructure

17 lines 648 B
import { type Root, type SyntaxOpts, type Token } from "./api.js"; export declare class ParseError extends Error { line: number; col: number; constructor(msg: string, line: number, col: number); } /** * Takes a `src` string or {@link Token} iteratable and parses it into * an AST, then returns tree's root node. Throws {@link ParseError} if * the token order causes illegal nesting. The error includes `line` and * `column` information of the offending token. * * @param src - * @param opts - */ export declare const parse: (src: string | Iterable<Token>, opts?: Partial<SyntaxOpts>) => Root; //# sourceMappingURL=parse.d.ts.map