UNPKG

calcium-js

Version:
13 lines (12 loc) 519 B
import { Command } from './command'; import { Element, Operation } from './element'; import { Expression, Reference } from './expression'; import { Statement } from './statement'; export declare abstract class Parser { readonly table: CommandTable; constructor(table: CommandTable); abstract readExpr(elem: Element): Expression; abstract readRef(elem: Operation): Reference; readStmt(stmt: Statement): Command; } export type CommandTable = Map<string, (parser: Parser, stmt: Statement) => Command>;