(l *State, d Debug)
| 9 | ) |
| 10 | |
| 11 | func functionName(l *State, d Debug) string { |
| 12 | switch { |
| 13 | case d.NameKind != "": |
| 14 | return fmt.Sprintf("function '%s'", d.Name) |
| 15 | case d.What == "main": |
| 16 | return "main chunk" |
| 17 | case d.What == "Go": |
| 18 | if pushGlobalFunctionName(l, d.callInfo) { |
| 19 | s, _ := l.ToString(-1) |
| 20 | l.Pop(1) |
| 21 | return fmt.Sprintf("function '%s'", s) |
| 22 | } |
| 23 | return "?" |
| 24 | } |
| 25 | return fmt.Sprintf("function <%s:%d>", d.ShortSource, d.LineDefined) |
| 26 | } |
| 27 | |
| 28 | func countLevels(l *State) int { |
| 29 | li, le := 1, 1 |
no test coverage detected