// TODO: might not to inherit Node, therefore giving statement not required.
@Override
    public void exitOperator_expr(OperonModuleParser.Operator_exprContext ctx) {
        //:OFF:log.debug("EXIT Operator_expr :: Stack size :: " + this.stack.size());
        List<ParseTree> subNodes = getContextChildNodes(ctx);
        int subNodesSize = subNodes.size();
        // Get the FunctionRef
        FunctionRef funcRef = (FunctionRef) this.stack.pop();
        boolean isCascade = false;
        if (subNodes.get(subNodes.size() - 2) instanceof TerminalNode && 
            subNodes.get(subNodes.size() - 2).getText().toLowerCase().equals("cascade")) {
            //:OFF:log.debug("  >> Operator :: set cascade true :: " + subNodes.get(subNodes.size() - 2).getText());
            isCascade = true;
        }
        // Get the overloaded operator:
        for (int i = 0; i < subNodesSize; i ++) {
            //:OFF:log.debug(subNodes.get(i).getClass().getName());
            if (subNodes.get(i) instanceof TerminalNode) {
                //:OFF:log.debug("  >> Operator :: terminal-node found.");
            }
        }
        String operator = subNodes.get(2).getText();
        //:OFF:log.debug(" >> OPERATOR :: " + operator);
        Operator op = new Operator(this.currentStatement); // TODO: might not to inherit Node, therefore giving statement not required.
        op.setOperator(operator);
        op.setFunctionRef(funcRef);
        op.setCascade(isCascade);
        this.stack.push(op);
    }
String operator = subNodes.get(2).getText();
//:OFF:log.debug(" >> OPERATOR :: " + operator);
Operator op = new Operator(this.currentStatement); // TODO: might not to inherit Node, therefore giving statement not required.
op.setOperator(operator);
op.setFunctionRef(funcRef);
}
// Get the overloaded operator:
for (int i = 0; i < subNodesSize; i ++) {
//:OFF:log.debug(subNodes.get(i).getClass().getName());
if (subNodes.get(i) instanceof TerminalNode) {
//:OFF:log.debug(" >> Operator :: terminal-node found.");
}
}
String operator = subNodes.get(2).getText();
//:OFF:log.debug(" >> OPERATOR :: " + operator);
Operator op = new Operator(this.currentStatement); // TODO: might not to inherit Node, therefore giving statement not required.
op.setOperator(operator);
op.setFunctionRef(funcRef);
op.setCascade(isCascade);
this.stack.push(op);
}
//:OFF:log.debug("EXIT Operator_expr :: Stack size :: " + this.stack.size());
List<ParseTree> subNodes = getContextChildNodes(ctx);
int subNodesSize = subNodes.size();
// Get the FunctionRef
FunctionRef funcRef = (FunctionRef) this.stack.pop();
boolean isCascade = false;
if (subNodes.get(subNodes.size() - 2) instanceof TerminalNode &&
subNodes.get(subNodes.size() - 2).getText().toLowerCase().equals("cascade")) {
//:OFF:log.debug(" >> Operator :: set cascade true :: " + subNodes.get(subNodes.size() - 2).getText());
isCascade = true;
}
// Get the overloaded operator:
for (int i = 0; i < subNodesSize; i ++) {
//:OFF:log.debug(subNodes.get(i).getClass().getName());
if (subNodes.get(i) instanceof TerminalNode) {
//:OFF:log.debug(" >> Operator :: terminal-node found.");
}
}
String operator = subNodes.get(2).getText();
//:OFF:log.debug(" >> OPERATOR :: " + operator);
Operator op = new Operator(this.currentStatement); // TODO: might not to inherit Node, therefore giving statement not required.
op.setOperator(operator);
op.setFunctionRef(funcRef);
op.setCascade(isCascade);
this.stack.push(op);
}