summaryrefslogtreecommitdiffstats
path: root/googlemock/scripts/generator/cpp/ast.py
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock/scripts/generator/cpp/ast.py')
-rwxr-xr-xgooglemock/scripts/generator/cpp/ast.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/googlemock/scripts/generator/cpp/ast.py b/googlemock/scripts/generator/cpp/ast.py
index b4890a54..cc9f89aa 100755
--- a/googlemock/scripts/generator/cpp/ast.py
+++ b/googlemock/scripts/generator/cpp/ast.py
@@ -1599,12 +1599,11 @@ class AstBuilder(object):
bases, templated_types, body, self.namespace_stack)
def handle_namespace(self):
- token = self._GetNextToken()
# Support anonymous namespaces.
name = None
- if token.token_type == tokenize.NAME:
- name = token.name
- token = self._GetNextToken()
+ name_tokens, token = self.GetName()
+ if name_tokens:
+ name = ''.join([t.name for t in name_tokens])
self.namespace_stack.append(name)
assert token.token_type == tokenize.SYNTAX, token
# Create an internal token that denotes when the namespace is complete.
OpenPOWER on IntegriCloud