leuat / TRSE

Turbo Rascal Syntax Error full repo
GNU General Public License v3.0
243 stars 44 forks source link

[Feature Request] Allow boolean expressions in procedure/function calls and boolean assignments #824

Closed zzarko closed 1 year ago

zzarko commented 1 year ago

If I have a procedure/function like this:

procedure Something(a: boolean);
begin
...
end;

I can call it with:

Something(true);
Something(false);

but if I try to call it like this:

Something((x < 4));

I get this message form TRSE:

Error during parsing
Fatal error on line: XXX 
Expected 'RPAREN' but found '

Without extra parentheses the error is

Uknown token '

and it is different if I use another logical operator. Of course, it can be solved by introducing extra if/then/else.

Also, it would be nice if boolean expressions could be assigned to boolean variables (this also produces similar errors).

leuat commented 1 year ago

Implemented, please verify that things work as they should!