diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-29 16:07:10 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-29 16:07:10 -0200 |
| commit | 4ebc183e569b41a854aba64ffc2d648ab34a6668 (patch) | |
| tree | 461300459a6ffeeb806da299579b8b6bfd9acb6c | |
| parent | 298d0abff7f292fa4bfbdb40979f41bc8f80f9c2 (diff) | |
| download | lua-4ebc183e569b41a854aba64ffc2d648ab34a6668.tar.gz lua-4ebc183e569b41a854aba64ffc2d648ab34a6668.tar.bz2 lua-4ebc183e569b41a854aba64ffc2d648ab34a6668.zip | |
bug: return gives wrong line in debug information.
| -rw-r--r-- | lparser.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lparser.c,v 1.50 1999/12/23 18:19:57 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.51 1999/12/29 16:31:15 roberto Exp roberto $ |
| 3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -1455,9 +1455,10 @@ static void body (LexState *ls, int needself, int line) { | |||
| 1455 | 1455 | ||
| 1456 | static void ret (LexState *ls) { | 1456 | static void ret (LexState *ls) { |
| 1457 | /* ret -> [RETURN explist sc] */ | 1457 | /* ret -> [RETURN explist sc] */ |
| 1458 | if (optional(ls, RETURN)) { | 1458 | if (ls->token == RETURN) { |
| 1459 | listdesc e; | 1459 | listdesc e; |
| 1460 | check_debugline(ls); | 1460 | check_debugline(ls); |
| 1461 | next(ls); | ||
| 1461 | explist(ls, &e); | 1462 | explist(ls, &e); |
| 1462 | if (e.pc > 0) { /* expression is an open function call? */ | 1463 | if (e.pc > 0) { /* expression is an open function call? */ |
| 1463 | Byte *code = ls->fs->f->code; | 1464 | Byte *code = ls->fs->f->code; |
