History

Lua 5.3.0-work3

Lua Team committed 12 years ago

Commit f8a66271 parent ad386d945 files · +2323 −1590Browse files

Showing the changes to src/lparser.c (1 of 45 files). Show all

Unified · Split

src/lparser.c+5−5
@@ -1,5 +1,5 @@
1/*1/*
2** $Id: lparser.c,v 2.138 2013/12/30 20:47:58 roberto Exp $2** $Id: lparser.c,v 2.139 2014/06/19 18:27:20 roberto Exp $
3** Lua Parser3** Lua Parser
4** See Copyright Notice in lua.h4** See Copyright Notice in lua.h
5*/5*/
@@ -1618,17 +1618,17 @@ static void mainfunc (LexState *ls, FuncState *fs) { · 1612 unmodified lines
1618}1618}
1619 1619
1620 1620
1621Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,1621LClosure *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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t