mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-17 11:51:32 +03:00
46 lines
770 B
C
46 lines
770 B
C
/* j/6/type.c
|
|
**
|
|
*/
|
|
|
|
/* new template for type switching
|
|
*/
|
|
{
|
|
u3_noun p_sut, q_sut, r_sut;
|
|
|
|
if ( c3n == u3du(sut) ) switch ( sut ) {
|
|
default: return u3m_bail(c3__fail);
|
|
|
|
case c3__noun:
|
|
{
|
|
}
|
|
case c3__void:
|
|
{
|
|
}
|
|
}
|
|
else switch ( u3h(sut) ) {
|
|
default: return u3m_bail(c3__fail);
|
|
|
|
case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__fork: p_sut = u3t(sut);
|
|
{
|
|
}
|
|
case c3__hint: u3x_cell(u3t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
case c3__hold: u3x_cell(u3t(sut), &p_sut, &q_sut);
|
|
{
|
|
}
|
|
}
|
|
}
|