()
| 24 | func (s *mathTreeStack) push(t *MathTree) { s.a = append(s.a, t) } |
| 25 | |
| 26 | func (s *mathTreeStack) popAssert() *MathTree { |
| 27 | x.AssertTruef(!s.empty(), "Expected a non-empty stack") |
| 28 | last := s.a[len(s.a)-1] |
| 29 | s.a = s.a[:len(s.a)-1] |
| 30 | return last |
| 31 | } |
| 32 | |
| 33 | func (s *mathTreeStack) pop() (*MathTree, error) { |
| 34 | if s.empty() { |
no test coverage detected