Using 3rd Party Javascript Libraries

Hi,

I'm working on a language that generates Javascript. I've built off of the Calculator JS example to give me a starting point, but the code that I am generating must integrate with a 3rd party Javascript library. The library is Babylon.js.

I really just need to be able to reference Babylon's types and functions in my mappings for generating the Javascript, but I can't find any way to reference a non-Java library as a model.

Is there something I am missing?

Thanks!

3 comments
Comment actions Permalink

I think I have found that I can use a plain text generator to directly code the library types and functions, so that should work for now. For future reference, how could a library be incorporated as a feature of a supported language?

0
Comment actions Permalink

It's possible but complex. You'd need to look at how Java stubs are implemented in MPS and design something similar for JavaScript. The relevant part of MPS sources is here: https://github.com/JetBrains/MPS/tree/master/core/java-stub.

0
Comment actions Permalink

Ok, thanks!

0

Please sign in to leave a comment.