Flow\TokenStream::look PHP Method

look() public method

public look ( $t = 1 )
    public function look($t = 1)
    {
        $t--;
        $length = count($this->tokens);
        if ($this->cursor + $t > $length) {
            $t = 0;
        }
        if ($this->cursor + $t < 0) {
            $t = -$this->cursor;
        }
        return $this->tokens[$this->cursor + $t];
    }