Files
c2/README.md

34 lines
902 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# C2
C2 is a programming language based on C.
It adds modern high-level features such as metaprogramming, generics, etc,
but compiles down to C89.
## Building
To build the c2compiler, simply run `make` or `make all`.
This will build the compiler and run the tests.
In order to only build the compiler, run `make c2`.
In order to run the tests, run `make test`.
## Versioning
The current version is v0. Its source code lives in the `v0` directory.
## Testing
### Unit Tests
Run unit tests with:
```bash
make test
```
### Integration Tests
Integration tests compare the compiler output with expected C files.
To add a new integration test, create a new directory under `v0/integration_tests/` with `input.c2` and `expected.c` files.
Run integration tests with:
```bash
make integration-test
```
## Languages Specifications
See the specs directory for information on the actual language syntax.