add pic_raise

This commit is contained in:
Yuichi Nishiwaki 2013-10-12 14:40:27 +09:00
parent b284973035
commit 69e927d7bc
2 changed files with 9 additions and 0 deletions

View File

@ -45,6 +45,8 @@ pic_value pic_eval(pic_state *, pic_value, struct pic_env *);
pic_value pic_run(pic_state *, struct pic_proc *, pic_value); pic_value pic_run(pic_state *, struct pic_proc *, pic_value);
struct pic_proc *pic_codegen(pic_state *, pic_value, struct pic_env*); struct pic_proc *pic_codegen(pic_state *, pic_value, struct pic_env*);
void pic_raise(pic_state *, const char *);
void pic_debug(pic_state *, pic_value); void pic_debug(pic_state *, pic_value);
#endif #endif

View File

@ -142,3 +142,10 @@ pic_run(pic_state *pic, struct pic_proc *proc, pic_value args)
STOP: STOP:
return *sp; return *sp;
} }
void
pic_raise(pic_state *pic, const char *str)
{
puts(str);
abort();
}