[valadoc] driver-0.13.x: Add basic gir support
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] driver-0.13.x: Add basic gir support
- Date: Thu, 3 Nov 2011 02:37:19 +0000 (UTC)
commit c93e1d8deccb1d508e50a890e96cb4dc929ee044
Author: Florian Brosch <flo brosch gmail com>
Date: Wed Sep 7 20:07:51 2011 +0200
driver-0.13.x: Add basic gir support
src/driver/0.13.x/treebuilder.vala | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/driver/0.13.x/treebuilder.vala b/src/driver/0.13.x/treebuilder.vala
index 74f42c5..efb8d44 100644
--- a/src/driver/0.13.x/treebuilder.vala
+++ b/src/driver/0.13.x/treebuilder.vala
@@ -698,9 +698,9 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
}
context.add_source_file (source_file);
- } else if (source.has_suffix (".vapi")) {
+ } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) {
string file_name = Path.get_basename (source);
- file_name = file_name.substring (0, file_name.length - ".vapi".length);
+ file_name = file_name.substring (0, file_name.last_index_of_char ('.'));
var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
context.add_source_file (vfile);
@@ -711,7 +711,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
register_source_file (source_package, vfile);
-
add_deps (context, Path.build_filename (Path.get_dirname (source), "%s.deps".printf (file_name)), file_name);
} else if (source.has_suffix (".c")) {
context.add_c_source_file (rpath);
@@ -809,6 +808,15 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
return context;
}
+ // parse gir:
+ Vala.GirParser gir_parser = new Vala.GirParser ();
+
+ gir_parser.parse (context);
+ if (context.report.get_errors () > 0) {
+ return context;
+ }
+
+
// check context:
context.check ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]