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); $children[] = new Ast\PhpDoc\PhpDocTextNode($textNode);
$textNode = ''; $textNode = '';
} }
$children[] = $this->parseTag($tokens); $children[] = $this->parseTag($tokens);
} else { } else {
$textNode .= $tokens->currentTokenValue(); $textNode .= $tokens->currentTokenValue();
$tokens->next(); $tokens->next();
}
if ($tokens->tryConsumeHorizontalWhiteSpace()) { if ($tokens->tryConsumeHorizontalWhiteSpace()) {
$textNode .= $tokens->prevTokenValue(); $textNode .= $tokens->prevTokenValue();
}
} }
} }