ADD: JSON highlighter

This commit is contained in:
Alexander Koblov 2025-01-08 19:09:23 +03:00
commit 85d1985b9f
3 changed files with 128 additions and 1 deletions

53
highlighters/JSON.hgl Normal file
View file

@ -0,0 +1,53 @@
<UniHighlighter version="1.8">
<Info>
<General Name="JSON" Extensions="json" Other="0"/>
<Author Name="" Email="" Web="" Copyright="" Company="" Remark=""/>
<Version Version="1" Revision="1" Date="45338,8541038426"/>
<History>
</History>
<Sample>
<S>{</S>
<S> Styles : [</S>
<S> {</S>
<S> String: &quot;Light&quot;,</S>
<S> Number: 1000,</S>
<S> Boolean: true</S>
<S> },</S>
<S> {</S>
<S> String: &quot;Dark&quot;,</S>
<S> Number: 3000,</S>
<S> Boolean: false</S>
<S> }</S>
<S> ]</S>
<S>}</S>
</Sample>
</Info>
<Scheme File="" Name=""/>
<Range Name="Root" Attributes="$80000008,$80000005;False:False." Style=""
Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
<Rule/>
<Keywords Name="Keywords" Attributes="$000080FF,$80000005;False:True." Style="">
<Word Value="false"/>
<Word Value="null"/>
<Word Value="true"/>
</Keywords>
<Keywords Name="Punctuators" Attributes="$00800000,$80000005;False:True." Style="">
<Word Value="["/>
<Word Value="]"/>
<Word Value="{"/>
<Word Value="}"/>
<Word Value=","/>
<Word Value=":"/>
</Keywords>
<Set Name="Numbers" Attributes="$00008000,$80000005;False:True." Style="" Symbols="0123456789"/>
<Range Name="Strings &quot;..&quot;" Attributes="$00000080,$80000005;False:True." Style=""
Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
<Rule OpenSymbol="&quot;" OpenSymbolPartOfTerm="Right" CloseSymbol="&quot;" CloseSymbolPartOfTerm="Right" CloseOnEol="True"/>
<Keywords Name="Escape" Attributes="$00000080,$80000005;True:True." Style="">
<Word Value="\&quot;"/>
<Word Value="\'"/>
<Word Value="\\"/>
</Keywords>
</Range>
</Range>
</UniHighlighter>

View file

@ -1,6 +1,6 @@
<UniHighlighter version="1.8">
<Info>
<General Name="Java script" Extensions="js,json" Other="0"/>
<General Name="Java script" Extensions="js" Other="0"/>
<Author Name="Vitaly Nevzorov" Email="nevzorov@yahoo.com" Web="www.delphist.com" Copyright="Copyright (c) Vitaly Nevzorov, 2002" Company="N/A" Remark=""/>
<Version Version="1" Revision="1" Date="45338,8541038426"/>
<History>

View file

@ -211,6 +211,43 @@
}
]
},
{
Name : "JSON",
Ranges : [
{
Name : "Root",
Attributes : "$80000008,$80000005;False:False.",
Sets : [
{
Name : "Numbers",
Attributes : "$00008000,$80000005;False:True."
}
],
KeyLists : [
{
Name : "Keywords",
Attributes : "$000080FF,$80000005;False:True."
},
{
Name : "Punctuators",
Attributes : "$00800000,$80000005;False:True."
}
],
Ranges : [
{
Name : "Strings \"..\"",
Attributes : "$00000080,$80000005;False:True.",
KeyLists : [
{
Name : "Escape",
Attributes : "$00000080,$80000005;True:True."
}
]
}
]
}
]
},
{
Name : "Java script",
Ranges : [
@ -715,6 +752,43 @@
}
]
},
{
Name : "JSON",
Ranges : [
{
Name : "Root",
Attributes : "$80000008,$80000005;False:False.",
Sets : [
{
Name : "Numbers",
Attributes : "$008AD277,$80000005;False:True."
}
],
KeyLists : [
{
Name : "Keywords",
Attributes : "$007891E2,$80000005;False:True."
},
{
Name : "Punctuators",
Attributes : "$00C09B61,$80000005;False:True."
}
],
Ranges : [
{
Name : "Strings \"..\"",
Attributes : "$00898BB9,$80000005;False:True.",
KeyLists : [
{
Name : "Escape",
Attributes : "$00898BB9,$80000005;True:True."
}
]
}
]
}
]
},
{
Name : "Java script",
Ranges : [