|
3 | 3 | "name": "FGD", |
4 | 4 | "scopeName": "source.fgd", |
5 | 5 | "patterns": [ |
6 | | - { "include": "#classDefinition" } |
| 6 | + { "include": "#classDefinition" }, |
| 7 | + { "include": "#helper"}, |
| 8 | + { "include": "#classLabel" }, |
| 9 | + { "include": "#body" }, |
| 10 | + { "include": "source.kv#comment" } |
7 | 11 | ], |
8 | 12 | "repository": { |
9 | 13 | "classDefinition": { |
10 | | - "begin": "(\\@)(\\w+)", |
11 | | - "beginCaptures": { |
| 14 | + "match": "(\\@)(\\w+)", |
| 15 | + "captures": { |
12 | 16 | "1": { "name": "entity.name.type.fgd" }, |
13 | 17 | "2": { |
14 | 18 | "patterns": [ |
|
18 | 22 | } |
19 | 23 | ] |
20 | 24 | } |
21 | | - }, |
22 | | - "end": "\\]", |
23 | | - "patterns": [ |
24 | | - { "include": "#helper" }, |
25 | | - { "include": "#content" }, |
26 | | - { "include": "source.kv#comment" } |
27 | | - ] |
| 25 | + } |
28 | 26 | }, |
29 | 27 | "helper": { |
30 | 28 | "begin": "(\\w+)\\(", |
| 29 | + "end": "\\)", |
31 | 30 | "beginCaptures": { |
32 | | - "1": { "name": "entity.other.attribute-name.fgd" } |
| 31 | + "1": { "name": "entity.name.function.fgd" } |
33 | 32 | }, |
34 | | - "end": "\\)", |
35 | 33 | "patterns": [ |
36 | | - { |
37 | | - "match": "\\w+", |
38 | | - "name": "string.unquoted.fgd" |
39 | | - }, |
40 | 34 | { |
41 | 35 | "match": "\\d+", |
42 | 36 | "name": "constant.numeric.fgd" |
43 | 37 | }, |
44 | 38 | { |
45 | | - "begin": "\"", |
46 | | - "end": "\"", |
47 | | - "name": "string.quoted.double.fgd" |
| 39 | + "match": "\\w+", |
| 40 | + "name": "variable.parameter.fgd" |
| 41 | + }, |
| 42 | + { |
| 43 | + "include": "source.kv#stringQuoted" |
48 | 44 | } |
49 | 45 | ] |
50 | 46 | }, |
51 | | - "content": { |
52 | | - "begin": "=", |
53 | | - "beginCaptures": { |
54 | | - "0": { "name": "keyword.operator.fgd" } |
55 | | - }, |
56 | | - "end": "\\]", |
57 | | - "patterns": [ |
58 | | - { "include": "#head" }, |
59 | | - { "include": "#description" }, |
60 | | - { "include": "#body" } |
61 | | - ] |
62 | | - }, |
63 | | - "head": { |
64 | | - "name": "meta.head.fgd", |
65 | | - "match": "([\\w]+ *)(:)", |
| 47 | + "classLabel": { |
| 48 | + "match": "(=) *([\\w_]+) *(:) *(\\\"[\\w ]+\\\")", |
66 | 49 | "captures": { |
67 | | - "1": { "name": "entity.name.class.fgd" }, |
68 | | - "2": { "name": "keyword.operator.fgd" } |
| 50 | + "1": { "name": "keyword.operator.fgd" }, |
| 51 | + "2": { "name": "entity.name.function.fgd" }, |
| 52 | + "3": { "name": "keyword.operator.fgd" }, |
| 53 | + "4": { "name": "string.quoted.double.fgd" } |
69 | 54 | } |
70 | 55 | }, |
71 | 56 | "body": { |
|
114 | 99 | { "include": "#preprocessorTag" } |
115 | 100 | ] |
116 | 101 | }, |
117 | | - "description": { |
118 | | - "name": "string.quoted.double.fgd", |
119 | | - "begin": "\"", |
120 | | - "end": "\"(\\s+)?", |
121 | | - "endCaptures": { |
122 | | - "1": { "name": "keyword.operator.fgd" } |
123 | | - }, |
124 | | - "patterns": [ |
125 | | - { |
126 | | - "match": "\\\\[a-z]", |
127 | | - "name": "constant.character.escape.fgd" |
128 | | - } |
129 | | - ] |
130 | | - }, |
131 | 102 | "preprocessorTag": { |
132 | 103 | "begin": "\\[", |
133 | 104 | "end": "\\]", |
|
0 commit comments