MCPcopy Create free account
hub / github.com/aspizu/goboscript / until

Method until

src/codegen/stmt.rs:101–119  ·  view source on GitHub ↗
(
        &mut self,
        s: S,
        d: D,
        this_id: NodeID,
        cond: &Expr,
        body: &[Stmt],
    )

Source from the content-addressed store, hash-verified

99 }
100
101 pub fn until(
102 &mut self,
103 s: S,
104 d: D,
105 this_id: NodeID,
106 cond: &Expr,
107 body: &[Stmt],
108 ) -> io::Result<()> {
109 let cond = coerce_condition(cond);
110 let cond_id = self.id.new_id();
111 let body_id = self.id.new_id();
112 self.begin_inputs()?;
113 self.input(s, d, "CONDITION", &cond, cond_id)?;
114 self.substack("SUBSTACK", (!body.is_empty()).then_some(body_id))?;
115 self.end_obj()?; // inputs
116 self.end_obj()?; // node
117 self.expr(s, d, &cond, cond_id, this_id)?;
118 self.stmts(s, d, body, body_id, Some(this_id))
119 }
120
121 pub fn set_var(
122 &mut self,

Callers 1

stmtMethod · 0.80

Calls 8

coerce_conditionFunction · 0.85
new_idMethod · 0.80
begin_inputsMethod · 0.80
substackMethod · 0.80
end_objMethod · 0.80
exprMethod · 0.80
stmtsMethod · 0.80
inputMethod · 0.45

Tested by

no test coverage detected