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

Method Top

parse/lexer/stack.go:11–17  ·  view source on GitHub ↗

Top returns the state at the top of the stack

()

Source from the content-addressed store, hash-verified

9
10// Top returns the state at the top of the stack
11func (ss *Stack) Top() string {
12 sz := len(*ss)
13 if sz == 0 {
14 return ""
15 }
16 return (*ss)[sz-1]
17}
18
19// Push appends state to stack
20func (ss *Stack) Push(state string) {

Callers 4

CurStateMethod · 0.45
MatchMethod · 0.45
DoActMethod · 0.45
FindNameTopScopeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected