MCPcopy Create free account
hub / github.com/cogentcore/core / Pop

Method Pop

parse/lexer/stack.go:25–33  ·  view source on GitHub ↗

Pop takes state off the stack and returns it

()

Source from the content-addressed store, hash-verified

23
24// Pop takes state off the stack and returns it
25func (ss *Stack) Pop() string {
26 sz := len(*ss)
27 if sz == 0 {
28 return ""
29 }
30 st := (*ss)[sz-1]
31 *ss = (*ss)[:sz-1]
32 return st
33}
34
35// Clone returns a copy of the stack
36func (ss *Stack) Clone() Stack {

Callers 4

ExecMethod · 0.45
RunBuiltinOrCommandMethod · 0.45
PopStateMethod · 0.45
DoActMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected