Add support for parsing generator declarations.
Add tests for parsing generator declarations.