Skip to content

Latest commit

Β 

History

67 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Logo

Assert programming language

"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 ❀

Project layout

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