fakir/libstd/lib.cpp

27 lines
930 B
C++

#include "commons.hpp"
#include "fun.hpp"
#include "macro.hpp"
extern "C" void lib(Module& mod)
{
mod.register_function("assert=", fkstd::assert_eq);
mod.register_function("println", fkstd::println);
mod.register_function("+", fkstd::add_int);
mod.register_function("-", fkstd::sub_int);
mod.register_function("*", fkstd::mul_int);
mod.register_function("/", fkstd::div_int);
mod.register_function("%", fkstd::mod_int);
mod.register_function("^", fkstd::pow_int);
mod.register_function("<", fkstd::lt);
mod.register_function("<=", fkstd::le);
mod.register_function(">", fkstd::gt);
mod.register_function(">=", fkstd::ge);
mod.register_function("=", fkstd::eq);
mod.register_function("<>", fkstd::ne);
mod.register_macro("assert-static-fail", fkstd::assert_static_fail);
mod.register_macro(":", fkstd::block);
mod.register_macro("$", fkstd::decl);
mod.register_macro("if", fkstd::if_macro);
}