[vala] Genie: Fix base access in async methods



commit 8a2b375009262b65f9fed4aeb15697420b3bd474
Author: Jamie McCracken <jamie.mccrack gmail com>
Date:   Mon May 24 14:13:24 2010 -0400

    Genie: Fix base access in async methods

 vala/valagenieparser.vala |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 6c1e33f..3a25d6b 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -1120,7 +1120,12 @@ public class Vala.Genie.Parser : CodeVisitor {
 	Expression parse_yield_expression () throws ParseError {
 		var begin = get_location ();
 		expect (TokenType.YIELD);
-		var member = parse_member_name ();
+		Expression base_expr = null;
+		if (current () == TokenType.SUPER) {
+			base_expr = parse_base_access ();
+			expect (TokenType.DOT);
+		}
+		var member = parse_member_name (base_expr);
 		var call = (MethodCall) parse_method_call (begin, member);
 		call.is_yield_expression = true;
 		return call;
@@ -3696,13 +3701,13 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return null;
 	}
 
-	MemberAccess parse_member_name () throws ParseError {
+	MemberAccess parse_member_name (Expression? base_expr = null) throws ParseError {
 		var begin = get_location ();
 		MemberAccess expr = null;
 		do {
 			string id = parse_identifier ();
 			List<DataType> type_arg_list = parse_type_argument_list (false);
-			expr = new MemberAccess (expr, id, get_src (begin));
+			expr = new MemberAccess (expr != null ? expr : base_expr, id, get_src (begin));
 			if (type_arg_list != null) {
 				foreach (DataType type_arg in type_arg_list) {
 					expr.add_type_argument (type_arg);



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