code: func (p *Parser) objectList(obj bool) (*ast.ObjectList, error) {
  	defer un(trace(p, "ParseObjectList"))
  	node := &ast.ObjectList{}
  
  	for {
  		if obj {
  			tok := p.scan()
  			p.unscan()
  			if tok.Type == token.RBRACE {
  				break
  			}
  		}
  
  		n, err := p.objectItem()
  		if err == errEofToken {
  			break // we are finished
  		}
  
  		// we don't return a nil node, because might want to use already
  		// collected items.
  		if err != nil {
  			return node, err
  		}
  
  		node.Add(n)
  
  		// object lists can be optionally comma-delimited e.g. when a list of maps
  		// is being expressed, so a comma is allowed here - it's simply consumed
  		tok := p.scan()
  		if tok.Type != token.COMMA {
  			p.unscan()
  		}
  	}
  	return node, nil
  }
docs: // objectList parses a list of items within an object (generally k/v pairs).
  // The parameter" obj" tells this whether to we are within an object (braces:
  // '{', '}') or just at the top level. If we're within an object, we end
  // at an RBRACE.