From: Juerg Billeter Date: Tue, 17 Jul 2007 22:36:46 +0000 (+0000) Subject: convert the CodeContext.get_root method to a property X-Git-Tag: VALA_0_1_2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5301e466a2cee4e6a8592f3b9dd3c65bf6f8b7a8;p=platform%2Fupstream%2Fvala.git convert the CodeContext.get_root method to a property 2007-07-17 Juerg Billeter * 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 --- diff --git a/ChangeLog b/ChangeLog index 519d7fa..7a311fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2007-07-17 Jürg Billeter + * 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 + * vala/parser.y, vala/valaattributeprocessor.vala, vala/valacodecontext.vala, vala/valadatatype.vala, vala/valainterfacewriter.vala, vala/valamemorymanager.vala, diff --git a/gobject/valacodegenerator.vala b/gobject/valacodegenerator.vala index b2cade1..81ae1f5 100644 --- a/gobject/valacodegenerator.vala +++ b/gobject/valacodegenerator.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; diff --git a/vala/valaarraylengthfield.vala b/vala/valaarraylengthfield.vala index 5e332c7..8cbf171 100644 --- a/vala/valaarraylengthfield.vala +++ b/vala/valaarraylengthfield.vala @@ -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; } diff --git a/vala/valaarrayresizemethod.vala b/vala/valaarrayresizemethod.vala index d2a5bf5..e8b1eac 100644 --- a/vala/valaarrayresizemethod.vala +++ b/vala/valaarrayresizemethod.vala @@ -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; diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index 6c19431..118fb67 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -85,7 +85,7 @@ public class Vala.CodeContext { public Method module_init_method { get; set; } List source_files; - private Symbol! root = new Symbol (); + private Symbol! _root = new Symbol (); private Namespace global_namespace = new Namespace (null); private List namespaces; @@ -95,12 +95,12 @@ public class Vala.CodeContext { private List 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; } } /** diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index 2fdca48..2309f35 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -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; diff --git a/vala/valasymbolbuilder.vala b/vala/valasymbolbuilder.vala index 483002f..31be7f9 100644 --- a/vala/valasymbolbuilder.vala +++ b/vala/valasymbolbuilder.vala @@ -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); } diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala index 57de9ff..2b90d62 100644 --- a/vala/valasymbolresolver.vala +++ b/vala/valasymbolresolver.vala @@ -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