Language interpreter written in C++ based on the Crafting Interpreters book. It currently only tested on Windows 11.
- Visual Studio 2022
- Python 3.x
- Clone the repository
git clone https://github.com/Resongeo/DwarfLang- Run the GenerateProject.py file
python .\Tools\GenerateProject.pyYou can call this script from anywhere
- If you run this the first time it will prompt you to download the premake binaries. If its present it will run the
premake5.luascript and generate theDwarfLang.slnfile in the root of the project.
If no args given it will print out some info
> .\Dwarf.exe
> Welcome to the Dwarf Language!You can interpret code straight from the terminal
> .\Dwarf.exe "var a = 10; print(a);"
> 10.000000It is important to put the code between quotes
Of you can provide a file using the -f flag
> .\Dwarf.exe -f .\Test.dw
> 10.000000Test.dw:
var a = 10;
print(a);