ClickHouse/src/Parsers/IParserBase.cpp

21 lines
349 B
C++
Raw Normal View History

#include <Parsers/IParserBase.h>
namespace DB
{
bool IParserBase::parse(Pos & pos, ASTPtr & node, Expected & expected)
{
expected.add(pos, getName());
2019-12-01 22:01:05 +00:00
return wrapParseImpl(pos, IncreaseDepthTag{}, [&]
{
2019-12-01 22:01:05 +00:00
bool res = parseImpl(pos, node, expected);
if (!res)
node = nullptr;
return res;
});
}
}