Conversation
|
A proposal for how
|
|
👍 Looks nice, and I like the FFI suggestion. I guess we can tidy up the So what's the plan for |
|
Like an idiot I spent half the afternoon using I'm going out for a bit, but will be back later to get this working at last. How does |
cf5de08 to
ddb98d9
Compare
There was a problem hiding this comment.
Using TokenParser here seems a little odd, since we're not really dealing with PS tokens. Maybe just using lines, and looking for // at the start is enough.
Also, maybe we want to define some type of custom comment, since it's not out of the question that a normal JS comment would begin with // module.
Finally, if we use lines, we can define a custom format for other metadata, like dependencies for DCE.
There was a problem hiding this comment.
Yeah, I guess that's true. It is a convenient way of extracting a proper ModuleName from a string though.
This does run over all the lines in the file, so if there are multiple comments that look like // module it will only take the first one that actually parses as having a ModuleName following it.
|
@garyb I fixed up Fingers crossed that the CI build works ... |
|
Well, CI is passing apart from the |
Remove implicit Prelude import
|
I'm happy to merge this then, if you are? |
|
Yep! |
Move JS codegen for compile into psc
@paf31 how does this approach look for
psc?I really like the idea of using
requirefor thepsc-makeforeigns, if we can figure out the details for that.pscierrorfor foreign-related errors inpscerrorfor foreign-related errors inpsc-makeerrorfor foreign-related errors inpsci// module X.Y.Zcomment)foreign importwith literalpsc