phprs\util\DocParser::match PHP Method

match() private method

If they match, updates the lookahead token; otherwise raises a syntax error.
private match ( integer $token ) : boolean
$token integer Type of token.
return boolean True if tokens match; false otherwise.
    private function match($token)
    {
        if (!$this->lexer->isNextToken($token)) {
            $this->syntaxError($this->lexer->getLiteral($token));
        }
        return $this->lexer->moveNext();
    }