How to Flow Control in Material Custom nodes?

This works!!

if(BoolValue>0.0f)
{
	BaseColor=A;
	Emissive = float3(0.0f,0.0f, 0.0f);
	return BaseColor;
}
else
{
	BaseColor=float3(0.0f,0.0f,0.0f);
	Emissive=A;
	return Emissive;
}

For some reason the name “Bool” caused the error… must be a internal reservate word. So, i renamed it to “BoolValue” and it does work.