Commit 7cf83333 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

don't require GLib namespace at runtime in symbol resolver and semantic

2006-11-21  Jürg Billeter  <j@bitron.ch>

	* vala/valasymbolresolver.vala, vala/valasemanticanalyzer.vala: don't
	  require GLib namespace at runtime in symbol resolver and semantic
	  analyzer

svn path=/trunk/; revision=176
parent aa9b2370
2006-11-21 Jürg Billeter <j@bitron.ch>
* vala/valasymbolresolver.vala, vala/valasemanticanalyzer.vala: don't
require GLib namespace at runtime in symbol resolver and semantic
analyzer
2006-11-21 Jürg Billeter <j@bitron.ch>
* tests/testrunner.sh: add test script
......
......@@ -72,12 +72,14 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
int_type = new TypeReference ();
int_type.data_type = (DataType) root_symbol.lookup ("int").node;
// TODO: don't require GLib namespace in semantic analyzer
var glib_ns = root_symbol.lookup ("GLib");
initially_unowned_type = (DataType) glib_ns.lookup ("InitiallyUnowned").node;
type_type = new TypeReference ();
type_type.data_type = (DataType) glib_ns.lookup ("Type").node;
if (glib_ns != null) {
initially_unowned_type = (DataType) glib_ns.lookup ("InitiallyUnowned").node;
type_type = new TypeReference ();
type_type.data_type = (DataType) glib_ns.lookup ("Type").node;
}
current_symbol = root_symbol;
context.accept (this);
......
......@@ -41,7 +41,11 @@ public class Vala.SymbolResolver : CodeVisitor {
root_symbol = context.get_root ();
current_scope = root_symbol;
object_class = (Class) root_symbol.lookup ("GLib").lookup ("Object").node;
// TODO: don't require GLib namespace in symbol resolver
var glib_ns = root_symbol.lookup ("GLib");
if (glib_ns != null) {
object_class = (Class) glib_ns.lookup ("Object").node;
}
context.accept (this);
}
......
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