Exemple #1
0
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)
Exemple #2
0
def format_type_name(name):
    return proper(str(name))
Exemple #3
0
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))
Exemple #4
0
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)
Exemple #5
0
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("-", ""))
Exemple #6
0
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
Exemple #7
0
def format_class_name(name):
    return proper(str(name))