Skip to content

Commit 499f02a

Browse files
committed
Merge branch 'topic/gpr-syntax-highlight' into 'master'
Fix GPR syntax highlighting See merge request eng/ide/ada_language_server!1781
2 parents c29e42d + 9dc0b47 commit 499f02a

File tree

4 files changed

+310
-3
lines changed

4 files changed

+310
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
},
277277
"project": {
278278
"name": "meta.project.gpr",
279-
"begin": "(?i)\\b(?:(abstract|aggregate|library)\\s+)?(project)\\s+((?:\\w|\\d|_)+)\\b",
279+
"begin": "(?i)\\b(?:(abstract|aggregate|library|standard)\\s+)?(project)\\s+((?:\\w|\\d|_)+)\\b",
280280
"end": "(?i)\\b(end)\\s+(\\3)\\s*(;)",
281281
"beginCaptures": {
282282
"1": { "name": "keyword.gpr" },
@@ -304,7 +304,8 @@
304304
{ "include": "#comment" },
305305
{ "include": "#attribute" },
306306
{ "include": "#type" },
307-
{ "include": "#variable" }
307+
{ "include": "#variable" },
308+
{ "include": "#case_construction" }
308309
]
309310
},
310311
{

integration/vscode/ada/test/suite/general/highlighting.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ suite('Highlighting', function () {
5656
});
5757
}
5858

59-
const gprTests = ['prj.gpr', 'src/test.gpr'];
59+
const gprTests = ['prj.gpr', 'src/test.gpr', 'src/ada_libfswatch.gpr'];
6060

6161
for (const relPath of gprTests) {
6262
const gprSyntaxPath = path.join(extensionRootPath, 'syntaxes', 'gpr.tmLanguage.json');
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
-- This project has been generated by GPRINSTALL Pro 26.0w (20241106) (x86_64-pc-linux-gnu)
2+
3+
with "c_libfswatch";
4+
with "c_libfswatch";
5+
with "gnatcoll_core";
6+
with "gnatcoll_minimal";
7+
8+
standard project Ada_Libfswatch is
9+
type BUILD_KIND is ("default");
10+
BUILD : BUILD_KIND := external("ADA_LIBFSWATCH_BUILD", "default");
11+
12+
for Languages use ("Ada");
13+
14+
case BUILD is
15+
when "default" =>
16+
for Source_Dirs use ("../../include/ada_libfswatch");
17+
for Object_Dir use "../../lib/ada_libfswatch";
18+
end case;
19+
20+
package Naming is
21+
case BUILD is
22+
when "default" =>
23+
null;
24+
end case;
25+
end Naming;
26+
27+
package Linker is
28+
case BUILD is
29+
when "default" =>
30+
null;
31+
end case;
32+
end Linker;
33+
34+
package Install is
35+
for Active use "False";
36+
end Install;
37+
38+
for Externally_Built use "True";
39+
40+
end Ada_Libfswatch;

0 commit comments

Comments
 (0)