Lines Matching refs:indent
117 def gen_struct(ty, indent): argument
123 x = x.replace("\n", "\n"+indent)
124 s += indent + x + ";\n"
127 def gen_ocaml_keyedunions(ty, interface, indent, parent = None): argument
146 s += gen_struct(f.type, indent + "\t")
173 return s.replace("\n", "\n%s" % indent), union_type
175 def gen_ocaml_anonstruct(ty, interface, indent, parent = None): argument
184 s += gen_struct(ty, indent)
189 s = indent + s
190 return s.replace("\n", "\n%s" % indent)
192 def gen_ocaml_ml(ty, interface, indent=""): argument
264 return s.replace("\n", "\n%s" % indent)
266 def c_val(ty, c, o, indent="", parent = None): argument
267 s = indent
293 s += c_val(ty.elem_type, c+"[i]", "Field(%s, i)" % o, indent="\t\t", parent=parent) + "\n"
328 … s += "%s" % c_val(f.type, fexpr, "Field(%s, 0)" % o, parent=nparent, indent=indent+"\t\t ")
346 return s.replace("\n", "\n%s" % indent)
348 def gen_c_val(ty, indent=""): argument
356 s += c_val(ty, "c_val", "v", indent="\t") + "\n"
361 return s.replace("\n", "\n%s" % indent)
363 def ocaml_Val(ty, o, c, indent="", parent = None): argument
364 s = indent
422 s += ocaml_Val(f.type, 'tmp', fexpr, indent="\t\t ", parent=nparent)
456 return s.replace("\n", "\n%s" % indent).rstrip(indent)
458 def gen_Val_ocaml(ty, indent=""): argument
466 s += ocaml_Val(ty, "%s_ocaml" % ty.rawname, "%s_c" % ty.rawname, indent="\t") + "\n"
470 return s.replace("\n", "\n%s" % indent)