github.com/hashicorp/hcl/v2@v2.20.0/hclsyntax/file.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package hclsyntax
     5  
     6  import (
     7  	"github.com/hashicorp/hcl/v2"
     8  )
     9  
    10  // File is the top-level object resulting from parsing a configuration file.
    11  type File struct {
    12  	Body  *Body
    13  	Bytes []byte
    14  }
    15  
    16  func (f *File) AsHCLFile() *hcl.File {
    17  	return &hcl.File{
    18  		Body:  f.Body,
    19  		Bytes: f.Bytes,
    20  
    21  		// TODO: The Nav object, once we have an implementation of it
    22  	}
    23  }