Skip to content

Commit 350f4a3

Browse files
Decent to Descent (llvm#154040)
[lldb] Rename RecursiveDecentFormatter to RecursiveDescentFormatter (NFC)
1 parent 7f27482 commit 350f4a3

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

lldb/packages/Python/lldbsuite/test/lldbutil.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,8 +1464,8 @@ def format(self, value, buffer=None):
14641464
return output.getvalue()
14651465

14661466

1467-
class RecursiveDecentFormatter(BasicFormatter):
1468-
"""The recursive decent formatter prints the value and the decendents.
1467+
class RecursiveDescentFormatter(BasicFormatter):
1468+
"""The recursive descent formatter prints the value and the descendents.
14691469
14701470
The constructor takes two keyword args: indent_level, which defaults to 0,
14711471
and indent_child, which defaults to 2. The current indentation level is
@@ -1482,15 +1482,14 @@ def format(self, value, buffer=None):
14821482
output = io.StringIO()
14831483
else:
14841484
output = buffer
1485-
14861485
BasicFormatter.format(self, value, buffer=output, indent=self.lindent)
14871486
new_indent = self.lindent + self.cindent
14881487
for child in value:
14891488
if child.GetSummary() is not None:
14901489
BasicFormatter.format(self, child, buffer=output, indent=new_indent)
14911490
else:
14921491
if child.GetNumChildren() > 0:
1493-
rdf = RecursiveDecentFormatter(indent_level=new_indent)
1492+
rdf = RecursiveDescentFormatter(indent_level=new_indent)
14941493
rdf.format(child, buffer=output)
14951494
else:
14961495
BasicFormatter.format(self, child, buffer=output, indent=new_indent)

lldb/test/API/python_api/value/TestValueAPI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test(self):
8383

8484
fmt = lldbutil.BasicFormatter()
8585
cvf = lldbutil.ChildVisitingFormatter(indent_child=2)
86-
rdf = lldbutil.RecursiveDecentFormatter(indent_child=2)
86+
rdf = lldbutil.RecursiveDescentFormatter(indent_child=2)
8787
if self.TraceOn():
8888
print(fmt.format(days_of_week))
8989
print(cvf.format(days_of_week))

lldb/utils/lui/lldbutil.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,8 +1040,8 @@ def format(self, value, buffer=None):
10401040
return output.getvalue()
10411041

10421042

1043-
class RecursiveDecentFormatter(BasicFormatter):
1044-
"""The recursive decent formatter prints the value and the decendents.
1043+
class RecursiveDescentFormatter(BasicFormatter):
1044+
"""The recursive descent formatter prints the value and the descendents.
10451045
10461046
The constructor takes two keyword args: indent_level, which defaults to 0,
10471047
and indent_child, which defaults to 2. The current indentation level is
@@ -1058,15 +1058,14 @@ def format(self, value, buffer=None):
10581058
output = io.StringIO()
10591059
else:
10601060
output = buffer
1061-
10621061
BasicFormatter.format(self, value, buffer=output, indent=self.lindent)
10631062
new_indent = self.lindent + self.cindent
10641063
for child in value:
10651064
if child.GetSummary() is not None:
10661065
BasicFormatter.format(self, child, buffer=output, indent=new_indent)
10671066
else:
10681067
if child.GetNumChildren() > 0:
1069-
rdf = RecursiveDecentFormatter(indent_level=new_indent)
1068+
rdf = RecursiveDescentFormatter(indent_level=new_indent)
10701069
rdf.format(child, buffer=output)
10711070
else:
10721071
BasicFormatter.format(self, child, buffer=output, indent=new_indent)

0 commit comments

Comments
 (0)