DEADSOFTWARE

Процедуры можно вызывать со скобками :)
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 24 Jul 2017 19:12:44 +0000 (22:12 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 24 Jul 2017 19:12:44 +0000 (22:12 +0300)
oberon.c

index 0aa8d45bf1304f6a95fe211480359d30afa7c9ef..98928fbe7c4e1629b2519b0f505e54fb921ef63b 100644 (file)
--- 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);