Exemplo n.º 1
0
 def __init__(self, scope):
     self._if = _kratos.IfStmt(target)
     self.scope = scope
     for stmt in args:
         if hasattr(stmt, "stmt"):
             stmt = stmt.stmt()
         self.scope.nested_stmts.add(stmt)
         self._if.add_then_stmt(stmt)
Exemplo n.º 2
0
            def __init__(self, scope):
                self._if = _kratos.IfStmt(target)
                if f_ln is not None:
                    fn_ln = (scope.filename, f_ln + scope.ln - 1)
                    target.add_fn_ln(fn_ln, True)
                    self._if.add_fn_ln(fn_ln, True)
                    self._if.then_body().add_fn_ln(fn_ln, True)
                    # this is additional info passed in
                    if add_local:
                        add_scope_context(self._if, kargs)

                self.scope = scope
                for stmt in args:
                    if hasattr(stmt, "stmt"):
                        stmt = stmt.stmt()
                    self._if.add_then_stmt(stmt)
Exemplo n.º 3
0
 def __init__(self, predicate: _kratos.Var):
     self._stmt = _kratos.IfStmt(predicate)
     self.__generator = predicate.generator
     if self.__generator.debug:
         self._stmt.add_fn_ln(get_fn_ln())