Skip to content

Commit

Permalink
Tmp: add example
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluralia committed Nov 25, 2021
1 parent 88c7ddc commit d669f47
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions examples/domainmodel/example/datatypes.dmodel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ datatype String
datatype Int
datatype Decimal

@aaa@wer
@bbb
ccc@

package big {
datatype Int
datatype Decimal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ entry Domainmodel:
(elements+=AbstractElement)*;

AbstractElement:
PackageDeclaration | Type;
PackageDeclaration | Type | '@aaa@' | '@bbb' | 'ccc@';

PackageDeclaration:
'package' name=QualifiedName '{'
Expand Down
15 changes: 15 additions & 0 deletions examples/domainmodel/src/language-server/generated/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,21 @@ export const grammar = (): Grammar => loaded || (loaded = loadGrammar(`{
"$refText": "Type"
},
"elements": []
},
{
"$type": "Keyword",
"value": "@aaa@",
"elements": []
},
{
"$type": "Keyword",
"value": "@bbb",
"elements": []
},
{
"$type": "Keyword",
"value": "ccc@",
"elements": []
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/domainmodel/syntaxes/domain-model.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"name": "keyword.control.domain-model",
"match": "\\b(datatype|entity|extends|many|package)\\b"
"match": "\\b(datatype|entity|extends|many|package)\\b|\\B(@bbb)\\b|\\b(ccc@)\\B|\\B(@aaa@)\\B"
},
{
"name": "string.quoted.double.domain-model",
Expand Down

0 comments on commit d669f47

Please sign in to comment.