toolchain.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:calmjs 作者: calmjs 项目源码 文件源码
def transpile_modname_source_target(self, spec, modname, source, target):
        """
        The function that gets called by compile_transpile_entry for
        processing the provided JavaScript source file provided by some
        Python package through the transpiler instance.
        """

        if not isinstance(self.transpiler, BaseUnparser):
            _deprecation_warning(
                'transpiler callable assigned to %r must be an instance of '
                'calmjs.parse.unparsers.base.BaseUnparser by calmjs-4.0.0; '
                'if the original transpile behavior is to be retained, the '
                'subclass may instead override this method to call '
                '`simple_transpile_modname_source_target` directly, as '
                'this fallback behavior will be removed by calmjs-4.0.0' % (
                    self,
                )
            )
            return self.simple_transpile_modname_source_target(
                spec, modname, source, target)

        # do the new thing here.
        return self._transpile_modname_source_target(
            spec, modname, source, target)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号