import { Lexer } from "./Lexer.ts"; import { readFileSync } from 'node:fs'; const text = readFileSync("example.slg").toString() const lexer = new Lexer(text); let token = lexer.next(); while (token !== null) { const value = token.identValue ?? token.intValue ?? token.stringValue ?? ""; console.log(`${token.type}\t${value}`) token = lexer.next(); }