root/trunk/infrastructure/pyd/generators/fn_to_dg.py

Revision 24, 373 bytes (checked in by KirkMcDonald, 2 years ago)

CeleriD/Pyd? integration.

Line 
1 f = open('fn_to_dg.txt', 'w')
2
3 template = """\
4     } else static if (ARGS == %s) {
5         alias RetType delegate(%s) type;
6 """
7
8 inner_template = """ArgType!(Fn, %s)"""
9
10 for i in range(1, 11):
11     inner_parts = []
12     for j in range(1, i+1):
13         inner_parts.append(inner_template % j)
14     f.write(template % (i, ', '.join(inner_parts)))
15 f.write("    }")
Note: See TracBrowser for help on using the browser.