Sha256: e4c4e2b22058cf70e9b80cdf87f87aa2153ad361fa195e67798305079ff2032f
Contents?: true
Size: 885 Bytes
Versions: 153
Compression:
Stored size: 885 Bytes
Contents
%%{ machine re_char_type; single_codepoint_char_type = [dDhHsSwW]; multi_codepoint_char_type = [RX]; char_type_char = single_codepoint_char_type | multi_codepoint_char_type; # Char types scanner # -------------------------------------------------------------------------- char_type := |* char_type_char { case text = copy(data, ts-1, te) when '\d'; emit(:type, :digit, text) when '\D'; emit(:type, :nondigit, text) when '\h'; emit(:type, :hex, text) when '\H'; emit(:type, :nonhex, text) when '\s'; emit(:type, :space, text) when '\S'; emit(:type, :nonspace, text) when '\w'; emit(:type, :word, text) when '\W'; emit(:type, :nonword, text) when '\R'; emit(:type, :linebreak, text) when '\X'; emit(:type, :xgrapheme, text) end fret; }; *|; }%%
Version data entries
153 entries across 143 versions & 23 rubygems