Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions .vitepress/languages/cds.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@
"name": "constant.language.cds"
},
{
"match": "(?<!\\.)\\b(super|this)(?!\\s*:)\\b",
"name": "variable.language.cds"
"include": "#selfKeyword"
},
{
"match": ";",
Expand Down Expand Up @@ -360,6 +359,10 @@
}
]
},
"selfKeyword": {
"name": "variable.language.cds",
"match": "(?<!\\.|\\w)\\$self\\b"
},
"comment": {
"name": "comment",
"patterns": [
Expand Down Expand Up @@ -612,7 +615,7 @@
},
{
"comment": "Element name or type",
"match": "(?<!@)(?:\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\]|[$_\\p{ID_Start}][$\\p{ID_Continue}\\u200C\\u200D]*)(?=\\s*[:{,@])",
"match": "(?<!@)(?:\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\]|[$_\\p{ID_Start}][$\\p{ID_Continue}\\u200C\\u200D]*)(?=\\s*[:{,@=])",
"name": "entity.other.attribute-name.cds"
},
{
Expand Down Expand Up @@ -946,7 +949,7 @@
"name": "atAnnoNoParen",
"begin": "(@)(?!\\s*\\()",
"comment": "'end' uses lookahead, since end of annotation value itself cannot currently be safely determined",
"end": "(?<=[}\\]'`])(?=\\s*($|[@;]))|(?<![@:])(?!\\s*:)(?=$|[\\s@,;(){}\\[\\]'`/\"!]|\\b\\p{ID_Start})",
"end": "(?<=[}\\]'`])(?=\\s*($|[@;]))|(?<![@:])(?!\\s*:)(?=$|[\\s@,;(){}\\[\\]'`/\"!])",
"captures": {
"1": {
"name": "entity.name.tag.at.cds"
Expand Down Expand Up @@ -1352,17 +1355,29 @@
"include": "#keyword"
},
{
"match": "(?i)(?<!@|select from )(?:\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\]|[$_\\p{ID_Start}][$\\p{ID_Continue}\\u200C\\u200D]*)",
"name": "entity.other.attribute-name.cds"
"include": "#selfKeyword"
},
{
"include": "#identifier"
"include": "#string"
},
{
"include": "#number"
},
{
"include": "#operator"
},
{
"include": "#string"
"include": "#bracketedExpression"
},
{
"include": "#squareBrackets"
},
{
"match": "(?i)(?<!@|select from )(?:\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\]|[$_\\p{ID_Start}][$\\p{ID_Continue}\\u200C\\u200D]*)",
"name": "entity.other.attribute-name.cds"
},
{
"include": "#identifier"
}
]
},
Expand Down Expand Up @@ -1738,4 +1753,4 @@
}
},
"scopeName": "source.cds"
}
}
Loading