mps-kotlin-typesystem

APACHE-2.0 License

Stars
5
Committers
3

Type system for MPS kotlin

This repository contains an implementation of the kotlin type system to be used with the kotlin language in MPS. The implementation relies on MPS coderules.

Several samples from kotlin documentation are also in the project (not in the plugin).

Installation

First, install both coderules and kotlin plugins, they can be either:

Then, you can toggle usage of coderules in MPS settings via Other Settings -> Typechecking (Enable typechecking with coderules and Watch model changes and collect updates are the minimal required for a proper edition experience).

Development

The project requires a version of MPS bundling kotlin (>= 2021.3) with the codesrules plugins to be opened.

Building the plugin

Manual building of the plugin can be done through gradle scripts with ./gradlew -b setup.gradle && ./gradlew assemble, several parameters may be configured in gradle.properties.

Through MPS, one need to set the coderules_home path variable or have coderules set up in "deps/coderules" (./gradlew -b setup.gradle installCoderules will download it there).

Extending the typesystem

The structure of the project gives a starting point to implement your types along with this typesystem implementation. You may also refer to this project for examples.