Example #1
0
File: scan.c Project: whc2uestc/OS
void print_token(const Token * tkp){
	if(tkp->type == ID || tkp->type == NUM)
		printf("%s: %s", token_type_to_string(tkp->type), tkp->string);
	else
		printf("%s", token_type_to_string(tkp->type));
}
Example #2
0
	char* to_string ()
	{
		return g_strdup_printf ("%s: %s", token_type_to_string (type), value);
	}
Example #3
0
void token_pretty_print(Token *t){
  printf("%s \t\t\t | %s (%i)\n", t->string, token_type_to_string(t->type), t->type);
}