X-Git-Url: https://deadsoftware.ru/gitweb?p=dsw-obn.git;a=blobdiff_plain;f=src%2Foberon.c;h=38e24a8da8b963669a406220cef798290e3b43ef;hp=50429645b22a713480253b1fb262128dc1b97af6;hb=b7a2685d39da39f69ee4530dda2ec5977159dc0c;hpb=9bcd389a97869b2ab6b1c6fdc35c0f09beab66c5 diff --git a/src/oberon.c b/src/oberon.c index 5042964..38e24a8 100644 --- a/src/oberon.c +++ b/src/oberon.c @@ -1814,7 +1814,22 @@ oberon_make_bin_op(oberon_context_t * ctx, int token, oberon_expr_t * a, oberon_ oberon_type_t * result; bool error = false; - if(token == IS) + if(token == IN) + { + if(a -> result -> class != OBERON_TYPE_INTEGER) + { + oberon_error(ctx, "must be integer"); + } + + if(b -> result -> class != OBERON_TYPE_SET) + { + oberon_error(ctx, "must be set"); + } + + result = ctx -> bool_type; + expr = oberon_new_operator(OP_IN, result, a, b); + } + else if(token == IS) { oberon_type_t * v = a -> result; if(v -> class == OBERON_TYPE_POINTER)