Exemplo n.º 1
0
 def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "Module":
     return Module(
         header=visit_sequence(self, "header", self.header, visitor),
         body=visit_body_sequence(self, "body", self.body, visitor),
         footer=visit_sequence(self, "footer", self.footer, visitor),
         encoding=self.encoding,
         default_indent=self.default_indent,
         default_newline=self.default_newline,
         has_trailing_newline=self.has_trailing_newline,
     )
Exemplo n.º 2
0
 def _visit_and_replace_children(
     self, visitor: CSTVisitorT
 ) -> "ParenthesizedWhitespace":
     return ParenthesizedWhitespace(
         first_line=visit_required(self, "first_line", self.first_line, visitor),
         empty_lines=visit_sequence(self, "empty_lines", self.empty_lines, visitor),
         indent=self.indent,
         last_line=visit_required(self, "last_line", self.last_line, visitor),
     )