Skip to content

Commit

Permalink
[DCOM-41] fixes a bug in the annotation parser
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed Mar 9, 2011
1 parent 440e050 commit 123315e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Doctrine/Common/Annotations/Parser.php
Expand Up @@ -303,7 +303,14 @@ public function Annotation()
$nameParts = array();

$this->match(Lexer::T_AT);
$this->match(Lexer::T_IDENTIFIER);
if ($this->isNestedAnnotation === false) {
if ($this->lexer->lookahead['type'] !== Lexer::T_IDENTIFIER) {
return false;
}
$this->lexer->moveNext();
} else {
$this->match(Lexer::T_IDENTIFIER);
}
$nameParts[] = $this->lexer->token['value'];

while ($this->lexer->isNextToken(Lexer::T_NAMESPACE_SEPARATOR)) {
Expand Down

0 comments on commit 123315e

Please sign in to comment.