コード例 #1
0
 /**
  * @param string $docComment
  * @return \com\mohiva\common\parser\TokenStream
  */
 private function createTokenStream($docComment)
 {
     $lexer = new AnnotationLexer();
     $stream = $lexer->scan($docComment);
     return $stream;
 }
コード例 #2
0
ファイル: AnnotationLexerTest.php プロジェクト: mohiva/common
 /**
  * Test the none token.
  */
 public function testNoneToken()
 {
     $lexer = new AnnotationLexer();
     $stream = $lexer->scan(' # ');
     $actual = $this->buildActualTokens($stream);
     $expected = array(array(AnnotationLexer::T_NONE => '#'));
     $this->assertSame($expected, $actual);
 }