protected override void GenerateInner(CodeGenerator generator) { if (Condition.Precedence > PrecedenceGroup.Ternary) { generator.Write(TokenType.Punctuation, '('); } Condition.Generate(generator); if (Condition.Precedence > PrecedenceGroup.Ternary) { generator.Write(TokenType.Punctuation, ')'); } generator.Write(TokenType.Space, ' '); generator.Write(TokenType.Punctuation, '?'); generator.Write(TokenType.Space, ' '); if (TrueExpression.Precedence >= PrecedenceGroup.Ternary) { generator.Write(TokenType.Punctuation, '('); } TrueExpression.Generate(generator); if (TrueExpression.Precedence >= PrecedenceGroup.Ternary) { generator.Write(TokenType.Punctuation, ')'); } generator.Write(TokenType.Space, ' '); generator.Write(TokenType.Punctuation, ':'); generator.Write(TokenType.Space, ' '); if (FalseExpression.Precedence >= PrecedenceGroup.Ternary) { generator.Write(TokenType.Punctuation, '('); } FalseExpression.Generate(generator); if (FalseExpression.Precedence >= PrecedenceGroup.Ternary) { generator.Write(TokenType.Punctuation, ')'); } }