def _list_syntax_error():
_, e, _ = sys.exc_info()<EOL>if isinstance(e, SyntaxError) and hasattr(e, '<STR_LIT:filename>'):<EOL><INDENT>yield path.dirname(e.filename)<EOL><DEDENT>
If we're going through a syntax error, add the directory of the error to
the watchlist.