advance() 공개 메소드

public advance ( ) : Token
리턴 Token
예제 #1
0
 /**
  * @param string $body
  * @return Token
  */
 private function lexOne($body)
 {
     $lexer = new Lexer(new Source($body));
     return $lexer->advance();
 }
예제 #2
0
파일: Parser.php 프로젝트: aeshion/ZeroPHP
 /**
  * @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;
 }