convert the CodeContext.get_root method to a property
authorJuerg Billeter <j@bitron.ch>
Tue, 17 Jul 2007 22:36:46 +0000 (22:36 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 17 Jul 2007 22:36:46 +0000 (22:36 +0000)
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

ChangeLog
gobject/valacodegenerator.vala
vala/valaarraylengthfield.vala
vala/valaarrayresizemethod.vala
vala/valacodecontext.vala
vala/valasemanticanalyzer.vala
vala/valasymbolbuilder.vala
vala/valasymbolresolver.vala

index 519d7fa..7a311fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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,
          vala/valacodecontext.vala, vala/valadatatype.vala,
          vala/valainterfacewriter.vala, vala/valamemorymanager.vala,
index b2cade1..81ae1f5 100644 (file)
@@ -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;
index 5e332c7..8cbf171 100644 (file)
@@ -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;
        }
 
index d2a5bf5..e8b1eac 100644 (file)
@@ -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;
 
index 6c19431..118fb67 100644 (file)
@@ -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; }
        }
        
        /**
index 2fdca48..2309f35 100644 (file)
@@ -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;
index 483002f..31be7f9 100644 (file)
@@ -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);
        }
        
index 57de9ff..2b90d62 100644 (file)
@@ -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