}
public void testBitwiseShiftRightExpression() throws CompilerException {
assertParserOutput(
new ExpressionStatement(
new BinaryOperatorExpression(
new Identifier("foo"),
new Identifier("bar"),
Token.OPERATOR_SHIFTRIGHT
)
),
"foo >> bar;"
);
assertParserOutput(
new ExpressionStatement(
new BinaryOperatorExpression(
new BinaryOperatorExpression(
new Identifier("foo"),
new Identifier("bar"),
Token.OPERATOR_SHIFTRIGHT
),
new Identifier("baz"),
Token.OPERATOR_SHIFTRIGHT
)
),
"foo >> bar >> baz;"
);
assertParserOutput(
new ExpressionStatement(
new BinaryOperatorExpression(
new Identifier("foo"),
new BinaryOperatorExpression(
new Identifier("bar"),
new NumberLiteral(1.0),
Token.OPERATOR_PLUS
),
Token.OPERATOR_SHIFTRIGHT