Undo a pushEOF. The element must have been finished, so the EOF should be at the top of the stack.
()
| 439 | // Undo a pushEOF. |
| 440 | // The element must have been finished, so the EOF should be at the top of the stack. |
| 441 | func (d *Decoder) popEOF() bool { |
| 442 | if d.stk == nil || d.stk.kind != stkEOF { |
| 443 | return false |
| 444 | } |
| 445 | d.pop() |
| 446 | return true |
| 447 | } |
| 448 | |
| 449 | // Record that we are starting an element with the given name. |
| 450 | func (d *Decoder) pushElement(name Name) { |