UNPKG

calcium-js

Version:
18 lines 474 B
import { CommandNotDefined } from './error'; import { Index } from './statement'; export class Parser { constructor(table) { this.table = table; } readStmt(stmt) { const keyword = stmt[Index.Command]; const generator = this.table.get(keyword); if (generator) { return generator(this, stmt); } else { throw new CommandNotDefined(keyword); } } } //# sourceMappingURL=parser.js.map