File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -410,15 +410,17 @@ def get_type_name(self):
410
410
else :
411
411
return "&str"
412
412
413
+
413
414
def _getVariantName (variant ) -> str :
414
415
"""
415
416
Since the enum variant's type name is in the form `TheEnumName::TheVariantName$Variant`,
416
417
we can extract `TheVariantName` from it for display purpose.
417
418
"""
418
419
s = variant .GetType ().GetName ()
419
- match = re .search (r' ::([^:]+)\$Variant$' , s )
420
+ match = re .search (r" ::([^:]+)\$Variant$" , s )
420
421
return match .group (1 ) if match else ""
421
422
423
+
422
424
class ClangEncodedEnumProvider :
423
425
"""Pretty-printer for 'clang-encoded' enums support implemented in LLDB"""
424
426
@@ -444,9 +446,7 @@ def get_child_at_index(self, index: int) -> SBValue:
444
446
ClangEncodedEnumProvider .VALUE_MEMBER_NAME
445
447
)
446
448
return value .CreateChildAtOffset (
447
- _getVariantName (self .variant ),
448
- 0 ,
449
- value .GetType ()
449
+ _getVariantName (self .variant ), 0 , value .GetType ()
450
450
)
451
451
return None
452
452
You can’t perform that action at this time.
0 commit comments