private static string GetUnaryOperator(NodeType nodeType, out bool isFunctionStyle)
{
isFunctionStyle = false;
switch (nodeType)
{
case NodeType.LogicalNot: return "!";
case NodeType.Not: return "~";
case NodeType.Neg: return "-";
case NodeType.UnaryPlus: return "+";
case NodeType.Sizeof: isFunctionStyle = true; return "sizeof";
case NodeType.OutAddress: return "out ";
case NodeType.RefAddress: return "ref ";
case NodeType.Parentheses: isFunctionStyle = true; return string.Empty;
default:
throw new NotImplementedException("Unary operator not supported");
}
}
}