Sfoglia il codice sorgente

Улучшения

ytolsky 2 mesi fa
parent
commit
2b6ba17980
4 ha cambiato i file con 51 aggiunte e 13 eliminazioni
  1. 5 5
      README.md
  2. 20 3
      cgdata.hrc
  3. 19 5
      cgpl.hrc
  4. 7 0
      wssp.hrc

+ 5 - 5
README.md

@@ -1,9 +1,9 @@
-# Far colorer presets for Communigate Pro
+# Far colorer presets for [Communigate Pro](https://communigatepro.ru/)
 
-Поддержка расцветки файлов Communigate Pro при редактировании в **far** (windows) и **far2l** (все версии linux)  
-Касается расширений файлов: cgpl,sppr,sppi,wcgi,wcgp в фомате CGPL  
-Расширения: wssp,wssi в формате WSSP (html)  
-Расширения: settings,dst,info,data,prefs в формате данных CG  
+Поддержка расцветки файлов Communigate Pro при редактировании в [**far** (windows)](https://farmanager.com/) и [**far2l** (все версии linux)](https://github.com/elfmz/far2l)  
+Касается расширений файлов: **cgpl**, **sppr**, **sppi**, **wcgi**, **wcgp** в фомате CGPL  
+Расширения: **wssp**, **wssi** в формате WSSP (html)  
+Расширения: **settings**, **dst**, **info**, **data**, **objdata**, **prefs** в формате данных CG  
 
 ## Установка
 Для установки например поместить *.hrc в  

+ 20 - 3
cgdata.hrc

@@ -5,9 +5,17 @@
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
 
+  <annotation><documentation>
+   CG data files Syntax Highlighting
+  </documentation><contributors><![CDATA[
+   Created by:
+     Iurii Tolskii <iurii.tolskii@communigatepro.ru>
+  ]]></contributors></annotation>
+
+
  <prototype name="cgdata" group="main" description="CG data files">
     <location link="cgdata.hrc" />
-    <filename>/\.(settings|dst|info|data|prefs)$/i</filename>
+    <filename>/\.(settings|dst|info|data|prefs|objdata)$/i</filename>
  </prototype>
 
  <type name="cgdata">
@@ -17,8 +25,12 @@
         <regexp match="/&#34;(?:\\.|[^&#34;\\])*&#34;/" region="def:String"/>
         <!-- Числа (десятичные, шестнадцатеричные, восьмеричные, двоичные) -->
         <regexp match="/\b?(0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|0|[1-9]\d*)\b/" region="def:Number" />
+    	<!-- Блоки -->
+        <block start="/(\{)/" end="/(\})/" scheme="cgdata" region00="def:Symbol" region01="def:PairStart" region10="def:Symbol" region11="def:PairEnd"/>
+        <block start="/(\()/" end="/(\))/" scheme="cgdata" region00="def:Symbol" region01="def:PairStart" region10="def:Symbol" region11="def:PairEnd"/>
+        <block start="/(\[)/" end="/(\])/" scheme="cgdata" region00="def:Symbol" region01="def:PairStart" region10="def:Symbol" region11="def:PairEnd"/>
         <!-- Ключевые слова -->
-	<keywords region="def:Keyword">
+	<keywords region="def:Keyword" ignorecase="yes">
 		<word name="yes"/> 
 		<word name="no"/> 
 	</keywords>		
@@ -26,7 +38,12 @@
         <keywords region="def:Symbol">
                 <symb name="+"/>
                 <symb name="-"/>
-                <symb name=";" region="def:SymbolStrong"/>
+                <symb name="="/>
+                <symb name="{" region="def:Error"/>
+                <symb name="}" region="def:Error"/>
+                <symb name="[" region="def:Error"/>
+                <symb name="]" region="def:Error"/>
+                <symb name=";"/>
 	</keywords>		
   </scheme>
  </type>

+ 19 - 5
cgpl.hrc

@@ -5,6 +5,13 @@
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
 
+  <annotation><documentation>
+   CGPL files Syntax Highlighting
+  </documentation><contributors><![CDATA[
+   Created by:
+     Iurii Tolskii <iurii.tolskii@communigatepro.ru>
+  ]]></contributors></annotation>
+
  <prototype name="cgpl" group="main" description="CGPL files">
     <location link="cgpl.hrc" />
     <filename>/\.(cgpl|sppr|sppi|wcgi|wcgp)$/i</filename>
@@ -16,12 +23,19 @@
         <!-- Комментарии -->
    	<block start="/\/\//" end="/$/" scheme="def:Comment" region="def:LineComment"/>
    	<block start="/\/\*/" end="/\*\//" scheme="def:Comment" region="def:Comment" region00="def:PairStart" region10="def:PairEnd"/>
-    	<!-- Строки -->
-        <regexp match="/&#34;(?:\\.|[^&#34;\\])*&#34;/" region="def:String"/>
         <!-- Числа (десятичные, шестнадцатеричные, восьмеричные, двоичные) -->
         <regexp match="/\b(0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|0|[1-9]\d*)\b/" region="def:Number" />
+    	<!-- Строки -->
+        <regexp match="/&#34;(?:\\.|[^&#34;\\])*&#34;/" region="def:String"/>
+    	<!-- Блоки -->
+        <block start="/\b(is)\b/i" end="/\b(end)\b/i" scheme="cgpl" region00="def:Keyword" region01="def:PairStart" region10="def:Keyword" region11="def:PairEnd"/>
+        <block start="/\b(if)\b/i" end="/\b(end\s+if)/i" scheme="cgpl" region00="def:Keyword" region01="def:PairStart" region10="def:Keyword" region11="def:PairEnd"/>
+        <block start="/\b(loop)\b/i" end="/\b(end\s+loop)/i" scheme="cgpl" region00="def:Keyword" region01="def:PairStart" region10="def:Keyword" region11="def:PairEnd"/>
+        <block start="/(\{)/" end="/(\})/" scheme="cgpl" region00="def:Symbol" region01="def:PairStart" region10="def:Symbol" region11="def:PairEnd"/>
+        <block start="/(\()/" end="/(\))/" scheme="cgpl" region00="def:Symbol" region01="def:PairStart" region10="def:Symbol" region11="def:PairEnd"/>
+        <block start="/(\[)/" end="/(\])/" scheme="cgpl" region00="def:Symbol" region01="def:PairStart" region10="def:Symbol" region11="def:PairEnd"/>
         <!-- Ключевые слова -->
-	<keywords region="def:Keyword">
+	<keywords region="def:Keyword" ignorecase="yes">
 		<word name="and"/> 
 		<word name="by"/> 
 		<word name="elif"/> 
@@ -85,10 +99,10 @@
                 <symb name="]"/>
                 <symb name="{"/>
                 <symb name="}"/>
-                <symb name=";" region="def:SymbolStrong"/>
+                <symb name=";"/>
 	</keywords>		
         <!-- Встроенные функции  и процедуры -->
-	<keywords region="def:Label">
+	<keywords region="def:Label" ignorecase="yes">
 		<word name="Same"/>
 		<word name="Copy"/>
 		<word name="Length"/>

+ 7 - 0
wssp.hrc

@@ -5,6 +5,13 @@
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
 
+  <annotation><documentation>
+   CG WSSP files Syntax Highlighting
+  </documentation><contributors><![CDATA[
+   Created by:
+     Iurii Tolskii <iurii.tolskii@communigatepro.ru>
+  ]]></contributors></annotation>
+
  <prototype name="wssp" group="main" description="WSSP files">
     <location link="wssp.hrc" />
     <filename>/\.(wssp|wssi)$/i</filename>