before1.go 303 B

12345678910
  1. // BEFORE: original straight-line code
  2. func (parser *Parser) parseArray(depth int) (Sexp, error) {
  3. ...
  4. if tok.typ != TokenEnd {
  5. break getTok // got a token
  6. } else {
  7. return nil, io.EOF // <<<<<<<<<<<<< sad, done before finding ']'
  8. }
  9. ...