aboutsummaryrefslogtreecommitdiff
path: root/include/CommandParser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/CommandParser.hpp')
-rw-r--r--include/CommandParser.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/CommandParser.hpp b/include/CommandParser.hpp
new file mode 100644
index 0000000..128b5f4
--- /dev/null
+++ b/include/CommandParser.hpp
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <QtCore/qcontainerfwd.h>
+#include <QtCore>
+
+enum CommandType {
+ Noop,
+ LuaEval,
+ Open,
+ TabOpen,
+ TabNext,
+ TabPrev,
+};
+
+class Cmd {
+public:
+ CommandType command;
+ QStringList args;
+
+ Cmd(CommandType command = Noop, QStringList args = QStringList())
+ : command(command), args(args) {}
+};
+
+class CommandParser {
+public:
+ CommandParser();
+ Cmd parse(QString command);
+
+private:
+ CommandType toCommandType(QString cmd);
+};