summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2990352)
raw | patch | inline | side by side (parent: 2990352)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 13 Aug 2017 13:25:44 +0000 (16:25 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 13 Aug 2017 13:25:44 +0000 (16:25 +0300) |
notes | patch | blob | history | |
src/oberon.c | patch | blob | history |
index 03a10c9e1bb2c39bc36631f52917f5613eb0bf8c..b09a685024b85d77f9e5078f6cad92b11bd73e63 100644 (file)
--- a/notes
+++ b/notes
3.5 Interfacing to External Libraries
3.6 Underscores in Identifiers
3.7 In-line Exponentiation
- 5.10 Monadic ‘-’: -5 MOD 3 is equivalent to -(5 MOD 3)
5.13 Read only VAR Parameters
1.2.5 Module Files
1.2.6 Module Strings
diff --git a/src/oberon.c b/src/oberon.c
index 8b94271a6033d4675f4c8026d316980139a85d18..830844a16aedb87eb17d805361346d80930d0e3a 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
expr = oberon_term_expr(ctx);
- if(minus)
- {
- expr = oberon_make_unary_op(ctx, MINUS, expr);
- }
-
while(ISADDOP(ctx -> token))
{
int token = ctx -> token;
expr = oberon_make_bin_op(ctx, token, expr, inter);
}
+ if(minus)
+ {
+ expr = oberon_make_unary_op(ctx, MINUS, expr);
+ }
+
return expr;
}