mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 06:01:57 +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;
|
|
}
|
|
|
|
}
|