def parse_file(self, sls_path):
        config = self.state.document.settings.env.config
        formulas_dirs = config.formulas_dirs
        fpath = sls_path.replace('.', '/')

        name_options = (
            '{0}.sls'.format(fpath),
            os.path.join(fpath, 'init.sls')
        )

        paths = [os.path.join(fdir, fname)
                for fname in name_options
                    for fdir in formulas_dirs]

        for i in paths:
            try:
                with open(i, 'rb') as f:
                    return f.readlines()
            except IOError:
                pass

        raise IOError("Could not find sls file '{0}'".format(sls_path))
Registers the given aliases to be exposed in parsed BUILD files.
dataset/ETHPy150Open saltstack/salt/doc/_ext/saltdomain.py/LiterateFormula.parse_file--crossover with--dataset/ETHPy150Open pantsbuild/pants/src/python/pants/build_graph/build_configuration.py/BuildConfiguration.register_aliases