MPS
 
Get MPS

Implementing generators for BaseLanguage's extensions

Last modified: 11 February 2024

This article showcases an idiomatic way for writing generators for BaseLanguage extensions that operate with lvalue-expressions. We say that a BaseLanguage expression is lvalueif it can be used in the left-hand side of an assignment expression. Concepts that introduce such expressions should override either the instance method Expression#isLValue()or the static method Expression#lvalue()in the behaviour aspect.

The study consists of two independent languages, both of which are small extensions to BaseLanguage. The source code can be found in the BlReference sample project in the MPS distribution.