genie: Fix parser's inner state when a struct is declared after a class
If the struct is declared after a class and has a default creation
method, the parser will raise a "missing return type in method ..."
error.
The cause of the bug is that the global 'class_name' variable is not
updated when the parser encounters a struct, so the previous value
is used, and if a class has been parsed before, this value will be the
name of the class instead of the struct.