2007-12-18 Jürg Billeter <j@bitron.ch>
+ * vala/parser.y, vala/valaattributeprocessor.vala,
+ vala/valaconstant.vala: support cname attribute for constants
+
+2007-12-18 Jürg Billeter <j@bitron.ch>
+
* vala/parser.y: support PointerType for parameters
2007-12-16 Jürg Billeter <j@bitron.ch>
cb.process_attributes ();
}
+ public override void visit_constant (Constant! c) {
+ c.process_attributes ();
+ }
+
public override void visit_field (Field! f) {
f.process_attributes ();
}
type_reference = new_type;
}
}
+
+ private void process_ccode_attribute (Attribute! a) {
+ if (a.has_argument ("cname")) {
+ cname = a.get_string ("cname");
+ }
+ if (a.has_argument ("cheader_filename")) {
+ var val = a.get_string ("cheader_filename");
+ foreach (string filename in val.split (",")) {
+ add_cheader_filename (filename);
+ }
+ }
+ }
+
+ /**
+ * Process all associated attributes.
+ */
+ public void process_attributes () {
+ foreach (Attribute a in attributes) {
+ if (a.name == "CCode") {
+ process_ccode_attribute (a);
+ }
+ }
+ }
}