()
| 19 | } |
| 20 | |
| 21 | func (s *stack) pop() (*Token, error) { |
| 22 | if len(s.open) == 0 { |
| 23 | return nil, SyntaxError{"no types unfinished"} |
| 24 | } |
| 25 | |
| 26 | last := len(s.closeat) - 1 |
| 27 | t := s.open[last] |
| 28 | s.open, s.closeat = s.open[:last], s.closeat[:last] |
| 29 | return t, nil |
| 30 | } |
| 31 | |
| 32 | func (s *stack) push(t *Token, end int) { |
| 33 | s.open = append(s.open, t) |
no outgoing calls
no test coverage detected