Search in sources :

Example 1 with ABooleanTrueExpression

use of de.be4.classicalb.core.parser.node.ABooleanTrueExpression in project probparsers by bendisposto.

the class ASTBuilder method addBooleanPreferenceDefinition.

public static void addBooleanPreferenceDefinition(IDefinitions iDefinitions, String name, boolean bool) {
    AExpressionDefinitionDefinition def = new AExpressionDefinitionDefinition(new TIdentifierLiteral(name), new ArrayList<PExpression>(), bool ? new ABooleanTrueExpression() : new ABooleanFalseExpression());
    iDefinitions.addDefinition(def, IDefinitions.Type.Expression);
}
Also used : AExpressionDefinitionDefinition(de.be4.classicalb.core.parser.node.AExpressionDefinitionDefinition) ABooleanTrueExpression(de.be4.classicalb.core.parser.node.ABooleanTrueExpression) ABooleanFalseExpression(de.be4.classicalb.core.parser.node.ABooleanFalseExpression) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral) PExpression(de.be4.classicalb.core.parser.node.PExpression)

Aggregations

ABooleanFalseExpression (de.be4.classicalb.core.parser.node.ABooleanFalseExpression)1 ABooleanTrueExpression (de.be4.classicalb.core.parser.node.ABooleanTrueExpression)1 AExpressionDefinitionDefinition (de.be4.classicalb.core.parser.node.AExpressionDefinitionDefinition)1 PExpression (de.be4.classicalb.core.parser.node.PExpression)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1