Commit 855ea5e3 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Separate visiting declaration from visiting declaration statement

2008-11-30  Jürg Billeter  <j@bitron.ch>

	* vala/valadeclarationstatement.vala:
	* vala/valasymbolresolver.vala:
	* gobject/valaccodebasemodule.vala:

	Separate visiting declaration from visiting declaration statement

svn path=/trunk/; revision=2093
parent d38761c9
2008-11-30 Jürg Billeter <j@bitron.ch>
* vala/valadeclarationstatement.vala:
* vala/valasymbolresolver.vala:
* gobject/valaccodebasemodule.vala:
Separate visiting declaration from visiting declaration statement
2008-11-30 Jürg Billeter <j@bitron.ch>
* ccode/valaccodeassignment.vala:
......
......@@ -1266,6 +1266,8 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_declaration_statement (DeclarationStatement stmt) {
stmt.declaration.accept (codegen);
stmt.ccodenode = stmt.declaration.ccodenode;
var local = stmt.declaration as LocalVariable;
......
......@@ -54,13 +54,15 @@ public class Vala.DeclarationStatement : CodeNode, Statement {
this.declaration = declaration;
this.source_reference = source_reference;
}
public override void accept (CodeVisitor visitor) {
declaration.accept (visitor);
visitor.visit_declaration_statement (this);
}
public override void accept_children (CodeVisitor visitor) {
declaration.accept (visitor);
}
public override bool check (SemanticAnalyzer analyzer) {
if (checked) {
return !error;
......
......@@ -323,6 +323,10 @@ public class Vala.SymbolResolver : CodeVisitor {
unresolved_type.parent_node.replace_type (unresolved_type, resolve_type (unresolved_type));
}
public override void visit_declaration_statement (DeclarationStatement stmt) {
stmt.accept_children (this);
}
public override void visit_local_variable (LocalVariable local) {
local.accept_children (this);
if (local.variable_type is ReferenceType) {
......
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