def output_variable(value_name, type_name, is_undefined=False): if type_name != "": value_type_components = str(type_name).split(" ") if len(value_type_components) != 1: type_name = proper(str(type_name)) else: type_name = "_" output_value("var", value_name, type_name, is_undefined=is_undefined)
def format_type_name(name): return proper(str(name))
def output_type_definition(type_name, definition_type): execute_with_dictation( type_name, lambda n: replace_in_text("const %s = %s {$};" % (proper(str(n)), definition_type)), lambda n: Text("%s {}" % definition_type))
def output_constant(value_name, type_name): if type_name != "": value_type_components = str(type_name).split(" ") if len(value_type_components) != 1: type_name = proper(str(type_name)) output_value("const", value_name, type_name)
def format_name(name, visibility_attribute): if visibility_attribute is None or visibility_attribute == "private": return camel_case(str(name).replace("-", "")) elif visibility_attribute == "public": return proper(str(name).replace("-", ""))
def format_module_name(name): name_string = str(name) components = name_string.split(".") module_name = ".".join([proper(n) for n in components]) return module_name
def format_class_name(name): return proper(str(name))