commit 4ebc183e569b41a854aba64ffc2d648ab34a6668
parent 298d0abff7f292fa4bfbdb40979f41bc8f80f9c2
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 29 Dec 1999 16:06:48 -0200
bug: return gives wrong line in debug information.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lparser.c b/lparser.c
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.c,v 1.50 1999/12/23 18:19:57 roberto Exp roberto $
+** $Id: lparser.c,v 1.51 1999/12/29 16:31:15 roberto Exp roberto $
** LL(1) Parser and code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -1455,9 +1455,10 @@ static void body (LexState *ls, int needself, int line) {
static void ret (LexState *ls) {
/* ret -> [RETURN explist sc] */
- if (optional(ls, RETURN)) {
+ if (ls->token == RETURN) {
listdesc e;
check_debugline(ls);
+ next(ls);
explist(ls, &e);
if (e.pc > 0) { /* expression is an open function call? */
Byte *code = ls->fs->f->code;