IParser: Set to vector

This commit is contained in:
Raúl Marín 2021-11-29 10:47:12 +01:00
parent 964203e712
commit e9ae49c68b

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <set>
#include <memory> #include <memory>
#include <vector>
#include <Core/Defines.h> #include <Core/Defines.h>
#include <Parsers/IAST_fwd.h> #include <Parsers/IAST_fwd.h>
@ -25,7 +25,7 @@ namespace ErrorCodes
struct Expected struct Expected
{ {
const char * max_parsed_pos = nullptr; const char * max_parsed_pos = nullptr;
std::set<const char *> variants; std::vector<const char *> variants;
/// 'description' should be statically allocated string. /// 'description' should be statically allocated string.
void add(const char * current_pos, const char * description) void add(const char * current_pos, const char * description)
@ -37,7 +37,7 @@ struct Expected
} }
if (!max_parsed_pos || current_pos >= max_parsed_pos) if (!max_parsed_pos || current_pos >= max_parsed_pos)
variants.insert(description); variants.push_back(description);
} }
void add(TokenIterator it, const char * description) void add(TokenIterator it, const char * description)