Decaf Source#2
Open
confused-Techie wants to merge 6 commits intosrc-machine-decaffrom
Open
Conversation
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.
This PR decafs the source code.
Like all others, it targets a machine decaf branch to make the diff easier to review, on approval it'll be merged right to main.
I'll be honest, this one was a bit difficult.
Firstly, generated machine decaffed code that worked wasn't nearly as straightforward as any other repo. Generally CoffeeScript v2 tooling still works, and if it doesn't v1 tooling will. In this instance the only machine decaf code that would still work is the one generated directly in this repo and placed into the
./libfolder. Everything else would still fail no matter what.From there, normally cleaning up machine decaf code is rather trivial, but in this case due to the complex ways we handle and manipulate the
thiscontext, it took me quite a while to find how to do this properly, and fight my urge to at some point declare a class ofMixin, but due to the funky ways things are in this repo we had to be somewhat old school and declare things akin to before JavaScript ever got classes.But in any case, this is the cleanest I could possibly make things while keeping all tests passing. I'd recommend merging #1 prior to this PR so we can have functional tests.