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