Commit 5301e466 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

convert the CodeContext.get_root method to a property

2007-07-17  Juerg Billeter  <j@bitron.ch>

	* vala/valaarraylengthfield.vala, vala/valaarrayresizemethod.vala,
	  vala/valacodecontext.vala, vala/valasemanticanalyzer.vala,
	  vala/valasymbolbuilder.vala, vala/valasymbolresolver.vala,
	  gobject/valacodegenerator.vala: convert the CodeContext.get_root
	  method to a property

svn path=/trunk/; revision=361
parent efb72750
2007-07-17 Jürg Billeter <j@bitron.ch>
* vala/valaarraylengthfield.vala, vala/valaarrayresizemethod.vala,
vala/valacodecontext.vala, vala/valasemanticanalyzer.vala,
vala/valasymbolbuilder.vala, vala/valasymbolresolver.vala,
gobject/valacodegenerator.vala: convert the CodeContext.get_root
method to a property
2007-07-17 Jürg Billeter <j@bitron.ch>
* vala/parser.y, vala/valaattributeprocessor.vala,
......
......@@ -187,7 +187,7 @@ public class Vala.CodeGenerator : CodeVisitor {
context.find_header_cycles ();
root_symbol = context.get_root ();
root_symbol = context.root;
bool_type = new TypeReference ();
bool_type.data_type = (DataType) root_symbol.lookup ("bool").node;
......
......@@ -29,7 +29,7 @@ public class Vala.ArrayLengthField : Field {
construct {
access = MemberAccessibility.PUBLIC;
var root_symbol = source_reference.file.context.get_root ();
var root_symbol = source_reference.file.context.root;
type_reference.data_type = (DataType) root_symbol.lookup ("int").node;
}
......
......@@ -31,7 +31,7 @@ public class Vala.ArrayResizeMethod : Method {
set_cname ("g_renew");
var root_symbol = source_reference.file.context.get_root ();
var root_symbol = source_reference.file.context.root;
var int_type = new TypeReference ();
int_type.data_type = (DataType) root_symbol.lookup ("int").node;
......
......@@ -85,7 +85,7 @@ public class Vala.CodeContext {
public Method module_init_method { get; set; }
List<SourceFile> source_files;
private Symbol! root = new Symbol ();
private Symbol! _root = new Symbol ();
private Namespace global_namespace = new Namespace (null);
private List<Namespace> namespaces;
......@@ -95,12 +95,12 @@ public class Vala.CodeContext {
private List<string> packages;
/**
* Returns the root symbol of the code tree.
* The root symbol of the code tree.
*
* @return root symbol
*/
public Symbol! get_root () {
return root;
public Symbol! root {
get { return _root; }
}
/**
......
......@@ -66,7 +66,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
* @param context a code context
*/
public void analyze (CodeContext! context) {
root_symbol = context.get_root ();
root_symbol = context.root;
bool_type = new TypeReference ();
bool_type.data_type = (DataType) root_symbol.lookup ("bool").node;
......
......@@ -37,7 +37,7 @@ public class Vala.SymbolBuilder : CodeVisitor {
* @param context a code context
*/
public void build (CodeContext! context) {
root = context.get_root ();
root = context.root;
context.accept (this);
}
......
......@@ -38,7 +38,7 @@ public class Vala.SymbolResolver : CodeVisitor {
* @param context a code context
*/
public void resolve (CodeContext! context) {
root_symbol = context.get_root ();
root_symbol = context.root;
current_scope = root_symbol;
// TODO: don't require GLib namespace in symbol resolver
......
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