ast

package
v0.0.0-...-4d002ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockContent

type BlockContent struct {
	*hcl.Block

	// Range represents range of the block in HCL syntax
	// or closest available representative range in JSON
	Range hcl.Range
}

blockContent represents HCL or JSON block content

type BodyContent

type BodyContent struct {
	Attributes hcl.Attributes
	Blocks     []*BlockContent
	RangePtr   *hcl.Range
}

bodyContent represents an HCL or JSON body content

func DecodeBody

func DecodeBody(body hcl.Body, bodySchema *schema.BodySchema) BodyContent

DecodeBody produces content of either HCL or JSON body JSON body requires schema for decoding, empty bodyContent is returned if nil schema is provided

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL