162 if isinstance(entry, linetypes.MetaCommand): |
162 if isinstance(entry, linetypes.MetaCommand): |
163 yield entry |
163 yield entry |
164 def skip_to_next(self, *, spaces_expected = 0): |
164 def skip_to_next(self, *, spaces_expected = 0): |
165 while True: |
165 while True: |
166 if self.cursor + 1 >= len(self.model_body): |
166 if self.cursor + 1 >= len(self.model_body): |
167 self.parse_error('stub ldraw file') |
167 self.parse_error('file does not have a proper header') |
168 self.cursor += 1 |
168 self.cursor += 1 |
169 entry = self.model_body[self.cursor] |
169 entry = self.model_body[self.cursor] |
170 if not is_suitable_header_object(entry): |
170 if not is_suitable_header_object(entry): |
171 self.parse_error('header is incomplete') |
171 self.parse_error('header is incomplete') |
172 if isinstance(entry, linetypes.MetaCommand): |
172 if isinstance(entry, linetypes.MetaCommand): |