1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- syntaxdefinition for Json by alek kowalczyk -->
3
+ <!-- update by zuijin in 2019.12.20 -->
3
4
<SyntaxDefinition name =" Json" extensions =" .json" xmlns =" http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008" >
4
- <Color name =" Digits" foreground =" #8700FF" exampleText =" 3.14" />
5
- <Color name =" Value" foreground =" #000CFF" />
6
- <Color name =" ParamName" foreground =" #057500" />
7
- <RuleSet ignoreCase =" false" >
8
- <Keywords color =" Digits" >
5
+ <Color name =" Bool" foreground =" Blue" exampleText =" true | false" />
6
+ <Color name =" Number" foreground =" Red" exampleText =" 3.14" />
7
+ <Color name =" String" foreground =" Green" exampleText =" " />
8
+ <Color name =" Null" foreground =" Olive" exampleText =" " />
9
+ <Color name =" FieldName" foreground =" DarkMagenta" />
10
+ <Color name =" Punctuation" foreground =" Black" />
11
+
12
+ <RuleSet name =" String" >
13
+ <Span begin =" \\" end =" ." />
14
+ </RuleSet >
15
+
16
+ <RuleSet name =" Object" >
17
+ <Span color =" FieldName" ruleSet =" String" >
18
+ <Begin >"</Begin >
19
+ <End >"</End >
20
+ </Span >
21
+ <Span color =" FieldName" ruleSet =" String" >
22
+ <Begin >'</Begin >
23
+ <End >'</End >
24
+ </Span >
25
+ <Span color =" Punctuation" ruleSet =" Expression" >
26
+ <Begin >:</Begin >
27
+ </Span >
28
+ <Span color =" Punctuation" >
29
+ <Begin >,</Begin >
30
+ </Span >
31
+ </RuleSet >
32
+
33
+ <RuleSet name =" Array" >
34
+ <Import ruleSet =" Expression" />
35
+ <Span color =" Punctuation" >
36
+ <Begin >,</Begin >
37
+ </Span >
38
+ </RuleSet >
39
+
40
+ <RuleSet name =" Expression" >
41
+ <Keywords color =" Bool" >
9
42
<Word >true</Word >
10
43
<Word >false</Word >
11
44
</Keywords >
12
- <Span color =" ParamName" >
45
+ <Keywords color =" Null" >
46
+ <Word >null</Word >
47
+ </Keywords >
48
+ <Span color =" String" ruleSet =" String" >
13
49
<Begin >"</Begin >
14
- <End >"\w*(?=:,) </End >
50
+ <End >"</End >
15
51
</Span >
16
- <Span color =" ParamName " >
52
+ <Span color =" String " ruleSet = " String " >
17
53
<Begin >'</Begin >
18
- <End >'\w*(?=:,) </End >
54
+ <End >'</End >
19
55
</Span >
20
- <Span color =" Value" >
21
- <Begin >
22
- (?< =:)\040"[^"]*
23
- </Begin >
24
- <End >"</End >
56
+ <Span color =" Punctuation" ruleSet =" Object" multiline =" true" >
57
+ <Begin >\{</Begin >
58
+ <End >\}</End >
25
59
</Span >
26
- <Span color =" Value" >
27
- <Begin >
28
- (?< =:)\040'[^']*
29
- </Begin >
30
- <End >'</End >
60
+ <Span color =" Punctuation" ruleSet =" Array" multiline =" true" >
61
+ <Begin >\[</Begin >
62
+ <End >\]</End >
31
63
</Span >
32
- <Rule color =" Digits" >\b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?</Rule >
64
+ <Rule color =" Number" >
65
+ \b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?
66
+ </Rule >
67
+ </RuleSet >
68
+
69
+ <RuleSet >
70
+ <Import ruleSet =" Expression" />
33
71
</RuleSet >
34
72
</SyntaxDefinition >
0 commit comments