parent
cba4f6fce0
commit
52f8513ce9
8 changed files with 199 additions and 23 deletions
@ -0,0 +1,72 @@ |
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<!-- syntaxdefinition for Json by alek kowalczyk --> |
||||
<!-- update by zuijin in 2019.12.20 --> |
||||
<SyntaxDefinition name="Json" extensions=".json" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008"> |
||||
<Color name="Bool" foreground="Blue" exampleText="true | false" /> |
||||
<Color name="Number" foreground="Red" exampleText="3.14" /> |
||||
<Color name="String" foreground="Green" exampleText="" /> |
||||
<Color name="Null" foreground="Olive" exampleText="" /> |
||||
<Color name="FieldName" foreground="DarkMagenta" /> |
||||
<Color name="Punctuation" foreground="Black" /> |
||||
|
||||
<RuleSet name="String"> |
||||
<Span begin="\\" end="."/> |
||||
</RuleSet> |
||||
|
||||
<RuleSet name="Object"> |
||||
<Span color="FieldName" ruleSet="String"> |
||||
<Begin>"</Begin> |
||||
<End>"</End> |
||||
</Span> |
||||
<Span color="FieldName" ruleSet="String"> |
||||
<Begin>'</Begin> |
||||
<End>'</End> |
||||
</Span> |
||||
<Span color="Punctuation" ruleSet="Expression"> |
||||
<Begin>:</Begin> |
||||
</Span> |
||||
<Span color="Punctuation"> |
||||
<Begin>,</Begin> |
||||
</Span> |
||||
</RuleSet> |
||||
|
||||
<RuleSet name="Array"> |
||||
<Import ruleSet="Expression"/> |
||||
<Span color="Punctuation"> |
||||
<Begin>,</Begin> |
||||
</Span> |
||||
</RuleSet> |
||||
|
||||
<RuleSet name="Expression"> |
||||
<Keywords color="Bool" > |
||||
<Word>true</Word> |
||||
<Word>false</Word> |
||||
</Keywords> |
||||
<Keywords color="Null" > |
||||
<Word>null</Word> |
||||
</Keywords> |
||||
<Span color="String" ruleSet="String"> |
||||
<Begin>"</Begin> |
||||
<End>"</End> |
||||
</Span> |
||||
<Span color="String" ruleSet="String"> |
||||
<Begin>'</Begin> |
||||
<End>'</End> |
||||
</Span> |
||||
<Span color="Punctuation" ruleSet="Object" multiline="true"> |
||||
<Begin>\{</Begin> |
||||
<End>\}</End> |
||||
</Span> |
||||
<Span color="Punctuation" ruleSet="Array" multiline="true"> |
||||
<Begin>\[</Begin> |
||||
<End>\]</End> |
||||
</Span> |
||||
<Rule color="Number"> |
||||
\b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)? |
||||
</Rule> |
||||
</RuleSet> |
||||
|
||||
<RuleSet> |
||||
<Import ruleSet="Expression"/> |
||||
</RuleSet> |
||||
</SyntaxDefinition> |
Loading…
Reference in new issue