Add method add_conversion_points into a ConvRepo
This commit is contained in:
@@ -79,11 +79,14 @@ class ConvRepo:
|
||||
def convertor_set(self):
|
||||
return self._convertor_set
|
||||
|
||||
def add_conversion_points(self, conversion_points: Iterable[ConversionPoint]):
|
||||
self._convertor_set |= set(conversion_points)
|
||||
|
||||
def add_injector(self,
|
||||
func: Callable,
|
||||
rettype: Optional[type] = None,
|
||||
type_remap: Optional[dict[str, type]] = None):
|
||||
self._convertor_set |= set(ConversionPoint.from_fn(func, rettype=rettype, type_remap=type_remap))
|
||||
self.add_conversion_points(ConversionPoint.from_fn(func, rettype=rettype, type_remap=type_remap))
|
||||
|
||||
def _callseq_from_callgraph(self, cg: Callgraph) -> list[ConversionPoint]:
|
||||
if len(cg.variants) == 0:
|
||||
|
||||
Reference in New Issue
Block a user