Fixed code review issues

This commit is contained in:
Maksim Kita 2021-07-23 00:07:22 +03:00
parent 49983883cc
commit 222915c275
3 changed files with 17 additions and 0 deletions

View File

@ -1584,6 +1584,7 @@ bool ParserStringLiteral::parseImpl(Pos & pos, ASTPtr & node, Expected & expecte
{
std::string_view here_doc(pos->begin, pos->size());
size_t heredoc_size = here_doc.find('$', 1) + 1;
assert(heredoc_size != std::string_view::npos);
s = String(pos->begin + heredoc_size, pos->size() - heredoc_size * 2);
}

View File

@ -1,4 +1,11 @@
VALUE
VALUE
\'VALUE\'
$do$ $ doc$ $doc $ $doco$
$do$ $ doc$ $doc $ $doco$ $do$ $ doc$ $doc $ $doco$
ТЕСТ
该类型的引擎
VALUE
VALUE

View File

@ -1,4 +1,13 @@
SELECT $$$$;
SELECT $$VALUE$$;
SELECT $doc$$doc$;
SELECT $doc$VALUE$doc$;
SELECT $doc$'VALUE'$doc$;
SELECT $doc$$do$ $ doc$ $doc $ $doco$$doc$;
SELECT $doc$$do$ $ doc$ $doc $ $doco$$doc$, $doc$$do$ $ doc$ $doc $ $doco$$doc$;
SELECT $doc$ТЕСТ$doc$;
SELECT $doc$$doc$;
SELECT $РАЗДЕЛИТЕЛЬ$VALUE$РАЗДЕЛИТЕЛЬ$;
SELECT $$VALUE$$;