mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 21:03:10 +03:00
b99b8969d9
Includes our first ever pass over the jets. Yikes.
47 lines
866 B
C
47 lines
866 B
C
/* j/6/type.c
|
|
**
|
|
** This file is in the public domain.
|
|
*/
|
|
|
|
/* new template for type switching
|
|
*/
|
|
{
|
|
u2_noun p_sut, q_sut, r_sut;
|
|
|
|
if ( u2_no == u2_dust(sut) ) switch ( sut ) {
|
|
default: return u2_bl_bail(wir_r, c3__fail);
|
|
|
|
case c3__noun:
|
|
{
|
|
}
|
|
case c3__void:
|
|
{
|
|
}
|
|
}
|
|
else switch ( u2_h(sut) ) {
|
|
default: return u2_bl_bail(wir_r, c3__fail);
|
|
|
|
case c3__atom: p_sut = u2_t(sut);
|
|
{
|
|
}
|
|
case c3__cell: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__core: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__cube: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__hold: p_sut = u2_t(sut);
|
|
{
|
|
}
|
|
}
|
|
}
|