use of org.batfish.datamodel.routing_policy.expr.CommunitySetElemHalfExpr in project batfish by batfish.
the class CiscoControlPlaneExtractor method toCommunitySetElemExpr.
private CommunitySetElem toCommunitySetElemExpr(Rp_community_set_elemContext ctx) {
if (ctx.prefix != null) {
CommunitySetElemHalfExpr prefix = toCommunitySetElemHalfExpr(ctx.prefix);
CommunitySetElemHalfExpr suffix = toCommunitySetElemHalfExpr(ctx.suffix);
return new CommunitySetElem(prefix, suffix);
} else if (ctx.community() != null) {
long value = toLong(ctx.community());
return new CommunitySetElem(value);
} else {
throw convError(CommunitySetElem.class, ctx);
}
}
Aggregations