2017-09-11 16:40:37 -07:00
|
|
|
package hclsyntax
|
2017-05-23 08:05:44 -07:00
|
|
|
|
2017-09-11 16:40:37 -07:00
|
|
|
import (
|
2019-09-09 16:08:19 -07:00
|
|
|
"github.com/hashicorp/hcl/v2"
|
2017-09-11 16:40:37 -07:00
|
|
|
)
|
2017-05-23 08:05:44 -07:00
|
|
|
|
|
|
|
// File is the top-level object resulting from parsing a configuration file.
|
|
|
|
type File struct {
|
|
|
|
Body *Body
|
|
|
|
Bytes []byte
|
|
|
|
}
|
|
|
|
|
2017-09-11 18:36:56 -07:00
|
|
|
func (f *File) AsHCLFile() *hcl.File {
|
2017-09-11 16:40:37 -07:00
|
|
|
return &hcl.File{
|
2017-05-23 08:05:44 -07:00
|
|
|
Body: f.Body,
|
|
|
|
Bytes: f.Bytes,
|
|
|
|
|
|
|
|
// TODO: The Nav object, once we have an implementation of it
|
|
|
|
}
|
|
|
|
}
|