Skip to content
Snippets Groups Projects
Commit 92cd62ba authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fix two minor doc errors

parent 71810559
No related branches found
No related tags found
1 merge request!425Refactor and Improve Documentation
Pipeline #70156 passed
......@@ -10,7 +10,7 @@ def dfs_preorder(
Args:
node: The tree's root node
filter_pred: Filter predicate; a node is only returned to the caller if `yield_pred(node)` returns True
filter_pred: Filter predicate; a node is only returned to the caller if ``yield_pred(node)`` returns True
"""
if filter_pred(node):
yield node
......@@ -26,7 +26,7 @@ def dfs_postorder(
Args:
node: The tree's root node
filter_pred: Filter predicate; a node is only returned to the caller if `yield_pred(node)` returns True
filter_pred: Filter predicate; a node is only returned to the caller if ``yield_pred(node)`` returns True
"""
for c in node.children:
yield from dfs_postorder(c, filter_pred)
......
......@@ -20,7 +20,7 @@ def failing_cast(target: type | tuple[type, ...], obj: Any) -> Any:
class AstEqWrapper:
"""Wrapper around AST nodes that computes a hash from the AST's textual representation
and maps the `__eq__` method onto `structurally_equal`.
and maps the ``__eq__`` method onto `structurally_equal <PsAstNode.structurally_equal>`.
Useful in dictionaries when the goal is to keep track of subtrees according to their
structure, e.g. in elimination of constants or common subexpressions.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment