QmlJS: Fix regression caused by parser update

We have to keep the semicolonToken into account.

Change-Id: Ie599d141d21f09f1d0036c0382f6a3098fde6ca5
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-17 16:22:00 +02:00
parent 640044c8f8
commit 3ee870a3d8

View File

@@ -1766,7 +1766,7 @@ public:
{ return expression->firstSourceLocation(); }
SourceLocation lastSourceLocation() const override
{ return expression->lastSourceLocation(); }
{ return semicolonToken.isValid() ? semicolonToken : expression->lastSourceLocation(); }
// attributes
ExpressionNode *expression;