mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
stdlib tester, fixes, switch to builtins as pseudo functions (use call), remove negative closure offset possibility
This commit is contained in:
parent
905632aab6
commit
43088ec9f9
10 changed files with 321 additions and 131 deletions
|
|
@ -11,47 +11,47 @@ Bytefile *run_with_imports(Bytefile *root, int argc, char **argv,
|
|||
// ---
|
||||
|
||||
enum BUILTIN : uint {
|
||||
BUILTIN_Luppercase,
|
||||
BUILTIN_Llowercase,
|
||||
BUILTIN_Lassert,
|
||||
BUILTIN_Lstring,
|
||||
BUILTIN_Llength,
|
||||
BUILTIN_LstringInt,
|
||||
BUILTIN_Lread,
|
||||
BUILTIN_Lwrite,
|
||||
BUILTIN_LmakeArray,
|
||||
BUILTIN_LmakeString,
|
||||
BUILTIN_Lstringcat,
|
||||
BUILTIN_LmatchSubString,
|
||||
BUILTIN_Lsprintf,
|
||||
BUILTIN_Lsubstring,
|
||||
BUILTIN_Li__Infix_4343, // ++
|
||||
BUILTIN_Lclone,
|
||||
BUILTIN_Lhash,
|
||||
BUILTIN_LtagHash,
|
||||
BUILTIN_Lcompare,
|
||||
BUILTIN_LflatCompare,
|
||||
BUILTIN_Lfst,
|
||||
BUILTIN_Lsnd,
|
||||
BUILTIN_Lhd,
|
||||
BUILTIN_Ltl,
|
||||
BUILTIN_Lprintf,
|
||||
BUILTIN_LreadLine,
|
||||
BUILTIN_Lfopen,
|
||||
BUILTIN_Lfclose,
|
||||
BUILTIN_Lfread,
|
||||
BUILTIN_Lfwrite,
|
||||
BUILTIN_Lfexists,
|
||||
BUILTIN_Lfprintf,
|
||||
BUILTIN_Lregexp,
|
||||
BUILTIN_LregexpMatch,
|
||||
BUILTIN_Lfailure,
|
||||
BUILTIN_Lsystem,
|
||||
BUILTIN_LgetEnv,
|
||||
BUILTIN_Lrandom,
|
||||
BUILTIN_Ltime,
|
||||
BUILTIN_Barray, // can't be run with run_stdlib_func
|
||||
BUILTIN_NONE,
|
||||
BUILTIN_Luppercase, // 0
|
||||
BUILTIN_Llowercase, // 1
|
||||
BUILTIN_Lassert, // 2
|
||||
BUILTIN_Lstring, // 3
|
||||
BUILTIN_Llength, // 4
|
||||
BUILTIN_LstringInt, // 5
|
||||
BUILTIN_Lread, // 6
|
||||
BUILTIN_Lwrite, // 7
|
||||
BUILTIN_LmakeArray, // 8
|
||||
BUILTIN_LmakeString, // 9
|
||||
BUILTIN_Lstringcat, // 10
|
||||
BUILTIN_LmatchSubString, // 11
|
||||
BUILTIN_Lsprintf, // 12
|
||||
BUILTIN_Lsubstring, // 13
|
||||
BUILTIN_Li__Infix_4343, // 14 // ++
|
||||
BUILTIN_Lclone, // 15
|
||||
BUILTIN_Lhash, // 16
|
||||
BUILTIN_LtagHash, // 17
|
||||
BUILTIN_Lcompare, // 18
|
||||
BUILTIN_LflatCompare, // 19
|
||||
BUILTIN_Lfst, // 20
|
||||
BUILTIN_Lsnd, // 21
|
||||
BUILTIN_Lhd, // 22
|
||||
BUILTIN_Ltl, // 23
|
||||
BUILTIN_Lprintf, // 24
|
||||
BUILTIN_LreadLine, // 25
|
||||
BUILTIN_Lfopen, // 26
|
||||
BUILTIN_Lfclose, // 27
|
||||
BUILTIN_Lfread, // 28
|
||||
BUILTIN_Lfwrite, // 29
|
||||
BUILTIN_Lfexists, // 30
|
||||
BUILTIN_Lfprintf, // 31
|
||||
BUILTIN_Lregexp, // 32
|
||||
BUILTIN_LregexpMatch, // 33
|
||||
BUILTIN_Lfailure, // 34
|
||||
BUILTIN_Lsystem, // 35
|
||||
BUILTIN_LgetEnv, // 36
|
||||
BUILTIN_Lrandom, // 37
|
||||
BUILTIN_Ltime, // 38
|
||||
BUILTIN_Barray, // 39 // can't be run with run_stdlib_func
|
||||
BUILTIN_NONE, // 40
|
||||
};
|
||||
|
||||
enum BUILTIN id_by_builtin(const char *name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue