and static method

Implementation

static SemanticContext? and(SemanticContext? a, SemanticContext? b) {
  if (a == null || a == EmptySemanticContext.Instance) return b;
  if (b == null || b == EmptySemanticContext.Instance) return a;
  final result = AND(a, b);
  if (result.opnds.length == 1) {
    return result.opnds[0];
  }

  return result;
}