pyrser/passes/topython.py
def visit_Rep0N(self, node: parsing.Rep0N) -> [ast.stmt]:
        """Generates python code for a clause repeated 0 or more times.

        #If all clauses can be inlined
        while clause:
            pass

        while True:
            <code for the clause>
        """
        cl_ast = self.visit(node.pt)
        if isinstance(cl_ast, ast.expr):
            return [ast.While(cl_ast, [ast.Pass()], [])]
        self.in_loop += 1
        clause = self._clause(self.visit(node.pt))
        self.in_loop -= 1
        return [ast.While(ast.Name('True', ast.Load()), clause, [])]
def visit_Rep0N(self, node: parsing.Rep0N) -> [ast.stmt]:
        """Generates python code for a clause repeated 0 or more times.

        #If all clauses can be inlined
        while clause:
            pass

        while True:
            <code for the clause>
        """
        cl_ast = self.visit(node.pt)
        if isinstance(cl_ast, ast.expr):
            return [ast.While(cl_ast, [ast.Pass()], [])]
        self.in_loop += 1
        clause = self._clause(self.visit(node.pt))
        self.in_loop -= 1
        return [ast.While(ast.Name('True', ast.Load()), clause, [])]
def visit_Rep0N ( self , node : parsing . Rep0N ) -> [ ast . stmt ] : cl_ast = self . visit ( node . pt ) if isinstance ( cl_ast , ast . expr ) : return [ ast . While ( cl_ast , [ ast . Pass ( ) ] , [ ] ) ] self . in_loop += 1 clause = self . _clause ( self . visit ( node . pt ) ) self . in_loop -= 1 return [ ast . While ( ast . Name ( 'True' , ast . Load ( ) ) , clause , [ ] ) ]
Generates python code for a clause repeated 0 or more times.

        #If all clauses can be inlined
        while clause:
            pass

        while True:
            <code for the clause>
Generates python code for a clause repeated 0 or more times .