From fc7b167ae0a0d65f0050299101e7d177550d7120 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 29 Nov 2000 09:57:42 -0200 Subject: BUG: parser does not accept a `;' after a `return' --- lparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index 7e6da470..b635a418 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.115 2000/10/10 19:51:15 roberto Exp roberto $ +** $Id: lparser.c,v 1.116 2000/10/27 11:39:52 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -997,7 +997,7 @@ static void retstat (LexState *ls) { /* stat -> RETURN explist */ FuncState *fs = ls->fs; next(ls); /* skip RETURN */ - if (!block_follow(ls->t.token)) + if (!block_follow(ls->t.token) && ls->t.token != ';') explist1(ls); /* optional return values */ luaK_code1(fs, OP_RETURN, ls->fs->nactloc); fs->stacklevel = fs->nactloc; /* removes all temp values */ -- cgit v1.2.3-55-g6feb