aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
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 @@
1/* 1/*
2** $Id: lparser.c,v 2.178 2018/02/17 19:20:00 roberto Exp roberto $ 2** $Id: lparser.c,v 2.179 2018/03/07 15:55:38 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*/
@@ -893,11 +893,6 @@ static void primaryexp (LexState *ls, expdesc *v) {
893 singlevar(ls, v); 893 singlevar(ls, v);
894 return; 894 return;
895 } 895 }
896 case TK_UNDEF: {
897 luaX_next(ls);
898 init_exp(v, VUNDEF, 0);
899 return;
900 }
901 default: { 896 default: {
902 luaX_syntaxerror(ls, "unexpected symbol"); 897 luaX_syntaxerror(ls, "unexpected symbol");
903 } 898 }
@@ -1183,10 +1178,6 @@ static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) {
1183 else { /* assignment -> '=' explist */ 1178 else { /* assignment -> '=' explist */
1184 int nexps; 1179 int nexps;
1185 checknext(ls, '='); 1180 checknext(ls, '=');
1186 if (nvars == 1 && testnext(ls, TK_UNDEF)) {
1187 luaK_codeundef(ls->fs, &lh->v);
1188 return;
1189 }
1190 nexps = explist(ls, &e); 1181 nexps = explist(ls, &e);
1191 if (nexps != nvars) 1182 if (nexps != nvars)
1192 adjust_assign(ls, nvars, nexps, &e); 1183 adjust_assign(ls, nvars, nexps, &e);
@@ -1652,11 +1643,6 @@ static void statement (LexState *ls) {
1652 luaX_next(ls); /* skip LOCAL */ 1643 luaX_next(ls); /* skip LOCAL */
1653 if (testnext(ls, TK_FUNCTION)) /* local function? */ 1644 if (testnext(ls, TK_FUNCTION)) /* local function? */
1654 localfunc(ls); 1645 localfunc(ls);
1655 else if (testnext(ls, TK_UNDEF))
1656 (void)0; /* ignore */
1657 /* old versions may need to declare 'local undef'
1658 when using 'undef' with no environment; so this
1659 version accepts (and ignores) these declarations */
1660 else 1646 else
1661 localstat(ls); 1647 localstat(ls);
1662 break; 1648 break;