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

feat: Add support for bool operators - transpiler #137

Merged
merged 3 commits into from
Nov 10, 2024

Conversation

vikasgrewal16
Copy link
Contributor

@vikasgrewal16 vikasgrewal16 commented Nov 1, 2024

Pull Request description

Pull Request checklists

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • the tests generate log file(s) (path).
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

  • I have reviewed the changes and it contains no misspelling.
  • The code is well commented, especially in the parts that contain more
    complexity.
  • New and old tests passed locally.

Reviewer's checklist

Copy and paste this template for your review's note:

## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved .

@vikasgrewal16 vikasgrewal16 changed the title feat: Add support for boolean operators - transpiler feat: Add support for bool operators - transpiler Nov 1, 2024
@dispatch # type: ignore[no-redef]
def visit(self, node: astx.LiteralBoolean) -> str:
"""Handle LiteralBoolean nodes."""
return "True" if node.value else "False"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that the value should be a boolean value, this should resolve this in a shorter way

Suggested change
return "True" if node.value else "False"
return repr(node.value)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this is not a block for this PR, let's merge it and we can address that later

@xmnlab
Copy link
Contributor

xmnlab commented Nov 10, 2024

I am rebasing it now .. so we can merge it now

@xmnlab xmnlab merged commit 18a0e2f into arxlang:main Nov 10, 2024
12 checks passed
@vikasgrewal16 vikasgrewal16 deleted the boolean branch November 23, 2024 23:16
Copy link

🎉 This PR is included in version 0.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants