This repository has been archived on 2024-03-07. You can view files and clone it, but cannot push or open issues/pull-requests.
2023-09-18 15:33:04 +00:00
|
|
|
#include "common.hpp"
|
|
|
|
#include "fun.hpp"
|
2023-09-18 17:08:32 +00:00
|
|
|
#include "macro.hpp"
|
|
|
|
#include "../src/types.hpp"
|
2023-09-18 15:33:04 +00:00
|
|
|
|
|
|
|
extern "C" void lib(Zarn& zarn)
|
|
|
|
{
|
|
|
|
zarn.register_function("println",
|
|
|
|
std::make_shared<Prototype>()
|
|
|
|
->param_any()
|
|
|
|
->param_variadic()
|
|
|
|
->ret(TYPE_NIL),
|
|
|
|
println);
|
|
|
|
|
|
|
|
zarn.register_function("assert=",
|
|
|
|
std::make_shared<Prototype>()
|
|
|
|
->param_any()
|
|
|
|
->param_any()
|
|
|
|
->ret(TYPE_NIL),
|
|
|
|
assert_eq);
|
2023-09-18 17:08:32 +00:00
|
|
|
|
|
|
|
zarn.register_macro("assert-fail", assert_fail);
|
2023-09-18 15:33:04 +00:00
|
|
|
}
|