summaryrefslogtreecommitdiffstats
path: root/test cases/rust/19 structured sources/gen.py
blob: 16e5c04e1c21cdd8a20b74969eb7e9dfc46ba484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python3

import argparse
import textwrap


def main() -> None:
    parser = argparse.ArgumentParser()
    parser.add_argument('output')
    args = parser.parse_args()

    with open(args.output, 'w') as f:
        f.write(textwrap.dedent('''\
            pub fn bar() -> () {
                println!("Hello, World!");
            }'''))


if __name__ == "__main__":
    main()