The Banjo Programming Language is a redesign of C++ that adheres to that language's philosophy, semantics, and (largely) syntax.
Banjo has several external dependencies.
- CMake version 3.0 or greater. This provides the build system for Banjo.
- Boost version 1.55 or later.
- Lingo is a library that provides a number of utilities used by the compiler.
- LLVM is a highly portable and optimizable intermediate
representation for programming languages.
Use the fork feature on github to fork the repo to your page.
Add the original repo to your upstream:
git remote add upstream https://github.com/asutton/banjo.gitRun
git remote -vto make sure the upstream has been added.
To get the latest updates to Banjo:
git fetch upstreamTo merge your local changes, checkout your local master and run:
git merge upstream/masterAfter cloning the repository (or a fork of the repository), go into the directory and run:
git submodule update --init --recursiveThis will pull the required versions of Lingo into your working directory.
Note that if you have a fork of Banjo, you may occasionally need to update the 'lingo' submodule. That can be done using the following command:
git submodule update --remote --mergeThe build is configured by CMake. Within your clone
of the Banjo repository, run the following commands to establish the
build system in the build directory.
mkdir build
cd build
cmake ..It is generally useful to build in debug mode. You can run ccmake to
edit the build configuration.
ccmake ..Set the value of CMAKE_BUILD_TYPE to Debug. Capitalization matters.
Now you can build the compiler:
makeYou can run the test suite by running:
make testIf you want to test the parser, you can use the test_parse program.
It takes the name of a single input file as an argument and prints
information about the parsed program (or errors).
./banjo/test_parse input.banjoWhen lowering LLVM to native assembly on new versions of Mac OS X you may
need to override the system triple to avoid linker warnings. Invoke llc
like this:
llc -mtriple=x86_64-apple-macosx <input>