def test_export(self): tree = self.p(''' OPTIONS(v = 'u') print(COMP({sum(x, {'c': 'd'}) for x in S}, [S], {'a': 'b'})) ''') tree = export_program(tree) exp_tree = parse_structast(''' print({sum(x) for x in S}) ''') self.assertEqual(tree, exp_tree)
def p(self, source, subst=None, mode=None): return IncLangImporter.run( parse_structast(source, mode=mode, subst=subst))
def p(self, source, mode=None, subst=None): tree = parse_structast(source, mode=mode, subst=subst) return IncMacroProcessor.run(tree)
def p(self, source, mode=None): return parse_structast(source, mode=mode)
def p(self, source, subst=None, mode=None): return IncLangImporter.run( parse_structast(source, mode=mode, subst=subst))
def p(self, source, mode=None, **kargs): return parse_structast(source, mode=mode, **kargs)
def p(self, source, mode=None, subst=None): tree = parse_structast(source, mode=mode, subst=subst) return IncMacroProcessor.run(tree)
def p(self, source, mode=None): tree = parse_structast(source, mode=mode) tree = IncMacroProcessor.run(tree) return tree
def p(self, source, mode=None, **kargs): return parse_structast(source, mode=mode, **kargs)