from setting the context for AST typecasting
# to complete the Type 1 (ast.*) nmigen language construct abstraction
# from Type 2 (Module - this class) Module must be told what AST type
# it may cast m.If/Elif conditions and m.Switch
- self._astTypeCast = _astTypeFn or Value.cast
+ sself._setATypeCastFn(_astTypeFn)
+
+ def _setAstTypeCastFn(self, typefn=None):
+ self._astTypeCast = typefn or Value.cast
def _check_context(self, construct, context):
if self._ctrl_context != context: