ProSurfer73 / Macro-Parser

A C/C++ macro calculator
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Support octal literals. #73

Closed ProSurfer73 closed 1 year ago

ProSurfer73 commented 1 year ago

Lets support octal literals. image (source: https://www.geeksforgeeks.org/integer-literal-in-c-cpp-prefixes-suffixes/)

ProSurfer73 commented 1 year ago

image The feature has now been implemented. Lets close the issue.

ProSurfer73 commented 1 year ago

There is a problem with the implementation. Firstly, it crashes now and then. Secondly, expressions alone are considered as invalid. Thirdly, when it is followed by a number greater or equal to 8, it should not be converted from octal to decimal, as it is not an octal expression. Lets fix that !

ProSurfer73 commented 1 year ago

Thanks to previous commit, the first and the second issues are now resolved. But there is still the third issue to solve ! image

ProSurfer73 commented 1 year ago

Thanks to previous commit, the 3 issues should now be resolved. image Octal literals should now be fully supported. Lets close the issue.