aboutsummaryrefslogtreecommitdiff
path: root/include/CommandParser.hpp
blob: dea04c5d78a9fa4af221f037411bdea429043481 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <QtCore/qcontainerfwd.h>
#include <QtCore>

enum CommandType {
  Noop,
  LuaEval,
  Open,
  TabOpen,
  TabNext,
  TabPrev,
};

struct Cmd {
  CommandType command;
  QString argsString;
  QString rawInput;
};

class CommandParser {
public:
  CommandParser();
  Cmd parse(QString command);

private:
  CommandType toCommandType(QString cmd);
};