Skip to content

Decaf Source#2

Open
confused-Techie wants to merge 6 commits intosrc-machine-decaffrom
src-manual-decaf
Open

Decaf Source#2
confused-Techie wants to merge 6 commits intosrc-machine-decaffrom
src-manual-decaf

Conversation

@confused-Techie
Copy link
Copy Markdown
Member

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 ./lib folder. 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 this context, it took me quite a while to find how to do this properly, and fight my urge to at some point declare a class of Mixin, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs precursor

Development

Successfully merging this pull request may close these issues.

1 participant