|
6 | 6 | { "include": "#comments" }, |
7 | 7 | { "include": "#block-header" }, |
8 | 8 | { "include": "#summary-separator" }, |
9 | | - { "include": "#field-definitions" }, |
10 | | - { "include": "#data-values" } |
| 9 | + { "include": "#strings" }, |
| 10 | + { "include": "#references" }, |
| 11 | + { "include": "#booleans" }, |
| 12 | + { "include": "#null" }, |
| 13 | + { "include": "#numbers" }, |
| 14 | + { "include": "#identifiers" } |
11 | 15 | ], |
12 | 16 | "repository": { |
13 | 17 | "comments": { |
|
27 | 31 | "name": "keyword.operator.separator.ison", |
28 | 32 | "match": "^---$" |
29 | 33 | }, |
30 | | - "field-definitions": { |
31 | | - "patterns": [ |
32 | | - { |
33 | | - "name": "meta.field-typed.ison", |
34 | | - "match": "(\\w+)(:)(int|float|string|bool|ref|date|datetime|uuid|json)", |
35 | | - "captures": { |
36 | | - "1": { "name": "variable.other.field.ison" }, |
37 | | - "2": { "name": "punctuation.separator.type.ison" }, |
38 | | - "3": { "name": "storage.type.ison" } |
39 | | - } |
40 | | - }, |
41 | | - { |
42 | | - "name": "variable.other.field.ison", |
43 | | - "match": "(?<=^|\\s)(\\w+)(?=\\s|$)" |
44 | | - } |
45 | | - ] |
46 | | - }, |
47 | | - "data-values": { |
| 34 | + "strings": { |
48 | 35 | "patterns": [ |
49 | 36 | { |
50 | 37 | "name": "string.quoted.double.ison", |
|
67 | 54 | "match": "\\\\." |
68 | 55 | } |
69 | 56 | ] |
70 | | - }, |
| 57 | + } |
| 58 | + ] |
| 59 | + }, |
| 60 | + "references": { |
| 61 | + "patterns": [ |
71 | 62 | { |
72 | | - "name": "constant.language.null.ison", |
73 | | - "match": "(?<=^|\\s)(null|~)(?=\\s|$)" |
| 63 | + "name": "variable.other.reference.ison", |
| 64 | + "match": ":[A-Z_]+:[\\w]+", |
| 65 | + "captures": { |
| 66 | + "0": { "name": "support.type.reference.ison" } |
| 67 | + } |
74 | 68 | }, |
| 69 | + { |
| 70 | + "name": "variable.other.reference.simple.ison", |
| 71 | + "match": ":[\\w]+\\b", |
| 72 | + "captures": { |
| 73 | + "0": { "name": "support.type.reference.ison" } |
| 74 | + } |
| 75 | + } |
| 76 | + ] |
| 77 | + }, |
| 78 | + "booleans": { |
| 79 | + "patterns": [ |
75 | 80 | { |
76 | 81 | "name": "constant.language.boolean.true.ison", |
77 | | - "match": "(?<=^|\\s)true(?=\\s|$)" |
| 82 | + "match": "\\btrue\\b" |
78 | 83 | }, |
79 | 84 | { |
80 | 85 | "name": "constant.language.boolean.false.ison", |
81 | | - "match": "(?<=^|\\s)false(?=\\s|$)" |
82 | | - }, |
| 86 | + "match": "\\bfalse\\b" |
| 87 | + } |
| 88 | + ] |
| 89 | + }, |
| 90 | + "null": { |
| 91 | + "name": "constant.language.null.ison", |
| 92 | + "match": "\\b(null|~)\\b" |
| 93 | + }, |
| 94 | + "numbers": { |
| 95 | + "patterns": [ |
83 | 96 | { |
84 | 97 | "name": "constant.numeric.float.ison", |
85 | | - "match": "(?<=^|\\s)-?\\d+\\.\\d+(?=\\s|$)" |
| 98 | + "match": "-?\\b\\d+\\.\\d+\\b" |
86 | 99 | }, |
87 | 100 | { |
88 | 101 | "name": "constant.numeric.integer.ison", |
89 | | - "match": "(?<=^|\\s)-?\\d+(?=\\s|$)" |
90 | | - }, |
91 | | - { |
92 | | - "name": "meta.reference.ison", |
93 | | - "match": "(:)([A-Z_]+)?(:)?(\\w+)", |
94 | | - "captures": { |
95 | | - "1": { "name": "punctuation.definition.reference.ison" }, |
96 | | - "2": { "name": "entity.name.tag.relationship.ison" }, |
97 | | - "3": { "name": "punctuation.separator.namespace.ison" }, |
98 | | - "4": { "name": "variable.other.reference.ison" } |
99 | | - } |
100 | | - }, |
| 102 | + "match": "-?\\b\\d+\\b" |
| 103 | + } |
| 104 | + ] |
| 105 | + }, |
| 106 | + "identifiers": { |
| 107 | + "patterns": [ |
101 | 108 | { |
102 | | - "name": "variable.other.reference.simple.ison", |
103 | | - "match": "(?<=^|\\s):(\\w+)(?=\\s|$)", |
| 109 | + "name": "meta.field-typed.ison", |
| 110 | + "match": "(\\w+)(:)(int|float|string|bool|ref|date|datetime|uuid|json)\\b", |
104 | 111 | "captures": { |
105 | | - "1": { "name": "variable.other.reference.id.ison" } |
| 112 | + "1": { "name": "variable.other.field.ison" }, |
| 113 | + "2": { "name": "punctuation.separator.type.ison" }, |
| 114 | + "3": { "name": "storage.type.ison" } |
106 | 115 | } |
107 | 116 | } |
108 | 117 | ] |
|
0 commit comments