Lines Matching refs:f

110 def ocaml_instance_of_field(f):  argument
111 if isinstance(f.type, idl.KeyedUnion):
112 name = f.type.keyvar.name
114 name = f.name
115 return "%s : %s" % (munge_name(name), ocaml_type_of(f.type))
119 for f in ty.fields:
120 if f.type.private:
122 x = ocaml_instance_of_field(f)
140 for f in ty.fields:
141 if f.type is None: continue
142 if f.type.rawname is not None: continue
143 if isinstance(f.type, idl.Struct) and not f.type.has_fields(): continue
144 s += "\ntype %s_%s =\n" % (nparent,f.name)
146 s += gen_struct(f.type, indent + "\t")
153 for f in ty.fields:
154 if f.type is None:
155 u.append("%s" % (f.name.capitalize()))
156 elif isinstance(f.type, idl.Struct):
157 if f.type.rawname is not None:
158 u.append("%s of %s.t" % (f.name.capitalize(), f.type.rawname.capitalize()))
159 elif f.type.has_fields():
160 u.append("%s of %s_%s" % (f.name.capitalize(), nparent, f.name))
162 u.append("%s" % (f.name.capitalize()))
227 for f in ty.fields:
228 ku, union_type = gen_ocaml_keyedunions(f.type, interface, "\t")
236 for f in ty.fields:
237 anon = gen_ocaml_anonstruct(f.type, interface, "\t", f.name)
309 for f in ty.fields:
310 if f.type is None or not f.type.has_fields():
313 f.enumname)
321 for f in ty.fields:
322 if f.type is not None and f.type.has_fields():
323 if f.type.private:
326 s += "\t\t %s = %s;\n" % (parent + ty.keyvar.name, f.enumname)
327 (nparent,fexpr) = ty.member(c, f, False)
328 … s += "%s" % c_val(f.type, fexpr, "Field(%s, 0)" % o, parent=nparent, indent=indent+"\t\t ")
337 for f in ty.fields:
338 if f.type.private:
340 (nparent,fexpr) = ty.member(c, f, ty.rawname is not None)
341 s += "%s\n" % c_val(f.type, fexpr, "Field(%s, %d)" % (o,n), parent=nparent)
406 for f in ty.fields:
407 s += "\t case %s:\n" % f.enumname
408 if f.type is None:
412 elif not f.type.has_fields():
418 (nparent,fexpr) = ty.member(c, f, parent is None)
422 s += ocaml_Val(f.type, 'tmp', fexpr, indent="\t\t ", parent=nparent)
442 for f in ty.fields:
443 if f.type.private:
446 (nparent,fexpr) = ty.member(c, f, parent is None)
449 s += "\t%s\n" % ocaml_Val(f.type, fn, ty.pass_arg(fexpr, c), parent=nparent)
485 for f in ty.fields:
486 if isinstance(f.type, idl.KeyedUnion):
487 union_types.append(f.type.keyvar)