MCPcopy Index your code
hub / github.com/Shopify/go-lua / functionInfo

Function functionInfo

debug.go:206–226  ·  view source on GitHub ↗
(p Debug, f closure)

Source from the content-addressed store, hash-verified

204}
205
206func functionInfo(p Debug, f closure) (d Debug) {
207 d = p
208 if l, ok := f.(*luaClosure); !ok {
209 d.Source = "=[Go]"
210 d.LineDefined, d.LastLineDefined = -1, -1
211 d.What = "Go"
212 } else {
213 p := l.prototype
214 d.Source = p.source
215 if d.Source == "" {
216 d.Source = "=?"
217 }
218 d.LineDefined, d.LastLineDefined = p.lineDefined, p.lastLineDefined
219 d.What = "Lua"
220 if d.LineDefined == 0 {
221 d.What = "main"
222 }
223 }
224 d.ShortSource = chunkID(d.Source)
225 return
226}
227
228func (l *State) functionName(ci *callInfo) (name, kind string) {
229 if ci == &l.baseCallInfo {

Callers 1

InfoFunction · 0.85

Calls 1

chunkIDFunction · 0.85

Tested by

no test coverage detected