From: DeaDDooMER Date: Mon, 24 Jul 2017 19:12:44 +0000 (+0300) Subject: Процедуры можно вызывать со скобками :) X-Git-Url: https://deadsoftware.ru/gitweb?p=dsw-obn.git;a=commitdiff_plain;h=d465a8b1fddbbabcf4f9739e80e9e82dc945028e Процедуры можно вызывать со скобками :) --- diff --git a/oberon.c b/oberon.c index 0aa8d45..98928fb 100644 --- a/oberon.c +++ b/oberon.c @@ -520,9 +520,16 @@ oberon_factor(oberon_context_t * ctx) } else { - oberon_error(ctx, "invalid desinator"); + oberon_error(ctx, "invalid designator"); } + expr -> item.var = var; + if(ctx -> token == LPAREN) + { + oberon_assert_token(ctx, LPAREN); + expr -> item.mode = MODE_CALL; + oberon_assert_token(ctx, RPAREN); + } break; case INTEGER: expr = oberon_new_item(MODE_INTEGER, ctx -> int_type);