Example #1
0
void nameStmnt(t_tree node)
{
	if (node == NULL)
		return;

	switch(node->Kind)
	{
	case kAssign:
		nameAssign(node);
		break;
	case kIf:
		nameIf(node);
		break;
	case kWhile:
		nameWhile(node);
		break;
	case kRead:
		nameRead(node);
		break;
	case kWrite:
		nameWrite(node);
		break;
	case kFuncCallStmnt:
		nameFuncCallStmnt(node);
		break;
	case kReturn:
		nameReturn(node);
		break;
	default:
		printf("Error in name.c!\n");
		break;
	}
}
Example #2
0
void nameStmnt(t_tree node)
{
	if (node == NULL)
		return;

	switch(node->Kind)
	{
	case kAssign:
		nameAssign(node);
		break;
	case kIf:
		nameIf(node);
		break;
	case kWhile:
		nameWhile(node);
		break;
	case kFuncCallStmnt:
		nameFuncCallStmnt(node);
		break;
	case kReturn:
		nameReturn(node);
		break;
	case kLoop:
		nameLoop(node);
		break;
	case kExit:
		nameExit(node);
		break;
	case kAsm:
		nameAsm(node);
		break;
	case kLabel:
		nameLabel(node);
		break;
	case kGoto:
		nameGoto(node);
		break;
	default:
		printf("Error in name.c!\n");
		break;
	}
}