import { AstUtils } from "langium";
import { ast } from "../../ast.js";
import { tryOrLog } from "../_shared.js";
export const relationPredicateWithChecks = (_services) => {
  return tryOrLog((el, accept) => {
    const container = AstUtils.getContainerOfType(el, ast.isViewRulePredicate);
    if (ast.isExcludePredicate(container)) {
      accept("error", 'Invalid usage inside "exclude"', {
        node: el
      });
    }
  });
};
