protected function pushTrail($expression)
    {
        if ($expression instanceof Expression) {
            array_push($this->trail, $expression);
        } else {
            // Add the collection in reverse order.
            $i = count($expression);
            while ($i >= 1) {
                $i--;
                array_push($this->trail, $expression[$i]);
            }
        }
    }
protected function pushTrail($expression)
    {
        if ($expression instanceof Expression) {
            array_push($this->trail, $expression);
        } else {
            // Add the collection in reverse order.
            $i = count($expression);
            while ($i >= 1) {
                $i--;
                array_push($this->trail, $expression[$i]);
            }
        }
    }
protected function pushTrail ( $ expression ) { if ( $ expression instanceof Expression ) { array_push ( $ this -> trail , $ expression ) ; } else { // Add the collection in reverse order. $ i = count ( $ expression ) ; while ( $ i >= 1 ) { $ i -- ; array_push ( $ this -> trail , $ expression [ $ i ] ) ; } } }
Push an Expression object on the trail stack.

@param \qtism\data\expressions\Expression|\qtism\data\expressions\ExpressionCollection $expression An Expression/ExpressionCollection object to be pushed on top of the trail stack.
Push an Expression object on the trail stack .