@Override
    public AssertStatement visitAssertStatement(AssertStatementContext ctx) {
        visitingAssertStatementCnt++;

        Expression conditionExpression = (Expression) this.visit(ctx.ce);

        if (conditionExpression instanceof BinaryExpression) {
            BinaryExpression binaryExpression = (BinaryExpression) conditionExpression;

            if (binaryExpression.getOperation().getType() == Types.ASSIGN) {
                throw createParsingFailedException("Assignment expression is not allowed in the assert statement", conditionExpression);
            }
        }

        BooleanExpression booleanExpression =
                configureAST(
                        new BooleanExpression(conditionExpression), conditionExpression);

        if (!asBoolean(ctx.me)) {
            return configureAST(
                    new AssertStatement(booleanExpression), ctx);
        }

        AssertStatement result = configureAST(new AssertStatement(booleanExpression,
                        (Expression) this.visit(ctx.me)),
                ctx);

        visitingAssertStatementCnt--;

        return result;
    }
@ Override public AssertStatement visitAssertStatement ( AssertStatementContext ctx ) { visitingAssertStatementCnt ++ ; Expression conditionExpression = ( Expression ) this . visit ( ctx . ce ) ; if ( conditionExpression instanceof BinaryExpression ) { BinaryExpression binaryExpression = ( BinaryExpression ) conditionExpression ; if ( binaryExpression . getOperation ( ) . getType ( ) == Types . ASSIGN ) { throw createParsingFailedException ( "Assignment expression is not allowed in the assert statement" , conditionExpression ) ; } } BooleanExpression booleanExpression = configureAST ( new BooleanExpression ( conditionExpression ) , conditionExpression ) ; if ( ! asBoolean ( ctx . me ) ) { return configureAST ( new AssertStatement ( booleanExpression ) , ctx ) ; } AssertStatement result = configureAST ( new AssertStatement ( booleanExpression , ( Expression ) this . visit ( ctx . me ) ) , ctx ) ; visitingAssertStatementCnt -- ; return result ; }
statement {    --------------------------------------------------------------------