aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2025-11-05 11:38:45 +0800
committerLi Jin <dragon-fly@qq.com>2025-11-05 11:38:45 +0800
commit36fc4fd1b262fd91226540bc79c833ef17a7425e (patch)
tree3da251b14017e45918e7133af1250342e8a6f62e /src
parent4e7cf4d863804303a931d6e16df7de6616337909 (diff)
downloadyuescript-36fc4fd1b262fd91226540bc79c833ef17a7425e.tar.gz
yuescript-36fc4fd1b262fd91226540bc79c833ef17a7425e.tar.bz2
yuescript-36fc4fd1b262fd91226540bc79c833ef17a7425e.zip
Updated spec.
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();