Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cpp/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,8 @@ def handle_friend(self):
tokens.append(last)
self._add_back_tokens(tokens)
token = self._get_next_token()
if token.name == '::':
token = self._get_next_token()
result = self._generate_one(token)
else:
if tokens[0].name == 'class':
Expand Down
8 changes: 4 additions & 4 deletions test/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ test/foo.h:101: static data 'ptof'
test/foo.h:106: static data 'data'
test/foo.h:208: static data 'garbage_state'
test/foo.h:225: static data 'flags_'
test/foo.h:239: static data 'foo'
test/foo.h:241: static data 'GlobalKey'
test/foo.h:268: static data 'Singleton::instance_'
test/foo.h:274: static data 'string_list'
test/foo.h:240: static data 'foo'
test/foo.h:242: static data 'GlobalKey'
test/foo.h:269: static data 'Singleton::instance_'
test/foo.h:275: static data 'string_list'
test/include.h:1: 'empty.cc' does not need to be #included
test/include.h:1: should not #include C++ source file 'empty.cc'
test/include.h:3: 'include.h' #includes itself
Expand Down
1 change: 1 addition & 0 deletions test/foo.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ class MyF {
class Colon {
virtual ::Foo GetFoo();
::Foo GetFoo2();
friend ::Foo& fn();
};

string foo = "\nX=\"/*\"";
Expand Down