| @@ 3522-3528 (lines=7) @@ | ||
| 3519 | } |
|
| 3520 | ||
| 3521 | // match something without consuming it |
|
| 3522 | protected function peek($regex, &$out = null, $from=null) { |
|
| 3523 | if (is_null($from)) $from = $this->count; |
|
| 3524 | $r = '/'.$regex.'/Ais'; |
|
| 3525 | $result = preg_match($r, $this->buffer, $out, null, $from); |
|
| 3526 | ||
| 3527 | return $result; |
|
| 3528 | } |
|
| 3529 | ||
| 3530 | // seek to a spot in the buffer or return where we are on no argument |
|
| 3531 | protected function seek($where = null) { |
|
| @@ 3990-3997 (lines=8) @@ | ||
| 3987 | return $gotWhite; |
|
| 3988 | } |
|
| 3989 | ||
| 3990 | protected function peek($regex, &$out, $from=null) { |
|
| 3991 | if (is_null($from)) $from = $this->count; |
|
| 3992 | ||
| 3993 | $r = '/'.$regex.'/Ais'; |
|
| 3994 | $result = preg_match($r, $this->buffer, $out, null, $from); |
|
| 3995 | ||
| 3996 | return $result; |
|
| 3997 | } |
|
| 3998 | ||
| 3999 | protected function seek($where = null) { |
|
| 4000 | if ($where === null) return $this->count; |
|