X-Git-Url: http://deadsoftware.ru/gitweb?p=dsw-obn.git;a=blobdiff_plain;f=oberon.c;h=dab60b0bb151dce64579a099f2aa59f5722a2eb6;hp=931d948c57bc15c0faf906e0a6f23b52f991a122;hb=12ae486a18746b042fcc4ebbefc5449d4d3464af;hpb=c4d4a265b71124ad0e8588601cfc1d66aca84b96 diff --git a/oberon.c b/oberon.c index 931d948..dab60b0 100644 --- a/oberon.c +++ b/oberon.c @@ -2602,16 +2602,19 @@ oberon_make_new_call(oberon_context_t * ctx, int num_args, oberon_expr_t * list_ type = type -> base; oberon_expr_t * src; + src = oberon_new_item(MODE_NEW, dst -> result, 0); + src -> item.num_args = 0; + src -> item.args = NULL; + if(type -> class == OBERON_TYPE_ARRAY) { + // Пригодится при работе с открытыми массивами + /* int dim = 1; - oberon_expr_t * sizes = NULL; oberon_expr_t * last_size = NULL; - sizes = last_size = oberon_new_item(MODE_INTEGER, ctx -> int_type, 1); sizes -> item.integer = type -> size; - oberon_type_t * base = type -> base; while(base -> class == OBERON_TYPE_ARRAY) { @@ -2624,13 +2627,12 @@ oberon_make_new_call(oberon_context_t * ctx, int num_args, oberon_expr_t * list_ base = base -> base; dim += 1; } + */ - src = oberon_new_item(MODE_NEWARR, dst -> result, 0); - src -> item.num_args = dim; - src -> item.args = sizes; - src -> item.type = base; + src -> item.num_args = 0; + src -> item.args = NULL; } - else + else if(type -> class != OBERON_TYPE_RECORD) { oberon_error(ctx, "oberon_make_new_call: wat"); }