UNPKG

tscc-compiler

Version:

An LALR(1) compiler compiler written in Typescript

22 lines (19 loc) 421 B
import { OutputStream } from "./io"; export interface Aligner{ col(s: string): Aligner; row(): Aligner; writeTo(os: OutputStream): void; }; export function align(spaces): Aligner{ var rows: string[][] = [[]]; return { col: function(s: string){ return this; }, row: function(){ return this; }, writeTo: function(os){ } }; }