mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
fixes, more stdlib functions (& stdlib binops), printf and etc. temporally disabled
This commit is contained in:
parent
43088ec9f9
commit
3834897b78
5 changed files with 76 additions and 16 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "parser.h"
|
||||
#include "utils.h"
|
||||
|
||||
Bytefile *run_with_imports(Bytefile *root, int argc, char **argv,
|
||||
|
|
@ -50,8 +51,16 @@ enum BUILTIN : uint {
|
|||
BUILTIN_LgetEnv, // 36
|
||||
BUILTIN_Lrandom, // 37
|
||||
BUILTIN_Ltime, // 38
|
||||
BUILTIN_Barray, // 39 // can't be run with run_stdlib_func
|
||||
BUILTIN_NONE, // 40
|
||||
//
|
||||
BUILTIN_LkindOf, // 39
|
||||
BUILTIN_LcompareTags, // 40
|
||||
//
|
||||
#define BUILTIN_NAME(name) BUILTIN_##name,
|
||||
FORALL_BINOP_FUNC(BUILTIN_NAME)
|
||||
#undef BUILTIN_NAME
|
||||
//
|
||||
BUILTIN_Barray, // 41+14 // can't be run with run_stdlib_func
|
||||
BUILTIN_NONE, // 42+14
|
||||
};
|
||||
|
||||
enum BUILTIN id_by_builtin(const char *name);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,23 @@
|
|||
DEF(CMD_BINOP_AND, &&) \
|
||||
DEF(CMD_BINOP_OR, ||)
|
||||
|
||||
// NOTE: includes additional ':' operator
|
||||
#define FORALL_BINOP_FUNC(DEF) \
|
||||
DEF(Ls__Infix_58) \
|
||||
DEF(Ls__Infix_3333) \
|
||||
DEF(Ls__Infix_3838) \
|
||||
DEF(Ls__Infix_6161) \
|
||||
DEF(Ls__Infix_3361) \
|
||||
DEF(Ls__Infix_6061) \
|
||||
DEF(Ls__Infix_60) \
|
||||
DEF(Ls__Infix_6261) \
|
||||
DEF(Ls__Infix_62) \
|
||||
DEF(Ls__Infix_43) \
|
||||
DEF(Ls__Infix_45) \
|
||||
DEF(Ls__Infix_42) \
|
||||
DEF(Ls__Infix_47) \
|
||||
DEF(Ls__Infix_37)
|
||||
|
||||
const char *read_cmd(char *ip, const Bytefile *bf);
|
||||
|
||||
// Bytefile *read_file(const char *fname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue