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

Implement tokens for unsigned int and double data types #68

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

rigved-desai
Copy link
Contributor

@rigved-desai rigved-desai commented Aug 21, 2024

PR Description

This PR introduces the following changes:

  1. Tokens for uint (UINT) and double (DOUBLE) have been implemented in lexer.py.
  2. A test has been added for data type tokenization in test_lexer.py,

Related Issue

This PR attempts to solve the following issues:
Closes #58
Closes #59

Checklist

  • Have you added the necessary tests?
  • Only modified the files mentioned in the related issue(s)?
  • Are all tests passing?

Copy link
Contributor

@samthakur587 samthakur587 left a comment

Choose a reason for hiding this comment

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

change unsigned int to uint

@@ -17,6 +17,8 @@
("FLOAT_NUMBER", r"\d*\.\d+|\d+\.\d*"),
("FLOAT", r"\bfloat\b"),
("INT", r"\bint\b"),
("UINT", r"\bunsigned\s+int\b"),
Copy link
Contributor

Choose a reason for hiding this comment

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

hii @rigved-desai for the UINT token we are defining uint not unsigned int can you please change it to uint only .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in latest commit 👍

Copy link
Contributor

@samthakur587 samthakur587 left a comment

Choose a reason for hiding this comment

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

great work @rigved-desai everything LGTM 🚀

@samthakur587 samthakur587 merged commit 3a92872 into CrossGL:main Aug 22, 2024
8 checks passed
AxelB1011 pushed a commit to AxelB1011/crosstl that referenced this pull request Aug 22, 2024
* feat: Implement tokens for unsigned int and double data types.

* chore: Add test for data type tokenization

* feat: Refactor unsigned int to uint after review and edit tests for same
@AxelB1011 AxelB1011 mentioned this pull request Aug 29, 2024
3 tasks
samthakur587 pushed a commit that referenced this pull request Sep 5, 2024
* Added else if to translator

* Removed comment(s)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added else if support to Directx backend

* added Assignment and, assignment or, assignment xor, xor , assignemnt modulus and modulus to the translator frontend. closes #48,#50,#51,#52,#53

* tests for else_if added

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Implement tokens for unsigned int and double data types (#68)

* feat: Implement tokens for unsigned int and double data types.

* chore: Add test for data type tokenization

* feat: Refactor unsigned int to uint after review and edit tests for same

* fix for multiple else if conditionals

* more fixes for multiple else if conditionals

* More fixes

* Missing newline

* fix CI error

* fix CI error

* Removed name=main

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added tests for multiple if statements

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Nripesh Niketan <nripesh14@gmail.com>
Co-authored-by: Prithvi-Rao <ee22b024@smail.iitm.ac.in>
Co-authored-by: rigved-desai <109571041+rigved-desai@users.noreply.github.com>
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.

Add Unsigned Int Data Type Token at translator frontend Add Double Data Type Token at translator frontend
2 participants