Options
All
  • Public
  • Public/Protected
  • All
Menu

@thi.ng/sexpr

Index

Type aliases

ASTNode

ASTNode: Root | Expression | Sym | Str | Numeric

NodeType

NodeType: "root" | "expr" | "sym" | "str" | "num"

Variables

Const DEFAULT_SYNTAX

DEFAULT_SYNTAX: SyntaxOpts = ...

Functions

Const parse

  • Takes a src string or Token iteratable and parses it into an AST, then returns tree's root node. Throws ParseError if the token order causes illegal nesting. The error includes line and column information of the offending token.

    Parameters

    Returns Root

Const runtime

  • runtime<IMPL, ENV, RES>(impls: Partial<IMPL>): MultiFn1O<ASTNode, ENV, RES>

tokenize

  • tokenize(src: Iterable<string>, opts?: Partial<SyntaxOpts>): IterableIterator<Token>

Generated using TypeDoc