diff options
author | Brad Mostert <mostertb@users.noreply.github.com> | 2018-10-13 15:53:14 +0200 |
---|---|---|
committer | Brad Mostert <mostertb@users.noreply.github.com> | 2018-10-13 15:53:14 +0200 |
commit | 9cc6cc7a51607f9df355a1713d31893aa5e4e53d (patch) | |
tree | 00a0ea5ac7fdd498d1b1a846609ddc64b767a7cc | |
parent | f72a44cfd6266e9448e43bf7c1dcf759ea693a72 (diff) | |
download | sql-parser-9cc6cc7a51607f9df355a1713d31893aa5e4e53d.zip sql-parser-9cc6cc7a51607f9df355a1713d31893aa5e4e53d.tar.gz sql-parser-9cc6cc7a51607f9df355a1713d31893aa5e4e53d.tar.bz2 |
Handle end of statement while parsing CASE alias
-rw-r--r-- | src/Components/CaseExpression.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Components/CaseExpression.php b/src/Components/CaseExpression.php index 7f6af8c..ad6b92a 100644 --- a/src/Components/CaseExpression.php +++ b/src/Components/CaseExpression.php @@ -215,6 +215,10 @@ class CaseExpression extends Component 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) |