def get_highlighted_lines(syntax_name, text, syntax_settings_map):
    """Return list of text objs as lines of python source.

    Parameters
    ==========
    syntax_name (string)
        represents name of syntax used to map the received
        text; we use it to retrieve the suitable mapping
        function to map the syntax of the text.
    text (string)
        Text to be mapped, generating mapped syntax data
        used to highlighted text objects.
    syntax_settings_map (dict)
        maps strings to dicts; the strings indicate the
        kind of highlighted data (including 'normal' for
        text which isn't highlighted at all); the dicts
        are keyword arguments for each kind of highlighted
        data.
    """
    ### retrieve syntax mapping function
    syntax_mapping_func = SYNTAX_TO_MAPPING_FUNCTION[syntax_name]

    ### get mapped syntax
    mapped_syntax_data = syntax_mapping_func(text)

    ### retrieve list of lines
    text_lines = text.splitlines() or [""]

    ### get height of text surfaces from text settings
    height = syntax_settings_map["normal"]["font_height"]

    ### create and return special list of text objects
    ### representing lines

    return List2D(
        ## a text object is either an empty line or
        ## a text object rendered with the text settings
        (
            render_highlighted_line(
                line_text=line_string,
                mapped_syntax_data=mapped_syntax_data[line_index],
                syntax_settings_map=syntax_settings_map,
                join_objects=True,
            )
            if line_string
            else Object2D(image=EMPTY_SURF, rect=Rect(0, 0, 0, height))
        )
        ## iterate over each line index and line content
        for line_index, line_string in enumerate(text_lines)
    )
Return list of text objs as lines of python source.

    Parameters
    ==========
    syntax_name (string)
        represents name of syntax used to map the received
        text; we use it to retrieve the suitable mapping
        function to map the syntax of the text.
    text (string)
        Text to be mapped, generating mapped syntax data
        used to highlighted text objects.
    syntax_settings_map (dict)
        maps strings to dicts; the strings indicate the
        kind of highlighted data (including 'normal' for
        text which isn't highlighted at all); the dicts
        are keyword arguments for each kind of highlighted
        data.
    
nodezator/textman/text.py