def _parse_dict(self, text, i):
old_current_type = self.current_type<EOL>new_type = self.current_type<EOL>if new_type is None:<EOL><INDENT>new_type = dict<EOL><DEDENT>elif type(new_type) == list:<EOL><INDENT>new_type = new_type[<NUM_LIT:0>]<EOL><DEDENT>res = new_type()<EOL>i = self._parse_dict_into_object(res, text, i)<EOL>self.current_type = old_current_type<EOL>return res, i<EOL>
Parse a dictionary from source text starting at i.