org.unlaxer.tinyexpression.evaluator.javacode.StringBooleanEqualClauseBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tinyExpression-javacode Show documentation
Show all versions of tinyExpression-javacode Show documentation
a simple parser combinator inspired by RelaxNG
The newest version!
package org.unlaxer.tinyexpression.evaluator.javacode;
import java.util.List;
import org.unlaxer.Token;
import org.unlaxer.tinyexpression.evaluator.javacode.JavaCodeCalculator.CodeBuilder;
public class StringBooleanEqualClauseBuilder implements CodeBuilder {
public static final StringBooleanEqualClauseBuilder SINGLETON = new StringBooleanEqualClauseBuilder();
@Override
public void build(SimpleBuilder builder , Token token) {
List filteredChildren = token.filteredChildren;
ExpressionOrLiteral left = StringClauseBuilder.SINGLETON.build(filteredChildren.get(0));
ExpressionOrLiteral right = StringClauseBuilder.SINGLETON.build(filteredChildren.get(1));
builder.append("(")
.append(left.toString())
.append(".equals(")
.append(right.toString())
.append("))");
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy