1 | #include <Parsers/IParserBase.h> |
---|---|
2 | |
3 | |
4 | namespace DB |
5 | { |
6 | |
7 | namespace ErrorCodes |
8 | { |
9 | extern const int LOGICAL_ERROR; |
10 | } |
11 | |
12 | |
13 | bool IParserBase::parse(Pos & pos, ASTPtr & node, Expected & expected) |
14 | { |
15 | expected.add(pos, getName()); |
16 | |
17 | return wrapParseImpl(pos, IncreaseDepthTag{}, [&] |
18 | { |
19 | bool res = parseImpl(pos, node, expected); |
20 | if (!res) |
21 | node = nullptr; |
22 | return res; |
23 | }); |
24 | } |
25 | |
26 | } |
27 |