Support %form.

This commit is contained in:
C. Guy Yarvin 2018-03-26 16:58:51 -07:00
parent c0d108d745
commit b59aa59951
4 changed files with 57 additions and 1 deletions

View File

@ -413,6 +413,7 @@
# define c3__forb c3_s4('f','o','r','b') # define c3__forb c3_s4('f','o','r','b')
# define c3__fore c3_s4('f','o','r','e') # define c3__fore c3_s4('f','o','r','e')
# define c3__fork c3_s4('f','o','r','k') # define c3__fork c3_s4('f','o','r','k')
# define c3__form c3_s4('f','o','r','m')
# define c3__forq c3_s4('f','o','r','q') # define c3__forq c3_s4('f','o','r','q')
# define c3__foul c3_s4('f','o','u','l') # define c3__foul c3_s4('f','o','u','l')
# define c3__frag c3_s4('f','r','a','g') # define c3__frag c3_s4('f','r','a','g')

View File

@ -564,6 +564,23 @@
return ret; return ret;
} }
case c3__form: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used();
{
u3_noun hum = _mint_in(van, sut, gol, q_gen);
if ( c3__void == u3h(hum) ) {
return hum;
}
else {
ret = u3nc(u3nt(c3__form, u3nc(u3k(sut), u3k(p_gen)), u3k(u3h(hum))),
u3k(u3t(hum)));
u3z(hum);
return ret;
}
}
case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used(); _mint_used();
{ {

View File

@ -546,6 +546,31 @@
return ret; return ret;
} }
case c3__form: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used();
{
u3_noun vat = _mull_in(van, sut, gol, dox, q_gen);
u3_noun nup, dur;
if ( c3__void == u3h(vat) ) {
nup = c3__void;
}
else {
nup = u3nt(c3__form, u3nc(u3k(sut), u3k(p_gen)), u3k(u3h(vat)));
}
if ( c3__void == u3t(vat) ) {
dur = c3__void;
}
else {
dur = u3nt(c3__form, u3nc(u3k(dox), u3k(p_gen)), u3k(u3t(vat)));
}
ret = u3nc(nup, dur);
u3z(vat);
return ret;
}
case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used(); _mull_used();
{ {
@ -725,7 +750,7 @@
return u3m_error("mull-bonk-f"); return u3m_error("mull-bonk-f");
} }
else { else {
if ( c3y == _mull_feel(van, sut, p_gen) ) { if ( c3y == fes ) {
return _mull_in(van, sut, gol, dox, q_gen); return _mull_in(van, sut, gol, dox, q_gen);
} else { } else {
return _mull_in(van, sut, gol, dox, r_gen); return _mull_in(van, sut, gol, dox, r_gen);

View File

@ -388,6 +388,19 @@
return ret; return ret;
} }
case c3__form: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used();
{
u3_noun boc = _play_x(van, sut, q_gen);
if ( c3__void == boc ) {
return boc;
}
else {
return u3nt(c3__form, u3nc(u3k(sut), u3k(p_gen)), boc);
}
}
case c3__docs: u3x_cell(u3t(gen), &p_gen, &q_gen); case c3__docs: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used(); _play_used();
{ {