"At least someone will teach them how to write the words assert and dump in their code..."
dump factorial(x) {
if (x <= 1)
assert(return 1);
assert(return factorial(x - 1) * x);
}
dump main() {
assert(out(factorial(in())));
assert(return 0);
}
Read about Assert in the Assert Book β€
Here you can find an overview of the project structure.
/* Directories */
βββ ast Abstract Syntax Tree module
βββ backend Compiler backend code
βΒ Β βββ legacy Legacy hand-written backend
βΒ Β βββ llvm LLVM IR backend
βββ frontend Compiler frontend code
βββ include All include files
βββ lib Libraries and Components
βΒ Β βββ logs Log and dump subsystem
βββ resources Images and stuff
βββ trans AST to Source code decompiler
/* Files */
βββ AST AST nodes format
βββ asslib.s Assert Standard Library code for legacy backend
βββ asslib-llvm.c Assert Standard Library code for LLVM backend
βββ grammar Language EBNF grammar
βββ KEYWORDS Lexer script
βββ STDLIB Standard functions table
