Commit 689cc50e authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

fix crash when using libvala without a code generator

2007-09-26  Juerg Billeter  <j@bitron.ch>

	* vala/valacodecontext.vala, vala/valacodegenerator.vala: fix crash
	  when using libvala without a code generator

svn path=/trunk/; revision=629
parent 56e2970a
2007-09-26 Jürg Billeter <j@bitron.ch>
* vala/valacodecontext.vala, vala/valacodegenerator.vala: fix crash
when using libvala without a code generator
2007-09-26 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala, vala/valainterfacewriter.vala: support custom
......
......@@ -125,6 +125,13 @@ public class Vala.CodeContext : Object {
*/
public CodeGenerator codegen { get; set; }
public CodeContext () {
}
construct {
codegen = new CodeGenerator ();
}
/**
* Returns a copy of the list of source files.
*
......
......@@ -25,13 +25,14 @@ using GLib;
/**
* Abstract code visitor generating code.
*/
public abstract class Vala.CodeGenerator : CodeVisitor {
public class Vala.CodeGenerator : CodeVisitor {
/**
* Generate and emit C code for the specified code context.
*
* @param context a code context
*/
public abstract void emit (CodeContext! context);
public virtual void emit (CodeContext! context) {
}
public virtual CodeBinding create_namespace_binding (Namespace! node) {
return null;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment