| 123456789101112131415161718192021222324252627 |
- #pragma once
- #include <string>
- #include <abnf/forward.h>
- namespace abnf {
- class code_point {
- public:
- code_point(int value = 0) : value_(value) {}
- explicit code_point(std::string_view str);
- size_t width() const;
- explicit operator int() const { return value_; }
- operator std::string() const;
- private:
- friend char_range parse_char_range(std::string_view token);
- friend bool operator==(code_point const &, code_point const &) = default;
- friend auto operator<=>(code_point const &, code_point const &) = default;
- private:
- int value_; // 0x00000000 - 0x0010FFFF
- };
- }
|