]> Repositorios git - scryer-prolog.git/commitdiff
broaden the definition of alpha_char! (#1749, #1515, #1591)
authorMark Thom <[email protected]>
Sat, 25 Mar 2023 23:22:16 +0000 (17:22 -0600)
committerMark Thom <[email protected]>
Sun, 26 Mar 2023 17:10:46 +0000 (11:10 -0600)
src/parser/macros.rs

index 326772cff69d3917e23c89a8293b503f7490315c..27b106fc7a516a8137f7be5a96aae84cc1392306 100644 (file)
@@ -7,7 +7,13 @@ macro_rules! char_class {
 #[macro_export]
 macro_rules! alpha_char {
     ($c: expr) => {
-        $c.is_alphabetic() || $c == '_'
+        (!$c.is_numeric() &&
+         !$c.is_whitespace() &&
+         !$c.is_control() &&
+         !$crate::graphic_token_char!($c) &&
+         !$crate::layout_char!($c) &&
+         !$crate::meta_char!($c) &&
+         !$crate::solo_char!($c)) || $c == '_'
     };
 }