The Fox Programming Language: A statically typed scripting language designed for simplicity and embeddability
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
includes/Fox [TypeBase] Removing unwrapIfArray Feb 20, 2019
.gitattributes Add .gitignore and .gitattributes. Nov 8, 2017
CMakeLists.txt Check GoogleTest directly in the repo instead of downloading it throu… Feb 13, 2019
CMakeSettings.json Dropping the "Moonshot" name. Now only using "Fox" Jan 6, 2019

The Fox Programming Language

Fox is a language that aims to be easily embeddable in other projects and easy to dive into. In Fox, you won't see any complicated or confusing semantics. Everything should be clear at a glance!

Note: This is currently a work in progress, only a fraction of the project is completed.

Building the project


  • CMake
  • Git
  1. Open the command prompt and set your working directory to the folder where you wish to build the Fox interpreter.
  2. Clone the repo
    • git clone
  3. Create a new directory and set it as your working directory (we'll do an out of source build)
    • mkdir build
    • cd build
  4. Generate the CMake cache cmake ../Fox
  5. Building the project: cmake --build .
    • The executables will be available in the bin/(Build Type)/ folder.


Note: the project is in early development and thus is changing very rapidly. I won't document everything because things are certainly not definitive, but I'll try to keep this as up to date as I can

Note: Currently, only the Lexer, Parser and a small part of the Semantic analysis are complete, so files aren't executed and are just "compiled" with what's available.

Assuming that the binaries are installed in your path:

  • fox will launch the "command line interface", which is a quick and easy way to test the interpreter. The interface is really simple: you can only enter paths to files for the interpreter to process. (This is only a testing tool. For more advanced use, invoke the compiler using command line options (see below))
  • fox path/to/ will process the given file. Errors and diagnostics will be printed to stdout, and the command line tool will return EXIT_SUCCESS if the file was processed without any diagnostic being emitted (it'll return EXIT_FAILURE otherwise). Several options can be passed to the command line tool.
    • -verify enables verify mode (See Testing))
    • -werr promotes warnings to errors
    • -dump-ast will dump the abstract syntax tree (AST) after processing the file.




Licensed under the terms of the MIT license.


If you have any questions don't hesitate to send me a mail at

Project structure

  • /includes/ Contains the headers
  • /lib/ Contains the source code/implementation
  • /tools/ Contains the main.cpp, compiles to fox.exe
  • /tests/ "Runnable" language test programs which use the -verify mode and (in the future) File-Checking utilities.
  • /unittests/ Unit tests powered by GoogleTest which tests utilities (/Common) of the project and some parts of the pipeline. (Including the lexer)
  • /docs/ Documentation
  • /thirdparty/ Source code of external libraries used by the project.


  • CLang and Swift
    • These well written open source projects have been of immense help when I was in doubt, or in need of help. I've spent countless hours digging through the source code of Swift and Clang, and that helped me improve my programming and compiler designing skills. The design of the Fox interpreter has been highly influenced by the design of theses compilers.