[vala] Support adding modules in derived code generators



commit 39688b16d44fd14d7fbf417ef221b071c3543897
Author: Luca Bruno <lethalman88 gmail com>
Date:   Thu Mar 25 10:37:09 2010 +0100

    Support adding modules in derived code generators

 codegen/valaccodegenerator.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodegenerator.vala b/codegen/valaccodegenerator.vala
index e7472c2..4853e70 100644
--- a/codegen/valaccodegenerator.vala
+++ b/codegen/valaccodegenerator.vala
@@ -67,11 +67,16 @@ public class Vala.CCodeGenerator : CodeGenerator {
 			head = new CCodeDelegateModule (this, head);
 		}
 
+		head = add_modules (head);
 		head.emit (context);
 
 		head = null;
 	}
 
+	public virtual CCodeModule add_modules (CCodeModule head) {
+		return head;
+	}
+
 	public override void visit_source_file (SourceFile source_file) {
 		head.visit_source_file (source_file);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]