This project is me experimenting with creating my own programming language. For this project I am using C++23.
Crow's syntax is somewhat inspired by Swift and Rust. In this programming language expressions are not statements. This allows us to write code without any need for semicolons.
Here is a snippet (printing is not yet implemented):
fn main() -> int {
let sum = 10 + 10
return sum
}
In order to compile the project you will need to following dependencies:
- C++ compiler with support for C++23
- Invoke (Used to invoke CMake and scripts)
- Cmake (Main buildsysstem)
- CLI11 (CLI option parsing library)
- rang (cross platform terminal coloring library)
- tabulate (Text table library)
- Boost (Utility libraries for C++)
- LLVM (LLVM is used for code generation and optimization)
- libclang (libclang for compiling C++ sources (part of the LLVM project.))
- cereal (Serialization library used for the AST)
- libassert (Modern assertion library for compile and runtime assertion checking)
In order to compile the project you will need invoke
, clang
and cmake
.
You can install most of the dependencies with the following aptitude command:
apt install -y pipx clang cmake extra-cmake-modules
In order to make use of invoke you should install it through pipx
:
pipx install invoke
Rang and tabulate are downloaded using CMake and statically linked. CLI11, Boost, LLVM and libclang are dynamically linked (CMake searches for it on your system). You can install the dependencies with the following aptitude command:
apt install -y libcurl4 libcli11-dev llvm-17-dev libclang-17-dev liblld-17-dev libboost-all-dev libzstd-dev
cmake/
: Non code related assets like images.cmake/
: Cmake sources that are needed to build the project.src/
: Sources of the Crow project.tests/
: Unit tests of the Crow project.samples/
: Crow sources that can be compiled to demonstrate the functionalities of Crow.tools/
: Collection of tools and scripts, that aid development.