Skip to content

Instantly share code, notes, and snippets.

@resnickj
resnickj / lisp.js
Created July 22, 2026 00:41
Lisp Parser
import * as readline from 'node:readline/promises';
import { stdin as input, stdout as output } from 'node:process';
const TokenType = Object.freeze({
EOI: 0, // End-of-input
LEFT_PAREN: 1,
RIGHT_PAREN: 2,
NUMBER: 3,
SYMBOL: 4,
});