def _load_as_template(directory): if shared.is_source_clang(directory): return TemplateClang(directory) if shared.is_source_sol(directory): return TemplateSol(directory) if shared.is_source_rust(directory): return TemplateRust(directory)
def get_language(self, template): directory = self.get_template_folder(template) if shared.is_source_clang(directory): return "C / C++" if shared.is_source_sol(directory): return "Solidity" if shared.is_source_rust(directory): return "Rust" return "unknown"
def load_project(directory): guards.is_directory(directory) if shared.is_source_clang(directory): return ProjectClang(directory) if shared.is_source_cpp(directory): return ProjectCpp(directory) if shared.is_source_sol(directory): return ProjectSol(directory) if shared.is_source_rust(directory): return ProjectRust(directory) else: raise errors.NotSupportedProject(directory)