Package com.github.antlrjavaparser.api.expr

Examples of com.github.antlrjavaparser.api.expr.BinaryExpr


                    floatingPrecisionOnly);
        }

        if (expression instanceof BinaryExpr) {
            String result = "";
            BinaryExpr current = (BinaryExpr) expression;
            while (current != null) {
                String right = "";
                if (current.getRight() instanceof StringLiteralExpr) {
                    right = ((StringLiteralExpr) current.getRight()).getValue();
                }
                else if (current.getRight() instanceof NameExpr) {
                    right = ((NameExpr) current.getRight()).getName();
                }

                result = right + result;
                if (current.getLeft() instanceof StringLiteralExpr) {
                    final String left = ((StringLiteralExpr) current.getLeft())
                            .getValue();
                    result = left + result;
                }
                if (current.getLeft() instanceof BinaryExpr) {
                    current = (BinaryExpr) current.getLeft();
                }
                else {
                    current = null;
                }
            }
View Full Code Here

TOP

Related Classes of com.github.antlrjavaparser.api.expr.BinaryExpr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.