c1106d8e66830933da4549024fbad1a3f8030236
The tokenstream_open function now takes a Buffer* parameter instead of a file path string, making the API more flexible and allowing the caller to manage buffer lifetime. The tokenstream_close function continues to close the underlying buffer as documented. - Changed tokenstream_open signature from (const char* path) to (Buffer* buffer) - Updated implementation to accept and use the provided buffer directly - Updated all tests to open buffers separately and pass them to tokenstream_open - Added #include "buffer.h" to token.h for Buffer type definition - All 15 tests pass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 c2–compiler, 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.
Languages Specifications
See the specs directory for information on the actual language syntax.
Description
Languages
C
96.5%
Makefile
3.5%