This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('node:fs'); | |
const input = String.fromCharCode(...fs.readFileSync(0)).split('\n'); | |
const source = fs.readFileSync('source.knight', 'utf8'); | |
const Knight = (() => { | |
let inputs = []; | |
let output = ''; | |
class KnightError extends Error {} | |
class ParseError extends KnightError {} | |
class RuntimeError extends KnightError {} |