diff options
author | mattkae <mattkae@protonmail.com> | 2022-06-07 08:23:47 -0400 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-06-07 08:23:47 -0400 |
commit | bd18a38c2898548a3664a9ddab9f79c84f2caf4a (patch) | |
tree | 95b9933376770381bd8859782ae763be81c2d72b /elpa/irony-20220110.849/server/src/Command.h | |
parent | b07628dddf418d4f47b858e6c35fd3520fbaeed2 (diff) | |
parent | ef160dea332af4b4fe5e2717b962936c67e5fe9e (diff) |
Merge conflict
Diffstat (limited to 'elpa/irony-20220110.849/server/src/Command.h')
-rw-r--r-- | elpa/irony-20220110.849/server/src/Command.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/elpa/irony-20220110.849/server/src/Command.h b/elpa/irony-20220110.849/server/src/Command.h deleted file mode 100644 index 9f36aa4..0000000 --- a/elpa/irony-20220110.849/server/src/Command.h +++ /dev/null @@ -1,73 +0,0 @@ -/**-*-C++-*- - * \file - * \author Guillaume Papin <guillaume.papin@epitech.eu> - * - * \brief Command parser declarations. - * - * This file is distributed under the GNU General Public License. See - * COPYING for details. - */ - -#ifndef IRONY_MODE_SERVER_COMMAND_H_ -#define IRONY_MODE_SERVER_COMMAND_H_ - -#include "support/CIndex.h" -#include "support/TemporaryFile.h" -#include "Style.h" - -#include <iosfwd> -#include <string> -#include <vector> - -class TemporaryFile; - -// TODO: a tagged union? -struct Command { - Command() { - clear(); - } - - void clear() { - action = Unknown; - flags.clear(); - file.clear(); - unsavedFile.clear(); - dir.clear(); - prefix.clear(); - style = PrefixMatchStyle::Exact; - line = 0; - column = 0; - opt = false; - } - -#define X(sym, str, desc) sym, - enum Action { -#include "Commands.def" - } action; - - std::vector<std::string> flags; - std::string file; - std::string unsavedFile; - std::string dir; - std::string prefix; - PrefixMatchStyle style; - unsigned line; - unsigned column; - bool opt; -}; - -std::ostream &operator<<(std::ostream &os, const Command::Action &action); -std::ostream &operator<<(std::ostream &os, const Command &command); - -class CommandParser { -public: - CommandParser(); - - Command *parse(const std::vector<std::string> &argv); - -private: - Command command_; - TemporaryFile tempFile_; -}; - -#endif // IRONY_MODE_SERVER_COMMAND_H_ |