def add_parser_arguments(parser: argparse.ArgumentParser) -> None:
    'Sets up an argument parser for pw watch.'
    parser.add_argument('--patterns', help=(_WATCH_PATTERN_DELIMITER + '-delimited list of globs to watch to trigger recompile'), default=_WATCH_PATTERN_DELIMITER.join(_WATCH_PATTERNS))
    parser.add_argument('--ignore_patterns', dest='ignore_patterns_string', help=(_WATCH_PATTERN_DELIMITER + '-delimited list of globs to ignore events from'))
    parser.add_argument('--exclude_list', nargs='+', type=Path, help='directories to ignore during pw watch', default=[])
    parser.add_argument('--no-restart', dest='restart', action='store_false', help='do not restart ongoing builds if files change')
    parser.add_argument('default_build_targets', nargs='*', metavar='target', default=[], help='Automatically locate a build directory and build these targets. For example, `host docs` searches for a Ninja build directory (starting with out/) and builds the `host` and `docs` targets. To specify one or more directories, ust the -C / --build_directory option.')
    parser.add_argument('-C', '--build_directory', dest='build_directories', nargs='+', action='append', default=[], metavar=('directory', 'target'), help='Specify a build directory and optionally targets to build. `pw watch -C out tgt` is equivalent to `ninja -C out tgt`')
Sets up an argument parser for pw watch.
def add_parser_arguments(parser: argparse.ArgumentParser) -> None:
    
    parser.add_argument('--patterns', help=(_WATCH_PATTERN_DELIMITER + '-delimited list of globs to watch to trigger recompile'), default=_WATCH_PATTERN_DELIMITER.join(_WATCH_PATTERNS))
    parser.add_argument('--ignore_patterns', dest='ignore_patterns_string', help=(_WATCH_PATTERN_DELIMITER + '-delimited list of globs to ignore events from'))
    parser.add_argument('--exclude_list', nargs='+', type=Path, help='directories to ignore during pw watch', default=[])
    parser.add_argument('--no-restart', dest='restart', action='store_false', help='do not restart ongoing builds if files change')
    parser.add_argument('default_build_targets', nargs='*', metavar='target', default=[], help='Automatically locate a build directory and build these targets. For example, `host docs` searches for a Ninja build directory (starting with out/) and builds the `host` and `docs` targets. To specify one or more directories, ust the -C / --build_directory option.')
    parser.add_argument('-C', '--build_directory', dest='build_directories', nargs='+', action='append', default=[], metavar=('directory', 'target'), help='Specify a build directory and optionally targets to build. `pw watch -C out tgt` is equivalent to `ninja -C out tgt`')