| @@ 3393-3408 (lines=16) @@ | ||
| 3390 | ||
| 3391 | // a bunch of guards that are and'd together | |
| 3392 | // TODO rename to guardGroup | |
| 3393 | 	protected function guardGroup(&$guardGroup) { | |
| 3394 | $s = $this->seek(); | |
| 3395 | $guardGroup = array(); | |
| 3396 | 		while ($this->guard($guard)) { | |
| 3397 | $guardGroup[] = $guard; | |
| 3398 | 			if (!$this->literal("and")) break; | |
| 3399 | } | |
| 3400 | ||
| 3401 | 		if (count($guardGroup) == 0) { | |
| 3402 | $guardGroup = null; | |
| 3403 | $this->seek($s); | |
| 3404 | return false; | |
| 3405 | } | |
| 3406 | ||
| 3407 | return true; | |
| 3408 | } | |
| 3409 | ||
| 3410 | 	protected function guard(&$guard) { | |
| 3411 | $s = $this->seek(); | |
| @@ 3651-3667 (lines=17) @@ | ||
| 3648 | } | |
| 3649 | ||
| 3650 | // comma separated list of selectors | |
| 3651 | 	protected function selectors(&$out) { | |
| 3652 | $s = $this->seek(); | |
| 3653 | $selectors = array(); | |
| 3654 | 		while ($this->selector($sel)) { | |
| 3655 | $selectors[] = $sel; | |
| 3656 | 			if (!$this->literal(",")) break; | |
| 3657 | 			while ($this->literal(",")); // ignore extra | |
| 3658 | } | |
| 3659 | ||
| 3660 | 		if (count($selectors) == 0) { | |
| 3661 | $this->seek($s); | |
| 3662 | return false; | |
| 3663 | } | |
| 3664 | ||
| 3665 | $out = $selectors; | |
| 3666 | return true; | |
| 3667 | } | |
| 3668 | ||
| 3669 | // whitespace separated list of selectorSingle | |
| 3670 | 	protected function selector(&$out) { | |