]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Replace void* with corresponding Vala API
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 12 Jun 2018 08:02:25 +0000 (10:02 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 12 Jun 2018 16:19:46 +0000 (18:19 +0200)
32 files changed:
libvaladoc/api/array.vala
libvaladoc/api/attribute.vala
libvaladoc/api/attributeargument.vala
libvaladoc/api/class.vala
libvaladoc/api/constant.vala
libvaladoc/api/delegate.vala
libvaladoc/api/enum.vala
libvaladoc/api/enumvalue.vala
libvaladoc/api/errorcode.vala
libvaladoc/api/errordomain.vala
libvaladoc/api/field.vala
libvaladoc/api/formalparameter.vala
libvaladoc/api/interface.vala
libvaladoc/api/item.vala
libvaladoc/api/member.vala
libvaladoc/api/method.vala
libvaladoc/api/namespace.vala
libvaladoc/api/node.vala
libvaladoc/api/package.vala
libvaladoc/api/pointer.vala
libvaladoc/api/property.vala
libvaladoc/api/propertyaccessor.vala
libvaladoc/api/signal.vala
libvaladoc/api/sourcefile.vala
libvaladoc/api/struct.vala
libvaladoc/api/symbol.vala
libvaladoc/api/tree.vala
libvaladoc/api/typeparameter.vala
libvaladoc/api/typereference.vala
libvaladoc/api/typesymbol.vala
valadoc/driver.vala
valadoc/treebuilder.vala

index 8e3cbe5fbea270599769355d7ed78e70a6a4dc12..ef24b1f6e87257dfab3724e38bca22637b1cdf45 100644 (file)
@@ -36,7 +36,7 @@ public class Valadoc.Api.Array : Item {
                get;
        }
 
-       public Array (Item parent, void* data) {
+       public Array (Item parent, Vala.ArrayType data) {
                base (data);
 
                this.parent = parent;
index e138389be82763d37d3eae73fd5ddb1b3ac7256b..b80a1b52c90959c858757361295718dee0c18ec3 100644 (file)
@@ -32,7 +32,7 @@ public class Valadoc.Api.Attribute : Item {
                get;
        }
 
-       public Attribute (Node parent, SourceFile file, string name, void* data) {
+       public Attribute (Node parent, SourceFile file, string name, Vala.Attribute data) {
                base (data);
 
                this.parent = parent;
@@ -52,25 +52,25 @@ public class Valadoc.Api.Attribute : Item {
                return null;
        }
 
-       public AttributeArgument add_boolean (string name, bool value, void* data = null) {
+       public AttributeArgument add_boolean (string name, bool value, Vala.Attribute data) {
                AttributeArgument arg = new AttributeArgument.boolean (this, file, name, value, data);
                args.add (arg);
                return arg;
        }
 
-       public AttributeArgument add_integer (string name, int value, void* data = null) {
+       public AttributeArgument add_integer (string name, int value, Vala.Attribute data) {
                AttributeArgument arg = new AttributeArgument.integer (this, file, name, value, data);
                args.add (arg);
                return arg;
        }
 
-       public AttributeArgument add_double (string name, double value, void* data = null) {
+       public AttributeArgument add_double (string name, double value, Vala.Attribute data) {
                AttributeArgument arg = new AttributeArgument.double (this, file, name, value, data);
                args.add (arg);
                return arg;
        }
 
-       public AttributeArgument add_string (string name, string value, void* data = null) {
+       public AttributeArgument add_string (string name, string value, Vala.Attribute data) {
                AttributeArgument arg = new AttributeArgument.string (this, file, name, value, data);
                args.add (arg);
                return arg;
index 1a3b01fab7a14f2ca8f9165aaa4f4c0858bf47e1..374b3d6fccd09d04cdc432c55d0fec20613baf27 100644 (file)
@@ -48,23 +48,23 @@ public class Valadoc.Api.AttributeArgument : Item {
                get;
        }
 
-       public AttributeArgument.boolean (Attribute parent, SourceFile file, string name, bool value, void* data) {
+       public AttributeArgument.boolean (Attribute parent, SourceFile file, string name, bool value, Vala.Attribute data) {
                this (parent, file, name, Type.BOOLEAN, value.to_string (), data);
        }
 
-       public AttributeArgument.integer (Attribute parent, SourceFile file, string name, int value, void* data) {
+       public AttributeArgument.integer (Attribute parent, SourceFile file, string name, int value, Vala.Attribute data) {
                this (parent, file, name, Type.INTEGER, value.to_string (), data);
        }
 
-       public AttributeArgument.double (Attribute parent, SourceFile file, string name, double value, void* data) {
+       public AttributeArgument.double (Attribute parent, SourceFile file, string name, double value, Vala.Attribute data) {
                this (parent, file, name, Type.DOUBLE, value.to_string (), data);
        }
 
-       public AttributeArgument.string (Attribute parent, SourceFile file, string name, string value, void* data) {
+       public AttributeArgument.string (Attribute parent, SourceFile file, string name, string value, Vala.Attribute data) {
                this (parent, file, name, Type.STRING, value, data);
        }
 
-       private AttributeArgument (Attribute parent, SourceFile file, string name, Type type, string value, void* data) {
+       private AttributeArgument (Attribute parent, SourceFile file, string name, Type type, string value, Vala.Attribute data) {
                base (data);
 
                this.argument_type = type;
index 4ef99ea147c680d8c7e7953cc8189a1ca9379a13..47781c959cc835cc28faa8f27493d35418665fea 100644 (file)
@@ -52,7 +52,7 @@ public class Valadoc.Api.Class : TypeSymbol {
                                  string? dbus_name, string? type_id, string? param_spec_function_name, string? ref_function_name,
                                  string? unref_function_name, string? free_function_name, string? finalize_function_name,
                                  string? take_value_function_cname, string? get_value_function_cname, string? set_value_function_cname,
-                                 bool is_fundamental, bool is_abstract, bool is_basic_type, void* data)
+                                 bool is_fundamental, bool is_abstract, bool is_basic_type, Vala.Class data)
        {
                base (parent, file, name, accessibility, comment, type_macro_name,
                        is_type_macro_name, type_cast_macro_name, type_function_name, is_basic_type, data);
index 0ff79f2616a8df1aed120ab7a269117fa36fb631..d9d3f475d424e485cf4a9ee44f92806f01a40a87 100644 (file)
@@ -38,7 +38,7 @@ public class Valadoc.Api.Constant : Member {
        }
 
        public Constant (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
-                                        SourceComment? comment, string? cname, void* data)
+                                        SourceComment? comment, string? cname, Vala.Constant data)
        {
                base (parent, file, name, accessibility, comment, data);
 
index 9db4d9f104fba2dc0c1bc5e0c0b574dd81391bb1..d7afcb17e405bfa538c128687ea49a87a08b5bf6 100644 (file)
@@ -40,7 +40,7 @@ public class Valadoc.Api.Delegate : TypeSymbol, Callable {
 
 
        public Delegate (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
-                                        SourceComment? comment, string? cname, bool is_static, void* data)
+                                        SourceComment? comment, string? cname, bool is_static, Vala.Delegate data)
        {
                base (parent, file, name, accessibility, comment, null, null, null, null, false, data);
 
index cbadb1971f201870c497b5ebafeb6ffed5025cc6..6774b5c846e85a14563077f7b2db5cd632423bfb 100644 (file)
@@ -31,7 +31,7 @@ public class Valadoc.Api.Enum : TypeSymbol {
 
        public Enum (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                 SourceComment? comment, string? cname, string? type_macro_name,
-                                string? type_function_name, void* data)
+                                string? type_function_name, Vala.Enum data)
        {
                base (parent, file, name, accessibility, comment, type_macro_name, null, null,
                        type_function_name, false, data);
index e3ec568b9e367773d7306bc7b18ba3752a601a5b..55702e1df7b77eb8196300af2873cf75687eac48 100644 (file)
@@ -44,7 +44,7 @@ public class Valadoc.Api.EnumValue: Symbol {
                }
        }
 
-       public EnumValue (Enum parent, SourceFile file, string name, SourceComment? comment, string? cname, void* data) {
+       public EnumValue (Enum parent, SourceFile file, string name, SourceComment? comment, string? cname, Vala.EnumValue data) {
                base (parent, file, name, parent.accessibility, data);
 
                this.source_comment = comment;
index 2d10fb6a1f622988a11ad7e5cdf03c6feeaefe80..64f1693570e616eebc64737729c0c7013074a7c4 100644 (file)
@@ -32,7 +32,7 @@ public class Valadoc.Api.ErrorCode : Symbol {
        private string? cname;
 
        public ErrorCode (ErrorDomain parent, SourceFile file, string name, SourceComment? comment,
-                                         string? cname, string? dbus_name, void* data)
+                                         string? cname, string? dbus_name, Vala.ErrorCode data)
        {
                base (parent, file, name, parent.accessibility, data);
 
index c469bf3a8dd745e631e5bdea7004bc3a27a3fecb..80b16bb7f692f996ecd245c5b60efb63dba1c59b 100644 (file)
@@ -34,7 +34,7 @@ public class Valadoc.Api.ErrorDomain : TypeSymbol {
 
        public ErrorDomain (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                                SourceComment? comment, string? cname, string? quark_macro_name,
-                                               string? quark_function_name, string? dbus_name, void* data)
+                                               string? quark_function_name, string? dbus_name, Vala.ErrorDomain data)
        {
                base (parent, file, name, accessibility, comment, null, null, null, null, false, data);
 
index 2844faa5f5985f85c2f4fe294b8e564c7f9720a6..baf58a94fb0ac22611b923ff7c0a5b78d30a7652 100644 (file)
@@ -31,7 +31,7 @@ public class Valadoc.Api.Field : Member {
 
        public Field (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                  SourceComment? comment, string? cname, bool is_static, bool is_volatile,
-                                 void* data)
+                                 Vala.Field data)
        {
                base (parent, file, name, accessibility, comment, data);
 
index f22b5bc39a5f66c05275b0cc0a66456ee8a4f824..6bbbc37df2f764689fee090250554ba2dfcb297e 100644 (file)
@@ -58,7 +58,7 @@ public class Valadoc.Api.FormalParameter : Symbol {
 
        private FormalParameterType type;
 
-       public FormalParameter (Node parent, SourceFile file, string? name, SymbolAccessibility accessibility, FormalParameterType type, bool ellipsis, void* data) {
+       public FormalParameter (Node parent, SourceFile file, string? name, SymbolAccessibility accessibility, FormalParameterType type, bool ellipsis, Vala.Parameter data) {
                base (parent, file, name, accessibility, data);
                assert ((name == null && ellipsis) || (name != null && !ellipsis));
 
index ede696cf9a5db36cd0ff410ae1ce84eb8ad9c0e9..a9cc860a9e3fde63963bf954bf18d70168d2753e 100644 (file)
@@ -35,7 +35,7 @@ public class Valadoc.Api.Interface : TypeSymbol {
        public Interface (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                          SourceComment? comment, string? cname, string? type_macro_name, string? is_type_macro_name,
                                          string? type_cast_macro_name, string? type_function_name, string interface_macro_name,
-                                         string? dbus_name, void* data)
+                                         string? dbus_name, Vala.Interface data)
        {
                base (parent, file, name, accessibility, comment, type_macro_name, is_type_macro_name,
                          type_cast_macro_name, type_function_name, false, data);
index 60967a7c144cfa3bb6945be5b0a5d45886d3e27c..69bec622ac76471733091c35e7868ba5aeeae4c6 100644 (file)
@@ -29,7 +29,7 @@ using Valadoc.Content;
 public abstract class Valadoc.Api.Item : Object {
        private Inline _signature;
 
-       public void* data {
+       public Vala.CodeNode? data {
                private set;
                get;
        }
@@ -42,7 +42,7 @@ public abstract class Valadoc.Api.Item : Object {
                get;
        }
 
-       public Item (void* data) {
+       public Item (Vala.CodeNode? data) {
                this.data = data;
        }
 
index fcabbea6bbff99eba8d7718e4711d0a2574bf42c..a812fc0ab8c4d04ebd074dfea6abf0442f633ca9 100644 (file)
@@ -26,7 +26,7 @@ public abstract class Valadoc.Api.Member : Symbol {
        private SourceComment? source_comment;
 
        public Member (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
-                                  SourceComment? comment, void* data)
+                                  SourceComment? comment, Vala.Symbol data)
        {
                base (parent, file, name, accessibility, data);
 
index bccbac5fbbdd7a3f9bdcf1cfdd8ed631a4099e02..9c12c8f16d62c04e787cbbf14991189cf2baee6c 100644 (file)
@@ -46,7 +46,7 @@ public class Valadoc.Api.Method : Member, Callable {
        public Method (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                   SourceComment? comment, string? cname, string? dbus_name, string? dbus_result_name,
                                   string? finish_function_cname, MethodBindingType binding_type, bool is_yields,
-                                  bool is_dbus_visible, bool is_constructor, void* data)
+                                  bool is_dbus_visible, bool is_constructor, Vala.Method data)
        {
                base (parent, file, name, accessibility, comment, data);
 
index 7e351660544a03d7b541e28da3a0280dbbe6729a..c441782cae3f043e438b404503159a512859db9c 100644 (file)
@@ -29,7 +29,7 @@ using Valadoc.Content;
 public class Valadoc.Api.Namespace : Symbol {
        private SourceComment? source_comment;
 
-       public Namespace (Api.Node parent, SourceFile file, string? name, SourceComment? comment, void* data) {
+       public Namespace (Api.Node parent, SourceFile file, string? name, SourceComment? comment, Vala.Namespace data) {
                base (parent, file, name, SymbolAccessibility.PUBLIC, data);
 
                this.source_comment = comment;
index f1bbd2c62ba33995834c392a6dbd5ec086677b22..dfd4a94f3066ab4e4358ad3a561d7c08902794e6 100644 (file)
@@ -50,7 +50,7 @@ public abstract class Valadoc.Api.Node : Item, Browsable, Documentation {
        private Vala.Map<NodeType, Vala.List<Node>> per_type_children;
 
 
-       public Node (Node? parent, SourceFile? file, string? name, void* data) {
+       public Node (Node? parent, SourceFile? file, string? name, Vala.CodeNode? data) {
                base (data);
 
                per_name_children = new Vala.HashMap<string, Node> (str_hash, str_equal);
index 821230ecfe37dde39ba4383f4a417109a532c693..8942d9e1cb01ea6f9cc246bae08c90ffd023ed72 100644 (file)
@@ -73,7 +73,7 @@ public class Valadoc.Api.Package : Node {
                return this._dependencies;
        }
 
-       public Package (string name, bool is_package, void* data) {
+       public Package (string name, bool is_package, Vala.CodeNode? data) {
                base (null, null, name, data);
 
                this.is_package = is_package;
index 954acd949a220659338a5c525dfaa6b774a24851..14bb6e0e8e57bd3db94a0490d10a87fd5c0c9bbd 100644 (file)
@@ -36,7 +36,7 @@ public class Valadoc.Api.Pointer : Item {
                get;
        }
 
-       public Pointer (Item parent, void* data) {
+       public Pointer (Item parent, Vala.PointerType data) {
                base (data);
 
                this.parent = parent;
index d981c9027b379a7b532a7827062cab348e5036ca..c50b2b2711396706c6ff62763ac2d75e328c7c2a 100644 (file)
@@ -33,7 +33,7 @@ public class Valadoc.Api.Property : Member {
 
        public Property (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                         SourceComment? comment, string? cname, string? dbus_name, bool is_dbus_visible,
-                                        PropertyBindingType binding_type, void* data)
+                                        PropertyBindingType binding_type, Vala.Property data)
        {
                base (parent, file, name, accessibility, comment, data);
 
index 173edd89d38f57849325bd730650f610cb707997..89de374bb54a0a1dee4724ea727d3805ef4a4b2e 100644 (file)
@@ -32,7 +32,7 @@ public class Valadoc.Api.PropertyAccessor : Symbol {
        private string? cname;
 
        public PropertyAccessor (Property parent, SourceFile file, string name, SymbolAccessibility accessibility,
-                                                        string? cname, PropertyAccessorType type, Ownership ownership, void* data)
+                                                        string? cname, PropertyAccessorType type, Ownership ownership, Vala.PropertyAccessor data)
        {
                base (parent, file, name, accessibility, data);
 
index 6e6f8855f8bde2e504c43a33cd91de049afbadd2..7da544bbd8dd401ca6b4fd81e8b800977264af70 100644 (file)
@@ -43,7 +43,7 @@ public class Valadoc.Api.Signal : Member, Callable {
 
        public Signal (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                   SourceComment? comment, string? cname, string? default_impl_cname, string? dbus_name, bool is_dbus_visible,
-                                  bool is_virtual, void* data)
+                                  bool is_virtual, Vala.Signal data)
        {
                base (parent, file, name, accessibility, comment, data);
 
index 9c3401145e3fb378f8dec3f81061ef0b5aa805f4..262c5b188486b3cf5dc83e428a859f7149d4a53e 100644 (file)
@@ -45,12 +45,12 @@ public class Valadoc.Api.SourceFile : Object {
                return Path.get_basename (relative_path);
        }
 
-       public void* data {
+       public Vala.SourceFile? data {
                private set;
                get;
        }
 
-       public SourceFile (Package package, string relative_path, string? relative_c_path, void* data) {
+       public SourceFile (Package package, string relative_path, string? relative_c_path, Vala.SourceFile? data) {
                this.relative_c_path = relative_c_path;
                this.relative_path = relative_path;
                this.package = package;
index 93bbce778e4c33eb6825b60bdbb2ba6ca92fa70c..d35d5ff9333525cb0074ad7dc3bb83f024056095 100644 (file)
@@ -38,7 +38,7 @@ public class Valadoc.Api.Struct : TypeSymbol {
                                   SourceComment? comment, string? cname, string? type_macro_name,
                                   string? type_function_name, string? type_id, string? dup_function_cname,
                                   string? copy_function_cname, string? destroy_function_cname,
-                                  string? free_function_cname, bool is_basic_type, void* data)
+                                  string? free_function_cname, bool is_basic_type, Vala.Struct data)
        {
                base (parent, file, name, accessibility, comment, type_macro_name, null, null,
                        type_function_name, is_basic_type, data);
index 020c28ab1cc801941a1294d3d7fe0e6bcc5889aa..3b375a330bba158aff2b7d471ebadb87f5e7c814 100644 (file)
@@ -35,7 +35,7 @@ public abstract class Valadoc.Api.Symbol : Node {
        }
 
        public Symbol (Node parent, SourceFile file, string? name, SymbolAccessibility accessibility,
-                                  void* data)
+                                  Vala.Symbol data)
        {
                base (parent, file, name, data);
 
index 833aea529a589656b3fd314c55014173f48faec1..e357fe08e634336dee9bd113c5fc49ac21ce7d70 100644 (file)
@@ -53,7 +53,7 @@ public class Valadoc.Api.Tree {
                this.packages.add (package);
        }
 
-       public void* data {
+       public Vala.CodeContext context {
                set;
                get;
        }
@@ -216,10 +216,10 @@ public class Valadoc.Api.Tree {
                return params;
        }
 
-       public Tree (ErrorReporter reporter, Settings settings, void* data = null) {
+       public Tree (ErrorReporter reporter, Settings settings, Vala.CodeContext context) {
                this.settings = settings;
                this.reporter = reporter;
-               this.data = data;
+               this.context = context;
        }
 
        // copied from valacodecontext.vala
index e2821580405b77106668cca9d9c406e847af17d8..bbeaa67c699b6185196a9162d40aebf4a30cf59f 100644 (file)
@@ -28,7 +28,7 @@ using Valadoc.Content;
  */
 public class Valadoc.Api.TypeParameter : Symbol {
 
-       public TypeParameter (Node parent, SourceFile file, string name, void* data) {
+       public TypeParameter (Node parent, SourceFile file, string name, Vala.TypeParameter data) {
                base (parent, file, name, SymbolAccessibility.PUBLIC, data);
        }
 
index 5f29f293f657e40efae82b43b4d9d3230c1aea74..884b721bc244b2a6b536d50cefca908bce871411 100644 (file)
@@ -32,7 +32,7 @@ public class Valadoc.Api.TypeReference : Item {
        private Ownership ownership;
 
        public TypeReference (Item parent, Ownership ownership, bool pass_ownership, bool is_dynamic,
-                                                 bool is_nullable, string? dbus_type_signature, void* data)
+                                                 bool is_nullable, string? dbus_type_signature, Vala.DataType? data)
        {
                base (data);
 
index c7274ba0132e12d9aaddc7a934798f46b3ef9ff1..17c3501c8554c9ea23e5fd720f13854a881b2f97 100644 (file)
@@ -35,7 +35,7 @@ public abstract class Valadoc.Api.TypeSymbol : Symbol {
        public TypeSymbol (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                           SourceComment? comment, string? type_macro_name, string? is_type_macro_name,
                                           string? type_cast_macro_name, string? type_function_name, bool is_basic_type,
-                                          void* data)
+                                          Vala.TypeSymbol data)
        {
                base (parent, file, name, accessibility, data);
 
index 60d00e599675748554ef5cc4c8d4057c25e5af25..9bd4a3e196589275316195fadb2aa24083f32a78 100644 (file)
@@ -39,7 +39,7 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
                        gir_directory = settings.gir_directory;
                }
 
-               gir_writer.write_file ((Vala.CodeContext) tree.data,
+               gir_writer.write_file (tree.context,
                                                           gir_directory,
                                                           "%s-%s.gir".printf (settings.gir_namespace, settings.gir_version),
                                                           settings.gir_namespace,
index b2fdd6f1047cf3a5f1c268826cef58ec85f1630d..0b81481c0491b9a821d9767b258da368a5d6b157 100644 (file)
@@ -862,12 +862,7 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                }
        }
 
-       private Vala.CodeContext create_valac_tree (Settings settings) {
-               // init context:
-               var context = new Vala.CodeContext ();
-               Vala.CodeContext.push (context);
-
-
+       private void create_valac_tree (Vala.CodeContext context, Settings settings) {
                // settings:
                context.experimental = settings.experimental;
                context.experimental_non_null = settings.experimental || settings.experimental_non_null;
@@ -943,21 +938,20 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                // add user defined files:
                add_depencies (context, settings.packages);
                if (reporter.errors > 0) {
-                       return context;
+                       return;
                }
 
                add_documented_files (context, settings.source_files);
                if (reporter.errors > 0) {
-                       return context;
+                       return;
                }
 
-
                // parse vala-code:
                Vala.Parser parser = new Vala.Parser ();
 
                parser.parse (context);
                if (context.report.get_errors () > 0) {
-                       return context;
+                       return;
                }
 
                // parse gir:
@@ -965,18 +959,14 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
 
                gir_parser.parse (context);
                if (context.report.get_errors () > 0) {
-                       return context;
+                       return;
                }
 
-
-
                // check context:
                context.check ();
                if (context.report.get_errors () > 0) {
-                       return context;
+                       return;
                }
-
-               return context;
        }
 
 
@@ -1503,17 +1493,15 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                this.settings = settings;
                this.reporter = reporter;
 
-               this.tree = new Api.Tree (reporter, settings);
-               var context = create_valac_tree (settings);
-               this.tree.data = context;
+               var context = new Vala.CodeContext ();
+               Vala.CodeContext.push (context);
+
+               this.tree = new Api.Tree (reporter, settings, context);
+               create_valac_tree (context, settings);
 
                reporter.warnings_offset = context.report.get_warnings ();
                reporter.errors_offset = context.report.get_errors ();
 
-               if (context == null) {
-                       return null;
-               }
-
                // TODO: Register all packages here
                // register packages included by gir-files
                foreach (Vala.SourceFile vfile in context.get_source_files ()) {