A bytecode compiler and interpreter written in zig.
Build debug
zig buildWill generate
blitzc-debug: compilerblitz-debug: virtual machinebzc-objdump-debug: bytecode disassemblerblitz-diff: bytecode diff utility
Make prod
zig build -DprodWill generate
blitzc: compilerblitz: virtual machinebzc-objdump: bytecode disassemblerblitz-diff: bytecode diff utility
Run all test files
Runs from blitzc-debug exe. Expected to have been built already
./testCompile debug and run all test files
Compiles with zig build in debug mode. Runs from blitzc-debug exe.
./test -cRun specific test file
Runs from zig build run-compiler ...
./test [file name]Run a file that matches a pattern
Use the -p flag to match any file that contains the next argument, runs from zig build run-compiler ...
./test -p structsIf you clone to experiment, it might be helpful to source the env.sh file. It adds the bin directory to the path so you have easier access to the executables.
You must also set the environment variable BLITZ_DIR to the root directory of the blitz source
Example:
BLITZ_DIR = "/home/name/code/blitz"By Jackson Otto