blob: 75af7c05e11d624d5895c4310a901678a3cd8f15 [file] [log] [blame]
Václav Kubernát624a8872018-03-02 17:28:47 +01001#include "CParser.hpp"
2
3TooManyArgumentsException::~TooManyArgumentsException() = default;
4
5CParser::CParser(const CTree& tree)
6 : m_tree(tree)
7{
8}
9
10
11Cmd CParser::parseInput(const std::string& line)
12{
13 Cmd args;
14 auto it = line.begin();
15 //bool result = x3::phrase_parse(it, line.end(), command, space, args);
16 //std::cout << "success: " << result << std::endl;
17 if (it != line.end()) {
18 throw TooManyArgumentsException(std::string(it, line.end()));
19 }
20
21
22 return args;
23}