summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix2
-rw-r--r--kel_cmds/.gitignore1
-rw-r--r--kel_cmds/c++/cmd_schema.hpp19
-rw-r--r--kel_cmds/c++/kel_cmds.cpp27
4 files changed, 48 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index 890fccd..55824d0 100644
--- a/default.nix
+++ b/default.nix
@@ -1,5 +1,5 @@
{ pkgs ? import <nixpkgs> {}
-, llvmPackages ? pkgs.llvmPackages_21
+, llvmPackages ? pkgs.llvmPackages_20
, stdenv ? llvmPackages.stdenv
, clang-tools ? llvmPackages.clang-tools
}:
diff --git a/kel_cmds/.gitignore b/kel_cmds/.gitignore
new file mode 100644
index 0000000..fcfc4a1
--- /dev/null
+++ b/kel_cmds/.gitignore
@@ -0,0 +1 @@
+result*
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;
+}