Ensure dot is used in class declarations

The parser wasn't checking for a dot in the class name, so you could write anything there.