| @@ 908-921 (lines=14) @@ | ||
| 905 | * |
|
| 906 | * @return null|Token |
|
| 907 | */ |
|
| 908 | public function parseUnknown() |
|
| 909 | { |
|
| 910 | $token = $this->str[$this->last]; |
|
| 911 | if (Context::isSeparator($token)) { |
|
| 912 | return null; |
|
| 913 | } |
|
| 914 | ||
| 915 | while (++$this->last < $this->len && !Context::isSeparator($this->str[$this->last])) { |
|
| 916 | $token .= $this->str[$this->last]; |
|
| 917 | } |
|
| 918 | --$this->last; |
|
| 919 | ||
| 920 | return new Token($token); |
|
| 921 | } |
|
| 922 | ||
| 923 | /** |
|
| 924 | * Parses the delimiter of the query. |
|
| @@ 506-521 (lines=16) @@ | ||
| 503 | * |
|
| 504 | * @return null|Token |
|
| 505 | */ |
|
| 506 | public function parseWhitespace() |
|
| 507 | { |
|
| 508 | $token = $this->str[$this->last]; |
|
| 509 | ||
| 510 | if (!Context::isWhitespace($token)) { |
|
| 511 | return null; |
|
| 512 | } |
|
| 513 | ||
| 514 | while (++$this->last < $this->len && Context::isWhitespace($this->str[$this->last])) { |
|
| 515 | $token .= $this->str[$this->last]; |
|
| 516 | } |
|
| 517 | ||
| 518 | --$this->last; |
|
| 519 | ||
| 520 | return new Token($token, Token::TYPE_WHITESPACE); |
|
| 521 | } |
|
| 522 | ||
| 523 | /** |
|
| 524 | * Parses a comment. |
|