stack.go | |
---|---|
|
|
Documentation in literate-programming-style is available at: https://redhatinsights.github.io/insights-operator-utils/packages/evaluator/stack.html |
|
Stack struct is naive but fully functional implementation of operand stack |
|
Push method pushes value onto the stack |
|
Pop method pops value from stack with check if stack is empty |
|
index of top of stack (TOS) |
|
read element from the stack |
|
remove element from the stack |
|
Empty method checks if the stack is empty |
|
Size method returns number of items on stack |
|