summaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-04-04 11:23:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-04-04 11:23:41 -0300
commit03c6a05ec836c3a90a6b8d730120afdad39c092b (patch)
tree31f0bdf82969b1e082e92d7b5dd5d9e1496d64af /lparser.c
parent3d0b5edfe4df7ec54d6885b6b6ce917faddf6661 (diff)
downloadlua-github-03c6a05ec836c3a90a6b8d730120afdad39c092b.tar.gz
no more nil-in-table
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/lparser.c b/lparser.c
index 9bf5485e..e67d70ea 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.c,v 2.178 2018/02/17 19:20:00 roberto Exp roberto $
+** $Id: lparser.c,v 2.179 2018/03/07 15:55:38 roberto Exp roberto $
** Lua Parser
** See Copyright Notice in lua.h
*/
@@ -893,11 +893,6 @@ static void primaryexp (LexState *ls, expdesc *v) {
singlevar(ls, v);
return;
}
- case TK_UNDEF: {
- luaX_next(ls);
- init_exp(v, VUNDEF, 0);
- return;
- }
default: {
luaX_syntaxerror(ls, "unexpected symbol");
}
@@ -1183,10 +1178,6 @@ static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) {
else { /* assignment -> '=' explist */
int nexps;
checknext(ls, '=');
- if (nvars == 1 && testnext(ls, TK_UNDEF)) {
- luaK_codeundef(ls->fs, &lh->v);
- return;
- }
nexps = explist(ls, &e);
if (nexps != nvars)
adjust_assign(ls, nvars, nexps, &e);
@@ -1652,11 +1643,6 @@ static void statement (LexState *ls) {
luaX_next(ls); /* skip LOCAL */
if (testnext(ls, TK_FUNCTION)) /* local function? */
localfunc(ls);
- else if (testnext(ls, TK_UNDEF))
- (void)0; /* ignore */
- /* old versions may need to declare 'local undef'
- when using 'undef' with no environment; so this
- version accepts (and ignores) these declarations */
else
localstat(ls);
break;