From b8f23f78742fc01b7c1ac1ea668d914e5d0fcb9b Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Wed, 10 Mar 2021 00:47:52 +0300 Subject: [PATCH] Parser: update line and column when merging into virtual nodes (#338) Otherwise their lines and columns are left as default values (0 and 0). --- pkg/parser/node/node.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/parser/node/node.go b/pkg/parser/node/node.go index 012d341d..79cc42f3 100644 --- a/pkg/parser/node/node.go +++ b/pkg/parser/node/node.go @@ -114,6 +114,8 @@ func (node *Node) MergeListOfMapsToSingleMap() { func (node *Node) MergeFrom(other *Node) { node.Name = other.Name + node.Line = other.Line + node.Column = other.Column // Special treatment for environment variables since they can also be represented as a list of maps if node.Name == "env" || node.Name == "environment" {