@shd101wyy/yo 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/skills/yo-async-effects/SKILL.md +4 -4
- package/.github/skills/yo-async-effects/async-effects-recipes.md +34 -34
- package/.github/skills/yo-core-patterns/SKILL.md +1 -1
- package/.github/skills/yo-core-patterns/core-patterns-cheatsheet.md +26 -26
- package/.github/skills/yo-project-workflow/SKILL.md +6 -3
- package/.github/skills/yo-project-workflow/workflow-cheatsheet.md +34 -11
- package/.github/skills/yo-syntax/SKILL.md +7 -6
- package/.github/skills/yo-syntax/syntax-cheatsheet.md +73 -60
- package/.github/skills/yo-wasm-integration/wasm-integration-cheatsheet.md +3 -3
- package/README.md +10 -8
- package/out/cjs/index.cjs +456 -438
- package/out/cjs/yo-cli.cjs +576 -543
- package/out/cjs/yo-lsp.cjs +559 -532
- package/out/esm/index.mjs +281 -263
- package/out/types/src/formatter.d.ts +11 -0
- package/out/types/src/lsp/formatting.d.ts +2 -0
- package/out/types/src/tests/formatter.test.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/std/alg/hash.yo +13 -21
- package/std/allocator.yo +25 -40
- package/std/async.yo +3 -7
- package/std/build.yo +105 -151
- package/std/cli/arg_parser.yo +184 -169
- package/std/collections/array_list.yo +350 -314
- package/std/collections/btree_map.yo +142 -131
- package/std/collections/deque.yo +132 -128
- package/std/collections/hash_map.yo +542 -566
- package/std/collections/hash_set.yo +623 -687
- package/std/collections/linked_list.yo +275 -293
- package/std/collections/ordered_map.yo +113 -85
- package/std/collections/priority_queue.yo +73 -73
- package/std/crypto/md5.yo +191 -95
- package/std/crypto/random.yo +56 -64
- package/std/crypto/sha256.yo +151 -107
- package/std/encoding/base64.yo +87 -81
- package/std/encoding/hex.yo +43 -50
- package/std/encoding/html.yo +56 -81
- package/std/encoding/html_char_utils.yo +7 -13
- package/std/encoding/html_entities.yo +2248 -2253
- package/std/encoding/json.yo +316 -224
- package/std/encoding/punycode.yo +86 -116
- package/std/encoding/toml.yo +67 -66
- package/std/encoding/utf16.yo +37 -44
- package/std/env.yo +62 -91
- package/std/error.yo +7 -15
- package/std/fmt/display.yo +5 -9
- package/std/fmt/index.yo +8 -14
- package/std/fmt/to_string.yo +330 -315
- package/std/fmt/writer.yo +58 -87
- package/std/fs/dir.yo +83 -102
- package/std/fs/file.yo +147 -180
- package/std/fs/metadata.yo +45 -78
- package/std/fs/temp.yo +55 -65
- package/std/fs/types.yo +27 -40
- package/std/fs/walker.yo +53 -68
- package/std/gc.yo +5 -8
- package/std/glob.yo +30 -43
- package/std/http/client.yo +107 -120
- package/std/http/http.yo +106 -96
- package/std/http/index.yo +4 -6
- package/std/imm/list.yo +88 -93
- package/std/imm/map.yo +528 -464
- package/std/imm/set.yo +52 -57
- package/std/imm/sorted_map.yo +340 -286
- package/std/imm/sorted_set.yo +57 -63
- package/std/imm/string.yo +404 -345
- package/std/imm/vec.yo +173 -181
- package/std/io/reader.yo +3 -6
- package/std/io/writer.yo +4 -8
- package/std/libc/assert.yo +5 -9
- package/std/libc/ctype.yo +32 -22
- package/std/libc/dirent.yo +26 -25
- package/std/libc/errno.yo +164 -90
- package/std/libc/fcntl.yo +52 -45
- package/std/libc/float.yo +66 -44
- package/std/libc/limits.yo +42 -33
- package/std/libc/math.yo +53 -82
- package/std/libc/signal.yo +72 -47
- package/std/libc/stdatomic.yo +217 -188
- package/std/libc/stdint.yo +5 -29
- package/std/libc/stdio.yo +5 -29
- package/std/libc/stdlib.yo +32 -39
- package/std/libc/string.yo +5 -23
- package/std/libc/sys/stat.yo +58 -56
- package/std/libc/time.yo +5 -19
- package/std/libc/unistd.yo +5 -20
- package/std/libc/wctype.yo +6 -9
- package/std/libc/windows.yo +26 -30
- package/std/log.yo +41 -55
- package/std/net/addr.yo +102 -97
- package/std/net/dns.yo +27 -28
- package/std/net/errors.yo +50 -49
- package/std/net/tcp.yo +113 -124
- package/std/net/udp.yo +55 -66
- package/std/os/env.yo +35 -33
- package/std/os/signal.yo +15 -25
- package/std/path.yo +276 -311
- package/std/prelude.yo +6304 -4315
- package/std/process/command.yo +87 -103
- package/std/process/index.yo +12 -31
- package/std/regex/compiler.yo +196 -95
- package/std/regex/flags.yo +58 -39
- package/std/regex/index.yo +157 -173
- package/std/regex/match.yo +20 -31
- package/std/regex/node.yo +134 -152
- package/std/regex/parser.yo +283 -259
- package/std/regex/unicode.yo +172 -202
- package/std/regex/vm.yo +155 -171
- package/std/string/index.yo +5 -7
- package/std/string/rune.yo +45 -55
- package/std/string/string.yo +937 -964
- package/std/string/string_builder.yo +94 -104
- package/std/string/unicode.yo +46 -64
- package/std/sync/channel.yo +72 -73
- package/std/sync/cond.yo +31 -36
- package/std/sync/mutex.yo +30 -32
- package/std/sync/once.yo +13 -16
- package/std/sync/rwlock.yo +26 -31
- package/std/sync/waitgroup.yo +20 -25
- package/std/sys/advise.yo +16 -24
- package/std/sys/bufio/buf_reader.yo +77 -93
- package/std/sys/bufio/buf_writer.yo +52 -65
- package/std/sys/clock.yo +4 -9
- package/std/sys/constants.yo +77 -61
- package/std/sys/copy.yo +4 -10
- package/std/sys/dir.yo +26 -43
- package/std/sys/dns.yo +41 -61
- package/std/sys/errors.yo +95 -103
- package/std/sys/events.yo +45 -57
- package/std/sys/externs.yo +319 -267
- package/std/sys/fallocate.yo +7 -11
- package/std/sys/fcntl.yo +14 -22
- package/std/sys/file.yo +26 -40
- package/std/sys/future.yo +5 -8
- package/std/sys/iov.yo +12 -25
- package/std/sys/lock.yo +12 -13
- package/std/sys/mmap.yo +38 -43
- package/std/sys/path.yo +3 -8
- package/std/sys/perm.yo +7 -21
- package/std/sys/pipe.yo +5 -12
- package/std/sys/process.yo +23 -29
- package/std/sys/seek.yo +10 -12
- package/std/sys/signal.yo +7 -13
- package/std/sys/signals.yo +52 -35
- package/std/sys/socket.yo +63 -58
- package/std/sys/socketpair.yo +3 -6
- package/std/sys/sockinfo.yo +11 -20
- package/std/sys/statfs.yo +11 -34
- package/std/sys/statx.yo +25 -52
- package/std/sys/sysinfo.yo +15 -20
- package/std/sys/tcp.yo +62 -92
- package/std/sys/temp.yo +5 -9
- package/std/sys/time.yo +5 -15
- package/std/sys/timer.yo +6 -11
- package/std/sys/tty.yo +10 -18
- package/std/sys/udp.yo +22 -39
- package/std/sys/umask.yo +3 -6
- package/std/sys/unix.yo +33 -52
- package/std/testing/bench.yo +49 -52
- package/std/thread.yo +10 -15
- package/std/time/datetime.yo +105 -89
- package/std/time/duration.yo +43 -56
- package/std/time/instant.yo +13 -18
- package/std/time/sleep.yo +5 -9
- package/std/url/index.yo +184 -209
- package/std/worker.yo +6 -10
package/std/regex/unicode.yo
CHANGED
|
@@ -3,247 +3,231 @@
|
|
|
3
3
|
//! Provides character ranges for common Unicode general categories.
|
|
4
4
|
//! Uses compact range representation covering the most commonly used
|
|
5
5
|
//! Unicode blocks. Not exhaustive but covers practical use cases.
|
|
6
|
-
|
|
7
|
-
open
|
|
8
|
-
|
|
9
|
-
{ CharRange } :: import "./node.yo";
|
|
10
|
-
|
|
6
|
+
open(import("std/collections/array_list"));
|
|
7
|
+
open(import("std/string"));
|
|
8
|
+
{ CharRange } :: import("./node.yo");
|
|
11
9
|
_add_letter_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
12
10
|
// Latin letters
|
|
13
|
-
rs.push(CharRange(low: u32(0x0041), high: u32(0x005A)));
|
|
14
|
-
rs.push(CharRange(low: u32(0x0061), high: u32(0x007A)));
|
|
11
|
+
rs.push(CharRange(low : u32(0x0041), high : u32(0x005A)));
|
|
12
|
+
rs.push(CharRange(low : u32(0x0061), high : u32(0x007A)));
|
|
15
13
|
// Latin Extended
|
|
16
|
-
rs.push(CharRange(low: u32(0x00C0), high: u32(0x00D6)));
|
|
17
|
-
rs.push(CharRange(low: u32(0x00D8), high: u32(0x00F6)));
|
|
18
|
-
rs.push(CharRange(low: u32(0x00F8), high: u32(0x024F)));
|
|
14
|
+
rs.push(CharRange(low : u32(0x00C0), high : u32(0x00D6)));
|
|
15
|
+
rs.push(CharRange(low : u32(0x00D8), high : u32(0x00F6)));
|
|
16
|
+
rs.push(CharRange(low : u32(0x00F8), high : u32(0x024F)));
|
|
19
17
|
// Greek
|
|
20
|
-
rs.push(CharRange(low: u32(0x0370), high: u32(0x0373)));
|
|
21
|
-
rs.push(CharRange(low: u32(0x0376), high: u32(0x0377)));
|
|
22
|
-
rs.push(CharRange(low: u32(0x037B), high: u32(0x037D)));
|
|
23
|
-
rs.push(CharRange(low: u32(0x0386), high: u32(0x0386)));
|
|
24
|
-
rs.push(CharRange(low: u32(0x0388), high: u32(0x038A)));
|
|
25
|
-
rs.push(CharRange(low: u32(0x038C), high: u32(0x038C)));
|
|
26
|
-
rs.push(CharRange(low: u32(0x038E), high: u32(0x03A1)));
|
|
27
|
-
rs.push(CharRange(low: u32(0x03A3), high: u32(0x03FF)));
|
|
18
|
+
rs.push(CharRange(low : u32(0x0370), high : u32(0x0373)));
|
|
19
|
+
rs.push(CharRange(low : u32(0x0376), high : u32(0x0377)));
|
|
20
|
+
rs.push(CharRange(low : u32(0x037B), high : u32(0x037D)));
|
|
21
|
+
rs.push(CharRange(low : u32(0x0386), high : u32(0x0386)));
|
|
22
|
+
rs.push(CharRange(low : u32(0x0388), high : u32(0x038A)));
|
|
23
|
+
rs.push(CharRange(low : u32(0x038C), high : u32(0x038C)));
|
|
24
|
+
rs.push(CharRange(low : u32(0x038E), high : u32(0x03A1)));
|
|
25
|
+
rs.push(CharRange(low : u32(0x03A3), high : u32(0x03FF)));
|
|
28
26
|
// Cyrillic
|
|
29
|
-
rs.push(CharRange(low: u32(0x0400), high: u32(0x0481)));
|
|
30
|
-
rs.push(CharRange(low: u32(0x048A), high: u32(0x052F)));
|
|
27
|
+
rs.push(CharRange(low : u32(0x0400), high : u32(0x0481)));
|
|
28
|
+
rs.push(CharRange(low : u32(0x048A), high : u32(0x052F)));
|
|
31
29
|
// Armenian
|
|
32
|
-
rs.push(CharRange(low: u32(0x0531), high: u32(0x0556)));
|
|
33
|
-
rs.push(CharRange(low: u32(0x0560), high: u32(0x0588)));
|
|
30
|
+
rs.push(CharRange(low : u32(0x0531), high : u32(0x0556)));
|
|
31
|
+
rs.push(CharRange(low : u32(0x0560), high : u32(0x0588)));
|
|
34
32
|
// Hebrew
|
|
35
|
-
rs.push(CharRange(low: u32(0x05D0), high: u32(0x05EA)));
|
|
33
|
+
rs.push(CharRange(low : u32(0x05D0), high : u32(0x05EA)));
|
|
36
34
|
// Arabic
|
|
37
|
-
rs.push(CharRange(low: u32(0x0620), high: u32(0x064A)));
|
|
38
|
-
rs.push(CharRange(low: u32(0x066E), high: u32(0x066F)));
|
|
39
|
-
rs.push(CharRange(low: u32(0x0671), high: u32(0x06D3)));
|
|
35
|
+
rs.push(CharRange(low : u32(0x0620), high : u32(0x064A)));
|
|
36
|
+
rs.push(CharRange(low : u32(0x066E), high : u32(0x066F)));
|
|
37
|
+
rs.push(CharRange(low : u32(0x0671), high : u32(0x06D3)));
|
|
40
38
|
// Devanagari
|
|
41
|
-
rs.push(CharRange(low: u32(0x0904), high: u32(0x0939)));
|
|
42
|
-
rs.push(CharRange(low: u32(0x0958), high: u32(0x0961)));
|
|
39
|
+
rs.push(CharRange(low : u32(0x0904), high : u32(0x0939)));
|
|
40
|
+
rs.push(CharRange(low : u32(0x0958), high : u32(0x0961)));
|
|
43
41
|
// Thai
|
|
44
|
-
rs.push(CharRange(low: u32(0x0E01), high: u32(0x0E30)));
|
|
45
|
-
rs.push(CharRange(low: u32(0x0E32), high: u32(0x0E33)));
|
|
42
|
+
rs.push(CharRange(low : u32(0x0E01), high : u32(0x0E30)));
|
|
43
|
+
rs.push(CharRange(low : u32(0x0E32), high : u32(0x0E33)));
|
|
46
44
|
// CJK Unified Ideographs
|
|
47
|
-
rs.push(CharRange(low: u32(0x4E00), high: u32(0x9FFF)));
|
|
45
|
+
rs.push(CharRange(low : u32(0x4E00), high : u32(0x9FFF)));
|
|
48
46
|
// Hangul Syllables
|
|
49
|
-
rs.push(CharRange(low: u32(0xAC00), high: u32(0xD7A3)));
|
|
47
|
+
rs.push(CharRange(low : u32(0xAC00), high : u32(0xD7A3)));
|
|
50
48
|
// Hiragana
|
|
51
|
-
rs.push(CharRange(low: u32(0x3040), high: u32(0x309F)));
|
|
49
|
+
rs.push(CharRange(low : u32(0x3040), high : u32(0x309F)));
|
|
52
50
|
// Katakana
|
|
53
|
-
rs.push(CharRange(low: u32(0x30A0), high: u32(0x30FF)));
|
|
51
|
+
rs.push(CharRange(low : u32(0x30A0), high : u32(0x30FF)));
|
|
54
52
|
// CJK Extension A
|
|
55
|
-
rs.push(CharRange(low: u32(0x3400), high: u32(0x4DBF)));
|
|
53
|
+
rs.push(CharRange(low : u32(0x3400), high : u32(0x4DBF)));
|
|
56
54
|
// CJK Extension B
|
|
57
|
-
rs.push(CharRange(low: u32(0x20000), high: u32(0x2A6DF)));
|
|
55
|
+
rs.push(CharRange(low : u32(0x20000), high : u32(0x2A6DF)));
|
|
58
56
|
});
|
|
59
|
-
|
|
60
57
|
_add_uppercase_letter_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
61
|
-
rs.push(CharRange(low: u32(0x0041), high: u32(0x005A)));
|
|
62
|
-
rs.push(CharRange(low: u32(0x00C0), high: u32(0x00D6)));
|
|
63
|
-
rs.push(CharRange(low: u32(0x00D8), high: u32(0x00DE)));
|
|
64
|
-
rs.push(CharRange(low: u32(0x0100), high: u32(0x0100)));
|
|
65
|
-
rs.push(CharRange(low: u32(0x0102), high: u32(0x0102)));
|
|
66
|
-
rs.push(CharRange(low: u32(0x0104), high: u32(0x0104)));
|
|
67
|
-
rs.push(CharRange(low: u32(0x0106), high: u32(0x0106)));
|
|
68
|
-
rs.push(CharRange(low: u32(0x0391), high: u32(0x03A1)));
|
|
69
|
-
rs.push(CharRange(low: u32(0x03A3), high: u32(0x03A9)));
|
|
70
|
-
rs.push(CharRange(low: u32(0x0410), high: u32(0x042F)));
|
|
58
|
+
rs.push(CharRange(low : u32(0x0041), high : u32(0x005A)));
|
|
59
|
+
rs.push(CharRange(low : u32(0x00C0), high : u32(0x00D6)));
|
|
60
|
+
rs.push(CharRange(low : u32(0x00D8), high : u32(0x00DE)));
|
|
61
|
+
rs.push(CharRange(low : u32(0x0100), high : u32(0x0100)));
|
|
62
|
+
rs.push(CharRange(low : u32(0x0102), high : u32(0x0102)));
|
|
63
|
+
rs.push(CharRange(low : u32(0x0104), high : u32(0x0104)));
|
|
64
|
+
rs.push(CharRange(low : u32(0x0106), high : u32(0x0106)));
|
|
65
|
+
rs.push(CharRange(low : u32(0x0391), high : u32(0x03A1)));
|
|
66
|
+
rs.push(CharRange(low : u32(0x03A3), high : u32(0x03A9)));
|
|
67
|
+
rs.push(CharRange(low : u32(0x0410), high : u32(0x042F)));
|
|
71
68
|
});
|
|
72
|
-
|
|
73
69
|
_add_lowercase_letter_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
74
|
-
rs.push(CharRange(low: u32(0x0061), high: u32(0x007A)));
|
|
75
|
-
rs.push(CharRange(low: u32(0x00DF), high: u32(0x00F6)));
|
|
76
|
-
rs.push(CharRange(low: u32(0x00F8), high: u32(0x00FF)));
|
|
77
|
-
rs.push(CharRange(low: u32(0x0101), high: u32(0x0101)));
|
|
78
|
-
rs.push(CharRange(low: u32(0x0103), high: u32(0x0103)));
|
|
79
|
-
rs.push(CharRange(low: u32(0x0105), high: u32(0x0105)));
|
|
80
|
-
rs.push(CharRange(low: u32(0x03B1), high: u32(0x03C9)));
|
|
81
|
-
rs.push(CharRange(low: u32(0x0430), high: u32(0x044F)));
|
|
70
|
+
rs.push(CharRange(low : u32(0x0061), high : u32(0x007A)));
|
|
71
|
+
rs.push(CharRange(low : u32(0x00DF), high : u32(0x00F6)));
|
|
72
|
+
rs.push(CharRange(low : u32(0x00F8), high : u32(0x00FF)));
|
|
73
|
+
rs.push(CharRange(low : u32(0x0101), high : u32(0x0101)));
|
|
74
|
+
rs.push(CharRange(low : u32(0x0103), high : u32(0x0103)));
|
|
75
|
+
rs.push(CharRange(low : u32(0x0105), high : u32(0x0105)));
|
|
76
|
+
rs.push(CharRange(low : u32(0x03B1), high : u32(0x03C9)));
|
|
77
|
+
rs.push(CharRange(low : u32(0x0430), high : u32(0x044F)));
|
|
82
78
|
});
|
|
83
|
-
|
|
84
79
|
_add_number_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
85
80
|
// ASCII digits
|
|
86
|
-
rs.push(CharRange(low: u32(0x0030), high: u32(0x0039)));
|
|
81
|
+
rs.push(CharRange(low : u32(0x0030), high : u32(0x0039)));
|
|
87
82
|
// Superscript/subscript digits
|
|
88
|
-
rs.push(CharRange(low: u32(0x00B2), high: u32(0x00B3)));
|
|
89
|
-
rs.push(CharRange(low: u32(0x00B9), high: u32(0x00B9)));
|
|
90
|
-
rs.push(CharRange(low: u32(0x00BC), high: u32(0x00BE)));
|
|
83
|
+
rs.push(CharRange(low : u32(0x00B2), high : u32(0x00B3)));
|
|
84
|
+
rs.push(CharRange(low : u32(0x00B9), high : u32(0x00B9)));
|
|
85
|
+
rs.push(CharRange(low : u32(0x00BC), high : u32(0x00BE)));
|
|
91
86
|
// Arabic-Indic digits
|
|
92
|
-
rs.push(CharRange(low: u32(0x0660), high: u32(0x0669)));
|
|
93
|
-
rs.push(CharRange(low: u32(0x06F0), high: u32(0x06F9)));
|
|
87
|
+
rs.push(CharRange(low : u32(0x0660), high : u32(0x0669)));
|
|
88
|
+
rs.push(CharRange(low : u32(0x06F0), high : u32(0x06F9)));
|
|
94
89
|
// Devanagari digits
|
|
95
|
-
rs.push(CharRange(low: u32(0x0966), high: u32(0x096F)));
|
|
90
|
+
rs.push(CharRange(low : u32(0x0966), high : u32(0x096F)));
|
|
96
91
|
// Fullwidth digits
|
|
97
|
-
rs.push(CharRange(low: u32(0xFF10), high: u32(0xFF19)));
|
|
92
|
+
rs.push(CharRange(low : u32(0xFF10), high : u32(0xFF19)));
|
|
98
93
|
});
|
|
99
|
-
|
|
100
94
|
_add_digit_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
101
|
-
rs.push(CharRange(low: u32(0x0030), high: u32(0x0039)));
|
|
102
|
-
rs.push(CharRange(low: u32(0x0660), high: u32(0x0669)));
|
|
103
|
-
rs.push(CharRange(low: u32(0x06F0), high: u32(0x06F9)));
|
|
104
|
-
rs.push(CharRange(low: u32(0x0966), high: u32(0x096F)));
|
|
105
|
-
rs.push(CharRange(low: u32(0x09E6), high: u32(0x09EF)));
|
|
106
|
-
rs.push(CharRange(low: u32(0x0A66), high: u32(0x0A6F)));
|
|
107
|
-
rs.push(CharRange(low: u32(0xFF10), high: u32(0xFF19)));
|
|
95
|
+
rs.push(CharRange(low : u32(0x0030), high : u32(0x0039)));
|
|
96
|
+
rs.push(CharRange(low : u32(0x0660), high : u32(0x0669)));
|
|
97
|
+
rs.push(CharRange(low : u32(0x06F0), high : u32(0x06F9)));
|
|
98
|
+
rs.push(CharRange(low : u32(0x0966), high : u32(0x096F)));
|
|
99
|
+
rs.push(CharRange(low : u32(0x09E6), high : u32(0x09EF)));
|
|
100
|
+
rs.push(CharRange(low : u32(0x0A66), high : u32(0x0A6F)));
|
|
101
|
+
rs.push(CharRange(low : u32(0xFF10), high : u32(0xFF19)));
|
|
108
102
|
});
|
|
109
|
-
|
|
110
103
|
_add_punctuation_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
111
|
-
rs.push(CharRange(low: u32(0x0021), high: u32(0x0023)));
|
|
112
|
-
rs.push(CharRange(low: u32(0x0025), high: u32(0x002A)));
|
|
113
|
-
rs.push(CharRange(low: u32(0x002C), high: u32(0x002F)));
|
|
114
|
-
rs.push(CharRange(low: u32(0x003A), high: u32(0x003B)));
|
|
115
|
-
rs.push(CharRange(low: u32(0x003F), high: u32(0x0040)));
|
|
116
|
-
rs.push(CharRange(low: u32(0x005B), high: u32(0x005D)));
|
|
117
|
-
rs.push(CharRange(low: u32(0x005F), high: u32(0x005F)));
|
|
118
|
-
rs.push(CharRange(low: u32(0x007B), high: u32(0x007B)));
|
|
119
|
-
rs.push(CharRange(low: u32(0x007D), high: u32(0x007D)));
|
|
120
|
-
rs.push(CharRange(low: u32(0x00A1), high: u32(0x00A1)));
|
|
121
|
-
rs.push(CharRange(low: u32(0x00A7), high: u32(0x00A7)));
|
|
122
|
-
rs.push(CharRange(low: u32(0x00AB), high: u32(0x00AB)));
|
|
123
|
-
rs.push(CharRange(low: u32(0x00B6), high: u32(0x00B7)));
|
|
124
|
-
rs.push(CharRange(low: u32(0x00BB), high: u32(0x00BB)));
|
|
125
|
-
rs.push(CharRange(low: u32(0x00BF), high: u32(0x00BF)));
|
|
126
|
-
rs.push(CharRange(low: u32(0x2010), high: u32(0x2027)));
|
|
127
|
-
rs.push(CharRange(low: u32(0x2030), high: u32(0x2043)));
|
|
128
|
-
rs.push(CharRange(low: u32(0x3001), high: u32(0x3003)));
|
|
129
|
-
rs.push(CharRange(low: u32(0x3008), high: u32(0x3011)));
|
|
130
|
-
rs.push(CharRange(low: u32(0xFF01), high: u32(0xFF0F)));
|
|
131
|
-
rs.push(CharRange(low: u32(0xFF1A), high: u32(0xFF1B)));
|
|
132
|
-
rs.push(CharRange(low: u32(0xFF1F), high: u32(0xFF20)));
|
|
104
|
+
rs.push(CharRange(low : u32(0x0021), high : u32(0x0023)));
|
|
105
|
+
rs.push(CharRange(low : u32(0x0025), high : u32(0x002A)));
|
|
106
|
+
rs.push(CharRange(low : u32(0x002C), high : u32(0x002F)));
|
|
107
|
+
rs.push(CharRange(low : u32(0x003A), high : u32(0x003B)));
|
|
108
|
+
rs.push(CharRange(low : u32(0x003F), high : u32(0x0040)));
|
|
109
|
+
rs.push(CharRange(low : u32(0x005B), high : u32(0x005D)));
|
|
110
|
+
rs.push(CharRange(low : u32(0x005F), high : u32(0x005F)));
|
|
111
|
+
rs.push(CharRange(low : u32(0x007B), high : u32(0x007B)));
|
|
112
|
+
rs.push(CharRange(low : u32(0x007D), high : u32(0x007D)));
|
|
113
|
+
rs.push(CharRange(low : u32(0x00A1), high : u32(0x00A1)));
|
|
114
|
+
rs.push(CharRange(low : u32(0x00A7), high : u32(0x00A7)));
|
|
115
|
+
rs.push(CharRange(low : u32(0x00AB), high : u32(0x00AB)));
|
|
116
|
+
rs.push(CharRange(low : u32(0x00B6), high : u32(0x00B7)));
|
|
117
|
+
rs.push(CharRange(low : u32(0x00BB), high : u32(0x00BB)));
|
|
118
|
+
rs.push(CharRange(low : u32(0x00BF), high : u32(0x00BF)));
|
|
119
|
+
rs.push(CharRange(low : u32(0x2010), high : u32(0x2027)));
|
|
120
|
+
rs.push(CharRange(low : u32(0x2030), high : u32(0x2043)));
|
|
121
|
+
rs.push(CharRange(low : u32(0x3001), high : u32(0x3003)));
|
|
122
|
+
rs.push(CharRange(low : u32(0x3008), high : u32(0x3011)));
|
|
123
|
+
rs.push(CharRange(low : u32(0xFF01), high : u32(0xFF0F)));
|
|
124
|
+
rs.push(CharRange(low : u32(0xFF1A), high : u32(0xFF1B)));
|
|
125
|
+
rs.push(CharRange(low : u32(0xFF1F), high : u32(0xFF20)));
|
|
133
126
|
});
|
|
134
|
-
|
|
135
127
|
_add_symbol_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
136
|
-
rs.push(CharRange(low: u32(0x0024), high: u32(0x0024)));
|
|
137
|
-
rs.push(CharRange(low: u32(0x002B), high: u32(0x002B)));
|
|
138
|
-
rs.push(CharRange(low: u32(0x003C), high: u32(0x003E)));
|
|
139
|
-
rs.push(CharRange(low: u32(0x005E), high: u32(0x005E)));
|
|
140
|
-
rs.push(CharRange(low: u32(0x0060), high: u32(0x0060)));
|
|
141
|
-
rs.push(CharRange(low: u32(0x007C), high: u32(0x007C)));
|
|
142
|
-
rs.push(CharRange(low: u32(0x007E), high: u32(0x007E)));
|
|
143
|
-
rs.push(CharRange(low: u32(0x00A2), high: u32(0x00A6)));
|
|
144
|
-
rs.push(CharRange(low: u32(0x00A8), high: u32(0x00A9)));
|
|
145
|
-
rs.push(CharRange(low: u32(0x00AC), high: u32(0x00AC)));
|
|
146
|
-
rs.push(CharRange(low: u32(0x00AE), high: u32(0x00B1)));
|
|
147
|
-
rs.push(CharRange(low: u32(0x2190), high: u32(0x21FF)));
|
|
148
|
-
rs.push(CharRange(low: u32(0x2200), high: u32(0x22FF)));
|
|
149
|
-
rs.push(CharRange(low: u32(0x2600), high: u32(0x26FF)));
|
|
150
|
-
rs.push(CharRange(low: u32(0x2700), high: u32(0x27BF)));
|
|
128
|
+
rs.push(CharRange(low : u32(0x0024), high : u32(0x0024)));
|
|
129
|
+
rs.push(CharRange(low : u32(0x002B), high : u32(0x002B)));
|
|
130
|
+
rs.push(CharRange(low : u32(0x003C), high : u32(0x003E)));
|
|
131
|
+
rs.push(CharRange(low : u32(0x005E), high : u32(0x005E)));
|
|
132
|
+
rs.push(CharRange(low : u32(0x0060), high : u32(0x0060)));
|
|
133
|
+
rs.push(CharRange(low : u32(0x007C), high : u32(0x007C)));
|
|
134
|
+
rs.push(CharRange(low : u32(0x007E), high : u32(0x007E)));
|
|
135
|
+
rs.push(CharRange(low : u32(0x00A2), high : u32(0x00A6)));
|
|
136
|
+
rs.push(CharRange(low : u32(0x00A8), high : u32(0x00A9)));
|
|
137
|
+
rs.push(CharRange(low : u32(0x00AC), high : u32(0x00AC)));
|
|
138
|
+
rs.push(CharRange(low : u32(0x00AE), high : u32(0x00B1)));
|
|
139
|
+
rs.push(CharRange(low : u32(0x2190), high : u32(0x21FF)));
|
|
140
|
+
rs.push(CharRange(low : u32(0x2200), high : u32(0x22FF)));
|
|
141
|
+
rs.push(CharRange(low : u32(0x2600), high : u32(0x26FF)));
|
|
142
|
+
rs.push(CharRange(low : u32(0x2700), high : u32(0x27BF)));
|
|
151
143
|
});
|
|
152
|
-
|
|
153
144
|
_add_separator_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
154
|
-
rs.push(CharRange(low: u32(0x0020), high: u32(0x0020)));
|
|
155
|
-
rs.push(CharRange(low: u32(0x00A0), high: u32(0x00A0)));
|
|
156
|
-
rs.push(CharRange(low: u32(0x1680), high: u32(0x1680)));
|
|
157
|
-
rs.push(CharRange(low: u32(0x2000), high: u32(0x200A)));
|
|
158
|
-
rs.push(CharRange(low: u32(0x2028), high: u32(0x2029)));
|
|
159
|
-
rs.push(CharRange(low: u32(0x202F), high: u32(0x202F)));
|
|
160
|
-
rs.push(CharRange(low: u32(0x205F), high: u32(0x205F)));
|
|
161
|
-
rs.push(CharRange(low: u32(0x3000), high: u32(0x3000)));
|
|
145
|
+
rs.push(CharRange(low : u32(0x0020), high : u32(0x0020)));
|
|
146
|
+
rs.push(CharRange(low : u32(0x00A0), high : u32(0x00A0)));
|
|
147
|
+
rs.push(CharRange(low : u32(0x1680), high : u32(0x1680)));
|
|
148
|
+
rs.push(CharRange(low : u32(0x2000), high : u32(0x200A)));
|
|
149
|
+
rs.push(CharRange(low : u32(0x2028), high : u32(0x2029)));
|
|
150
|
+
rs.push(CharRange(low : u32(0x202F), high : u32(0x202F)));
|
|
151
|
+
rs.push(CharRange(low : u32(0x205F), high : u32(0x205F)));
|
|
152
|
+
rs.push(CharRange(low : u32(0x3000), high : u32(0x3000)));
|
|
162
153
|
});
|
|
163
|
-
|
|
164
154
|
_add_mark_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
165
155
|
// Combining diacritical marks
|
|
166
|
-
rs.push(CharRange(low: u32(0x0300), high: u32(0x036F)));
|
|
156
|
+
rs.push(CharRange(low : u32(0x0300), high : u32(0x036F)));
|
|
167
157
|
// Devanagari dependent vowel signs
|
|
168
|
-
rs.push(CharRange(low: u32(0x093C), high: u32(0x094F)));
|
|
158
|
+
rs.push(CharRange(low : u32(0x093C), high : u32(0x094F)));
|
|
169
159
|
// Arabic combining marks
|
|
170
|
-
rs.push(CharRange(low: u32(0x064B), high: u32(0x065F)));
|
|
160
|
+
rs.push(CharRange(low : u32(0x064B), high : u32(0x065F)));
|
|
171
161
|
// Thai combining marks
|
|
172
|
-
rs.push(CharRange(low: u32(0x0E31), high: u32(0x0E31)));
|
|
173
|
-
rs.push(CharRange(low: u32(0x0E34), high: u32(0x0E3A)));
|
|
162
|
+
rs.push(CharRange(low : u32(0x0E31), high : u32(0x0E31)));
|
|
163
|
+
rs.push(CharRange(low : u32(0x0E34), high : u32(0x0E3A)));
|
|
174
164
|
// CJK compatibility ideographs supplement
|
|
175
|
-
rs.push(CharRange(low: u32(0xFE20), high: u32(0xFE2F)));
|
|
165
|
+
rs.push(CharRange(low : u32(0xFE20), high : u32(0xFE2F)));
|
|
176
166
|
});
|
|
177
|
-
|
|
178
167
|
_add_other_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
179
168
|
// C0 controls
|
|
180
|
-
rs.push(CharRange(low: u32(0x0000), high: u32(0x001F)));
|
|
169
|
+
rs.push(CharRange(low : u32(0x0000), high : u32(0x001F)));
|
|
181
170
|
// Delete
|
|
182
|
-
rs.push(CharRange(low: u32(0x007F), high: u32(0x007F)));
|
|
171
|
+
rs.push(CharRange(low : u32(0x007F), high : u32(0x007F)));
|
|
183
172
|
// C1 controls
|
|
184
|
-
rs.push(CharRange(low: u32(0x0080), high: u32(0x009F)));
|
|
173
|
+
rs.push(CharRange(low : u32(0x0080), high : u32(0x009F)));
|
|
185
174
|
// Surrogates (not valid in UTF-8, but included for completeness)
|
|
186
|
-
rs.push(CharRange(low: u32(0xD800), high: u32(0xDFFF)));
|
|
175
|
+
rs.push(CharRange(low : u32(0xD800), high : u32(0xDFFF)));
|
|
187
176
|
// Noncharacters
|
|
188
|
-
rs.push(CharRange(low: u32(0xFDD0), high: u32(0xFDEF)));
|
|
189
|
-
rs.push(CharRange(low: u32(0xFFFE), high: u32(0xFFFF)));
|
|
177
|
+
rs.push(CharRange(low : u32(0xFDD0), high : u32(0xFDEF)));
|
|
178
|
+
rs.push(CharRange(low : u32(0xFFFE), high : u32(0xFFFF)));
|
|
190
179
|
});
|
|
191
|
-
|
|
192
180
|
_add_latin_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
193
|
-
rs.push(CharRange(low: u32(0x0041), high: u32(0x005A)));
|
|
194
|
-
rs.push(CharRange(low: u32(0x0061), high: u32(0x007A)));
|
|
195
|
-
rs.push(CharRange(low: u32(0x00C0), high: u32(0x00D6)));
|
|
196
|
-
rs.push(CharRange(low: u32(0x00D8), high: u32(0x00F6)));
|
|
197
|
-
rs.push(CharRange(low: u32(0x00F8), high: u32(0x024F)));
|
|
198
|
-
rs.push(CharRange(low: u32(0x1E00), high: u32(0x1EFF)));
|
|
181
|
+
rs.push(CharRange(low : u32(0x0041), high : u32(0x005A)));
|
|
182
|
+
rs.push(CharRange(low : u32(0x0061), high : u32(0x007A)));
|
|
183
|
+
rs.push(CharRange(low : u32(0x00C0), high : u32(0x00D6)));
|
|
184
|
+
rs.push(CharRange(low : u32(0x00D8), high : u32(0x00F6)));
|
|
185
|
+
rs.push(CharRange(low : u32(0x00F8), high : u32(0x024F)));
|
|
186
|
+
rs.push(CharRange(low : u32(0x1E00), high : u32(0x1EFF)));
|
|
199
187
|
});
|
|
200
|
-
|
|
201
188
|
_add_han_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
202
189
|
// CJK Unified Ideographs
|
|
203
|
-
rs.push(CharRange(low: u32(0x4E00), high: u32(0x9FFF)));
|
|
190
|
+
rs.push(CharRange(low : u32(0x4E00), high : u32(0x9FFF)));
|
|
204
191
|
// CJK Extension A
|
|
205
|
-
rs.push(CharRange(low: u32(0x3400), high: u32(0x4DBF)));
|
|
192
|
+
rs.push(CharRange(low : u32(0x3400), high : u32(0x4DBF)));
|
|
206
193
|
// CJK Extension B
|
|
207
|
-
rs.push(CharRange(low: u32(0x20000), high: u32(0x2A6DF)));
|
|
194
|
+
rs.push(CharRange(low : u32(0x20000), high : u32(0x2A6DF)));
|
|
208
195
|
// CJK Compatibility Ideographs
|
|
209
|
-
rs.push(CharRange(low: u32(0xF900), high: u32(0xFAFF)));
|
|
196
|
+
rs.push(CharRange(low : u32(0xF900), high : u32(0xFAFF)));
|
|
210
197
|
// CJK Radicals Supplement
|
|
211
|
-
rs.push(CharRange(low: u32(0x2E80), high: u32(0x2EFF)));
|
|
198
|
+
rs.push(CharRange(low : u32(0x2E80), high : u32(0x2EFF)));
|
|
212
199
|
// Kangxi Radicals
|
|
213
|
-
rs.push(CharRange(low: u32(0x2F00), high: u32(0x2FDF)));
|
|
200
|
+
rs.push(CharRange(low : u32(0x2F00), high : u32(0x2FDF)));
|
|
214
201
|
});
|
|
215
|
-
|
|
216
202
|
_add_emoji_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
217
203
|
// Miscellaneous Symbols
|
|
218
|
-
rs.push(CharRange(low: u32(0x2600), high: u32(0x26FF)));
|
|
204
|
+
rs.push(CharRange(low : u32(0x2600), high : u32(0x26FF)));
|
|
219
205
|
// Dingbats
|
|
220
|
-
rs.push(CharRange(low: u32(0x2700), high: u32(0x27BF)));
|
|
206
|
+
rs.push(CharRange(low : u32(0x2700), high : u32(0x27BF)));
|
|
221
207
|
// Emoticons
|
|
222
|
-
rs.push(CharRange(low: u32(0x1F600), high: u32(0x1F64F)));
|
|
208
|
+
rs.push(CharRange(low : u32(0x1F600), high : u32(0x1F64F)));
|
|
223
209
|
// Misc Symbols and Pictographs
|
|
224
|
-
rs.push(CharRange(low: u32(0x1F300), high: u32(0x1F5FF)));
|
|
210
|
+
rs.push(CharRange(low : u32(0x1F300), high : u32(0x1F5FF)));
|
|
225
211
|
// Transport and Map
|
|
226
|
-
rs.push(CharRange(low: u32(0x1F680), high: u32(0x1F6FF)));
|
|
212
|
+
rs.push(CharRange(low : u32(0x1F680), high : u32(0x1F6FF)));
|
|
227
213
|
// Supplemental Symbols
|
|
228
|
-
rs.push(CharRange(low: u32(0x1F900), high: u32(0x1F9FF)));
|
|
214
|
+
rs.push(CharRange(low : u32(0x1F900), high : u32(0x1F9FF)));
|
|
229
215
|
// Symbols and Pictographs Extended-A
|
|
230
|
-
rs.push(CharRange(low: u32(0x1FA00), high: u32(0x1FA6F)));
|
|
231
|
-
rs.push(CharRange(low: u32(0x1FA70), high: u32(0x1FAFF)));
|
|
216
|
+
rs.push(CharRange(low : u32(0x1FA00), high : u32(0x1FA6F)));
|
|
217
|
+
rs.push(CharRange(low : u32(0x1FA70), high : u32(0x1FAFF)));
|
|
232
218
|
});
|
|
233
|
-
|
|
234
219
|
_add_whitespace_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
235
|
-
rs.push(CharRange(low: u32(0x0009), high: u32(0x000D)));
|
|
236
|
-
rs.push(CharRange(low: u32(0x0020), high: u32(0x0020)));
|
|
237
|
-
rs.push(CharRange(low: u32(0x0085), high: u32(0x0085)));
|
|
238
|
-
rs.push(CharRange(low: u32(0x00A0), high: u32(0x00A0)));
|
|
239
|
-
rs.push(CharRange(low: u32(0x1680), high: u32(0x1680)));
|
|
240
|
-
rs.push(CharRange(low: u32(0x2000), high: u32(0x200A)));
|
|
241
|
-
rs.push(CharRange(low: u32(0x2028), high: u32(0x2029)));
|
|
242
|
-
rs.push(CharRange(low: u32(0x202F), high: u32(0x202F)));
|
|
243
|
-
rs.push(CharRange(low: u32(0x205F), high: u32(0x205F)));
|
|
244
|
-
rs.push(CharRange(low: u32(0x3000), high: u32(0x3000)));
|
|
220
|
+
rs.push(CharRange(low : u32(0x0009), high : u32(0x000D)));
|
|
221
|
+
rs.push(CharRange(low : u32(0x0020), high : u32(0x0020)));
|
|
222
|
+
rs.push(CharRange(low : u32(0x0085), high : u32(0x0085)));
|
|
223
|
+
rs.push(CharRange(low : u32(0x00A0), high : u32(0x00A0)));
|
|
224
|
+
rs.push(CharRange(low : u32(0x1680), high : u32(0x1680)));
|
|
225
|
+
rs.push(CharRange(low : u32(0x2000), high : u32(0x200A)));
|
|
226
|
+
rs.push(CharRange(low : u32(0x2028), high : u32(0x2029)));
|
|
227
|
+
rs.push(CharRange(low : u32(0x202F), high : u32(0x202F)));
|
|
228
|
+
rs.push(CharRange(low : u32(0x205F), high : u32(0x205F)));
|
|
229
|
+
rs.push(CharRange(low : u32(0x3000), high : u32(0x3000)));
|
|
245
230
|
});
|
|
246
|
-
|
|
247
231
|
// Unicode property range lookup.
|
|
248
232
|
// Returns Some(ranges) for known property names, None for unknown.
|
|
249
233
|
// Supports both short (L, N, P, S, Z, M, C) and long names (Letter, Number, etc.)
|
|
@@ -251,7 +235,6 @@ _add_whitespace_ranges :: (fn(rs : ArrayList(CharRange)) -> unit)({
|
|
|
251
235
|
unicode_property_ranges :: (fn(name : String) -> Option(ArrayList(CharRange)))({
|
|
252
236
|
rs := ArrayList(CharRange).new();
|
|
253
237
|
(found : bool) = true;
|
|
254
|
-
|
|
255
238
|
cond(
|
|
256
239
|
// === General Category: Letter (L) ===
|
|
257
240
|
((name == `L`) || (name == `Letter`)) => {
|
|
@@ -263,7 +246,6 @@ unicode_property_ranges :: (fn(name : String) -> Option(ArrayList(CharRange)))({
|
|
|
263
246
|
((name == `Ll`) || (name == `Lowercase_Letter`)) => {
|
|
264
247
|
_add_lowercase_letter_ranges(rs);
|
|
265
248
|
},
|
|
266
|
-
|
|
267
249
|
// === General Category: Number (N) ===
|
|
268
250
|
((name == `N`) || (name == `Number`)) => {
|
|
269
251
|
_add_number_ranges(rs);
|
|
@@ -271,76 +253,69 @@ unicode_property_ranges :: (fn(name : String) -> Option(ArrayList(CharRange)))({
|
|
|
271
253
|
((name == `Nd`) || (name == `Digit`)) => {
|
|
272
254
|
_add_digit_ranges(rs);
|
|
273
255
|
},
|
|
274
|
-
|
|
275
256
|
// === General Category: Punctuation (P) ===
|
|
276
257
|
((name == `P`) || (name == `Punctuation`)) => {
|
|
277
258
|
_add_punctuation_ranges(rs);
|
|
278
259
|
},
|
|
279
|
-
|
|
280
260
|
// === General Category: Symbol (S) ===
|
|
281
261
|
((name == `S`) || (name == `Symbol`)) => {
|
|
282
262
|
_add_symbol_ranges(rs);
|
|
283
263
|
},
|
|
284
|
-
|
|
285
264
|
// === General Category: Separator (Z) ===
|
|
286
265
|
((name == `Z`) || (name == `Separator`)) => {
|
|
287
266
|
_add_separator_ranges(rs);
|
|
288
267
|
},
|
|
289
|
-
|
|
290
268
|
// === General Category: Mark (M) ===
|
|
291
269
|
((name == `M`) || (name == `Mark`)) => {
|
|
292
270
|
_add_mark_ranges(rs);
|
|
293
271
|
},
|
|
294
|
-
|
|
295
272
|
// === General Category: Other (C) ===
|
|
296
273
|
((name == `C`) || (name == `Other`)) => {
|
|
297
274
|
_add_other_ranges(rs);
|
|
298
275
|
},
|
|
299
|
-
|
|
300
276
|
// === Script categories ===
|
|
301
277
|
((name == `ASCII`) || (name == `ascii`)) => {
|
|
302
|
-
rs.push(CharRange(low: u32(0x0000), high: u32(0x007F)));
|
|
278
|
+
rs.push(CharRange(low : u32(0x0000), high : u32(0x007F)));
|
|
303
279
|
},
|
|
304
280
|
((name == `Latin`) || (name == `latin`)) => {
|
|
305
281
|
_add_latin_ranges(rs);
|
|
306
282
|
},
|
|
307
283
|
((name == `Greek`) || (name == `greek`)) => {
|
|
308
|
-
rs.push(CharRange(low: u32(0x0370), high: u32(0x03FF)));
|
|
309
|
-
rs.push(CharRange(low: u32(0x1F00), high: u32(0x1FFF)));
|
|
284
|
+
rs.push(CharRange(low : u32(0x0370), high : u32(0x03FF)));
|
|
285
|
+
rs.push(CharRange(low : u32(0x1F00), high : u32(0x1FFF)));
|
|
310
286
|
},
|
|
311
287
|
((name == `Cyrillic`) || (name == `cyrillic`)) => {
|
|
312
|
-
rs.push(CharRange(low: u32(0x0400), high: u32(0x04FF)));
|
|
313
|
-
rs.push(CharRange(low: u32(0x0500), high: u32(0x052F)));
|
|
288
|
+
rs.push(CharRange(low : u32(0x0400), high : u32(0x04FF)));
|
|
289
|
+
rs.push(CharRange(low : u32(0x0500), high : u32(0x052F)));
|
|
314
290
|
},
|
|
315
291
|
((name == `Han`) || (name == `han`)) => {
|
|
316
292
|
_add_han_ranges(rs);
|
|
317
293
|
},
|
|
318
294
|
((name == `Hiragana`) || (name == `hiragana`)) => {
|
|
319
|
-
rs.push(CharRange(low: u32(0x3040), high: u32(0x309F)));
|
|
295
|
+
rs.push(CharRange(low : u32(0x3040), high : u32(0x309F)));
|
|
320
296
|
},
|
|
321
297
|
((name == `Katakana`) || (name == `katakana`)) => {
|
|
322
|
-
rs.push(CharRange(low: u32(0x30A0), high: u32(0x30FF)));
|
|
323
|
-
rs.push(CharRange(low: u32(0x31F0), high: u32(0x31FF)));
|
|
298
|
+
rs.push(CharRange(low : u32(0x30A0), high : u32(0x30FF)));
|
|
299
|
+
rs.push(CharRange(low : u32(0x31F0), high : u32(0x31FF)));
|
|
324
300
|
},
|
|
325
301
|
((name == `Hangul`) || (name == `hangul`)) => {
|
|
326
|
-
rs.push(CharRange(low: u32(0xAC00), high: u32(0xD7AF)));
|
|
327
|
-
rs.push(CharRange(low: u32(0x1100), high: u32(0x11FF)));
|
|
328
|
-
rs.push(CharRange(low: u32(0x3130), high: u32(0x318F)));
|
|
302
|
+
rs.push(CharRange(low : u32(0xAC00), high : u32(0xD7AF)));
|
|
303
|
+
rs.push(CharRange(low : u32(0x1100), high : u32(0x11FF)));
|
|
304
|
+
rs.push(CharRange(low : u32(0x3130), high : u32(0x318F)));
|
|
329
305
|
},
|
|
330
306
|
((name == `Arabic`) || (name == `arabic`)) => {
|
|
331
|
-
rs.push(CharRange(low: u32(0x0600), high: u32(0x06FF)));
|
|
332
|
-
rs.push(CharRange(low: u32(0x0750), high: u32(0x077F)));
|
|
307
|
+
rs.push(CharRange(low : u32(0x0600), high : u32(0x06FF)));
|
|
308
|
+
rs.push(CharRange(low : u32(0x0750), high : u32(0x077F)));
|
|
333
309
|
},
|
|
334
310
|
((name == `Devanagari`) || (name == `devanagari`)) => {
|
|
335
|
-
rs.push(CharRange(low: u32(0x0900), high: u32(0x097F)));
|
|
311
|
+
rs.push(CharRange(low : u32(0x0900), high : u32(0x097F)));
|
|
336
312
|
},
|
|
337
313
|
((name == `Thai`) || (name == `thai`)) => {
|
|
338
|
-
rs.push(CharRange(low: u32(0x0E00), high: u32(0x0E7F)));
|
|
314
|
+
rs.push(CharRange(low : u32(0x0E00), high : u32(0x0E7F)));
|
|
339
315
|
},
|
|
340
316
|
((name == `Emoji`) || (name == `emoji`)) => {
|
|
341
317
|
_add_emoji_ranges(rs);
|
|
342
318
|
},
|
|
343
|
-
|
|
344
319
|
// === Boolean properties ===
|
|
345
320
|
((name == `White_Space`) || (name == `space`)) => {
|
|
346
321
|
_add_whitespace_ranges(rs);
|
|
@@ -348,18 +323,13 @@ unicode_property_ranges :: (fn(name : String) -> Option(ArrayList(CharRange)))({
|
|
|
348
323
|
((name == `Alphabetic`) || (name == `Alpha`)) => {
|
|
349
324
|
_add_letter_ranges(rs);
|
|
350
325
|
},
|
|
351
|
-
|
|
352
326
|
true => {
|
|
353
327
|
found = false;
|
|
354
328
|
}
|
|
355
329
|
);
|
|
356
|
-
|
|
357
330
|
cond(
|
|
358
|
-
found
|
|
359
|
-
true
|
|
331
|
+
found =>.Some(rs),
|
|
332
|
+
true =>.None
|
|
360
333
|
)
|
|
361
334
|
});
|
|
362
|
-
|
|
363
|
-
export
|
|
364
|
-
unicode_property_ranges
|
|
365
|
-
;
|
|
335
|
+
export(unicode_property_ranges);
|