.
This commit is contained in:
4
src/vm.h
4
src/vm.h
@@ -34,6 +34,9 @@ public:
|
||||
// Register native functions
|
||||
void register_native_function(const std::string& name, NativeFunction func);
|
||||
|
||||
// Register built-in classes for types (like list, map)
|
||||
void register_builtin_class(const std::string& type_name, std::shared_ptr<ClassValue> klass);
|
||||
|
||||
// Global variable access
|
||||
void set_global(const std::string& name, ValuePtr value);
|
||||
ValuePtr get_global(const std::string& name);
|
||||
@@ -48,6 +51,7 @@ private:
|
||||
std::vector<CallFrame> frames;
|
||||
CallFrame* current_frame;
|
||||
std::map<std::string, ValuePtr> globals;
|
||||
std::map<std::string, std::shared_ptr<ClassValue>> builtin_classes;
|
||||
std::string error_message;
|
||||
|
||||
// Main execution loop
|
||||
|
||||
Reference in New Issue
Block a user