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!

0
3 comments

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

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

Please sign in to leave a comment.