Fix scoped enum not working in gmock-gen.py

This commit is contained in:
Josh Bodily
2017-08-10 10:58:57 -06:00
parent 75f0723c45
commit 713b077870
2 changed files with 21 additions and 0 deletions

View File

@@ -1264,6 +1264,9 @@ class AstBuilder(object):
return self._GetNestedType(Union)
def handle_enum(self):
token = self._GetNextToken()
if not (token.token_type == tokenize.NAME and token.name == 'class'):
self._AddBackToken(token)
return self._GetNestedType(Enum)
def handle_auto(self):