-
Notifications
You must be signed in to change notification settings - Fork 123
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
Support octal literals #151
Conversation
9f6e642
to
e3c6388
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read https://cbea.ms/git-commit/ carefully and refine the commits.
You should extend the test suite for octal literals. |
I just added some test cases for octal literals, but I found that the current testing method has significant limitations. It seems like it can only test values where the final result is between 0 and 255 (a byte) . Additionally, testing for negative numbers requires handling through printf. Should we consider improving our testing process to handle a broader range of cases more efficiently? What are your thoughts on this? |
730f416
to
d694188
Compare
You can create a new issue to track the improvements of the test suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using backticks in git commit messages and comments to ensure compatibility with terminal emulators that may not render the backtick character properly.
Instead, use the pair ' or " (quotation marks).
Add extra logic to deal with octal literals satisfied re(0[0-7]+) in function 'read_numeric_param'.
Add extra logic to deal with octal literals satisfied re(0[0-7]+) in function 'read_numeric_constant'.
- Added test cases for octal literals in constant declarations. - Ensured correct behavior for arithmetic operations with octal values. - Tested bitwise operations involving octal numbers. - Added variable declaration tests using octal literals. - Ensured proper handling of octal literals passed as function params.
d694188
to
710ae29
Compare
Thank @fennecJ for contributing! |
As title, this PR basically implement support for octal literals in numeric constants and function parameters.