Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,11 @@ public function parse(Parser $parser, TokensList $list)
$this->after($parser, $list, $token);

// #223 Here may make a patch, if last is delimiter, back one
if ($class !== null) {
if ((new $class()) instanceof FunctionCall) {
if ($list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER) {
--$list->idx;
}
}
// TODO: when not supporting PHP 5.3 anymore, replace this by FunctionCall::class.
if ($class === 'PhpMyAdmin\\SqlParser\\Components\\FunctionCall'
&& $list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER
) {
--$list->idx;
}
}

Expand Down