It's like C, but
- Install command line developer tools (Xcode)
- Install brew
brew cask install mactex
sudo apt-get install texlive-full
- No idea™️
(Optional) Documentation:
cd docs
make
Bootstrap the compiler (bin/bc
):
git checkout bootstrap
./bootstrap.sh [--update] [--keep-old]
While developing:
make clean # Remove build/
make # Build stage1, stage2, and the new bc
make test # Run the new bc against the test cases
make install # Copy build/bc to bin/bc (if the tests pass)
- Add associated functions to enums (similar to values, looked up with symbols)
- Rewrite
resolveExpressionDot
to handleEnum.Case
,Struct.Field
, andstruct.field
resolveExpressionArrow
should dereference the value then callresolveExpressionArrow
- Rvalue/Lvalue (warn about write-only variables)
- Overload functions (with swift labels?)
- Unions + nested struct/union
- Allow
.
to get a struct field (currently only->
on a pointer works) - Allow
Struct.Field
to resolve the symbol of that field for use insizeof
andoffsetof
- Custom operators implemented as functions
- Allow keywords to be used as second-level identifiers (enum cases, struct fields, ...)
- Static arrays (lookup tables)
- Integer conversion for literals
- Convert the C codegen into a module to allow multiple targets
- Escape characters for string and character literals
- Automatic conversion to and from
Void*
,Void**
, etc. - Ensure all paths in a function returns
- Add
@noreturn
attribute - Unused declaration detection
- Add
let
keyword to prevent mutation for
loops- Fix C codegen to allow having structs in struct (only pointer work now)
- Floating point number support
- Support inlined functions
- Represent the
Int
family as structs that wrap hidden primitives (eg.__builtin_int
) - Line comments
- Block comments (with nesting)
- Improve VSCode plugin with compile/debug/autocompletion features
- When
make test
fails to compile running it again gives a different, irrelevant error - [advanced] Remove all keywords and define generic concepts such as
conditional
andloop
, and implement some way to define keywords at compile-time where custom code can be run to interact with the ast during parsing and resolving