Open
Conversation
Owner
|
Instead of having this for block expressions, could we make this preprocessor be for ALL hanging expressions with no side-effects? Besides that, this is fantastic work!! |
The basics should be finished with this commit, now the problem is figuring out how to properly handle blocks...
Still not fully working though, next up i gotta figure out what do do with the final expression of a block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for https://discord.com/channels/162395145352904705/1200065966445449286/1473062164435701905
Basically, inline function calls would still append the return expr into the code where the function was called from, even if the program didn't actually want to do anything with that return code, leading to errors in certain languages because the compiler didn't know what to do with them.
Heres an example with lua:
Before the fix:
After the fix:
This fix also applies for blocks so it should be a universal fix for all situations.