Look at your function s definition. If you forget using "()" after function declaration somewhere, you ll get plenty of errors with the same format:
... ??: class, interface, or enum expected ...
And also you have forgot closing bracket after your class or function definition ends. But note that these missing bracket, is not the only reason for this type of error.