Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unary plus #130

Merged
merged 4 commits into from
Jun 17, 2024
Merged

Add support for unary plus #130

merged 4 commits into from
Jun 17, 2024

Conversation

tinygiant98
Copy link
Contributor

@tinygiant98 tinygiant98 commented Jun 17, 2024

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

  • I am licencing my change under the project's MIT licence, including all changes to GPL-3.0 licenced parts of the codebase.

@mtijanic mtijanic merged commit e5571b7 into niv:master Jun 17, 2024
2 checks passed
@tinygiant98 tinygiant98 deleted the unary-plus branch December 1, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants