/** * @Warmup(2) * @Revs(100) * @Iterations(5) */ public function benchIntrospectionQuery() { $lexer = new Lexer($this->introQuery); do { $token = $lexer->nextToken(); } while ($token->kind !== Token::EOF); }
/** * Moves the internal parser object to the next lexed token. */ function advance() { $prevEnd = $this->token->end; $this->prevEnd = $prevEnd; $this->token = $this->lexer->nextToken($prevEnd); }
/** * @param string $body * @return Token */ private function lexOne($body) { $lexer = new Lexer(new Source($body)); return $lexer->nextToken(); }