advance() public method

public advance ( ) : Token
return Token
Beispiel #1
0
 /**
  * @param string $body
  * @return Token
  */
 private function lexOne($body)
 {
     $lexer = new Lexer(new Source($body));
     return $lexer->advance();
 }
Beispiel #2
0
 /**
  * @return NamedType[]
  */
 function parseImplementsInterfaces()
 {
     $types = [];
     if ($this->lexer->token->value === 'implements') {
         $this->lexer->advance();
         do {
             $types[] = $this->parseNamedType();
         } while ($this->peek(Token::NAME));
     }
     return $types;
 }