File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1204,6 +1204,7 @@ class CppVariable(_CppVariable):
1204
1204
* ``extern`` - True if its an extern, False if not
1205
1205
* ``parent`` - If not None, either the class this is a property of, or the
1206
1206
method this variable is a parameter in
1207
+ * ``access`` - Anything in supportedAccessSpecifier
1207
1208
"""
1208
1209
1209
1210
Vars = []
@@ -1320,6 +1321,7 @@ def __str__(self):
1320
1321
"desc" ,
1321
1322
"line_number" ,
1322
1323
"extern" ,
1324
+ "access" ,
1323
1325
]
1324
1326
cpy = dict ((k , v ) for (k , v ) in list (self .items ()) if k in keys_white_list )
1325
1327
if "array_size" in self :
@@ -3382,6 +3384,7 @@ def _evaluate_stack(self, token=None):
3382
3384
else :
3383
3385
atype ["raw_type" ] = ns + atype ["type" ]
3384
3386
3387
+ atype ["access" ] = self .curAccessSpecifier
3385
3388
if self .curClass :
3386
3389
klass = self .classes [self .curClass ]
3387
3390
klass ["using" ][alias ] = atype
Original file line number Diff line number Diff line change @@ -4015,6 +4015,7 @@ def setUp(self):
4015
4015
self .cppHeader = CppHeaderParser .CppHeader (
4016
4016
"""
4017
4017
template <class D> class P {
4018
+ using A = typename f::TP<D>::A;
4018
4019
public:
4019
4020
using State = typename f::TP<D>::S;
4020
4021
P(State st);
@@ -4026,9 +4027,15 @@ def setUp(self):
4026
4027
def test_fn (self ):
4027
4028
c = self .cppHeader .classes ["P" ]
4028
4029
self .assertEqual ("P" , c ["name" ])
4030
+ self .assertEqual (len (c ["using" ]), 2 )
4029
4031
state = c ["using" ]["State" ]
4030
4032
self .assertEqual (state ["raw_type" ], "typename f::TP<D >::S" )
4031
4033
self .assertEqual (state ["type" ], "typename TP<D >::S" )
4034
+ self .assertEqual (state ["access" ], "public" )
4035
+ private = c ["using" ]["A" ]
4036
+ self .assertEqual (private ["raw_type" ], "typename f::TP<D >::A" )
4037
+ self .assertEqual (private ["type" ], "typename TP<D >::A" )
4038
+ self .assertEqual (private ["access" ], "private" )
4032
4039
4033
4040
m = c ["methods" ]["public" ][0 ]
4034
4041
self .assertEqual (m ["name" ], "P" )
You can’t perform that action at this time.
0 commit comments