| @@ 549-564 (lines=16) @@ | ||
| 546 | * |
|
| 547 | * @return null|Token |
|
| 548 | */ |
|
| 549 | public function parseWhitespace() |
|
| 550 | { |
|
| 551 | $token = $this->str[$this->last]; |
|
| 552 | ||
| 553 | if (! Context::isWhitespace($token)) { |
|
| 554 | return null; |
|
| 555 | } |
|
| 556 | ||
| 557 | while (++$this->last < $this->len && Context::isWhitespace($this->str[$this->last])) { |
|
| 558 | $token .= $this->str[$this->last]; |
|
| 559 | } |
|
| 560 | ||
| 561 | --$this->last; |
|
| 562 | ||
| 563 | return new Token($token, Token::TYPE_WHITESPACE); |
|
| 564 | } |
|
| 565 | ||
| 566 | /** |
|
| 567 | * Parses a comment. |
|
| @@ 961-974 (lines=14) @@ | ||
| 958 | * |
|
| 959 | * @return null|Token |
|
| 960 | */ |
|
| 961 | public function parseUnknown() |
|
| 962 | { |
|
| 963 | $token = $this->str[$this->last]; |
|
| 964 | if (Context::isSeparator($token)) { |
|
| 965 | return null; |
|
| 966 | } |
|
| 967 | ||
| 968 | while (++$this->last < $this->len && ! Context::isSeparator($this->str[$this->last])) { |
|
| 969 | $token .= $this->str[$this->last]; |
|
| 970 | } |
|
| 971 | --$this->last; |
|
| 972 | ||
| 973 | return new Token($token); |
|
| 974 | } |
|
| 975 | ||
| 976 | /** |
|
| 977 | * Parses the delimiter of the query. |
|