Skip to content

Commit 9cc6cc7

Browse files
committed
Handle end of statement while parsing CASE alias
1 parent f72a44c commit 9cc6cc7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/Components/CaseExpression.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ public static function parse(Parser $parser, TokensList $list, array $options =
215215
for (; $list->idx < $list->count; ++$list->idx) {
216216
$token = $list->tokens[$list->idx];
217217

218+
// End of statement.
219+
if ($token->type === Token::TYPE_DELIMITER) {
220+
break;
221+
}
218222
// Skipping whitespaces and comments.
219223
if (($token->type === Token::TYPE_WHITESPACE)
220224
|| ($token->type === Token::TYPE_COMMENT)

0 commit comments

Comments
 (0)