super(name);
}
public void testConditionalExpression() throws CompilerException {
assertParserOutput(
new ExpressionStatement(
new ConditionalExpression(
new BinaryOperatorExpression(
new NumberLiteral(1.0),
new NumberLiteral(0.0),
Token.OPERATOR_EQUALEQUAL
),
new IncrementExpression(
new Identifier("foo"), 1, true
),
new IncrementExpression(
new Identifier("bar"), 1, true
)
)
),
"1 == 0 ? foo ++ : bar ++;"
);
assertParserOutput(
new ExpressionStatement(
new ConditionalExpression(
new Identifier("foo"),
new ConditionalExpression(
new Identifier("a"),
new Identifier("b"),