From 77ac95b9985f5669d6659bfb54728786d28c2ef0 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 20 Jul 2020 09:42:30 +0800 Subject: *misc --- src/lua51/lparser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lua51/lparser.c') diff --git a/src/lua51/lparser.c b/src/lua51/lparser.c index dda7488..7da34e7 100644 --- a/src/lua51/lparser.c +++ b/src/lua51/lparser.c @@ -380,9 +380,10 @@ static void close_func (LexState *ls) { } +//c! 编译生成字节码,分析阶段的唯一入口,返回proto指针 Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { struct LexState lexstate; - struct FuncState funcstate; + struct FuncState funcstate; // 分析过程中的临时数据 lexstate.buff = buff; luaX_setinput(L, &lexstate, z, luaS_new(L, name)); open_func(&lexstate, &funcstate); @@ -394,7 +395,7 @@ Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { lua_assert(funcstate.prev == NULL); lua_assert(funcstate.f->nups == 0); lua_assert(lexstate.fs == NULL); - return funcstate.f; + return funcstate.f; //c 最终生成的字节码 } -- cgit v1.1-26-g67d0