def mangle_native_fn_name(method_decl): result = "NATIVE" result += mangle_class_name(classof(method_decl)) result += method_decl.get("name") return result.replace("_", ".")
def mangle_field_name(field_decl): return mangle_class_name(classof(field_decl)) + "_" + collect_token_text(field_decl.find("./variable")) + "_"
def mangle_fn_name(method_decl): name = mangle_class_name(classof(method_decl)) + method_decl.get("name") + "_" for arg in argument_list_for_declaration(method_decl.env, method_decl): name += arg.replace("[", "__lbrace__").replace("]", "__rbrace__") + "_" return name.replace(".", "_")