libcubescript/src/cs_vm.hh

40 lines
842 B
C++
Raw Normal View History

2021-03-23 23:29:32 +01:00
#ifndef LIBCUBESCRIPT_VM_HH
#define LIBCUBESCRIPT_VM_HH
2016-08-12 18:38:43 +02:00
#include <cubescript/cubescript.hh>
2016-08-12 18:38:43 +02:00
2021-03-23 01:11:21 +01:00
#include "cs_std.hh"
#include "cs_ident.hh"
#include "cs_thread.hh"
2021-05-13 04:48:55 +02:00
#include <utility>
2021-03-23 23:32:25 +01:00
namespace cubescript {
2016-08-12 18:38:43 +02:00
2021-03-24 02:21:27 +01:00
struct break_exception {
2016-09-14 23:24:13 +02:00
};
2021-03-24 02:21:27 +01:00
struct continue_exception {
2016-08-12 18:38:43 +02:00
};
void exec_command(
thread_state &ts, command_impl *id, ident *self, any_value *args,
any_value &res, std::size_t nargs, bool lookup = false
);
2021-05-14 22:42:19 +02:00
void exec_alias(
thread_state &ts, alias *a, any_value *args, any_value &result,
std::size_t callargs, std::size_t &nargs, std::size_t offset,
2021-05-14 22:42:19 +02:00
std::size_t skip, alias_stack &astack
);
2021-05-14 02:54:29 +02:00
any_value exec_code_with_args(thread_state &ts, bcode_ref const &body);
std::uint32_t *vm_exec(
thread_state &ts, std::uint32_t *code, any_value &result
);
2021-03-23 23:32:25 +01:00
} /* namespace cubescript */
2016-08-12 18:38:43 +02:00
2021-03-23 23:29:32 +01:00
#endif /* LIBCUBESCRIPT_VM_HH */