ECMAScript language implementation for JetBrains MPS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.mps
code/languages/org.mar9000.mps.ecmascript
solutions/org.mar9000.mps.ecmascript.build
.gitattributes
.gitignore
LICENSE
README.md
build.xml
plugin.xml

README.md

ECMAScript4MPS

ECMAScript4MPS is the implementation of the ECMAScript 5.1 for JetBrains MetaProgrammingSystem, a.k.a. MPS.

Introduction

The constructed AST is identical (with very small exceptions) to the one described by the Mozilla Parser API and implemented, for example, by parsers like Esprima. It's still quite incomplete being my focus on javascript generation. Read more on this announcement post.

Resources

Try it out

  • clone the github project.
  • install MPS version 3.3 .
  • open the project with MPS.
  • rebuild the project.
  • the sandbox solution contains a complete javascript example I use to test the language and the generation to text.

An EcmaScript4MPS plugin

To get a pre-prepared and packaged ecmaScript4mps language you can install the IDEA/MPS plugin in either IntelliJ IDEA or MPS and start using the language right-away.

Future improvements

ECMAScript4MPS is rather primitive with respect to its editing capabilities that are still "AST like" and not "text like". Also it's missing almost all "lexer like" rules.

My objective is to generate javascript so a "text like" editor experience while editing ECMAScript4MPS models is out of scope. Nevertheless I think to further improve the editor while I'll be using it.

Writing a developer's guide that could help other developers understanding MPS is also one of my goals.