mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
32 lines
407 B
C++
32 lines
407 B
C++
#include <Parsers/IParserBase.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
namespace ErrorCodes
|
|
{
|
|
extern const int LOGICAL_ERROR;
|
|
}
|
|
|
|
|
|
bool IParserBase::parse(Pos & pos, ASTPtr & node, Expected & expected)
|
|
{
|
|
Pos begin = pos;
|
|
expected.add(pos, getName());
|
|
|
|
bool res = parseImpl(pos, node, expected);
|
|
|
|
/// TODO expected
|
|
|
|
if (!res)
|
|
{
|
|
node = nullptr;
|
|
pos = begin;
|
|
}
|
|
|
|
return res;
|
|
}
|
|
|
|
}
|