public function findPreviousToken($matcher)
    {
        $previousToken = $this->previousToken;
        while (null !== $previousToken) {
            if ($previousToken->matches($matcher)) {
                return new Some($previousToken);
            }

            $previousToken = $previousToken->previousToken;
        }

        return None::create();
    }
public function findPreviousToken($matcher)
    {
        $previousToken = $this->previousToken;
        while (null !== $previousToken) {
            if ($previousToken->matches($matcher)) {
                return new Some($previousToken);
            }

            $previousToken = $previousToken->previousToken;
        }

        return None::create();
    }
public function findPreviousToken ( $ matcher ) { $ previousToken = $ this -> previousToken ; while ( null !== $ previousToken ) { if ( $ previousToken -> matches ( $ matcher ) ) { return new Some ( $ previousToken ) ; } $ previousToken = $ previousToken -> previousToken ; } return None :: create ( ) ; }
Finds the previous token that satisfies the passed matcher.

Eligible matchers are:

- T_??? constants such as T_WHITESPACE
- Literal values such as ";"
- A Closure which receives an AbstractToken as first argument
- Some special built-in matchers: "END_OF_LINE", "END_OF_NAME", etc. (see matches())

@param string|integer|\Closure $matcher

@return Option<AbstractToken>
Finds the previous token that satisfies the passed matcher .