This change provides support for unary plus operations for constants and variables. This allows constructs such as +7, +x, (+7 + +x), etc. The result can also be passed directly as a function paramater or used within a conditional: my_function(+x), if (+x) {}, while (+x) {}, etc.
Addresses #127 and #57.
Testing
Tested the following constructs:
+<variable|constant>some_variable = +<variable|constant>my_function_call(+<variable|constant>);if (+<variable|constant>) {}while (+<variable|constant>) {}some_variable = [+]<variable|constant> <+|-> [+]<variable|constant>;
Changelog
Added
Added support for unary plus operations
Licence
[x] I am licencing my change under the project's MIT licence, including all changes to GPL-3.0 licenced parts of the codebase.
This change provides support for unary plus operations for constants and variables. This allows constructs such as
+7
,+x
,(+7 + +x)
, etc. The result can also be passed directly as a function paramater or used within a conditional:my_function(+x)
,if (+x) {}
,while (+x) {}
, etc.Addresses #127 and #57.
Testing
Tested the following constructs:
+<variable|constant>
some_variable = +<variable|constant>
my_function_call(+<variable|constant>);
if (+<variable|constant>) {}
while (+<variable|constant>) {}
some_variable = [+]<variable|constant> <+|-> [+]<variable|constant>;
Changelog
Added
Licence