I agree with @Stokestack that it is a problem with Xcode. The usual way I debug it is by progressively commenting out sections of my code and observing at which point the compiler error disappears (or changes). This will help you narrow down and find the real syntax issue you need to fix.