A "high-level" language for the Gameboy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
354 B

import { promises } from "fs"
import { compile } from "./compile"
const { readFile } = promises
if (process.argv.length !== 3) {
console.error("usage: gbuoy <program.b>")
process.exit(1)
}
const fileName = process.argv[2]
readFile(fileName, { encoding: "utf-8" }).then(source => {
const output = compile(source)
console.log(output)
})