-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixed several issues relating to the static and const keywords #123
Conversation
catch-bad-whitespace is destroying me lol |
…, add -g flag to Makefile
I squashed all the commits together since a lot of them were me just fixing whitespace issues caught by the CI |
@@ -2705,9 +2734,6 @@ ast parse_cast_expression() { | |||
if (is_type_starter(tok)) { | |||
type = parse_type_with_stars(); | |||
|
|||
if (get_val(type) == 0 && get_op(type) == VOID_KW) |
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.
I'm not sure the exe code generator works well with (void)
casts. Do you mind writing a small test for this? You can take a look at tests/_all/comma.c
for an example, and can use ./run-tests.sh sh --match cast.c
to run the test.
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.
sure
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.
I gave it a shot, i'm not really familiar with how the testing format works so it may take some tweaks
@laurenthuberdeau could you explain what the measure-file-size ci does? |
Sure! If we look at the difference between the 2 files using
Looks like the value of the
Edit: I made this PR to fix the script: #132 |
This fixes several miscompilations I discovering when attempting to transpile my c code. I also added debug functionality to the parse_error() function which will emit the line and file of where the error was generated. This is helpful for finding out which part of the parser is not working.