From d7bc2dea4049b93d4eb14f26969badc19ac3394a Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 26 Oct 2024 18:46:51 -0400 Subject: [PATCH] Add R and Pascal language defs (#1634) #1633 --- OneMore/Colorizer/Languages/pascal.json | 55 ++++++++++++++++++++++++ OneMore/Colorizer/Languages/pascal.png | Bin 0 -> 722 bytes OneMore/Colorizer/Languages/r.json | 38 ++++++++++++++++ OneMore/Colorizer/Languages/r.png | Bin 0 -> 696 bytes OneMore/OneMore.csproj | 12 ++++++ 5 files changed, 105 insertions(+) create mode 100644 OneMore/Colorizer/Languages/pascal.json create mode 100644 OneMore/Colorizer/Languages/pascal.png create mode 100644 OneMore/Colorizer/Languages/r.json create mode 100644 OneMore/Colorizer/Languages/r.png diff --git a/OneMore/Colorizer/Languages/pascal.json b/OneMore/Colorizer/Languages/pascal.json new file mode 100644 index 0000000000..5d850eb01b --- /dev/null +++ b/OneMore/Colorizer/Languages/pascal.json @@ -0,0 +1,55 @@ +{ + "name": "Pascal", + "rules": [ + { + "pattern": "({(?:[^}]|[\\r\\n]|(?:{+(?:[^}]|[\\r\\n])))*})", + "captures": [ + "Comment" + ] + }, + { + "pattern": "({[^\\r\\n]*)$", + "scope": "Comment", + "captures": [ + "Comment" + ] + }, + { + "pattern": "^([^{\\r\\n]*})\\s*$", + "scope": "", + "captures": [ + "Comment" + ] + }, + { + "pattern": "(//.*?)\\r?$", + "captures": [ + "Comment" + ] + }, + { + "pattern": "('[^\\n]*?(?Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0%u7?K~y+TeN#;-Mh;0~Rp^ zD)>Wft1UuXRI2gdK`gC}7L(d!ck`TiyREiVzcAT(Gw+)>Z)To?b%>w7wx2#{NDh)D z*hct7@{;8C?7-Dm(&Aw?01*T9=_ff`qd!N8KTd)|Kg~5{NG?#IU%Zeek32|{7=Zi&0O7dUY%k9eJ*mj^h{ z6l;u<<={{vhWc!wvG4p1^k*N+K#Wex45|vQ6CuR`xY{n3ZFKG423^-+*$#4J zZ}GlR#KlJwD3xW++(4A6SKuBFu+l2&XiGFp)v_#X-?AB(k9T48$|*z}>ZN_0>cH>< zv~mrWNC{NwzCS3h&*@&YY;AJg>oEG}9gd{$!AETB1e;_Rcu3ldb`2+YHm#oYb#4KR zKg+U^^TkDsOn$(nCsXiiD#BC)ufYWlz!TPvijD3)&G4IsB;6dy;d*`=2>E3HVQ7d3 zeRR6ALS~F`4YE?DO`UspNR>~1I`aiuG>F(H6Y)p@@sI(1Et!#3dA7-zfvLf!VVPU_ zj@Oej82?sAl+yKzwGlGRm3|&&QU>Q8k+dm&?naDK{ttPGM2@n?tJ2gnJJNCZz6Q}4 zRF&?qu7dCO5Ab73t$9p;!y9d$&K{Chwh;;>8$4&=H&FTJZLx(HzW@LL07*qoM6N<$ Eg6kYd$p8QV literal 0 HcmV?d00001 diff --git a/OneMore/Colorizer/Languages/r.json b/OneMore/Colorizer/Languages/r.json new file mode 100644 index 0000000000..b51c657be6 --- /dev/null +++ b/OneMore/Colorizer/Languages/r.json @@ -0,0 +1,38 @@ +{ + "name": "R", + "aliases": [ + "R" + ], + "rules": [ + { + "pattern": "(\\#.*?)\\r?$", + "captures": [ + "Comment" + ] + }, + { + "pattern": "(?s)(\"[^\\n]*?(?D{ zM?rU9xQn|uzk9e3;4LG2wHO(_IuXcvgRz#uPe{&)2uH9Q5hVuyN-3Q!Y*@$F0HdYy zS0sO8a2`nn2}U4-h=@j}Km>1)EcR_FTxCO-0{uMt-ofYrShkwE{S|6NQk^+WB-u7)daQdcFR`=|BIO(lDUb@GO20dsxyg zTQGdBcUGlc_VGNWG$d&-NJNSyDbn!JZ>PFniUq@Z(b>S|zK`$x(mo;D1_lnC$ya~5 z%A$6P`jKQkQY=j=l~;W5px+W?p}X_Zk?ziif7^n^&xWhh*NEzW?Ua8%d3t_IshCpw zdgN}~+;d~^X11_)&OLuPdHm+jH)c<(5i@K*HL|Y%2iM)rUj=L|tp9h*=EA|JPo8yM zs7yWNrtNc;&cdPoJqv2gzH6?s-R8FdkiY4}ip3qS1!}g!79K}d0{~|jv|VjNw$1E2 eHUDkD8P5Sg;UnQnT}|`=0000 PreserveNewest + + PreserveNewest + PreserveNewest @@ -1127,6 +1130,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -1179,12 +1185,18 @@ PreserveNewest + + PreserveNewest + PreserveNewest PreserveNewest + + PreserveNewest + PreserveNewest