Accurate syntax error for invalid method body