From 5b61ce3ee5b15e6356487dd97236bf663a96a391 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Tue, 1 Feb 2011 00:00:03 +0000 Subject: Picks up gtest r536; renames implicit_cast and down_cast to reduce the chance of clash (by Roman Perepelitsa); enables gmock_gen.py to handle storage specifiers (by Steve Fox). --- scripts/generator/cpp/ast.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts/generator/cpp/ast.py') diff --git a/scripts/generator/cpp/ast.py b/scripts/generator/cpp/ast.py index 47dc9a07..6f61f877 100755 --- a/scripts/generator/cpp/ast.py +++ b/scripts/generator/cpp/ast.py @@ -1483,7 +1483,13 @@ class AstBuilder(object): assert class_token.token_type == tokenize.SYNTAX, class_token token = class_token else: - self._AddBackToken(class_token) + # Skip any macro (e.g. storage class specifiers) after the + # 'class' keyword. + next_token = self._GetNextToken() + if next_token.token_type == tokenize.NAME: + self._AddBackToken(next_token) + else: + self._AddBackTokens([class_token, next_token]) name_tokens, token = self.GetName() class_name = ''.join([t.name for t in name_tokens]) bases = None -- cgit v1.2.3