[vala/staging: 4/6] vala: Use CodeContext.root instead of SemanticAnalyzer.root_symbol



commit 0c05b6e39d2a1f10cdd3f155c85d39f7a563080b
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Dec 14 09:57:53 2017 +0100

    vala: Use CodeContext.root instead of SemanticAnalyzer.root_symbol
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712694

 vala/valacharacterliteral.vala |    4 ++--
 vala/valaintegerliteral.vala   |    2 +-
 vala/valamemberaccess.vala     |    4 ++--
 vala/valarealliteral.vala      |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/vala/valacharacterliteral.vala b/vala/valacharacterliteral.vala
index 71bed95..cecddba 100644
--- a/vala/valacharacterliteral.vala
+++ b/vala/valacharacterliteral.vala
@@ -91,9 +91,9 @@ public class Vala.CharacterLiteral : Literal {
                checked = true;
 
                if (get_char () < 128) {
-                       value_type = new IntegerType ((Struct) context.analyzer.root_symbol.scope.lookup 
("char"));
+                       value_type = new IntegerType ((Struct) context.root.scope.lookup ("char"));
                } else {
-                       value_type = new IntegerType ((Struct) context.analyzer.root_symbol.scope.lookup 
("unichar"));
+                       value_type = new IntegerType ((Struct) context.root.scope.lookup ("unichar"));
                }
 
                return !error;
diff --git a/vala/valaintegerliteral.vala b/vala/valaintegerliteral.vala
index 77a5bc8..3a1d673 100644
--- a/vala/valaintegerliteral.vala
+++ b/vala/valaintegerliteral.vala
@@ -114,7 +114,7 @@ public class Vala.IntegerLiteral : Literal {
                        }
                }
 
-               var st = (Struct) context.analyzer.root_symbol.scope.lookup (type_name);
+               var st = (Struct) context.root.scope.lookup (type_name);
                // ensure attributes are already processed
                st.check (context);
 
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 9365202..85f8bbb 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -216,8 +216,8 @@ public class Vala.MemberAccess : Expression {
                symbol_reference = null;
 
                if (qualified) {
-                       base_symbol = context.analyzer.root_symbol;
-                       symbol_reference = context.analyzer.root_symbol.scope.lookup (member_name);
+                       base_symbol = context.root;
+                       symbol_reference = base_symbol.scope.lookup (member_name);
                } else if (inner == null) {
                        if (member_name == "this") {
                                if (!context.analyzer.is_in_instance_method ()) {
diff --git a/vala/valarealliteral.vala b/vala/valarealliteral.vala
index 0dc01ad..550c2b4 100644
--- a/vala/valarealliteral.vala
+++ b/vala/valarealliteral.vala
@@ -77,7 +77,7 @@ public class Vala.RealLiteral : Literal {
 
                checked = true;
 
-               var st = (Struct) context.analyzer.root_symbol.scope.lookup (get_type_name ());
+               var st = (Struct) context.root.scope.lookup (get_type_name ());
                // ensure attributes are already processed
                st.check (context);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]