Function difft::parse::guess_language::looks_like_objc
source · fn looks_like_objc(path: &Path, src: &str) -> bool
Expand description
Use a heuristic to determine if a ‘.h’ file looks like Objective-C. We look for a line starting with ‘#import’, ‘@interface’ or ‘@protocol’ near the top of the file. These keywords are not valid C or C++, so this should not produce false positives.