mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 23:06:32 +00:00
14 lines
331 B
TypeScript
14 lines
331 B
TypeScript
import { Lexer } from "./Lexer.ts";
|
|
import { readFileSync } from 'node:fs';
|
|
import { Parser } from "./Parser.ts";
|
|
|
|
|
|
const text = readFileSync("example-no-types.slg").toString()
|
|
|
|
const lexer = new Lexer(text);
|
|
const parser = new Parser(lexer)
|
|
while (!parser.done()) {
|
|
const result = parser.parseExpr()
|
|
console.log(result)
|
|
}
|