Ejemplo n.º 1
0
 function outputExpression(CSSExpression $e)
 {
     $out = '';
     foreach ($e->getTerms() as $e) {
         $out .= $e[0] . $this->outputTerm($e[1]);
     }
     return $out;
 }
Ejemplo n.º 2
0
 function CSSExpression($endtoken)
 {
     $exprs = new CSSExpression();
     $term = $this->CSSTerm();
     if (!$term) {
         $this->error('Syntax of expression doesn\'t match any allowed term');
     }
     $exprs->add(NULL, $term);
     $safe = 100;
     while ($safe--) {
         $op = $this->CSSOperator($endtoken);
         if ($op == false) {
             break;
         }
         $term = $this->CSSTerm();
         if ($term == false) {
             break;
         }
         $exprs->add($op, $term);
     }
     return $exprs;
 }