use of de.be4.classicalb.core.parser.node.ASetExtensionExpression 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.ASetExtensionExpression in project probparsers by bendisposto.
the class ASTBuilder method createSetOfPExpression.
public static PExpression createSetOfPExpression(PExpression pExpression, PositionedNode pos) {
final ArrayList<PExpression> list = new ArrayList<>();
list.add((PExpression) cloneNode(pExpression));
return createPositinedNode(new ASetExtensionExpression(list), pos);
}
use of de.be4.classicalb.core.parser.node.ASetExtensionExpression 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