History

Lua 5.0.1

Lua Team committed 22 years ago

Commit a985bf41 parent 488a64b15 files · +822 −155Browse files

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

Unified · Split

src/lparser.c+7−3
@@ -1,5 +1,5 @@
1/*1/*
2** $Id: lparser.c,v 1.208 2003/04/03 13:35:34 roberto Exp $2** $Id: lparser.c,v 1.208a 2003/04/03 13:35:34 roberto Exp $
3** Lua Parser3** Lua Parser
4** See Copyright Notice in lua.h4** See Copyright Notice in lua.h
5*/5*/
@@ -1141,11 +1141,15 @@ static void ifstat (LexState *ls, int line) { · 1135 unmodified lines
1141 1141
1142static void localfunc (LexState *ls) {1142static void localfunc (LexState *ls) {
1143 expdesc v, b;1143 expdesc v, b;
1144 FuncState *fs = ls->fs;
1144 new_localvar(ls, str_checkname(ls), 0);1145 new_localvar(ls, str_checkname(ls), 0);
1145 init_exp(&v, VLOCAL, ls->fs->freereg++);1146 init_exp(&v, VLOCAL, fs->freereg);
1147 luaK_reserveregs(fs, 1);
1146 adjustlocalvars(ls, 1);1148 adjustlocalvars(ls, 1);
1147 body(ls, &b, 0, ls->linenumber);1149 body(ls, &b, 0, ls->linenumber);
1148 luaK_storevar(ls->fs, &v, &b);1150 luaK_storevar(fs, &v, &b);
1151 /* debug information will only see the variable after this point! */
1152 getlocvar(fs, fs->nactvar - 1).startpc = fs->pc;
1149}1153}
1150 1154
1151 1155

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