diff --git a/aas_core_codegen/parse/retree/__init__.py b/aas_core_codegen/parse/retree/__init__.py index 078439b29..95ffb46d7 100644 --- a/aas_core_codegen/parse/retree/__init__.py +++ b/aas_core_codegen/parse/retree/__init__.py @@ -35,7 +35,7 @@ Visitor = _types.Visitor Transformer = _types.Transformer -BaseVisitor = _visitor.BaseVisitor +PassThroughVisitor = _visitor.PassThroughVisitor dump = _stringify.dump diff --git a/aas_core_codegen/parse/retree/_fix.py b/aas_core_codegen/parse/retree/_fix.py index 545dda9f9..eed361d21 100644 --- a/aas_core_codegen/parse/retree/_fix.py +++ b/aas_core_codegen/parse/retree/_fix.py @@ -9,7 +9,7 @@ ) -class _FixForUTF16Regex(retree_visitor.BaseVisitor): +class _FixForUTF16Regex(retree_visitor.PassThroughVisitor): """ Modify the pattern in-place so that UTF-32 can be dealt by UTF-16-only regex engine. diff --git a/aas_core_codegen/parse/retree/_visitor.py b/aas_core_codegen/parse/retree/_visitor.py index 3157145b5..6f6560a43 100644 --- a/aas_core_codegen/parse/retree/_visitor.py +++ b/aas_core_codegen/parse/retree/_visitor.py @@ -15,7 +15,7 @@ from aas_core_codegen.parse.tree import FormattedValue -class BaseVisitor(Visitor): +class PassThroughVisitor(Visitor): """Visit all the nodes recursively without any action.""" def visit_regex(self, node: Regex) -> None: diff --git a/aas_core_codegen/xsd/main.py b/aas_core_codegen/xsd/main.py index 7f8da7e7b..67a49f09c 100644 --- a/aas_core_codegen/xsd/main.py +++ b/aas_core_codegen/xsd/main.py @@ -124,7 +124,7 @@ def _undo_escaping_backslash_x_u_and_U_in_pattern(pattern: str) -> str: return "".join(parts) -class _AnchorRemover(parse_retree.BaseVisitor): +class _AnchorRemover(parse_retree.PassThroughVisitor): """ Remove anchors from a regex in-place.