Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
combine.py File Reference

Namespaces

namespace  combine
 

Functions

bool test_match_include ()
 
bool test_match_pragma ()
 
Optional[Path] resolve_include (str file, Optional[Path] parent=None)
 
None resolve_excluded_files (Optional[List[str]] file_list, Set[Path] resolved, Optional[Path] parent=None)
 
None write_line (str line)
 
None error_line (Any line)
 
None add_file (Path file, str file_name=None)
 

Variables

Set roots = set()
 
Set excludes = set()
 
Set keeps = set()
 
bool keep_pragma = False
 
TextIO destn = sys.stdout
 
Set found = set()
 
Pattern pragma_regex = re.compile(r'^\s*#\s*pragma\s*once\s*')
 
Pattern include_regex = re.compile(r'^\s*#\s*include\s*"(.+?)"')
 
 parser = argparse.ArgumentParser(description='Amalgamate Tool', epilog=f'example: {sys.argv[0]} -r ../my/path -r ../other/path -o out.c in.c')
 
 action
 
 type
 
 Path
 
 help
 
 default
 
 False
 
 args = parser.parse_args()
 
 input
 
 strict