2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/IParserBase.h>
|
2015-04-14 02:11:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool IParserBase::parse(Pos & pos, ASTPtr & node, Expected & expected)
|
2015-04-14 02:11:59 +00:00
|
|
|
{
|
2017-07-13 04:20:56 +00:00
|
|
|
expected.add(pos, getName());
|
2015-04-14 02:11:59 +00:00
|
|
|
|
2019-12-01 22:01:05 +00:00
|
|
|
return wrapParseImpl(pos, IncreaseDepthTag{}, [&]
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2019-12-01 22:01:05 +00:00
|
|
|
bool res = parseImpl(pos, node, expected);
|
|
|
|
if (!res)
|
|
|
|
node = nullptr;
|
|
|
|
return res;
|
|
|
|
});
|
2015-04-14 02:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|