Exemplo n.º 1
0
 def _translator_func(self, platform, file_names, out_file, module_name,
                      translator_args, incremental):
     kw = dict(self.translator_arguments)
     kw['list_imports'] = True
     deps, js_libs = translate(self.compiler, file_names, out_file,
                               module_name, **kw)
     return deps, js_libs
Exemplo n.º 2
0
    def _translator_func(self, platform, file_names, out_file, module_name,
                         translator_args, incremental):
        if out_file in _deps_cache:
            return _deps_cache[out_file]

        deps, js_libs = translate(self.compiler, file_names, out_file,
                                  module_name, **translator_args)
        _deps_cache[out_file] = (deps, js_libs)
        return deps, js_libs
Exemplo n.º 3
0
 def _translator_func(self, platform, file_names, out_file, module_name,
                      translator_args, incremental):
     kw = dict(self.translator_arguments)
     kw['list_imports'] = True
     deps, js_libs = translate(self.compiler,
                               file_names,
                               out_file,
                               module_name,
                               **kw)
     return deps, js_libs
Exemplo n.º 4
0
    def _translator_func(self, platform, file_names, out_file, module_name,
                         translator_args, incremental):
        if out_file in _deps_cache:
            return _deps_cache[out_file]

        deps, js_libs = translate(self.compiler,
                                  file_names,
                                  out_file,
                                  module_name,
                                  **translator_args)
        _deps_cache[out_file] = (deps, js_libs)
        return deps, js_libs
Exemplo n.º 5
0
Arquivo: do.py Projeto: AlexChick/PCC
    a += 1
    bb = 0
    from a.b import c
    c()
    a = 42
    def main():
        import a.b
        a.b.something()
        a = 1
        import z as x
        x()
        from x.z import y, p as pp
    """)
f.close()

translator.translate([imports], out_file,
                         debug=False,
                         print_statements = True,
                         function_argument_checking=True,
                         attribute_checking=True,
                         source_tracking=False,
                         line_tracking=False,
                         store_source=False)
(['a', 'x.z.y', 'x', 'x.z', 'x.z.p', 'a.b', 'a.b.c', 'z'], set([]))

print(file(outfile).read())