mirror of
https://github.com/urbit/shrub.git
synced 2024-12-11 11:02:25 +03:00
47 lines
867 B
C
47 lines
867 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);
|
|
{
|
|
}
|
|
}
|
|
}
|