Skip to content

Langium-based LS for TaskList language implemented in GLSP blueprints. Integrated with GLSP as SourceModel Server for demo purpose

License

Notifications You must be signed in to change notification settings

Crystal-Modeling/tasklist-lang

Repository files navigation

Task List Language

This repository contains Langium grammar for TaskList language implemented in GLSP blueprints.

The idea is to connect Langium-based LS to GLSP server as Source Model Server into tasklist-theia-glsp.

Environment

This project is built with Node v16.20.0.

Implementation considerations

This language is connected to GLSP through Langium Model Server (LMS) API, so need to identify corresponding graphical and textual elements. In the example, demoed here Langium + Sirius Web = Heart, they used so called "Semantic ID" to locate an element bidirectionally.

That is why, Langium LS enriches AST nodes with semantic identity. It is stored in a separate JSON file, and updated on every changes made to the correspondent Langium Document.
The mapping between AST nodes and their IDs is done either by the name of the AstNode (for primary nodes), or by the IDs of the parent/referenced AstNodes a.k.a. Customized.$props (for derivative nodes).
The AstNode mapped to its identity is called an Identified node.

SourceModel is defined separately from the autogenerated AST (e.g., to have semantic IDs added), and LangiumModelServerFacade performs bidirectional mapping. This is done in order not to overload the textual DSL user with irrelevant not language-domain information.

LMS server exposes SourceModel (LMS model) to the outer world (e.g., to be consumed by GLSP server) via an LMS API (see LangiumModelServerRouter).

Plans

📃 Learn how to test Langium-based LS and services

Thoughts for the future

  • Formatter will be needed to apply formatting after making text changes in the source model.

About

Langium-based LS for TaskList language implemented in GLSP blueprints. Integrated with GLSP as SourceModel Server for demo purpose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published