Exemple #1
0
def parse_location(d, p=None):
    loc = symbols.Location(get_value(d, 'file'), get_value(p, 'line', 0),
                           get_value(p, 'column', 0), get_value(d, 'project'))
    if not loc.is_null():
        return loc
    loc = symbols.InstalledLocation(
        symbols.parse_package(get_value(d, 'package')), get_value(d, 'cabal'))
    if not loc.is_null():
        return loc
    return None
Exemple #2
0
def parse_location(d):
    loc = symbols.Location(get_value(d, 'file'), get_value(d, 'project'))
    if not loc.is_null():
        return loc
    loc = symbols.InstalledLocation(
        symbols.parse_package(get_value(d, 'package')),
        parse_package_db(get_value(d, 'db')))
    if not loc.is_null():
        return loc
    loc = symbols.OtherLocation(get_value(d, 'source'))
    if not loc.is_null():
        return loc
    return None
Exemple #3
0
def parse_location(d, p = None):
    loc = symbols.Location(
        get_value(d, 'file'),
        get_value(p, 'line', 0),
        get_value(p, 'column', 0),
        get_value(d, 'project'))
    if not loc.is_null():
        return loc
    loc = symbols.InstalledLocation(
        symbols.parse_package(get_value(d, 'package')),
        get_value(d, 'cabal'))
    if not loc.is_null():
        return loc
    return None
def parse_location(d):
    loc = symbols.Location(
        get_value(d, 'file'),
        get_value(d, 'project'))
    if not loc.is_null():
        return loc
    loc = symbols.InstalledLocation(
        symbols.parse_package(get_value(d, 'package')),
        parse_package_db(get_value(d, 'db')))
    if not loc.is_null():
        return loc
    loc = symbols.OtherLocation(
        get_value(d, 'source'))
    if not loc.is_null():
        return loc
    return None