aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser.cpp b/Parser.cpp
index 491b5f84..a542d9b7 100644
--- a/Parser.cpp
+++ b/Parser.cpp
@@ -267,6 +267,8 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(VarDeclParserOp
{
ASTNodeFactory nodeFactory(*this);
ASTPointer<TypeName> type = parseTypeName(_options.allowVar);
+ if (type != nullptr)
+ nodeFactory.setEndPositionFromNode(type);
bool isIndexed = false;
ASTPointer<ASTString> identifier;
Token::Value token = m_scanner->getCurrentToken();