jaskell.expression.Binary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaskell-java8 Show documentation
Show all versions of jaskell-java8 Show documentation
This is a utils library for java 8 project.
It include parsec combinators and sql generators library.
package jaskell.expression;
/**
* TODO
*
* @author mars
* @version 1.0.0
* @since 2020/06/04 10:52
*/
public abstract class Binary implements Expression {
protected Expression left;
protected Expression right;
public abstract int getPriority();
@Override
public Expression makeAst() {
this.left = this.left.makeAst();
this.right = this.right.makeAst();
if (right instanceof Binary) {
Binary r = (Binary) right;
if (this.getPriority() >= r.getPriority()) {
Expression lx = r.left;
this.right = lx;
r.left = this;
return r;
}
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy