From 00dea7e8c41b672730d6e2c891b6012a83d8842c Mon Sep 17 00:00:00 2001 From: Raiki Tamura Date: Fri, 8 Sep 2023 16:59:09 +0200 Subject: libcpp: add function to check XID properties This commit adds a new function intended for checking the XID properties of a possibly unicode character, as well as the accompanying enum describing the possible properties. libcpp/ChangeLog: * charset.cc (cpp_check_xid_property): New. * include/cpplib.h (cpp_check_xid_property): New. (enum cpp_xid_property): New. Signed-off-by: Raiki Tamura --- libcpp/include/cpplib.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libcpp/include/cpplib.h') diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index f699daa..5746aac 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -1631,4 +1631,11 @@ bool cpp_valid_utf8_p (const char *data, size_t num_bytes); bool cpp_is_combining_char (cppchar_t c); bool cpp_is_printable_char (cppchar_t c); +enum cpp_xid_property { + CPP_XID_START = 1, + CPP_XID_CONTINUE = 2 +}; + +unsigned int cpp_check_xid_property (cppchar_t c); + #endif /* ! LIBCPP_CPPLIB_H */ -- cgit v1.1