7e46c07cca
typechecking still buggy, but close enough cause i cant handle any more typechecker dev added: - Functions - Constants - Better file positions for error reporting - Better error reporting, with examples being drawn in term -MC
15 lines
302 B
Plaintext
15 lines
302 B
Plaintext
|
|
// Assert implementation
|
|
// args: [condition, str_len, str_ptr]
|
|
// @arg condition: Bool
|
|
// @arg str_len: Int
|
|
// @arg str_ptr: Ptr
|
|
// @ret NULL/NEVER
|
|
fn assert with bool int ptr returns void then
|
|
rot
|
|
if else
|
|
"Assert failed: \"" eputs eputs
|
|
"\". Exiting!\n" eputs
|
|
1 exit
|
|
end
|
|
done |