Lex the enclosing method as a method or a class

It's a method if it includes '(', or a class otherwise.
Support single-quoted labels