You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tree-sitter can't parse half statements inside #if blocks, it interprets it as a declaration with tons of ERROR nodes, which get lost when converting to D declarations.
One thing I can do is simply not translate an #if block if it's inside a function and has errors.
Yeah, I don't know the right answer. But I do think lots of error nodes turning into lost code is going to eventually run into a problem where the truncated code compiles, and the user doesn't notice.
In general the worst thing that ctod can do is generate D code that compiles and does something completely different than the original.
So 2 possibilities are:
Leave the code alone, and not worry about translating from C to D.
just insert an #error to indicate the translation couldn't be done
Not sure how this happened when converting this file: https://github.com/schveiguy/draylib/blob/acb0b099169d73ac2fc4c11ddf00776bdf0aaa40/raylibc/rtextures.c
All the function calls and the image code is just missing.
The text was updated successfully, but these errors were encountered: