supported indexing to enum declarations.