Search in sources :

Example 1 with NodeCloner.cloneNode

use of de.be4.classicalb.core.parser.util.NodeCloner.cloneNode in project probparsers by bendisposto.

the class ASTBuilder method createEqualPredicate.

public static AEqualPredicate createEqualPredicate(TIdentifierLiteral old, final String value) {
    TIdentifierLiteral e = NodeCloner.cloneNode(old);
    AIdentifierExpression aIdentifier = createAIdentifierExpression(e);
    final AEqualPredicate equal = new AEqualPredicate(aIdentifier, new AStringExpression(new TStringLiteral(value)));
    equal.setStartPos(e.getStartPos());
    equal.setEndPos(e.getEndPos());
    return equal;
}
Also used : AEqualPredicate(de.be4.classicalb.core.parser.node.AEqualPredicate) AIdentifierExpression(de.be4.classicalb.core.parser.node.AIdentifierExpression) AStringExpression(de.be4.classicalb.core.parser.node.AStringExpression) TStringLiteral(de.be4.classicalb.core.parser.node.TStringLiteral) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral)

Aggregations

AEqualPredicate (de.be4.classicalb.core.parser.node.AEqualPredicate)1 AIdentifierExpression (de.be4.classicalb.core.parser.node.AIdentifierExpression)1 AStringExpression (de.be4.classicalb.core.parser.node.AStringExpression)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1 TStringLiteral (de.be4.classicalb.core.parser.node.TStringLiteral)1