import { Result } from './result.js'; import { Range } from './loc.js'; declare type BracketKind = '(' | '[' | '{'; declare type Sexp = Atom | SList; /** A single atom */ declare type Atom = { tag: 'atom'; single: string; range: Range; toString: () => string; }; declare function atom(range: Range, single: string): Atom; /** An list of sexps */ declare type SList = { tag: 'slist'; list: Sexp[]; range: Range; bracket: BracketKind; toString: () => string; }; declare function slist(range: Range, bracket: BracketKind, list: Sexp[]): SList; declare type Token = { value: string; range: Range; }; declare function tokenize(src: string): Result; declare function tokensToSexp(toks: Token[]): Result; declare function stringToSexp(s: string): Result; declare function tokensToSexps(tokens: Token[]): Result; declare function stringToSexps(s: string): Result; declare function sexpToString(s: Sexp): string; export { Sexp, Atom, SList, atom, slist, Token, tokenize, tokensToSexp, stringToSexp, tokensToSexps, stringToSexps, sexpToString }; //# sourceMappingURL=sexp.d.ts.map