mirror of https://gitlab.com/basile.b/dexed.git
d2 highlighter, remove keyword body, typedef, macro
This commit is contained in:
parent
eeab0decb9
commit
9b1391e781
|
@ -4,6 +4,10 @@
|
|||
|
||||
- releases, linux, gtk2: random crashes when save and open dialogs are displayed. (#79)
|
||||
|
||||
## Other
|
||||
|
||||
- D2 highlighter: remove the keywords `body` (deprecated), `typedef` (deprecated), `macro` (unused).
|
||||
|
||||
# v3.9.10
|
||||
|
||||
## Bugs fixed
|
||||
|
|
|
@ -5,7 +5,6 @@ asm
|
|||
assert
|
||||
auto
|
||||
|
||||
body
|
||||
bool
|
||||
break
|
||||
byte
|
||||
|
@ -64,7 +63,6 @@ is
|
|||
lazy
|
||||
long
|
||||
|
||||
macro
|
||||
mixin
|
||||
module
|
||||
|
||||
|
@ -103,7 +101,6 @@ this
|
|||
throw
|
||||
true
|
||||
try
|
||||
typedef
|
||||
typeid
|
||||
typeof
|
||||
|
||||
|
@ -127,4 +124,4 @@ wstring
|
|||
__gshared
|
||||
__traits
|
||||
__vector
|
||||
__parameters
|
||||
__parameters
|
||||
|
|
|
@ -54,114 +54,21 @@ type
|
|||
*)
|
||||
keywordsMap = record
|
||||
private
|
||||
const fWords: array [0..511] of string =
|
||||
(
|
||||
'double', '', '', '', '', 'volatile', 'synchronized', '', 'wchar', '', '',
|
||||
'', '', '', 'goto', '', 'assert', '', '', 'void', '', '', '', 'override',
|
||||
'pure', '', '', '', '', '', '', 'delegate', '', '', 'super', '', 'case',
|
||||
'', '', '', 'pragma', '', '', '', 'string', '', 'debug', '', '', '', '',
|
||||
'', 'module', '', '', '', '', '', '', '', '', '', '', 'immutable', '',
|
||||
'template', 'dstring', '', '__parameters', '', '', '', '', '__vector', '',
|
||||
'', '', '', '', '', 'invariant', '', 'unittest', '', '', 'protected', '',
|
||||
'', 'break', 'alias', '', '', '', '', '', '', '', '', '', 'wstring', '',
|
||||
'', 'private', 'final', '', 'false', '', 'catch', 'float', '', '', '', '',
|
||||
'', '', '', '', '', '', '', '', '', '', 'align', '', '', '', '', '', '',
|
||||
'ptrdiff_t', '', '', '', '', '', '', 'delete', '', '', '', '', '', '', '',
|
||||
'do', '', 'mixin', '', 'ireal', '', '', '', '', 'static', 'extern', '', '',
|
||||
'null', '', '', 'creal', '', '', 'typeid', '', 'idouble', '', '', '', 'try',
|
||||
'', '', '', 'finally', '', 'is', '', 'cdouble', '', 'in', '', '', '', '',
|
||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
'scope', '', '', 'package', '', '', '', '', '', 'interface', '', '', 'macro',
|
||||
'', '', '', '', '', '', '', '', '', 'default', '', '', '', '', '', 'out',
|
||||
'', '', '', '', 'size_t', '', '', '', '', 'new', 'int', '', '', '', '', '',
|
||||
'', '', '', 'this', '', '', '', '', '', '', '', 'public', '', '', '',
|
||||
'continue', '', '', '', 'body', '', '', '', '', '', '', 'ifloat', '', '',
|
||||
'', '', 'version', '', '', 'deprecated', '', '', '', 'cfloat', '', 'uint',
|
||||
'function', '', '', '', '', 'short', '', 'with', 'typeof', '', '', '', '',
|
||||
'', '', '', '', '', '', '', 'import', '', '', '', '', '', '', '', '',
|
||||
'__traits', '', '', '', '', '', 'export', '', '', '', '', '', '', '', '',
|
||||
'', '', '', '', '', '', 'throw', 'ushort', '', '', '', '', '', '', '', '',
|
||||
'', 'asm', '', '', '', '', '', 'byte', '', '', '', '', '', 'abstract',
|
||||
'union', 'if', '', 'true', '', 'typedef', '', '', '', '', '', '', '', '',
|
||||
'', '', '', '', '', '', '', 'enum', '', '', 'const', '', '', '', '', '', '',
|
||||
'', 'bool', '', '', '', '', '', '', 'ubyte', 'else', 'long', '', '', 'for',
|
||||
'', '', '', 'inout', '', '', '', '', '', '', '', 'auto', '', '', '', '', '',
|
||||
'', 'cent', '', '', '', '', '', '', '', '', 'class', '', '', 'cast', '', '',
|
||||
'', '', '', 'struct', '', 'foreach', '', '', '', 'ulong', '', '', '__gshared',
|
||||
'', 'while', 'ref', '', '', '', '', '', '', '', '', 'char', 'return', '',
|
||||
'foreach_reverse', 'lazy', '', '', 'ucent', '', '', '', 'nothrow', '', '',
|
||||
'', '', '', '', '', 'switch', '', '', 'dchar', '', '', '', 'shared', '', '',
|
||||
'', 'real', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''
|
||||
);
|
||||
const fHasEntry: array [0..511] of boolean =
|
||||
(
|
||||
true, false, false, false, false, true, true, false, true, false, false,
|
||||
false, false, false, true, false, true, false, false, true, false, false,
|
||||
false, true, true, false, false, false, false, false, false, true, false,
|
||||
false, true, false, true, false, false, false, true, false, false, false,
|
||||
true, false, true, false, false, false, false, false, true, false, false,
|
||||
false, false, false, false, false, false, false, false, true, false, true,
|
||||
true, false, true, false, false, false, false, true, false, false, false,
|
||||
false, false, false, true, false, true, false, false, true, false, false,
|
||||
true, true, false, false, false, false, false, false, false, false, false,
|
||||
true, false, false, true, true, false, true, false, true, true, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, true, false, false, false, false, false, false, true, false, false,
|
||||
false, false, false, false, true, false, false, false, false, false, false,
|
||||
false, true, false, true, false, true, false, false, false, false, true,
|
||||
true, false, false, true, false, false, true, false, false, true, false,
|
||||
true, false, false, false, true, false, false, false, true, false, true,
|
||||
false, true, false, true, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, true, false, false, true, false, false, false,
|
||||
false, false, true, false, false, true, false, false, false, false, false,
|
||||
false, false, false, false, true, false, false, false, false, false, true,
|
||||
false, false, false, false, true, false, false, false, false, true, true,
|
||||
false, false, false, false, false, false, false, false, true, false, false,
|
||||
false, false, false, false, false, true, false, false, false, true, false,
|
||||
false, false, true, false, false, false, false, false, false, true, false,
|
||||
false, false, false, true, false, false, true, false, false, false, true,
|
||||
false, true, true, false, false, false, false, true, false, true, true, false,
|
||||
false, false, false, false, false, false, false, false, false, false, true,
|
||||
false, false, false, false, false, false, false, false, true, false, false,
|
||||
false, false, false, true, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, true, true, false, false,
|
||||
false, false, false, false, false, false, false, true, false, false, false,
|
||||
false, false, true, false, false, false, false, false, true, true, true,
|
||||
false, true, false, true, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, true, false, false,
|
||||
true, false, false, false, false, false, false, false, true, false, false,
|
||||
false, false, false, false, true, true, true, false, false, true, false,
|
||||
false, false, true, false, false, false, false, false, false, false, true,
|
||||
false, false, false, false, false, false, true, false, false, false, false,
|
||||
false, false, false, false, true, false, false, true, false, false, false,
|
||||
false, false, true, false, true, false, false, false, true, false, false,
|
||||
true, false, true, true, false, false, false, false, false, false, false,
|
||||
false, true, true, false, true, true, false, false, true, false, false,
|
||||
false, true, false, false, false, false, false, false, false, true, false,
|
||||
false, true, false, false, false, true, false, false, false, true, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false
|
||||
);
|
||||
// 100017a
|
||||
const fCoeffs: array[0..255] of Byte =
|
||||
(
|
||||
93, 12, 147, 37, 246, 76, 204, 47, 77, 0, 217, 84, 225, 244, 62, 63, 81, 2,
|
||||
46, 137, 104, 245, 184, 87, 229, 148, 69, 207, 24, 10, 239, 172, 27, 34, 60,
|
||||
251, 113, 66, 175, 29, 10, 1, 158, 38, 157, 120, 224, 173, 11, 199, 49, 173,
|
||||
88, 229, 213, 191, 217, 177, 90, 19, 83, 212, 97, 12, 136, 154, 243, 105,
|
||||
97, 29, 94, 226, 71, 60, 28, 245, 38, 212, 156, 116, 254, 70, 207, 211, 93,
|
||||
67, 32, 42, 149, 101, 98, 4, 83, 160, 228, 128, 231, 188, 100, 178, 22, 172,
|
||||
198, 218, 13, 166, 45, 54, 49, 152, 14, 123, 232, 223, 86, 10, 62, 46, 220,
|
||||
55, 161, 22, 210, 86, 14, 79, 8, 28, 66, 67, 84, 116, 159, 144, 37, 46, 199,
|
||||
218, 233, 188, 207, 168, 89, 64, 245, 3, 6, 199, 144, 165, 216, 145, 141, 70,
|
||||
69, 20, 149, 252, 119, 75, 153, 97, 14, 196, 74, 48, 91, 145, 70, 90, 59, 69,
|
||||
92, 252, 233, 161, 169, 155, 9, 28, 234, 103, 172, 225, 164, 49, 161, 95, 81,
|
||||
201, 217, 217, 58, 119, 169, 230, 11, 8, 137, 65, 165, 159, 4, 243, 225, 236,
|
||||
178, 209, 133, 35, 68, 222, 237, 114, 64, 158, 72, 66, 151, 208, 169, 232, 83,
|
||||
229, 157, 233, 123, 135, 65, 187, 161, 100, 217, 63, 124, 36, 108, 198, 2,
|
||||
103, 156, 241, 140, 163, 128, 196, 45, 166, 41, 61, 19, 139, 25, 115, 72, 175
|
||||
);
|
||||
{
|
||||
rendered on 2021-Apr-14 18:49:17.621124 by IsItThere.
|
||||
- PRNG seed: 0
|
||||
- map length: 512
|
||||
- case sensitive: true
|
||||
}
|
||||
|
||||
const fWords: array [0..511] of string =
|
||||
('', '', '', '', '', '', 'scope', '', '', '', '', 'this', 'ucent', 'delegate', 'size_t', '', '', 'ulong', 'nothrow', '', '', 'bool', '', '', '', '', 'debug', '', '', 'class', '', '', 'function', '', '', 'uint', 'private', '', 'for', '', '', '', 'false', 'deprecated', 'mixin', '', 'while', '', '', 'with', '', '', '', 'true', '', '', '', '', '', 'foreach_reverse', '', '', '', 'real', '', '', 'align', '', '', '__vector', '', '', '', '', 'pragma', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'module', '', '', '', '', '', '', '', '', '', '', '', '', '', 'interface', '', '', '', '', '', '', '', '', 'foreach', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'auto', '', 'float', '', 'typeid', 'else', '', 'string', 'creal', 'inout', '', '', 'pure', '', '', '', '', '', '', '', '', '', '', '', 'export', '', '', '', '', '', 'ubyte', 'double', '', '', '', '', '', '', '', 'do', '', '', '', 'union', '', '', '', '', '', 'static', '', 'final', 'ireal', '', '', '', '', '', 'is', '', '', 'immutable', '', 'switch', '', '', '', 'assert', '', '', '', '', 'dstring', '', '__traits', '', '', '', '', '', 'new', 'super', '', '', '', '', '', '', 'typeof', '', '', 'catch', 'short', '', 'alias', '', '', '', 'delete', 'in', '', '', '', '', '', 'cfloat', '', '', '', 'abstract', '', '', '', '__gshared', 'wstring', 'break', '', '', '', 'unittest', '', '', 'struct', '', '', '', '', '', '', '', 'throw', '', '', '', 'cdouble', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'ifloat', 'ptrdiff_t', 'template', 'cent', 'if', '', '', '', 'long', '', '', '', '', '', '', '', '', 'char', '', '', '', 'default', '', '', '', '', 'int', '', '', 'idouble', 'volatile', '', '', '', '', 'version', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'goto', '', '', '', '', '', 'package', '__parameters', '', '', '', '', '', '', '', 'shared', '', '', '', '', '', '', '', '', '', '', '', '', 'dchar', '', '', '', '', '', '', '', '', '', '', '', 'continue', '', '', '', '', '', '', '', '', 'synchronized', '', '', '', 'public', '', '', 'return', '', '', '', '', 'out', '', 'import', '', '', '', 'null', 'protected', '', 'wchar', '', 'finally', '', '', '', 'invariant', '', 'ref', '', 'case', '', '', '', '', '', '', '', '', '', 'asm', '', '', '', '', '', '', '', '', '', '', '', '', 'ushort', 'void', '', '', '', '', '', '', '', '', '', '', '', '', '', 'enum', '', '', '', '', '', '', 'byte', '', '', '', 'const', '', 'lazy', '', '', '', 'cast', '', '', '', 'extern', '', 'try', 'override', '', '', '', '', '', '', '', '');
|
||||
|
||||
const fHasEntry: array [0..511] of boolean =
|
||||
(false, false, false, false, false, false, true, false, false, false, false, true, true, true, true, false, false, true, true, false, false, true, false, false, false, false, true, false, false, true, false, false, true, false, false, true, true, false, true, false, false, false, true, true, true, false, true, false, false, true, false, false, false, true, false, false, false, false, false, true, false, false, false, true, false, false, true, false, false, true, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, true, false, true, true, false, true, true, true, false, false, true, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, true, true, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, true, false, true, true, false, false, false, false, false, true, false, false, true, false, true, false, false, false, true, false, false, false, false, true, false, true, false, false, false, false, false, true, true, false, false, false, false, false, false, true, false, false, true, true, false, true, false, false, false, true, true, false, false, false, false, false, true, false, false, false, true, false, false, false, true, true, true, false, false, false, true, false, false, true, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, true, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, true, false, false, false, false, true, false, true, false, false, false, true, true, false, true, false, true, false, false, false, true, false, true, false, true, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, true, false, false, false, true, false, true, false, false, false, true, false, false, false, true, false, true, true, false, false, false, false, false, false, false, false);
|
||||
|
||||
const fCoeffs: array [0..255] of Byte =
|
||||
(38, 33, 180, 0, 185, 246, 108, 140, 101, 70, 225, 36, 169, 241, 207, 131, 8, 145, 253, 246, 120, 51, 192, 218, 141, 3, 128, 13, 153, 122, 147, 180, 155, 253, 108, 112, 81, 69, 216, 179, 91, 136, 140, 39, 226, 59, 35, 105, 3, 111, 139, 247, 35, 246, 8, 124, 74, 191, 207, 221, 168, 208, 182, 40, 125, 146, 113, 139, 166, 251, 161, 145, 87, 99, 57, 74, 153, 249, 60, 234, 254, 164, 213, 146, 164, 14, 30, 121, 56, 203, 76, 11, 44, 178, 124, 193, 12, 248, 217, 103, 65, 21, 164, 21, 231, 147, 173, 45, 52, 134, 110, 132, 193, 209, 254, 69, 76, 214, 121, 107, 18, 172, 20, 89, 137, 103, 6, 153, 190, 154, 210, 136, 72, 198, 124, 133, 215, 154, 155, 198, 121, 208, 215, 184, 239, 210, 214, 130, 231, 158, 210, 177, 16, 39, 121, 200, 101, 187, 168, 82, 237, 94, 101, 118, 255, 207, 85, 168, 217, 106, 177, 5, 88, 246, 217, 77, 204, 40, 208, 142, 96, 217, 123, 31, 20, 237, 212, 146, 9, 168, 103, 214, 167, 134, 75, 204, 86, 62, 164, 83, 131, 236, 14, 131, 31, 66, 95, 70, 166, 134, 47, 8, 171, 76, 79, 136, 237, 10, 178, 22, 235, 255, 228, 205, 162, 40, 103, 57, 169, 153, 164, 128, 28, 5, 216, 168, 35, 121, 33, 96, 39, 72, 230, 91, 54, 134, 223, 59, 5, 166, 146, 71, 188, 129, 179, 117);
|
||||
class function hash(const w: string): Word; static; {$IFNDEF DEBUG}inline;{$ENDIF}
|
||||
public
|
||||
class function match(const w: string): boolean; static; {$IFNDEF DEBUG}inline;{$ENDIF}
|
||||
|
|
Loading…
Reference in New Issue