use of de.be4.classicalb.core.parser.node.AUnionExpression in project probparsers by bendisposto.
the class CreateFreetypeTest method createSimpleAdd.
private AOperation createSimpleAdd(String name) {
final ASetExtensionExpression newVal = new ASetExtensionExpression(createIdentifiers(CONS_EMPTY));
final PSubstitution subst = createAssignment(VAR_NAME, new AUnionExpression(createIdentifier(VAR_NAME), newVal));
return new AOperation(EMPTY_EXPRS, createIdLits(name), EMPTY_EXPRS, subst);
}
use of de.be4.classicalb.core.parser.node.AUnionExpression in project probparsers by bendisposto.
the class CreateFreetypeTest method createAdd.
private AOperation createAdd(String name, String param, PExpression type, String cons) {
final AMemberPredicate pre = new AMemberPredicate(createIdentifier(param), type);
final ASetExtensionExpression newVal = new ASetExtensionExpression(Arrays.<PExpression>asList(new AFunctionExpression(createIdentifier(cons), createIdentifiers(param))));
final PSubstitution subst = new APreconditionSubstitution(pre, createAssignment(VAR_NAME, new AUnionExpression(createIdentifier(VAR_NAME), newVal)));
return new AOperation(EMPTY_EXPRS, createIdLits(name), createIdentifiers(param), subst);
}
Aggregations