Added fun_version and env_all as opcodes and some fixes in httpserver. (0.37.30)
This commit is contained in:
parent
17c2b44c1a
commit
a27ff12b08
12 changed files with 126 additions and 6 deletions
14
src/parser.c
14
src/parser.c
|
|
@ -757,6 +757,20 @@ static int emit_primary(Bytecode *bc, const char *src, size_t len, size_t *pos)
|
|||
free(name);
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(name, "env_all") == 0) {
|
||||
(*pos)++; /* '(' */
|
||||
if (!consume_char(src, len, pos, ')')) { parser_fail(*pos, "env_all expects ()"); free(name); return 0; }
|
||||
bytecode_add_instruction(bc, OP_ENV_ALL, 0);
|
||||
free(name);
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(name, "fun_version") == 0) {
|
||||
(*pos)++; /* '(' */
|
||||
if (!consume_char(src, len, pos, ')')) { parser_fail(*pos, "fun_version expects ()"); free(name); return 0; }
|
||||
bytecode_add_instruction(bc, OP_FUN_VERSION, 0);
|
||||
free(name);
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(name, "os_list_dir") == 0) {
|
||||
(*pos)++; /* '(' */
|
||||
if (!emit_expression(bc, src, len, pos)) { parser_fail(*pos, "os_list_dir expects (path)"); free(name); return 0; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue