aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_is_dash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicode/prop/uprop_is_dash.c')
-rw-r--r--lib/unicode/prop/uprop_is_dash.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/unicode/prop/uprop_is_dash.c b/lib/unicode/prop/uprop_is_dash.c
new file mode 100644
index 0000000..7b326f7
--- /dev/null
+++ b/lib/unicode/prop/uprop_is_dash.c
@@ -0,0 +1,50 @@
+/* This file is autogenerated by gen/prop/bool-props; DO NOT EDIT. */
+
+#include "__bsearch.h"
+#include "bitset.h"
+#include "rune.h"
+#include "unicode/prop.h"
+
+/* clang-format off */
+
+static constexpr bitset(bs, LATIN1_MAX) = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+static const struct {
+ rune lo, hi;
+} lookup[] = {
+ {RUNE_C(0x00058A), RUNE_C(0x00058A)},
+ {RUNE_C(0x0005BE), RUNE_C(0x0005BE)},
+ {RUNE_C(0x001400), RUNE_C(0x001400)},
+ {RUNE_C(0x001806), RUNE_C(0x001806)},
+ {RUNE_C(0x002010), RUNE_C(0x002015)},
+ {RUNE_C(0x002053), RUNE_C(0x002053)},
+ {RUNE_C(0x00207B), RUNE_C(0x00207B)},
+ {RUNE_C(0x00208B), RUNE_C(0x00208B)},
+ {RUNE_C(0x002212), RUNE_C(0x002212)},
+ {RUNE_C(0x002E17), RUNE_C(0x002E17)},
+ {RUNE_C(0x002E1A), RUNE_C(0x002E1A)},
+ {RUNE_C(0x002E3A), RUNE_C(0x002E3B)},
+ {RUNE_C(0x002E40), RUNE_C(0x002E40)},
+ {RUNE_C(0x002E5D), RUNE_C(0x002E5D)},
+ {RUNE_C(0x00301C), RUNE_C(0x00301C)},
+ {RUNE_C(0x003030), RUNE_C(0x003030)},
+ {RUNE_C(0x0030A0), RUNE_C(0x0030A0)},
+ {RUNE_C(0x00FE31), RUNE_C(0x00FE32)},
+ {RUNE_C(0x00FE58), RUNE_C(0x00FE58)},
+ {RUNE_C(0x00FE63), RUNE_C(0x00FE63)},
+ {RUNE_C(0x00FF0D), RUNE_C(0x00FF0D)},
+ {RUNE_C(0x010EAD), RUNE_C(0x010EAD)},
+};
+
+__MLIB_DEFINE_BSEARCH_CONTAINS(lookup)
+
+bool
+uprop_is_dash(rune ch)
+{
+ return ch <= LATIN1_MAX ? TESTBIT(bs, ch) : mlib_lookup_contains(ch);
+}