hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 9ea3ca7a283facd1ff7d29860920d8fc803b25a8
parent 2a124e3c67aefa4cafbc1be9058e658fc486edfd
Author: Sebastian <sebastian@sebsite.pw>
Date:   Wed, 13 Apr 2022 20:33:19 -0400

regex: remove ASCII charclass

This isn't one of the standard classes specified by POSIX.

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mregex/regex.ha | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/regex/regex.ha b/regex/regex.ha @@ -52,8 +52,8 @@ type thread = struct { type newmatch = void; export type charclass = enum { - ALNUM, ALPHA, ASCII, BLANK, CNTRL, DIGIT, GRAPH, LOWER, PRINT, PUNCT, - SPACE, UPPER, WORD, XDIGIT, + ALNUM, ALPHA, BLANK, CNTRL, DIGIT, GRAPH, LOWER, PRINT, PUNCT, SPACE, + UPPER, WORD, XDIGIT, }; export type charset = [](charset_lit_item | charset_range_item | charset_class_item), @@ -63,7 +63,6 @@ export type charset = [](charset_lit_item | charset_range_item | const charclass_names: [](charclass, str) = [ (charclass::ALNUM, ":alnum:]"), (charclass::ALPHA, ":alpha:]"), - (charclass::ASCII, ":ascii:]"), (charclass::BLANK, ":blank:]"), (charclass::CNTRL, ":cntrl:]"), (charclass::DIGIT, ":digit:]"), @@ -79,7 +78,6 @@ const charclass_names: [](charclass, str) = [ const charclass_fns: [](charclass, *fn(c: rune) bool) = [ (charclass::ALNUM, &ascii::isalnum), (charclass::ALPHA, &ascii::isalpha), - (charclass::ASCII, &ascii::isascii), (charclass::BLANK, &ascii::isblank), (charclass::CNTRL, &ascii::iscntrl), (charclass::DIGIT, &ascii::isdigit),