MCPcopy Index your code
hub / github.com/goccy/go-json / lastAnonymousFieldCode

Method lastAnonymousFieldCode

internal/encoder/code.go:397–408  ·  view source on GitHub ↗
(firstField *Opcode)

Source from the content-addressed store, hash-verified

395}
396
397func (c *StructCode) lastAnonymousFieldCode(firstField *Opcode) *Opcode {
398 // firstField is special StructHead operation for anonymous structure.
399 // So, StructHead's next operation is truly struct head operation.
400 for firstField.Op == OpStructHead || firstField.Op == OpStructField {
401 firstField = firstField.Next
402 }
403 lastField := firstField
404 for lastField.NextField != nil {
405 lastField = lastField.NextField
406 }
407 return lastField
408}
409
410func (c *StructCode) ToOpcode(ctx *compileContext) Opcodes {
411 // header => code => structField => code => end

Callers 1

lastFieldCodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected