From b316443d880140055774b9592d63da56dee419d3 Mon Sep 17 00:00:00 2001 From: Jan Tvrdik Date: Sat, 18 Nov 2017 21:54:11 +0100 Subject: [PATCH] PhpDocParser: change whitespace handling --- src/Parser/PhpDocParser.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Parser/PhpDocParser.php b/src/Parser/PhpDocParser.php index 5d9e0dc..2eb80f2 100644 --- a/src/Parser/PhpDocParser.php +++ b/src/Parser/PhpDocParser.php @@ -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(); + } } }