}
public void testBitwiseAndAssignmentExpression() throws CompilerException {
assertParserOutput(
new ExpressionStatement(
new AssignmentOperatorExpression(
new Identifier("foo"),
new Identifier("bar"),
Token.OPERATOR_BITWISEANDASSIGNMENT
)
),
"foo &= bar;"
);
assertParserOutput(
new ExpressionStatement(
new AssignmentOperatorExpression(
new Identifier("foo"),
new AssignmentOperatorExpression(
new Identifier("bar"),
new Identifier("baz"),
Token.OPERATOR_BITWISEANDASSIGNMENT
),
Token.OPERATOR_BITWISEANDASSIGNMENT
)
),
"foo &= bar &= baz;"
);
assertParserOutput(
new ExpressionStatement(
new AssignmentOperatorExpression(
new Identifier("foo"),
new BinaryOperatorExpression(
new Identifier("bar"),
new NumberLiteral(1.0),
Token.OPERATOR_PLUS