diff options
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 2.137 2013/12/18 14:12:03 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.138 2013/12/30 20:47:58 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1618,17 +1618,17 @@ static void mainfunc (LexState *ls, FuncState *fs) { | |||
1618 | } | 1618 | } |
1619 | 1619 | ||
1620 | 1620 | ||
1621 | Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, | 1621 | LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, |
1622 | Dyndata *dyd, const char *name, int firstchar) { | 1622 | Dyndata *dyd, const char *name, int firstchar) { |
1623 | LexState lexstate; | 1623 | LexState lexstate; |
1624 | FuncState funcstate; | 1624 | FuncState funcstate; |
1625 | Closure *cl = luaF_newLclosure(L, 1); /* create main closure */ | 1625 | LClosure *cl = luaF_newLclosure(L, 1); /* create main closure */ |
1626 | setclLvalue(L, L->top, cl); /* anchor it (to avoid being collected) */ | 1626 | setclLvalue(L, L->top, cl); /* anchor it (to avoid being collected) */ |
1627 | incr_top(L); | 1627 | incr_top(L); |
1628 | lexstate.h = luaH_new(L); /* create table for scanner */ | 1628 | lexstate.h = luaH_new(L); /* create table for scanner */ |
1629 | sethvalue(L, L->top, lexstate.h); /* anchor it */ | 1629 | sethvalue(L, L->top, lexstate.h); /* anchor it */ |
1630 | incr_top(L); | 1630 | incr_top(L); |
1631 | funcstate.f = cl->l.p = luaF_newproto(L); | 1631 | funcstate.f = cl->p = luaF_newproto(L); |
1632 | funcstate.f->source = luaS_new(L, name); /* create and anchor TString */ | 1632 | funcstate.f->source = luaS_new(L, name); /* create and anchor TString */ |
1633 | luaC_objbarrier(L, funcstate.f, funcstate.f->source); | 1633 | luaC_objbarrier(L, funcstate.f, funcstate.f->source); |
1634 | lexstate.buff = buff; | 1634 | lexstate.buff = buff; |