阅读词法分析器 添加相应注释

This commit is contained in:
ranchuan
2024-10-21 19:21:54 +08:00
parent f0aa32fbfb
commit 1f31eb2c14
5 changed files with 62 additions and 19 deletions

View File

@@ -131,7 +131,7 @@ void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2,
}
}
// hex字符转数字
int luaO_hexavalue (int c) {
if (lisdigit(c)) return c - '0';
else return (ltolower(c) - 'a') + 10;
@@ -319,7 +319,7 @@ size_t luaO_str2num (const char *s, TValue *o) {
return (e - s) + 1; /* success; return string size */
}
// utf8编码去除编码头
int luaO_utf8esc (char *buff, unsigned long x) {
int n = 1; /* number of bytes put in buffer (backwards) */
lua_assert(x <= 0x7FFFFFFFu);