diff --git a/ChangeLog b/ChangeLog index 22f6711..1c353a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,21 @@ 2007-08-17 Mathias Hasselmann + * vala/valadatatype.vala, vala/valamember.vala, + vala/valanamespace.vala: remove cheader_filename handling + which is in Vala.Symbol now + * vala/valasymbol.vala: unify handling of cheader_filenames list + * vala/valafield.vala: make set_cname public + * vala/valainterfacewriter.vala: unify writing of CCode attribute to + generate cheader_filename parameters when needed and generate that + symbol for delegates + * vapigen/valagidlparser.vala: consider CCode.cheader_filename for + callbacks, methods and structs. consider CCode.cname for fields. + * vapi/packages/libglade-2.0/libglade-2.0.metadata, + vapi/libglade-2.0.vala: correct C header declarations and rename + AccelInfo.signal to signal_name (with a cname attribute this time) + +2007-08-17 Mathias Hasselmann + * vapi/libglade-2.0.vala: revert last change: the field really is called "signal" name as figured out by gidlgen - for almost five years now diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala index d419a52..162f878 100644 --- a/vala/valadatatype.vala +++ b/vala/valadatatype.vala @@ -37,8 +37,6 @@ public abstract class Vala.DataType : Symbol { */ public MemberAccessibility access; - private Gee.List cheader_filenames = new ArrayList (); - private Pointer pointer_type; /* holds the array types of this type; each rank is a separate one */ @@ -179,31 +177,6 @@ public abstract class Vala.DataType : Symbol { return null; } - public override Collection get_cheader_filenames () { - if (cheader_filenames.size == 0) { - /* default to header filenames of the namespace */ - foreach (string filename in parent_symbol.get_cheader_filenames ()) { - add_cheader_filename (filename); - } - - if (cheader_filenames.size == 0 && source_reference != null && !source_reference.file.pkg) { - // don't add default include directives for VAPI files - cheader_filenames.add (source_reference.file.get_cinclude_filename ()); - } - } - return new ReadOnlyCollection (cheader_filenames); - } - - /** - * Adds a filename to the list of C header filenames users of this data - * type must include. - * - * @param filename a C header filename - */ - public void add_cheader_filename (string! filename) { - cheader_filenames.add (filename); - } - /** * Returns the pointer type of this data type. * diff --git a/vala/valafield.vala b/vala/valafield.vala index fc28cc0..96f6f8f 100644 --- a/vala/valafield.vala +++ b/vala/valafield.vala @@ -107,10 +107,15 @@ public class Vala.Field : Member, Invokable, Lockable { return cname; } - private void set_cname (string! cname) { + /** + * Sets the name of this field as it is used in C code. + * + * @param cname the name to be used in C code + */ + public void set_cname (string! cname) { this.cname = cname; } - + private void process_ccode_attribute (Attribute! a) { if (a.has_argument ("cname")) { set_cname (a.get_string ("cname")); diff --git a/vala/valainterfacewriter.vala b/vala/valainterfacewriter.vala index fc976fc..2a26474 100644 --- a/vala/valainterfacewriter.vala +++ b/vala/valainterfacewriter.vala @@ -55,6 +55,40 @@ public class Vala.InterfaceWriter : CodeVisitor { stream = null; } + [NoArrayLength] // XXX working arround invokation bug with attrs = null + private void write_ccode_attribute (Symbol! s, string[] attrs) { + String ccode_params = new String (); + + if (s.has_custom_cheaders ()) { + ccode_params.append ("cheader_filename = \""); + var prefix_length = ccode_params.len; + + foreach (string cheader in s.get_cheader_filenames ()) { + if (ccode_params.len > prefix_length) + ccode_params.append_c (','); + + ccode_params.append (cheader); + } + + ccode_params.append_c ('\"'); + } + + if (null != attrs) { + for (int i = 0; null != attrs[i]; i += 2) { + if (ccode_params.len > 0) + ccode_params.append (", "); + + ccode_params.append_printf ("%s = \"%s\"", attrs[i], attrs[i + 1]); + } + } + + if (ccode_params.len > 0) { + write_indent (); + write_string ("[CCode (%s)]".printf (ccode_params.str)); + write_newline (); + } + } + public override void visit_namespace (Namespace! ns) { if (ns.pkg) { return; @@ -65,9 +99,13 @@ public class Vala.InterfaceWriter : CodeVisitor { return; } - write_indent (); - write_string ("[CCode (cprefix = \"%s\", lower_case_cprefix = \"%s\")]".printf (ns.get_cprefix (), ns.get_lower_case_cprefix ())); - write_newline (); + var ccode_params = new string[] { + "lower_case_cprefix", ns.get_lower_case_cprefix (), + "cprefix", ns.get_cprefix (), + null + }; + + write_ccode_attribute (ns, ccode_params); write_indent (); write_string ("namespace "); @@ -89,20 +127,7 @@ public class Vala.InterfaceWriter : CodeVisitor { return; } - write_indent (); - - var first = true; - string cheaders; - foreach (string cheader in cl.get_cheader_filenames ()) { - if (first) { - cheaders = cheader; - first = false; - } else { - cheaders = "%s,%s".printf (cheaders, cheader); - } - } - write_string ("[CCode (cheader_filename = \"%s\")]".printf (cheaders)); - write_newline (); + write_ccode_attribute (cl, null); write_indent (); write_string ("public "); @@ -163,20 +188,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_string ("[ReferenceType]"); } - write_indent (); - - var first = true; - string cheaders; - foreach (string cheader in st.get_cheader_filenames ()) { - if (first) { - cheaders = cheader; - first = false; - } else { - cheaders = "%s,%s".printf (cheaders, cheader); - } - } - write_string ("[CCode (cheader_filename = \"%s\")]".printf (cheaders)); - write_newline (); + write_ccode_attribute (st, null); write_indent (); write_string ("public struct "); @@ -198,20 +210,7 @@ public class Vala.InterfaceWriter : CodeVisitor { return; } - write_indent (); - - var first = true; - string cheaders; - foreach (string cheader in iface.get_cheader_filenames ()) { - if (first) { - cheaders = cheader; - first = false; - } else { - cheaders = "%s,%s".printf (cheaders, cheader); - } - } - write_string ("[CCode (cheader_filename = \"%s\")]".printf (cheaders)); - write_newline (); + write_ccode_attribute (iface, null); write_indent (); write_string ("public "); @@ -264,19 +263,8 @@ public class Vala.InterfaceWriter : CodeVisitor { return; } - write_indent (); - - var first = true; - string cheaders; - foreach (string cheader in en.get_cheader_filenames ()) { - if (first) { - cheaders = cheader; - first = false; - } else { - cheaders = "%s,%s".printf (cheaders, cheader); - } - } - write_string ("[CCode (cprefix = \"%s\", cheader_filename = \"%s\")]".printf (en.get_cprefix (), cheaders)); + var ccode_params = new string[] { "cprefix", en.get_cprefix (), null }; + write_ccode_attribute (en, ccode_params); write_indent (); write_string ("public enum "); @@ -301,6 +289,8 @@ public class Vala.InterfaceWriter : CodeVisitor { return; } + write_ccode_attribute (c, null); + write_indent (); write_string ("public const "); @@ -320,7 +310,12 @@ public class Vala.InterfaceWriter : CodeVisitor { if (f.access == MemberAccessibility.PRIVATE) { return; } - + + if (f.get_cname () != f.name) { + var ccode_params = new string[] { "cname", f.get_cname (), null }; + write_ccode_attribute (f, ccode_params); + } + write_indent (); write_string ("public "); if (f.type_reference.data_type != null && @@ -403,6 +398,8 @@ public class Vala.InterfaceWriter : CodeVisitor { return; } + write_ccode_attribute (cb, null); + write_indent (); write_string ("public static delegate "); @@ -461,23 +458,21 @@ public class Vala.InterfaceWriter : CodeVisitor { write_string ("[InstanceByReference]"); } - var ccode_params = new String (); - var separator = ""; + var ccode_params = new string[5]; + ccode_params.length = 0; if (m.get_cname () != m.get_default_cname ()) { - ccode_params.append_printf ("%scname = \"%s\"", separator, m.get_cname ()); - separator = ", "; + string cname = m.get_cname (); // XXX work arround ownership bug + ccode_params[ccode_params.length++] = "cname"; + ccode_params[ccode_params.length++] = cname; } if (m.sentinel != m.DEFAULT_SENTINEL) { - ccode_params.append_printf ("%ssentinel = \"%s\"", separator, m.sentinel); - separator = ", "; + ccode_params[ccode_params.length++] = "sentinel"; + ccode_params[ccode_params.length++] = m.sentinel; } - if (ccode_params.len > 0) { - write_indent (); - write_string ("[CCode (%s)]".printf (ccode_params.str)); - } - + write_ccode_attribute (m, ccode_params); + write_indent (); write_string ("public"); diff --git a/vala/valamember.vala b/vala/valamember.vala index d2a7510..a826d98 100644 --- a/vala/valamember.vala +++ b/vala/valamember.vala @@ -27,35 +27,7 @@ using Gee; * Represents a general class member. */ public class Vala.Member : Symbol { - private Gee.List cheader_filenames = new ArrayList (); - public override void accept (CodeVisitor! visitor) { visitor.visit_member (this); } - - public override Collection get_cheader_filenames () { - if (cheader_filenames.size == 0) { - /* default to header filenames of the namespace */ - foreach (string filename in parent_symbol.get_cheader_filenames ()) { - add_cheader_filename (filename); - } - - if (cheader_filenames.size == 0 && source_reference != null && !source_reference.file.pkg) { - // don't add default include directives for VAPI files - cheader_filenames.add (source_reference.file.get_cinclude_filename ()); - } - } - return new ReadOnlyCollection (cheader_filenames); - } - - - /** - * Adds a filename to the list of C header filenames users of this data - * type must include. - * - * @param filename a C header filename - */ - public void add_cheader_filename (string! filename) { - cheader_filenames.add (filename); - } } diff --git a/vala/valanamespace.vala b/vala/valanamespace.vala index f4b63fc..8c4169f 100644 --- a/vala/valanamespace.vala +++ b/vala/valanamespace.vala @@ -44,8 +44,6 @@ public class Vala.Namespace : Symbol { private string cprefix; private string lower_case_cprefix; - private Gee.List cheader_filenames = new ArrayList (); - private Gee.List namespaces = new ArrayList (); /** @@ -288,10 +286,6 @@ public class Vala.Namespace : Symbol { this.lower_case_cprefix = cprefix; } - public override Collection get_cheader_filenames () { - return new ReadOnlyCollection (cheader_filenames); - } - /** * Returns the C header filename of this namespace. * @@ -318,8 +312,8 @@ public class Vala.Namespace : Symbol { * @param cheader_filename header filename */ public void set_cheader_filename (string! cheader_filename) { - cheader_filenames = new ArrayList (); - cheader_filenames.add (cheader_filename); + clear_cheader_filenames (); + add_cheader_filename (cheader_filename); } private void process_ccode_attribute (Attribute! a) { @@ -332,7 +326,7 @@ public class Vala.Namespace : Symbol { if (a.has_argument ("cheader_filename")) { var val = a.get_string ("cheader_filename"); foreach (string filename in val.split (",")) { - cheader_filenames.add (filename); + add_cheader_filename (filename); } } } diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala index 1127a6a..8ad6492 100644 --- a/vala/valasymbol.vala +++ b/vala/valasymbol.vala @@ -145,6 +145,9 @@ public abstract class Vala.Symbol : CodeNode { return ""; } + private Gee.List cheader_filenames = new ArrayList (); + private bool custom_cheaders = false; + /** * Returns a list of C header filenames users of this symbol must * include. @@ -152,7 +155,46 @@ public abstract class Vala.Symbol : CodeNode { * @return list of C header filenames for this symbol */ public virtual Collection get_cheader_filenames () { - return new ReadOnlyCollection (); + if (cheader_filenames.size == 0) { + /* default to header filenames of the namespace */ + if (null != parent_symbol) { + foreach (string filename in parent_symbol.get_cheader_filenames ()) { + add_cheader_filename (filename); + } + } + + if (cheader_filenames.size == 0 && source_reference != null && !source_reference.file.pkg) { + // don't add default include directives for VAPI files + add_cheader_filename (source_reference.file.get_cinclude_filename ()); + } else { + custom_cheaders = false; + } + } + return new ReadOnlyCollection (cheader_filenames); + } + + protected void clear_cheader_filenames () { + cheader_filenames.clear (); + } + + /** + * Adds a filename to the list of C header filenames users of this data + * type must include. + * + * @param filename a C header filename + */ + public void add_cheader_filename (string! filename) { + cheader_filenames.add (filename); + custom_cheaders = true; + } + + /** + * Checks whether custom C header filename have been added to this data type. + * + * @return true if custom C header filename have been added + */ + public bool has_custom_cheaders() { + return custom_cheaders; } /** diff --git a/vapi/libglade-2.0.vala b/vapi/libglade-2.0.vala index 2f5ebb7..92a6e44 100644 --- a/vapi/libglade-2.0.vala +++ b/vapi/libglade-2.0.vala @@ -1,22 +1,29 @@ -[CCode (cprefix = "Glade", lower_case_cprefix = "glade_")] +[CCode (cheader_filename = "glade/glade.h", lower_case_cprefix = "glade_", cprefix = "Glade")] namespace Glade { - [CCode (cheader_filename = "glade/glade.h")] public class XML : GLib.Object { + [CCode (cheader_filename = "glade/glade-build.h")] public weak Gtk.Widget build_widget (Glade.WidgetInfo info); public bool @construct (string fname, string root, string domain); public bool construct_from_buffer (string buffer, int size, string root, string domain); + [CCode (cheader_filename = "glade/glade-build.h")] public weak Gtk.AccelGroup ensure_accel (); public static GLib.Type get_type (); public weak Gtk.Widget get_widget (string name); public weak GLib.List get_widget_prefix (string name); + [CCode (cheader_filename = "glade/glade-build.h")] public void handle_internal_child (Gtk.Widget parent, Glade.ChildInfo child_info); + [CCode (cheader_filename = "glade/glade-build.h")] public void handle_widget_prop (Gtk.Widget widget, string prop_name, string value_name); public XML (string fname, string root, string domain); public XML.from_buffer (string buffer, int size, string root, string domain); public weak string relative_file (string filename); + [CCode (cheader_filename = "glade/glade-build.h")] public void set_common_params (Gtk.Widget widget, Glade.WidgetInfo info); + [CCode (cheader_filename = "glade/glade-build.h")] public void set_packing_property (Gtk.Widget parent, Gtk.Widget child, string name, string value); + [CCode (cheader_filename = "glade/glade-build.h")] public void set_toplevel (Gtk.Window window); + [CCode (cheader_filename = "glade/glade-build.h")] public bool set_value_from_string (GLib.ParamSpec pspec, string string, GLib.Value value); public void signal_autoconnect (); public void signal_autoconnect_full (Glade.XMLConnectFunc func, pointer user_data); @@ -25,26 +32,27 @@ namespace Glade { public void signal_connect_full (string handler_name, Glade.XMLConnectFunc func, pointer user_data); } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct AccelInfo { public uint key; public Gdk.ModifierType modifiers; - public weak string signal; + [CCode (cname = "signal")] + public weak string signal_name; } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct AtkActionInfo { public weak string action_name; public weak string description; } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct AtkRelationInfo { public weak string target; public weak string type; } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct ChildInfo { public weak Glade.Property properties; public uint n_properties; @@ -52,7 +60,7 @@ namespace Glade { public weak string internal_child; } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct Interface { public weak string requires; public uint n_requires; @@ -64,13 +72,13 @@ namespace Glade { public void dump (string filename); } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct Property { public weak string name; public weak string value; } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct SignalInfo { public weak string name; public weak string handler; @@ -78,7 +86,7 @@ namespace Glade { public uint after; } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] + [CCode (cheader_filename = "glade/glade-build.h")] public struct WidgetInfo { public weak Glade.WidgetInfo parent; public weak string classname; @@ -99,29 +107,38 @@ namespace Glade { public uint n_children; } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] public struct Parser { public static weak Glade.Interface parse_buffer (string buffer, int len, string domain); public static weak Glade.Interface parse_file (string file, string domain); } [ReferenceType] - [CCode (cheader_filename = "glade/glade.h")] public struct Standard { + [CCode (cheader_filename = "glade/glade-build.h")] public void build_children (Gtk.Widget parent, Glade.WidgetInfo info); + [CCode (cheader_filename = "glade/glade-build.h")] public static weak Gtk.Widget build_widget (Glade.XML xml, GLib.Type widget_type, Glade.WidgetInfo info); } + [CCode (cheader_filename = "glade/glade-build.h")] public static delegate void ApplyCustomPropFunc (Glade.XML xml, Gtk.Widget widget, string propname, string value); + [CCode (cheader_filename = "glade/glade-build.h")] public static delegate void BuildChildrenFunc (Glade.XML xml, Gtk.Widget parent, Glade.WidgetInfo info); + [CCode (cheader_filename = "glade/glade-build.h")] public static delegate weak Gtk.Widget FindInternalChildFunc (Glade.XML xml, Gtk.Widget parent, string childname); + [CCode (cheader_filename = "glade/glade-build.h")] public static delegate weak Gtk.Widget NewFunc (Glade.XML xml, GLib.Type widget_type, Glade.WidgetInfo info); public static delegate void XMLConnectFunc (string handler_name, GLib.Object object, string signal_name, string signal_data, GLib.Object connect_object, bool after, pointer user_data); public static delegate weak Gtk.Widget XMLCustomWidgetHandler (Glade.XML xml, string func_name, string name, string string1, string string2, int int1, int int2, pointer user_data); + [CCode (cheader_filename = "glade/glade-build.h")] public static int enum_from_string (GLib.Type type, string string); + [CCode (cheader_filename = "glade/glade-build.h")] public static uint flags_from_string (GLib.Type type, string string); public static weak string get_widget_name (Gtk.Widget widget); public static weak Glade.XML get_widget_tree (Gtk.Widget widget); + [CCode (cheader_filename = "glade/glade-build.h")] public static weak string module_check_version (int version); + [CCode (cheader_filename = "glade/glade-build.h")] public static void register_custom_prop (GLib.Type type, string prop_name, Glade.ApplyCustomPropFunc apply_prop); + [CCode (cheader_filename = "glade/glade-build.h")] public static void register_widget (GLib.Type type, Glade.NewFunc new_func, Glade.BuildChildrenFunc build_children, Glade.FindInternalChildFunc find_internal_child); public static void set_custom_handler (Glade.XMLCustomWidgetHandler handler, pointer user_data); } diff --git a/vapi/packages/libglade-2.0/libglade-2.0.metadata b/vapi/packages/libglade-2.0/libglade-2.0.metadata index 3a96c1a..0a39ab9 100644 --- a/vapi/packages/libglade-2.0/libglade-2.0.metadata +++ b/vapi/packages/libglade-2.0/libglade-2.0.metadata @@ -1,2 +1,34 @@ Glade cheader_filename="glade/glade.h" +GladeAccelInfo.signal name="signal_name" + +GladeNewFunc cheader_filename="glade/glade-build.h" +GladeBuildChildrenFunc cheader_filename="glade/glade-build.h" +GladeFindInternalChildFunc cheader_filename="glade/glade-build.h" +GladeApplyCustomPropFunc cheader_filename="glade/glade-build.h" + +GladeProperty cheader_filename="glade/glade-build.h" +GladeSignalInfo cheader_filename="glade/glade-build.h" +GladeAtkActionInfo cheader_filename="glade/glade-build.h" +GladeAtkRelationInfo cheader_filename="glade/glade-build.h" +GladeAccelInfo cheader_filename="glade/glade-build.h" +GladeWidgetInfo cheader_filename="glade/glade-build.h" +GladeChildInfo cheader_filename="glade/glade-build.h" +GladeInterface cheader_filename="glade/glade-build.h" + +glade_register_widget cheader_filename="glade/glade-build.h" +glade_register_custom_prop cheader_filename="glade/glade-build.h" +glade_xml_set_toplevel cheader_filename="glade/glade-build.h" +glade_xml_ensure_accel cheader_filename="glade/glade-build.h" +glade_xml_handle_widget_prop cheader_filename="glade/glade-build.h" +glade_xml_set_packing_property cheader_filename="glade/glade-build.h" +glade_xml_build_widget cheader_filename="glade/glade-build.h" +glade_xml_handle_internal_child cheader_filename="glade/glade-build.h" +glade_xml_set_common_params cheader_filename="glade/glade-build.h" +glade_xml_set_value_from_string cheader_filename="glade/glade-build.h" +glade_standard_build_widget cheader_filename="glade/glade-build.h" +glade_standard_build_children cheader_filename="glade/glade-build.h" +glade_enum_from_string cheader_filename="glade/glade-build.h" +glade_flags_from_string cheader_filename="glade/glade-build.h" +glade_module_check_version cheader_filename="glade/glade-build.h" +glade_module_register_widgets cheader_filename="glade/glade-build.h" diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 4ee58a3..b0fb39d 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -245,11 +245,16 @@ public class Vala.GIdlParser : CodeVisitor { private Callback parse_callback (IdlNodeFunction! f_node) { weak IdlNode node = (IdlNode) f_node; + var cb = new Callback (node.name, parse_param (f_node.result), current_source_reference); + cb.access = MemberAccessibility.PUBLIC; + var attributes = get_attributes (node.name); if (attributes != null) { foreach (string attr in attributes) { var nv = attr.split ("=", 2); - if (nv[0] == "hidden") { + if (nv[0] == "cheader_filename") { + cb.add_cheader_filename (eval (nv[1])); + } else if (nv[0] == "hidden") { if (eval (nv[1]) == "1") { return null; } @@ -257,9 +262,6 @@ public class Vala.GIdlParser : CodeVisitor { } } - var cb = new Callback (node.name, parse_param (f_node.result), current_source_reference); - cb.access = MemberAccessibility.PUBLIC; - foreach (weak IdlNodeParam param in f_node.parameters) { weak IdlNode param_node = (IdlNode) param; @@ -288,6 +290,8 @@ public class Vala.GIdlParser : CodeVisitor { var nv = attr.split ("=", 2); if (nv[0] == "is_value_type" && eval (nv[1]) == "1") { st.set_is_reference_type (false); + } else if (nv[0] == "cheader_filename") { + st.add_cheader_filename (eval (nv[1])); } else if (nv[0] == "hidden") { if (eval (nv[1]) == "1") { return null; @@ -787,6 +791,8 @@ public class Vala.GIdlParser : CodeVisitor { if (nv[0] == "name") { m.set_cname (m.name); m.name = eval (nv[1]); + } else if (nv[0] == "cheader_filename") { + m.add_cheader_filename (eval (nv[1])); } else if (nv[0] == "hidden") { if (eval (nv[1]) == "1") { return null; @@ -953,6 +959,9 @@ public class Vala.GIdlParser : CodeVisitor { return null; } + var field = new Field (node.name, type, null, current_source_reference); + field.access = MemberAccessibility.PUBLIC; + var attributes = get_attributes ("%s.%s".printf (current_data_type.name, node.name)); if (attributes != null) { foreach (string attr in attributes) { @@ -961,17 +970,17 @@ public class Vala.GIdlParser : CodeVisitor { if (eval (nv[1]) == "1") { return null; } + } else if (nv[0] == "name") { + field.set_cname (field.name); + field.name = eval (nv[1]); } } } - + if (current_type_symbol_set != null) { current_type_symbol_set.add (node.name); } - var field = new Field (node.name, type, null, current_source_reference); - field.access = MemberAccessibility.PUBLIC; - return field; }