MCPcopy
hub / github.com/hashicorp/hcl / Partition

Method Partition

hclwrite/parser.go:77–83  ·  view source on GitHub ↗
(rng hcl.Range)

Source from the content-addressed store, hash-verified

75}
76
77func (it inputTokens) Partition(rng hcl.Range) (before, within, after inputTokens) {
78 start, end := partitionTokens(it.nativeTokens, rng)
79 before = it.Slice(0, start)
80 within = it.Slice(start, end)
81 after = it.Slice(end, len(it.nativeTokens))
82 return
83}
84
85func (it inputTokens) PartitionType(ty hclsyntax.TokenType) (before, within, after inputTokens) {
86 for i, t := range it.writerTokens {

Callers 6

PartitionBlockItemMethod · 0.95
parseAttributeFunction · 0.80
parseBlockFunction · 0.80
parseBlockLabelsFunction · 0.80
parseTraversalFunction · 0.80
parseTraversalStepFunction · 0.80

Calls 2

SliceMethod · 0.95
partitionTokensFunction · 0.85

Tested by

no test coverage detected