If e.g. the xml header is missing, it resulted in errors like:
error: expected start element of `repository'
error: unsupported GIR version (null) (supported: 1.2)
reader = new MarkupReader (source_file.filename);
// xml prolog
- next ();
- next ();
+ do {
+ next ();
+ if (current_token == MarkupTokenType.EOF) {
+ Report.error (get_current_src (), "unexpected end of file");
+ return;
+ }
+ } while (current_token != MarkupTokenType.START_ELEMENT && reader.name != "repository");
- next ();
parse_repository ();
reader = null;