nextToken() public method

public nextToken ( ) : Token
return Token
Beispiel #1
0
 /**
  * @Warmup(2)
  * @Revs(100)
  * @Iterations(5)
  */
 public function benchIntrospectionQuery()
 {
     $lexer = new Lexer($this->introQuery);
     do {
         $token = $lexer->nextToken();
     } while ($token->kind !== Token::EOF);
 }
Beispiel #2
0
 /**
  * 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);
 }
Beispiel #3
0
 /**
  * @param string $body
  * @return Token
  */
 private function lexOne($body)
 {
     $lexer = new Lexer(new Source($body));
     return $lexer->nextToken();
 }