summary refs log tree commit diff
path: root/source/xi_lib/plugin_register.ml
diff options
context:
space:
mode:
Diffstat (limited to 'source/xi_lib/plugin_register.ml')
-rw-r--r--source/xi_lib/plugin_register.ml16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/xi_lib/plugin_register.ml b/source/xi_lib/plugin_register.ml
new file mode 100644
index 0000000..da7e8a6
--- /dev/null
+++ b/source/xi_lib/plugin_register.ml
@@ -0,0 +1,16 @@
+open Plugin
+
+let register = ref []
+
+let current_file = ref ""
+
+let register_plugin plugin =
+  register := (!current_file, plugin) :: !register
+
+module RegisterPlugin(P:PLUGIN) = struct
+
+  let handle = (module P : PLUGIN)
+
+  let () = register_plugin handle
+
+end
\ No newline at end of file