Mercurial > lbo > hg > ylisp
view src/built-ins.h @ 163:2448ebe4a586
built-ins: Allow setting separate output stream.
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Tue, 03 Sep 2019 17:16:49 +0200 |
parents | 63650268d006 |
children | 263256062455 |
line wrap: on
line source
#ifndef src_built_ins_h #define src_built_ins_h #include "eval.h" #include "expr.h" #include "types.h" #include "base/vec.h" /** * @file built-ins.h * @addtogroup language * @{ */ /** * @brief Return a string representation of a built-in. */ const char* ybuiltin_name(YBUILTIN_TYPE t); /** * @brief If possible, make an ID (in a parse tree) into a built-in reference. */ bool ybuiltin_translate(yexpr_t* expr); /** * @brief Run a built-in function. The caller assumes ownership of the returned value. */ yexpr_t ybuiltin_run(YBUILTIN_TYPE t, yeval_state_t* state); /** * @brief Set standard output for output built-ins. * * TODO: Figure out a more general way for I/O. */ void ybuiltin_set_output(FILE* out); /** * @} */ #endif