PhpDocParser: change whitespace handling

This commit is contained in:
Jan Tvrdik 2017-11-18 21:54:11 +01:00
parent 2e73ac5f3d
commit b316443d88

View File

@ -43,15 +43,16 @@ class PhpDocParser
$children[] = new Ast\PhpDoc\PhpDocTextNode($textNode);
$textNode = '';
}
$children[] = $this->parseTag($tokens);
} else {
$textNode .= $tokens->currentTokenValue();
$tokens->next();
}
if ($tokens->tryConsumeHorizontalWhiteSpace()) {
$textNode .= $tokens->prevTokenValue();
if ($tokens->tryConsumeHorizontalWhiteSpace()) {
$textNode .= $tokens->prevTokenValue();
}
}
}