What are parser errors?
Parser errors are produced by Swiftify either as warnings for the Xcode extension or the AppCode plugin or in the console when using the Advanced Project Converter, Web Converter or the Finder extension. If found during the conversion, although not fatal, they can ruin the entire output of the process!
Why do they happen?
These errors are rare but are usually produced due to:
- Yet to be supported Objective-C constructs
- Preprocessor macros that may confuse the parser
The severity of these errors can reach the point where an entire method disappears during conversion. This is also one of the reasons why it is recommended to convert one file at a time during whole-project conversions.
How can I deal with them?
There are two ways in which you can handle these errors:
1. Comment out the offending line in the source Objective-C code.
2. Refactor the offending line until the error disappears.
Doing this before conversion is very important and may dramatically improve the conversion result. If you find yourself facing these errors frequently, they are worth reporting here.