Started a Cobor Virtual Machine implementation for running the code.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "godot_cpp/classes/ref_counted.hpp"
|
||||
|
||||
namespace CoborVM
|
||||
{
|
||||
class CoborVirtualMachine : public godot::RefCounted
|
||||
{
|
||||
GDCLASS(CoborVirtualMachine, godot::RefCounted)
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
CoborVirtualMachine() = default;
|
||||
~CoborVirtualMachine() override = default;
|
||||
|
||||
godot::PackedStringArray parse_source_code(godot::String source_code);
|
||||
};
|
||||
}
|
||||
24
cobor_vm_extension/cobor_vm/include/example_class.hpp
Normal file
24
cobor_vm_extension/cobor_vm/include/example_class.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "godot_cpp/classes/ref_counted.hpp"
|
||||
#include "godot_cpp/classes/wrapped.hpp"
|
||||
#include "godot_cpp/variant/variant.hpp"
|
||||
|
||||
using namespace godot;
|
||||
|
||||
namespace CoborVM
|
||||
{
|
||||
class ExampleClass : public RefCounted
|
||||
{
|
||||
GDCLASS(ExampleClass, RefCounted)
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
ExampleClass() = default;
|
||||
~ExampleClass() override = default;
|
||||
|
||||
void print_type(const Variant &p_variant) const;
|
||||
};
|
||||
}
|
||||
7
cobor_vm_extension/cobor_vm/include/register_types.h
Normal file
7
cobor_vm_extension/cobor_vm/include/register_types.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef COBOR_VM_REGISTER_TYPES_H
|
||||
#define COBOR_VM_REGISTER_TYPES_H
|
||||
|
||||
void initialize_gdextension_types();
|
||||
void uninitialize_gdextension_types();
|
||||
|
||||
#endif // COBOR_VM_REGISTER_TYPES_H
|
||||
Reference in New Issue
Block a user