shopify_draft_proxy/graphql/character_classes
Mirrors graphql-js language/characterClasses.ts.
All predicates take a Unicode code point as an Int and return whether
the code point participates in the named GraphQL lexical class. Inputs
outside the BMP are accepted but only ASCII-range answers are meaningful;
graphql-js itself only checks for ASCII letters/digits in these classes.
Values
pub fn is_unicode_scalar_value(code: Int) -> Bool
Whether a code point is a valid Unicode scalar value (anything except
surrogate code points). graphql-js isUnicodeScalarValue.
pub fn is_white_space(code: Int) -> Bool
WhiteSpace :: Horizontal Tab (U+0009) | Space (U+0020)
pub fn read_hex_digit(code: Int) -> Int
HexDigit :: 0..9 | A..F | a..f. Returns the integer value 0..15, or
-1 when code is not a hex digit (matches graphql-js’s sentinel).