summaryrefslogtreecommitdiffstats
path: root/src/Statement.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Statement.php')
-rw-r--r--src/Statement.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Statement.php b/src/Statement.php
index 4eb3ccb..277942d 100644
--- a/src/Statement.php
+++ b/src/Statement.php
@@ -195,6 +195,11 @@ abstract class Statement
// Only keywords are relevant here. Other parts of the query are
// processed in the functions below.
if ($token->type !== Token::TYPE_KEYWORD) {
+ if (($token->type !== TOKEN::TYPE_COMMENT)
+ && ($token->type !== Token::TYPE_WHITESPACE)
+ ) {
+ $parser->error('Unexpected token.', $token);
+ }
continue;
}