From 4ebc183e569b41a854aba64ffc2d648ab34a6668 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 29 Dec 1999 16:07:10 -0200 Subject: bug: return gives wrong line in debug information. --- lparser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lparser.c b/lparser.c index e21ad7a1..574b3a25 100644 --- 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; -- cgit v1.2.3-55-g6feb