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
Why not just include a file (at the parser level) ?
Because mlogjs doesn't actually do the parsing by itself, it uses babel to parse the code and then traverses the AST (Abstract Syntax Tree) that babel generated.
The are a few things that are in the way of implementing modules:
Implementing a module resolution algorithm (needs the path of the input file and needs to give the compiler access to the file system, instead of just giving it to the CLI)
Updating the sourcemaps feature to handle multiple files
Make all of it compatible with the web environment so that it works on the online editor
And while module support is within my priorities, I find it more important to implement the optimizer first, as that will eliminate many bugs in the current implementation and possibly make handling modules more straightforward in some aspects.
Because fery few other compilers did that. Also, this requires changes on the sourcemapping format and the name handling and resolution.
The text was updated successfully, but these errors were encountered: