nextToken() public méthode

public nextToken ( ) : Token
Résultat Token
Exemple #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);
 }
Exemple #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);
 }
Exemple #3
0
 /**
  * @param string $body
  * @return Token
  */
 private function lexOne($body)
 {
     $lexer = new Lexer(new Source($body));
     return $lexer->nextToken();
 }