```
milovidov-desktop :) SELECT -1::INT

Syntax error: failed at position 10 ('::')
```
{
    
    
    ASTPtr expr_node;
    ASTPtr type_node;
    if (ParserKeyword("CAST").ignore(pos, expected)
        && ParserToken(TokenType::OpeningRoundBracket).ignore(pos, expected)
        && ParserExpression().parse(pos, expr_node, expected)
        && ParserKeyword("AS").ignore(pos, expected)
        && ParserDataType().parse(pos, type_node, expected)
        && ParserToken(TokenType::ClosingRoundBracket).ignore(pos, expected))
    {
        node = createFunctionCast(expr_node, type_node);
        return true;
    }
    return false;
}
bool ParserSubstringExpression::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)