summaryrefslogtreecommitdiff
path: root/kel_cmds/c++
diff options
context:
space:
mode:
Diffstat (limited to 'kel_cmds/c++')
-rw-r--r--kel_cmds/c++/cmd_schema.hpp19
-rw-r--r--kel_cmds/c++/kel_cmds.cpp27
2 files changed, 46 insertions, 0 deletions
diff --git a/kel_cmds/c++/cmd_schema.hpp b/kel_cmds/c++/cmd_schema.hpp
new file mode 100644
index 0000000..472fd9b
--- /dev/null
+++ b/kel_cmds/c++/cmd_schema.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "common.hpp"
+
+namespace kel {
+namespace sch {
+using namespace saw::schema;
+
+using CommandStruct = Struct<
+ Member<Array<String>, "command">
+>;
+
+using Commands = Struct<
+
+>;
+}
+
+
+}
diff --git a/kel_cmds/c++/kel_cmds.cpp b/kel_cmds/c++/kel_cmds.cpp
index 8b13789..b7ea512 100644
--- a/kel_cmds/c++/kel_cmds.cpp
+++ b/kel_cmds/c++/kel_cmds.cpp
@@ -1 +1,28 @@
+#include <forstio/codec/data.hpp>
+#include <iostream>
+
+namespace kel {
+saw::error_or<void> kel_main(int argc, char** argv){
+
+ return saw::make_void();
+}
+}
+
+int main(int argc, char** argv){
+ auto eov = kel::kel_main(argc, argv);
+ if(eov.is_error()){
+ auto& err = eov.get_error();
+ auto err_msg = err.get_message();
+ std::cerr<<"[Error]: "<<err.get_category();
+
+ if(not err_msg.empty()){
+ std::cerr<<" - "<<err_msg;
+ }
+ std::cerr<<std::endl;
+
+ return err.get_id();
+ }
+
+ return 0;
+}