Skip to content

Commit

Permalink
Parser: update line and column when merging into virtual nodes (#338)
Browse files Browse the repository at this point in the history
Otherwise their lines and columns are left as default values (0 and 0).
  • Loading branch information
edigaryev authored Mar 9, 2021
1 parent 15eb66f commit b8f23f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/parser/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit b8f23f7

Please sign in to comment.