aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/hcl/hcl/parser/parser.go')
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/parser.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
index f46ed4c..0aa080f 100644
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
@@ -337,6 +337,12 @@ func (p *Parser) listType() (*ast.ListType, error) {
return nil, err
}
+ // If there is a lead comment, apply it
+ if p.leadComment != nil {
+ node.LeadComment = p.leadComment
+ p.leadComment = nil
+ }
+
l.Add(node)
needComma = true
case token.COMMA: