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

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