MCPcopy
hub / github.com/gopherjs/gopherjs / writePos

Method writePos

compiler/utils.go:71–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69}
70
71func (fc *funcContext) writePos() {
72 if fc.posAvailable {
73 fc.posAvailable = false
74 h := sourcemapx.Hint{}
75 if err := h.Pack(fc.pos); err != nil {
76 panic(bailout(fmt.Errorf("failed to pack source map position: %w", err)))
77 }
78 if _, err := h.WriteTo(fc); err != nil {
79 panic(bailout(fmt.Errorf("failed to write source map hint: %w", err)))
80 }
81 }
82}
83
84// Indented increases generated code indentation level by 1 for the code emitted
85// from the callback f.

Callers 2

WriteMethod · 0.95
CatchOutputMethod · 0.95

Calls 3

PackMethod · 0.95
WriteToMethod · 0.95
bailoutFunction · 0.85

Tested by

no test coverage detected