Files
adminandClaude Opus 5.5 a45e8b2382 Restore Riposte from the copy installed in ReaderJS
The GitHub repository (github.com/Alpaq92/Riposte) is gone with the suspended
account. These are the files npm installed for ReaderJS from commit
307ef7dfd9c5e8c0c07a840874e013cf94a85ada, so this is that commit's packaged content, without its history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:26:53 +01:00

16 lines
550 B
JavaScript

// engine/repl.js — minimal interactive REPL. Run: node engine/repl.js
import readline from 'node:readline';
import { VM } from './vm.js';
const vm = new VM();
const rl = readline.createInterface({ input: process.stdin, output: process.stdout, prompt: 'PS> ' });
process.stdout.write('Riposte REPL — type PostScript, Ctrl+D to exit.\n');
rl.prompt();
rl.on('line', (line) => {
try { vm.runString(line); }
catch (e) { process.stderr.write('%% ' + (e.psname || e.message) + '\n'); }
rl.prompt();
});
rl.on('close', () => process.exit(0));