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
makeBootstrap 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
resolveExpressionDotto handleEnum.Case,Struct.Field, andstruct.field resolveExpressionArrowshould 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.Fieldto resolve the symbol of that field for use insizeofandoffsetof - 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
@noreturnattribute - Unused declaration detection
- Add
letkeyword to prevent mutation forloops- Fix C codegen to allow having structs in struct (only pointer work now)
- Floating point number support
- Support inlined functions
- Represent the
Intfamily 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 testfails to compile running it again gives a different, irrelevant error - [advanced] Remove all keywords and define generic concepts such as
conditionalandloop, 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