| @@ 239-243 (lines=5) @@ | ||
| 236 | // Only keywords are relevant here. Other parts of the query are |
|
| 237 | // processed in the functions below. |
|
| 238 | if ($token->type !== Token::TYPE_KEYWORD) { |
|
| 239 | if (($token->type !== TOKEN::TYPE_COMMENT) |
|
| 240 | && ($token->type !== Token::TYPE_WHITESPACE) |
|
| 241 | ) { |
|
| 242 | $parser->error('Unexpected token.', $token); |
|
| 243 | } |
|
| 244 | continue; |
|
| 245 | } |
|
| 246 | ||
| @@ 186-191 (lines=6) @@ | ||
| 183 | } |
|
| 184 | ||
| 185 | if ($state === 0) { |
|
| 186 | if ($token->type === Token::TYPE_KEYWORD |
|
| 187 | && $token->keyword !== 'INTO' |
|
| 188 | ) { |
|
| 189 | $parser->error('Unexpected keyword.', $token); |
|
| 190 | break; |
|
| 191 | } |
|
| 192 | ||
| 193 | ++$list->idx; |
|
| 194 | $this->into = IntoKeyword::parse( |
|
| @@ 152-157 (lines=6) @@ | ||
| 149 | } |
|
| 150 | ||
| 151 | if ($state === 0) { |
|
| 152 | if ($token->type === Token::TYPE_KEYWORD |
|
| 153 | && $token->keyword !== 'INTO' |
|
| 154 | ) { |
|
| 155 | $parser->error('Unexpected keyword.', $token); |
|
| 156 | break; |
|
| 157 | } |
|
| 158 | ++$list->idx; |
|
| 159 | $this->into = IntoKeyword::parse( |
|
| 160 | $parser, |
|
| @@ 115-123 (lines=9) @@ | ||
| 112 | } |
|
| 113 | $state = 1; |
|
| 114 | } elseif ($state === 1) { |
|
| 115 | if ($token->type === Token::TYPE_KEYWORD && $token->keyword === 'TO') { |
|
| 116 | $state = 2; |
|
| 117 | } else { |
|
| 118 | $parser->error( |
|
| 119 | 'Keyword "TO" was expected.', |
|
| 120 | $token |
|
| 121 | ); |
|
| 122 | break; |
|
| 123 | } |
|
| 124 | } elseif ($state === 2) { |
|
| 125 | $expr->new = Expression::parse( |
|
| 126 | $parser, |
|