def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "EmptyLine": return EmptyLine( indent=self.indent, whitespace=visit_required("whitespace", self.whitespace, visitor), comment=visit_optional("comment", self.comment, visitor), newline=visit_required("newline", self.newline, visitor), )
def _visit_and_replace_children( self, visitor: CSTVisitorT) -> "TrailingWhitespace": return TrailingWhitespace( whitespace=visit_required("whitespace", self.whitespace, visitor), comment=visit_optional("comment", self.comment, visitor), newline=visit_required("newline", self.newline, visitor), )
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "_BaseOneTokenOp": return self.__class__( whitespace_before=visit_required(self, "whitespace_before", self.whitespace_before, visitor), whitespace_after=visit_required(self, "whitespace_after", self.whitespace_after, visitor), )
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "BaseCompOp": return self.__class__( whitespace_before=visit_required(self, "whitespace_before", self.whitespace_before, visitor), value=self.value, whitespace_after=visit_required(self, "whitespace_after", self.whitespace_after, visitor), )
def _visit_and_replace_children( self, visitor: CSTVisitorT) -> "ParenthesizedWhitespace": return ParenthesizedWhitespace( first_line=visit_required("first_line", self.first_line, visitor), empty_lines=visit_sequence("empty_lines", self.empty_lines, visitor), indent=self.indent, last_line=visit_required("last_line", self.last_line, visitor), )
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "BaseUnaryOp": return self.__class__(whitespace_after=visit_required( self, "whitespace_after", self.whitespace_after, visitor))
def _visit_and_replace_children( self, visitor: CSTVisitorT) -> "DummyIndentedBlock": return DummyIndentedBlock(value=self.value, child=visit_required(self, "child", self.child, visitor))