Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.75 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.75 KB

MPS Calculator tutorial in JavaScript

This project serves as an example of using MPS to generate JavaScript code.

Introduction

JetBrains MPS (http://jetbrains.com/mps) is a projectional language workbench. ECMAScript4MPS (https://github.com/mar9000/ecmascript4mps) is the implementation of the ECMAScript 5.1 for MPS. The MPS Calculator tutorial (https://www.jetbrains.com/mps/help/mps-calculator-language-tutorial.html) guides students through the process of building a DSL for creating simple Java Swing calculation forms. This project implements similar functionality, but targets html/javascript as the target platform.

Resources

Try it out

  • clone the github project
  • install MPS from the JetBrains MPS download page
  • install the ecmascript4mps language plugin into MPS
  • open the project with MPS
  • rebuild the project
  • the sandbox solution contains a complete sample form, which you can generate and get an html page with an associated javascript program
  • open the generated html page in a browser and check the JavaScript functionality (the page is located in CalculatorJS/languages/CalculatorJS/sandbox/source_gen/CalculatorJS/sandbox/)

Compatibility

  • MPS 2017.2
  • ecmascript4mps plugin version 2.1