vala r1151 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1151 - in trunk: . vala
- Date: Sat, 22 Mar 2008 22:19:49 +0000 (GMT)
Author: juergbi
Date: Sat Mar 22 22:19:49 2008
New Revision: 1151
URL: http://svn.gnome.org/viewvc/vala?rev=1151&view=rev
Log:
2008-03-22 Juerg Billeter <j bitron ch>
* vala/parser.y, vala/valanamespace.vala: support nested namespaces,
fixes bug 516584
Modified:
trunk/ChangeLog
trunk/vala/parser.y
trunk/vala/valanamespace.vala
Modified: trunk/vala/parser.y
==============================================================================
--- trunk/vala/parser.y (original)
+++ trunk/vala/parser.y Sat Mar 22 22:19:49 2008
@@ -2630,8 +2630,7 @@
;
outer_declaration
- : namespace_declaration
- | namespace_member_declaration
+ : namespace_member_declaration
;
opt_namespace_member_declarations
@@ -2645,7 +2644,8 @@
;
namespace_member_declaration
- : class_declaration
+ : namespace_declaration
+ | class_declaration
| struct_declaration
| interface_declaration
| enum_declaration
Modified: trunk/vala/valanamespace.vala
==============================================================================
--- trunk/vala/valanamespace.vala (original)
+++ trunk/vala/valanamespace.vala Sat Mar 22 22:19:49 2008
@@ -260,7 +260,7 @@
if (cprefixes.size > 0) {
return cprefixes[0];
} else if (null != name) {
- return name;
+ return parent_symbol.get_cprefix () + name;
} else {
return "";
}
@@ -295,7 +295,7 @@
if (name == null) {
lower_case_cprefix = "";
} else {
- lower_case_cprefix = "%s_".printf (camel_case_to_lower_case (name));
+ lower_case_cprefix = "%s%s_".printf (parent_symbol.get_lower_case_cprefix (), camel_case_to_lower_case (name));
}
}
return lower_case_cprefix;
@@ -347,7 +347,7 @@
private void process_ccode_attribute (Attribute! a) {
if (a.has_argument ("cprefix")) {
- foreach(string name in a.get_string ("cprefix").split (","))
+ foreach (string name in a.get_string ("cprefix").split (","))
add_cprefix (name);
}
if (a.has_argument ("lower_case_cprefix")) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]