vala r2006 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2006 - in trunk: . vala
- Date: Sun, 9 Nov 2008 22:43:28 +0000 (UTC)
Author: juergbi
Date: Sun Nov 9 22:43:27 2008
New Revision: 2006
URL: http://svn.gnome.org/viewvc/vala?rev=2006&view=rev
Log:
2008-11-09 JÃrg Billeter <j bitron ch>
* vala/valacreationmethod.vala:
* vala/valadelegate.vala:
* vala/valadelegatetype.vala:
* vala/valaenum.vala:
* vala/valafield.vala:
* vala/valaformalparameter.vala:
* vala/valamethod.vala:
* vala/valaproperty.vala:
* vala/valastruct.vala:
* vala/valavaluetype.vala:
Ensure attributes of field, property, parameter, and return types
are processed before querying C header filenames
Modified:
trunk/ChangeLog
trunk/vala/valacreationmethod.vala
trunk/vala/valadelegate.vala
trunk/vala/valadelegatetype.vala
trunk/vala/valaenum.vala
trunk/vala/valafield.vala
trunk/vala/valaformalparameter.vala
trunk/vala/valamethod.vala
trunk/vala/valaproperty.vala
trunk/vala/valastruct.vala
trunk/vala/valavaluetype.vala
Modified: trunk/vala/valacreationmethod.vala
==============================================================================
--- trunk/vala/valacreationmethod.vala (original)
+++ trunk/vala/valacreationmethod.vala Sun Nov 9 22:43:27 2008
@@ -131,13 +131,16 @@
return false;
}
+ var old_symbol = analyzer.current_symbol;
+ var old_return_type = analyzer.current_return_type;
+
analyzer.current_symbol = this;
analyzer.current_return_type = return_type;
accept_children (analyzer);
- analyzer.current_symbol = analyzer.current_symbol.parent_symbol;
- analyzer.current_return_type = null;
+ analyzer.current_symbol = old_symbol;
+ analyzer.current_return_type = old_return_type;
if (analyzer.current_symbol.parent_symbol is Method) {
/* lambda expressions produce nested methods */
Modified: trunk/vala/valadelegate.vala
==============================================================================
--- trunk/vala/valadelegate.vala (original)
+++ trunk/vala/valadelegate.vala Sun Nov 9 22:43:27 2008
@@ -337,8 +337,16 @@
process_attributes ();
+ var old_source_file = analyzer.current_source_file;
+
+ if (source_reference != null) {
+ analyzer.current_source_file = source_reference.file;
+ }
+
accept_children (analyzer);
+ analyzer.current_source_file = old_source_file;
+
return !error;
}
}
Modified: trunk/vala/valadelegatetype.vala
==============================================================================
--- trunk/vala/valadelegatetype.vala (original)
+++ trunk/vala/valadelegatetype.vala Sun Nov 9 22:43:27 2008
@@ -70,4 +70,8 @@
public override string? get_type_id () {
return "G_TYPE_POINTER";
}
+
+ public override bool check (SemanticAnalyzer analyzer) {
+ return delegate_symbol.check (analyzer);
+ }
}
Modified: trunk/vala/valaenum.vala
==============================================================================
--- trunk/vala/valaenum.vala (original)
+++ trunk/vala/valaenum.vala Sun Nov 9 22:43:27 2008
@@ -307,8 +307,16 @@
process_attributes ();
+ var old_source_file = analyzer.current_source_file;
+
+ if (source_reference != null) {
+ analyzer.current_source_file = source_reference.file;
+ }
+
accept_children (analyzer);
+ analyzer.current_source_file = old_source_file;
+
return !error;
}
}
Modified: trunk/vala/valafield.vala
==============================================================================
--- trunk/vala/valafield.vala (original)
+++ trunk/vala/valafield.vala Sun Nov 9 22:43:27 2008
@@ -203,6 +203,8 @@
checked = true;
+ field_type.check (analyzer);
+
process_attributes ();
if (initializer != null) {
Modified: trunk/vala/valaformalparameter.vala
==============================================================================
--- trunk/vala/valaformalparameter.vala (original)
+++ trunk/vala/valaformalparameter.vala Sun Nov 9 22:43:27 2008
@@ -184,6 +184,10 @@
}
analyzer.current_symbol = parent_symbol;
+ if (parameter_type != null) {
+ parameter_type.check (analyzer);
+ }
+
accept_children (analyzer);
if (analyzer.context.non_null && default_expression != null) {
Modified: trunk/vala/valamethod.vala
==============================================================================
--- trunk/vala/valamethod.vala (original)
+++ trunk/vala/valamethod.vala Sun Nov 9 22:43:27 2008
@@ -652,6 +652,8 @@
analyzer.current_symbol = this;
analyzer.current_return_type = return_type;
+ return_type.check (analyzer);
+
var init_attr = get_attribute ("ModuleInit");
if (init_attr != null) {
source_reference.file.context.module_init_method = this;
Modified: trunk/vala/valaproperty.vala
==============================================================================
--- trunk/vala/valaproperty.vala (original)
+++ trunk/vala/valaproperty.vala Sun Nov 9 22:43:27 2008
@@ -421,8 +421,8 @@
}
analyzer.current_symbol = this;
- property_type.accept (analyzer);
-
+ property_type.check (analyzer);
+
if (get_accessor != null) {
get_accessor.accept (analyzer);
}
Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala (original)
+++ trunk/vala/valastruct.vala Sun Nov 9 22:43:27 2008
@@ -615,6 +615,13 @@
process_attributes ();
+ var old_source_file = analyzer.current_source_file;
+ var old_symbol = analyzer.current_symbol;
+ var old_struct = analyzer.current_struct;
+
+ if (source_reference != null) {
+ analyzer.current_source_file = source_reference.file;
+ }
analyzer.current_symbol = this;
analyzer.current_struct = this;
@@ -624,8 +631,9 @@
Report.error (source_reference, "structs cannot be empty");
}
- analyzer.current_symbol = analyzer.current_symbol.parent_symbol;
- analyzer.current_struct = null;
+ analyzer.current_source_file = old_source_file;
+ analyzer.current_symbol = old_symbol;
+ analyzer.current_struct = old_struct;
return !error;
}
Modified: trunk/vala/valavaluetype.vala
==============================================================================
--- trunk/vala/valavaluetype.vala (original)
+++ trunk/vala/valavaluetype.vala Sun Nov 9 22:43:27 2008
@@ -77,4 +77,8 @@
return false;
}
+
+ public override bool check (SemanticAnalyzer analyzer) {
+ return type_symbol.check (analyzer);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]