MCPcopy
hub / github.com/davyxu/tabtoy / String

Method String

v2/exprvm/stack.go:17–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17func (self *Stack) String() string {
18
19 var sb strings.Builder
20
21 index := 0
22 for i := self.top; i != nil; i = i.prev {
23 sb.WriteString(fmt.Sprintf("[%d] %v\n", index, i.value))
24 index++
25 }
26
27 return sb.String()
28}
29
30// Create a new stack
31func NewStack() *Stack {

Callers

nothing calls this directly

Calls 1

WriteStringMethod · 0.45

Tested by

no test coverage detected