Comment in localstat is wrong

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Comment in localstat is wrong

Xmilia Hermit
Hi,

I think the comment in localstat is wrong and was not updated since the
name and attribute were swapped.

diff --git a/lparser.c b/lparser.c
index bcdcfb6d..df5995bb 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1752,7 +1752,7 @@ static void checktoclose (LexState *ls, int level) {


  static void localstat (LexState *ls) {
-  /* stat -> LOCAL ATTRIB NAME {',' ATTRIB NAME} ['=' explist] */
+  /* stat -> LOCAL NAME ATTRIB {',' NAME ATTRIB} ['=' explist] */
    FuncState *fs = ls->fs;
    int toclose = -1;  /* index of to-be-closed variable (if any) */
    Vardesc *var;  /* last variable */

Regards,
Xmilia
Reply | Threaded
Open this post in threaded view
|

Re: Comment in localstat is wrong

Roberto Ierusalimschy
> I think the comment in localstat is wrong and was not updated since the name
> and attribute were swapped.
> [...]
> -  /* stat -> LOCAL ATTRIB NAME {',' ATTRIB NAME} ['=' explist] */
> +  /* stat -> LOCAL NAME ATTRIB {',' NAME ATTRIB} ['=' explist] */

Thanks for the feedback.

-- Roberto