Implemented ternary operator (expr1 ? expr2 : expr3).