AsHCLBlock returns the block data expressed as a *hcl.Block.
()
| 12 | |
| 13 | // AsHCLBlock returns the block data expressed as a *hcl.Block. |
| 14 | func (b *Block) AsHCLBlock() *hcl.Block { |
| 15 | if b == nil { |
| 16 | return nil |
| 17 | } |
| 18 | |
| 19 | return &hcl.Block{ |
| 20 | Type: b.Type, |
| 21 | Labels: b.Labels, |
| 22 | Body: b.Body, |
| 23 | |
| 24 | DefRange: b.DefRange(), |
| 25 | TypeRange: b.TypeRange, |
| 26 | LabelRanges: b.LabelRanges, |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | // Body is the implementation of hcl.Body for the HCL native syntax. |
| 31 | type Body struct { |
no test coverage detected