Skip to content

Commit 4953018

Browse files
Fix TextMate grammar for case statetements + null directives
For eng/ide/ada_language_server#1393
1 parent 705797f commit 4953018

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

integration/vscode/ada/syntaxes/gpr.tmLanguage.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
{ "include": "#comment" }
88
],
99
"repository": {
10+
"empty_declaration": {
11+
"begin": "(null)",
12+
"end": ";",
13+
"beginCaptures": {
14+
"0": { "name": "keyword.gpr" }
15+
}
16+
},
1017
"assignment": {
1118
"begin": ":=",
1219
"end": "(?=;)",
@@ -42,7 +49,7 @@
4249
},
4350
"case_construction": {
4451
"name": "meta.case.gpr",
45-
"begin": "(?i)\\b(case)\\s+((?:\\w|\\d|_)+)\\s+(is)\\b",
52+
"begin": "(?i)\\b(case)\\s+(.+)\\s+(is)\\b",
4653
"end": "(?i)\\b(end)\\s+(case)\\s*(;)",
4754
"beginCaptures": {
4855
"1": { "name": "keyword.control.gpr" },
@@ -55,9 +62,11 @@
5562
"3": { "name": "punctuation.gpr" }
5663
},
5764
"patterns": [
65+
{ "include": "#case_construction" },
5866
{ "include": "#case_when" },
5967
{ "include": "#comment" },
60-
{ "include": "#attribute" }
68+
{ "include": "#attribute" },
69+
{ "include": "#empty_declaration" }
6170
]
6271
},
6372
"case_when": {
@@ -117,7 +126,8 @@
117126
"patterns": [
118127
{ "include": "#case_construction" },
119128
{ "include": "#comment" },
120-
{ "include": "#attribute" }
129+
{ "include": "#attribute" },
130+
{ "include": "#empty_declaration" }
121131
]
122132
},
123133
{

0 commit comments

Comments
 (0)