Debian Codegraph @

plugins/controls/src/Stack.js

raw symbols SCIP
1 var stackView = [];
2
3 function push(p)
4 {
5 if (!p)
6 return
7 stackView.push(p)
8 __depth++
9 return p
10 }
11
12 function pop()
13 {
14 if (stackView.length === 0)
15 return null
16 var p = stackView.pop()
17 __depth--
18 return p
19 }
20
21 function current()
22 {
23 if (stackView.length === 0)
24 return null
25 return stackView[stackView.length-1]
26 }
27