MCPcopy Create free account
hub / github.com/covscript/covscript / is_identifier

Method is_identifier

sources/compiler/lexer.cpp:86–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85
86 bool utf8::is_identifier(char32_t ch)
87 {
88 static constexpr std::uint32_t ascii_max = 0x7F;
89 /**
90 * Chinese Character in Unicode Charset
91 * Basic: 0x4E00 - 0x9FA5
92 * Extended: 0x9FA6 - 0x9FEF
93 * Special: 0x3007
94 */
95 if (ch > ascii_max)
96 return (ch >= 0x4E00 && ch <= 0x9FA5) || (ch >= 0x9FA6 && ch <= 0x9FEF) || ch == 0x3007;
97 else
98 return ch == '_' || std::iswalnum(ch);
99 }
100
101 std::u32string gbk::local2wide(const std::deque<char> &local)
102 {

Callers 1

process_char_buffMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected