diff --git a/syntaxes/metamodelica.tmGrammar.yaml b/syntaxes/metamodelica.tmGrammar.yaml index c11cdc8..e9040d4 100644 --- a/syntaxes/metamodelica.tmGrammar.yaml +++ b/syntaxes/metamodelica.tmGrammar.yaml @@ -17,8 +17,28 @@ patterns: name: constant.numeric # Storage + ## Enumeration + - begin: \b(enumeration)\b\s*\( + beginCaptures: + 1: + name: storage.type.enumeration + end: \)\s*; + patterns: + - include: '#enumeration' + + ## Type declaration + - match: \b(type)\b\s+\b(\w+)\b\s+(=) + captures: + 1: + name: storage.type + 2: + name: entity.name.type + 3: + name: keyword.operator.assignment + - match: \b(Real|Integer|Boolean|String|enumeration|type)\b name: storage.type + ## Variability Prefix - match: \b(parameter|constant)\b name: storage.modifier @@ -110,4 +130,15 @@ repository: match: '\\(x\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' name: constant.character.escape + enumeration: + patterns: + - match: \b(\w+)\b\s*((?