Rewriting non-library files


I am using the RecursiveASTVisitor to walk the AST and rewrite code automatically using Rewriter for Objective-C programs. Walking the AST results in analyzing the ASTs of the library files and rewriting logic which is embedded within the visit methods can potentially affect the library files.

a) Is there a way to restrict the AST walk to just non-library files?
b) Since the above option is likely not possible, is it possible to restrict the rewriting to non-library files?