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

Method PartitionLineEndTokens

hclwrite/parser.go:145–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143}
144
145func (it inputTokens) PartitionLineEndTokens() (comments, newline, after inputTokens) {
146 afterComments, afterNewline := partitionLineEndTokens(it.nativeTokens)
147 comments = it.Slice(0, afterComments)
148 newline = it.Slice(afterComments, afterNewline)
149 after = it.Slice(afterNewline, len(it.nativeTokens))
150 return
151}
152
153func (it inputTokens) Slice(start, end int) inputTokens {
154 // When we slice, we create a new slice with no additional capacity because

Callers 1

PartitionBlockItemMethod · 0.80

Calls 2

SliceMethod · 0.95
partitionLineEndTokensFunction · 0.85

Tested by

no test coverage detected