[vala/wip/attributes: 117/121] Hashmap



commit c449a2da5d4f1b63aa075f1b646d520fc4dc9476
Author: Luca Bruno <lucabru src gnome org>
Date:   Sun Jul 3 21:35:34 2011 +0200

    Hashmap

 codegen/valagirwriter.vala     |    5 ++-
 vala/valacodenode.vala         |   75 ++++++++++++++++++++++++++++-----------
 vala/valacodewriter.vala       |    5 ++-
 vala/valagenieparser.vala      |   49 +++++++++++++-------------
 vala/valagirparser.vala        |    4 +-
 vala/valalambdaexpression.vala |    2 +-
 vala/valaparameter.vala        |    3 +-
 vala/valaparser.vala           |   47 +++++++++++++------------
 8 files changed, 115 insertions(+), 75 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index b5f676e..669d422 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -1122,7 +1122,10 @@ public class Vala.GIRWriter : CodeVisitor {
 	}
 
 	private void write_annotations (CodeNode node) {
-		foreach (Attribute attr in node.attributes) {
+		if (node.attributes == null) {
+			return;
+		}
+		foreach (Attribute attr in node.attributes.get_values ()) {
 			string name = camel_case_to_canonical (attr.name);
 			foreach (string arg_name in attr.args.get_keys ()) {
 				string value = attr.args.get (arg_name);
diff --git a/vala/valacodenode.vala b/vala/valacodenode.vala
index 33b51d7..91fab8b 100644
--- a/vala/valacodenode.vala
+++ b/vala/valacodenode.vala
@@ -45,7 +45,7 @@ public abstract class Vala.CodeNode {
 	/**
 	 * Contains all attributes that have been specified for this code node.
 	 */
-	public GLib.List<Attribute> attributes;
+	public Map<string, Attribute> attributes;
 
 	public string type_name {
 		get { return Type.from_instance (this).name (); }
@@ -143,14 +143,10 @@ public abstract class Vala.CodeNode {
 	 * @return     attribute
 	 */
 	public Attribute? get_attribute (string name) {
-		// FIXME: use hash table
-		foreach (Attribute a in attributes) {
-			if (a.name == name) {
-				return a;
-			}
+		if (attributes == null) {
+			return null;
 		}
-		
-		return null;
+		return attributes.get (name);
 	}
 
 	/**
@@ -162,10 +158,12 @@ public abstract class Vala.CodeNode {
 	public void set_attribute (string name, bool value, SourceReference? source_reference = null) {
 		var a = get_attribute (name);
 		if (value && a == null) {
-			a = new Attribute (name, source_reference);
-			attributes.append (a);
+			if (attributes == null) {
+				attributes = new HashMap<string, Attribute> ();
+			}
+			attributes.set (name, new Attribute (name, source_reference));
 		} else if (!value && a != null) {
-			attributes.remove (a);
+			attributes.remove (name);
 		}
 	}
 
@@ -180,7 +178,7 @@ public abstract class Vala.CodeNode {
 		if (a != null) {
 			a.args.remove (argument);
 			if (a.args.size == 0) {
-				attributes.remove (a);
+				attributes.remove (attribute);
 			}
 		}
 	}
@@ -193,6 +191,9 @@ public abstract class Vala.CodeNode {
 	 * @return          string value
 	 */
 	public string? get_attribute_string (string attribute, string argument) {
+		if (attributes == null) {
+			return null;
+		}
 		var a = get_attribute (attribute);
 		if (a == null) {
 			return null;
@@ -208,6 +209,9 @@ public abstract class Vala.CodeNode {
 	 * @return          integer value
 	 */
 	public int get_attribute_integer (string attribute, string argument, int default_value = 0) {
+		if (attributes == null) {
+			return default_value;
+		}
 		var a = get_attribute (attribute);
 		if (a == null) {
 			return default_value;
@@ -223,6 +227,9 @@ public abstract class Vala.CodeNode {
 	 * @return          double value
 	 */
 	public double get_attribute_double (string attribute, string argument, double default_value = 0) {
+		if (attributes == null) {
+			return default_value;
+		}
 		var a = get_attribute (attribute);
 		if (a == null) {
 			return default_value;
@@ -238,6 +245,9 @@ public abstract class Vala.CodeNode {
 	 * @return          bool value
 	 */
 	public bool get_attribute_bool (string attribute, string argument, bool default_value = false) {
+		if (attributes == null) {
+			return default_value;
+		}
 		var a = get_attribute (attribute);
 		if (a == null) {
 			return default_value;
@@ -253,10 +263,15 @@ public abstract class Vala.CodeNode {
 	 * @param value     string value
 	 */
 	public void set_attribute_string (string attribute, string argument, string value, SourceReference? source_reference = null) {
-		var a = get_attribute (attribute);
+		Attribute a = null;
+		if (attributes == null) {
+			attributes = new HashMap<string, Attribute> ();
+		} else {
+			a = attributes.get (attribute);
+		}
 		if (a == null) {
 			a = new Attribute (attribute, source_reference);
-			attributes.append (a);
+			attributes.set (attribute, a);
 		}
 		a.add_argument (argument, "\"%s\"".printf (value));
 	}
@@ -269,10 +284,16 @@ public abstract class Vala.CodeNode {
 	 * @param value     integer value
 	 */
 	public void set_attribute_integer (string attribute, string argument, int value, SourceReference? source_reference = null) {
-		var a = get_attribute (attribute);
+		Attribute a = null;
+		if (attributes == null) {
+			attributes = new HashMap<string, Attribute> ();
+		} else {
+			a = attributes.get (attribute);
+		}
+		a = get_attribute (attribute);
 		if (a == null) {
 			a = new Attribute (attribute, source_reference);
-			attributes.append (a);
+			attributes.set (attribute, a);
 		}
 		a.add_argument (argument, value.to_string ());
 	}
@@ -285,26 +306,38 @@ public abstract class Vala.CodeNode {
 	 * @param value     double value
 	 */
 	public void set_attribute_double (string attribute, string argument, double value, SourceReference? source_reference = null) {
-		var a = get_attribute (attribute);
+		Attribute a = null;
+		if (attributes == null) {
+			attributes = new HashMap<string, Attribute> ();
+		} else {
+			a = attributes.get (attribute);
+		}
+		a = get_attribute (attribute);
 		if (a == null) {
 			a = new Attribute (attribute, source_reference);
-			attributes.append (a);
+			attributes.set (attribute, a);
 		}
 		a.add_argument (argument, value.to_string ());
 	}
 
 	/**
-	 * Sets the integer value of the specified attribute argument.
+	 * Sets the boolean value of the specified attribute argument.
 	 *
 	 * @param attribute attribute name
 	 * @param argument  argument name
 	 * @param value     bool value
 	 */
 	public void set_attribute_bool (string attribute, string argument, bool value, SourceReference? source_reference = null) {
-		var a = get_attribute (attribute);
+		Attribute a = null;
+		if (attributes == null) {
+			attributes = new HashMap<string, Attribute> ();
+		} else {
+			a = attributes.get (attribute);
+		}
+		a = get_attribute (attribute);
 		if (a == null) {
 			a = new Attribute (attribute, source_reference);
-			attributes.append (a);
+			attributes.set (attribute, a);
 		}
 		a.add_argument (argument, value.to_string ());
 	}
diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala
index 031b947..251f430 100644
--- a/vala/valacodewriter.vala
+++ b/vala/valacodewriter.vala
@@ -1539,7 +1539,10 @@ public class Vala.CodeWriter : CodeVisitor {
 	}
 
 	private void write_attributes (CodeNode node) {
-		foreach (Attribute attr in node.attributes) {
+		if (node.attributes == null) {
+			return;
+		}
+		foreach (Attribute attr in node.attributes.get_values ()) {
 			write_indent ();
 			stream.printf ("[%s", attr.name);
 
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 4f9c016..42ec403 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -2289,16 +2289,20 @@ public class Vala.Genie.Parser : CodeVisitor {
 		}
 	}
 
-	List<Attribute>? parse_attributes (bool parameter) throws ParseError {
+	Map<string, Attribute>? parse_attributes (bool parameter) throws ParseError {
 		if (current () != TokenType.OPEN_BRACKET) {
 			return null;
 		}
-		var attrs = new ArrayList<Attribute> ();
+		var attrs = new HashMap<string, Attribute> ();
 		while (accept (TokenType.OPEN_BRACKET)) {
 			do {
 				var begin = get_location ();
 				string id = parse_identifier ();
-				var attr = new Attribute (id, get_src (begin));
+				var attr = attrs.get (id);
+				if (attr == null) {
+					attr = new Attribute (id, get_src (begin));
+					attrs.set (id, attr);
+				}
 				if (accept (TokenType.OPEN_PARENS)) {
 					if (current () != TokenType.CLOSE_PARENS) {
 						do {
@@ -2309,7 +2313,6 @@ public class Vala.Genie.Parser : CodeVisitor {
 					}
 					expect (TokenType.CLOSE_PARENS);
 				}
-				attrs.add (attr);
 			} while (accept (TokenType.COMMA));
 			expect (TokenType.CLOSE_BRACKET);
 		}
@@ -2318,11 +2321,9 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return attrs;
 	}
 
-	void set_attributes (CodeNode node, List<Attribute>? attributes) {
+	void set_attributes (CodeNode node, Map<string, Attribute>? attributes) {
 		if (attributes != null) {
-			foreach (Attribute attr in (List<Attribute>) attributes) {
-				node.attributes.append (attr);
-			}
+			node.attributes = attributes;
 		}
 	}
 
@@ -2475,7 +2476,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return RecoveryState.EOF;
 	}
 
-	Namespace parse_namespace_declaration (List<Attribute>? attrs) throws ParseError {
+	Namespace parse_namespace_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		expect (TokenType.NAMESPACE);
 		var sym = parse_symbol_name ();
@@ -2566,7 +2567,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		
 	}
 
-	Symbol parse_class_declaration (List<Attribute>? attrs) throws ParseError {
+	Symbol parse_class_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		expect (TokenType.CLASS);
 
@@ -2703,7 +2704,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		}
 	}
 
-	Constant parse_constant_declaration (List<Attribute>? attrs) throws ParseError {
+	Constant parse_constant_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 
 		expect (TokenType.CONST);
@@ -2742,7 +2743,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return c;
 	}
 
-	Field parse_field_declaration (List<Attribute>? attrs) throws ParseError {
+	Field parse_field_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		string id = parse_identifier ();
 		expect (TokenType.COLON);
@@ -2810,7 +2811,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 	
 	
 
-	Method parse_main_method_declaration (List<Attribute>? attrs) throws ParseError {
+	Method parse_main_method_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var id = "main";
 		var begin = get_location ();
 		DataType type = new VoidType ();
@@ -2842,7 +2843,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return method;
 	}
 
-	Method parse_method_declaration (List<Attribute>? attrs) throws ParseError {
+	Method parse_method_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		DataType type = new VoidType ();
 		expect (TokenType.DEF);
@@ -2992,7 +2993,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return method;
 	}
 
-	Property parse_property_declaration (List<Attribute>? attrs) throws ParseError {
+	Property parse_property_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var readonly = false;
 
@@ -3135,7 +3136,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return prop;
 	}
 
-	Vala.Signal parse_signal_declaration (List<Attribute>? attrs) throws ParseError {
+	Vala.Signal parse_signal_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		DataType type;
 
@@ -3193,7 +3194,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return sig;
 	}
 
-	Constructor parse_constructor_declaration (List<Attribute>? attrs) throws ParseError {
+	Constructor parse_constructor_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 
 		expect (TokenType.INIT);
@@ -3211,7 +3212,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return c;
 	}
 
-	Destructor parse_destructor_declaration (List<Attribute>? attrs) throws ParseError {
+	Destructor parse_destructor_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		expect (TokenType.FINAL);
 		var d = new Destructor (get_src (begin));
@@ -3220,7 +3221,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return d;
 	}
 
-	Symbol parse_struct_declaration (List<Attribute>? attrs) throws ParseError {
+	Symbol parse_struct_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 
 		expect (TokenType.STRUCT);
@@ -3277,7 +3278,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		}
 	}
 
-	Symbol parse_interface_declaration (List<Attribute>? attrs) throws ParseError {
+	Symbol parse_interface_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 
 		expect (TokenType.INTERFACE);
@@ -3354,7 +3355,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		}
 	}
 
-	Symbol parse_enum_declaration (List<Attribute>? attrs) throws ParseError {
+	Symbol parse_enum_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		expect (TokenType.ENUM);
 		var flags = parse_type_declaration_modifiers ();
@@ -3412,7 +3413,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return result;
 	}
 
-	Symbol parse_errordomain_declaration (List<Attribute>? attrs) throws ParseError {
+	Symbol parse_errordomain_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		expect (TokenType.ERRORDOMAIN);
 		var flags = parse_type_declaration_modifiers ();
@@ -3582,7 +3583,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return param;
 	}
 
-	CreationMethod parse_creation_method_declaration (List<Attribute>? attrs) throws ParseError {
+	CreationMethod parse_creation_method_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		CreationMethod method;
 
@@ -3632,7 +3633,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		return method;
 	}
 
-	Symbol parse_delegate_declaration (List<Attribute>? attrs) throws ParseError {
+	Symbol parse_delegate_declaration (Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		DataType type;
 
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 98d3007..7541ed0 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -683,7 +683,7 @@ public class Vala.GirParser : CodeVisitor {
 									if (invoker != null) {
 										m.set_attribute_string ("CCode", "vfunc_name", m.name);
 										m.name = invoker.symbol.name;
-										m.attributes.remove (attr);
+										m.set_attribute ("NoWrapper", false);
 										invoker.merged = true;
 										different_invoker = true;
 									}
@@ -3126,7 +3126,7 @@ public class Vala.GirParser : CodeVisitor {
 				method.external = true;
 				method.coroutine = true;
 				method.has_construct_function = finish_method.has_construct_function;
-				method.attributes = m.attributes.copy ();
+				method.attributes = m.attributes;
 				method.set_attribute_string ("CCode", "cname", node.get_cname ());
 				if (finish_method_base == "new") {
 					method.name = null;
diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala
index 57033c8..6b651a0 100644
--- a/vala/valalambdaexpression.vala
+++ b/vala/valalambdaexpression.vala
@@ -135,7 +135,7 @@ public class Vala.LambdaExpression : Expression {
 		var cb = (Delegate) ((DelegateType) target_type).delegate_symbol;
 		var return_type = cb.return_type.get_actual_type (target_type, null, this);
 		method = new Method (get_lambda_name (context), return_type, source_reference);
-		method.attributes = cb.attributes.copy ();
+		method.attributes = cb.attributes;
 		// track usage for flow analyzer
 		method.used = true;
 		method.check_deprecated (source_reference);
diff --git a/vala/valaparameter.vala b/vala/valaparameter.vala
index ff7775f..f4463a2 100644
--- a/vala/valaparameter.vala
+++ b/vala/valaparameter.vala
@@ -101,8 +101,7 @@ public class Vala.Parameter : Variable {
 			result.params_array = params_array;
 			result.direction = this.direction;
 			result.initializer = this.initializer;
-			result.attributes = this.attributes.copy ();
-			result.attributes = attributes.copy ();
+			result.attributes = this.attributes;
 			return result;
 		} else {
 			return new Parameter.with_ellipsis ();
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 6aedb92..95fa3fe 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -2106,16 +2106,20 @@ public class Vala.Parser : CodeVisitor {
 		}
 	}
 
-	List<Attribute>? parse_attributes () throws ParseError {
+	Map<string, Attribute>? parse_attributes () throws ParseError {
 		if (current () != TokenType.OPEN_BRACKET) {
 			return null;
 		}
-		var attrs = new ArrayList<Attribute> ();
+		var attrs = new HashMap<string, Attribute> ();
 		while (accept (TokenType.OPEN_BRACKET)) {
 			do {
 				var begin = get_location ();
 				string id = parse_identifier ();
-				var attr = new Attribute (id, get_src (begin));
+				var attr = attrs.get (id);
+				if (attr == null) {
+					attr = new Attribute (id, get_src (begin));
+					attrs.set (id, attr);
+				}
 				if (accept (TokenType.OPEN_PARENS)) {
 					if (current () != TokenType.CLOSE_PARENS) {
 						do {
@@ -2126,18 +2130,15 @@ public class Vala.Parser : CodeVisitor {
 					}
 					expect (TokenType.CLOSE_PARENS);
 				}
-				attrs.add (attr);
 			} while (accept (TokenType.COMMA));
 			expect (TokenType.CLOSE_BRACKET);
 		}
 		return attrs;
 	}
 
-	void set_attributes (CodeNode node, List<Attribute>? attributes) {
+	void set_attributes (CodeNode node, Map<string, Attribute>? attributes) {
 		if (attributes != null) {
-			foreach (Attribute attr in (List<Attribute>) attributes) {
-				node.attributes.append (attr);
-			}
+			node.attributes = attributes;
 		}
 	}
 
@@ -2398,7 +2399,7 @@ public class Vala.Parser : CodeVisitor {
 		return RecoveryState.EOF;
 	}
 
-	void parse_namespace_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_namespace_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		expect (TokenType.NAMESPACE);
 		var sym = parse_symbol_name ();
@@ -2449,7 +2450,7 @@ public class Vala.Parser : CodeVisitor {
 		}
 	}
 
-	void parse_class_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_class_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_type_declaration_modifiers ();
@@ -2504,7 +2505,7 @@ public class Vala.Parser : CodeVisitor {
 		}
 	}
 
-	void parse_constant_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_constant_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_member_declaration_modifiers ();
@@ -2539,7 +2540,7 @@ public class Vala.Parser : CodeVisitor {
 		parent.add_constant (c);
 	}
 
-	void parse_field_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_field_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_member_declaration_modifiers ();
@@ -2644,7 +2645,7 @@ public class Vala.Parser : CodeVisitor {
 		return map;
 	}
 
-	void parse_method_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_method_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_member_declaration_modifiers ();
@@ -2741,7 +2742,7 @@ public class Vala.Parser : CodeVisitor {
 		parent.add_method (method);
 	}
 
-	void parse_property_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_property_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_member_declaration_modifiers ();
@@ -2883,7 +2884,7 @@ public class Vala.Parser : CodeVisitor {
 		parent.add_property (prop);
 	}
 
-	void parse_signal_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_signal_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_member_declaration_modifiers ();
@@ -2919,7 +2920,7 @@ public class Vala.Parser : CodeVisitor {
 		parent.add_signal (sig);
 	}
 
-	void parse_constructor_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_constructor_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var flags = parse_member_declaration_modifiers ();
 		expect (TokenType.CONSTRUCT);
@@ -2937,7 +2938,7 @@ public class Vala.Parser : CodeVisitor {
 		parent.add_constructor (c);
 	}
 
-	void parse_destructor_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_destructor_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var flags = parse_member_declaration_modifiers ();
 		expect (TokenType.TILDE);
@@ -2958,7 +2959,7 @@ public class Vala.Parser : CodeVisitor {
 		parent.add_destructor (d);
 	}
 
-	void parse_struct_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_struct_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_type_declaration_modifiers ();
@@ -2998,7 +2999,7 @@ public class Vala.Parser : CodeVisitor {
 		}
 	}
 
-	void parse_interface_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_interface_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_type_declaration_modifiers ();
@@ -3041,7 +3042,7 @@ public class Vala.Parser : CodeVisitor {
 		}
 	}
 
-	void parse_enum_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_enum_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_type_declaration_modifiers ();
@@ -3098,7 +3099,7 @@ public class Vala.Parser : CodeVisitor {
 		}
 	}
 
-	void parse_errordomain_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_errordomain_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_type_declaration_modifiers ();
@@ -3285,7 +3286,7 @@ public class Vala.Parser : CodeVisitor {
 		return param;
 	}
 
-	void parse_creation_method_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_creation_method_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_member_declaration_modifiers ();
@@ -3355,7 +3356,7 @@ public class Vala.Parser : CodeVisitor {
 		parent.add_method (method);
 	}
 
-	void parse_delegate_declaration (Symbol parent, List<Attribute>? attrs) throws ParseError {
+	void parse_delegate_declaration (Symbol parent, Map<string, Attribute>? attrs) throws ParseError {
 		var begin = get_location ();
 		var access = parse_access_modifier ();
 		var flags = parse_member_declaration_modifiers ();



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