- Fix a false positive regexp validation (#1631).
- Make the Langium language server more robust against errors (#1634)
- A few improvements to the grammar language validation (#1459, #1401).
- Fixed a bunch of grammar type system issues (#1541, #1506, #1500, #1478, #1473).
- Improve grammar language formatting (#1185).
- Fix a false positive in the grammar language validation (#1175).
- Includes a command to open a railroad syntax diagram for the currently selected langium grammar. Use the
Show Railroad Syntax Diagram
command or the corresponding button in the editor title bar to open the diagram (#1075). - Improvements to validation regarding cyclic type usage (#1130).
- The grammar language can now resolve grammar imports transitively (#1113).
- Various improvements to validation of type definitions (#845).
- Improved linking of types (#763).
- Various improvements around the inference and validation of types (#819).
- White space strings can be used in terminal rules (#771).
- Keywords of the grammar language can be used as property names (#811).
- Reserved words of the JavaScript runtime can no longer be used in grammar definitions (#749).
- The name of a terminal rule must not clash with a keyword (#820).
- The type of a property must not combine a cross-reference with something else (#826).
- Support find references for properties of declared types (#528).
- Support go to definition for grammar imports (#613).
- Highlight usages of declared types (#531).
- Added a code action to add new parser rule (#543).
- Various improvements around grammar types (#548, #551, #586, #670, #705).
- Hover pop-up shows information for cross-references (#473).
- Formatting of grammar files is now available (#479).
- You can "Go to Definition" on property assignments where the return type is explicitly declared (#505).
- Improved validation and general handling of inferred and declared types.
This release brought several changes to the grammar language:
- Added support for importing other grammar files to state explicitly which rules should be included in your grammar (#311).
This makes all declarations of the file
import './expressions';
expressions.langium
available in the current grammar. - Added support for explicit type declarations in the grammar (#406).
The
interface Entity { name: string superType?: @Entity features: Feature[] } type Symbol = Entity | PackageDeclaration | DataType | Feature
interface
form describes the properties of an AST node type. The@
character used at thesuperType
property above denotes a cross-reference to a node of typeEntity
. Thetype
form creates union types, i.e. an alternative of other declared or inferred types. - In addition to regular expressions, terminals now feature an extended backus-naur form that enables composition of terminal rules (#288).
- The
hidden
keyword of the grammar language is now used as modifier for terminals instead of following the top-level grammar declaration (#288). Instead ofyou now writegrammar Foo hidden(WS) terminal WS: /\s+/;
grammar Foo hidden terminal WS: /\s+/;
- Introduced a new
entry
keyword to explicitly mark the entry rule of the parser (#305). Previously the first grammar rule was assumed to be the entry rule. - Changed the syntax of cross-references in the grammar (#306). Instead of
property=[Type|TOKEN]
, you now writeproperty=[Type:TOKEN]
.