MPS
 
2021.1
Get MPS
You are viewing the documentation for an earlier version of MPS.

Implementing generators for BaseLanguage's extensions

Last modified: 23 March 2021

 

This article showcases an idiomatic way for writing generators for BaseLanguage extensions that operate with lvalue-expressions. We say that a BaseLanguage expression is lvalue  if 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.