MCPcopy
hub / github.com/go-yaml/yaml / sequence

Method sequence

decode.go:254–268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

252}
253
254func (p *parser) sequence() *Node {
255 n := p.node(SequenceNode, seqTag, string(p.event.tag), "")
256 if p.event.sequence_style()&yaml_FLOW_SEQUENCE_STYLE != 0 {
257 n.Style |= FlowStyle
258 }
259 p.anchor(n, p.event.anchor)
260 p.expect(yaml_SEQUENCE_START_EVENT)
261 for p.peek() != yaml_SEQUENCE_END_EVENT {
262 p.parseChild(n)
263 }
264 n.LineComment = string(p.event.line_comment)
265 n.FootComment = string(p.event.foot_comment)
266 p.expect(yaml_SEQUENCE_END_EVENT)
267 return n
268}
269
270func (p *parser) mapping() *Node {
271 n := p.node(MappingNode, mapTag, string(p.event.tag), "")

Callers 1

parseMethod · 0.95

Calls 6

nodeMethod · 0.95
anchorMethod · 0.95
expectMethod · 0.95
peekMethod · 0.95
parseChildMethod · 0.95
sequence_styleMethod · 0.80

Tested by

no test coverage detected