aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuescript/yue_compiler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp
index 4dd3583..75f4787 100644
--- a/src/yuescript/yue_compiler.cpp
+++ b/src/yuescript/yue_compiler.cpp
@@ -1360,10 +1360,10 @@ private:
1360 std::ostringstream buf; 1360 std::ostringstream buf;
1361 for (auto it = uname->m_begin.m_it; it != uname->m_end.m_it; ++it) { 1361 for (auto it = uname->m_begin.m_it; it != uname->m_end.m_it; ++it) {
1362 auto ch = *it; 1362 auto ch = *it;
1363 if (ch > 255) { 1363 if (ch <= 0x7F && ((ch == '_') || ((ch | 0x20) >= 'a' && (ch | 0x20) <= 'z') || (ch >= '0' && ch <= '9'))) {
1364 buf << "_u"sv << std::hex << static_cast<int>(ch);
1365 } else {
1366 buf << static_cast<char>(ch); 1364 buf << static_cast<char>(ch);
1365 } else {
1366 buf << "_u"sv << std::hex << static_cast<uint32_t>(ch);
1367 } 1367 }
1368 } 1368 }
1369 return buf.str(); 1369 return buf.str();