after1.go 405 B

123456789101112131415161718
  1. // AFTER: we call getMoreInput()
  2. func (parser *Parser) parseArray(depth int) (Sexp, error) {
  3. ...
  4. if tok.typ != TokenEnd {
  5. break getTok
  6. } else {
  7. // we ask for more, and then loop
  8. err = parser.getMoreInput(nil, ErrMoreInputNeeded) <<<<=== key change
  9. switch err {
  10. case ParserHaltRequested:
  11. return SexpNull, err
  12. case ResetRequested:
  13. return SexpEnd, err
  14. }
  15. }
  16. ...