# Path: lib/utils/fileutils.py
# def fn2k(filename):
#     """ shortcut for filename2key """
#     return filename2key(filename)


import re
from ..utils.fileutils import fn2k
        line += 1

        a = (e['start']['line']-1, e['start']['character']-1)
        b = (e['end']['line']-1, e['end']['character']-1)
        line_to_pos[line] = (a,b)
        line_to_file[line] = e['file']


    if len(errors) == 0:
        text.append("\n\nno errors")

    text.append('\n')
    text = ''.join(text)

    return text, line_to_file, line_to_pos


def tssjs_to_highlighter(self, errors, file_name):
    """
        Creates a list of error and warning regions for all errors.

        Returns error_regions, warning_regions
    """
    error_regions = []
    warning_regions = []

    key = fn2k(file_name)
    self.errors[key] = {}

    for e in errors:

# Path: lib/utils/fileutils.py
# def fn2k(filename):
#     """ shortcut for filename2key """
#     return filename2key(filename)


# Path: lib/server/typescripttoolsparser.py
import re
from ..utils.fileutils import fn2k

        line += 1

        a = (e['start']['line']-1, e['start']['character']-1)
        b = (e['end']['line']-1, e['end']['character']-1)
        line_to_pos[line] = (a,b)
        line_to_file[line] = e['file']


    if len(errors) == 0:
        text.append("\n\nno errors")

    text.append('\n')
    text = ''.join(text)

    return text, line_to_file, line_to_pos


def tssjs_to_highlighter(self, errors, file_name):
    """
        Creates a list of error and warning regions for all errors.

        Returns error_regions, warning_regions
    """
    error_regions = []
    warning_regions = []

    key = fn2k(file_name)
    self.errors[key] = {}

    for e in errors:

        if fn2k(e['file']) == key: