Skip to content

Commit

Permalink
Handle end of statement while parsing CASE alias
Browse files Browse the repository at this point in the history
  • Loading branch information
mostertb committed Oct 13, 2018
1 parent f72a44c commit 9cc6cc7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Components/CaseExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ public static function parse(Parser $parser, TokensList $list, array $options =
for (; $list->idx < $list->count; ++$list->idx) {
$token = $list->tokens[$list->idx];

// End of statement.
if ($token->type === Token::TYPE_DELIMITER) {
break;
}
// Skipping whitespaces and comments.
if (($token->type === Token::TYPE_WHITESPACE)
|| ($token->type === Token::TYPE_COMMENT)
Expand Down

0 comments on commit 9cc6cc7

Please sign in to comment.