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
compiler: break functions related to Decls out of Compile().
For each package-level entity we emit one or more Decl struct, which
contains all JS code fragments and metadata required to produce the
final executable script.
For each decl type (imports, vars, functions and types) I creates a
separate function that contains the logic responsible for its creation
(and some auxiliary functions). The main objective is to keep the
Compile() function very high-level and clearly reflecting various
compilation stages we go through.
I tried to add comments to make the code more accessible for future
contributors (and future self...), although there are still some aspects
I don't fully grasp.
Ideally, we would have tests for all these new functions, but that's way
more work than I'm able to take on right now.
0 commit comments