diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-26 15:02:50 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-26 15:02:50 -0200 |
commit | 9d9f9c48ffea08f90768a24ceb38e551d48e17e2 (patch) | |
tree | 1d2d66b6b0fa8bd4a8dbd8a4baa4ca94f955cb8e | |
parent | 15d48576ea737d51e579f101a870e37f62b81f22 (diff) | |
download | lua-9d9f9c48ffea08f90768a24ceb38e551d48e17e2.tar.gz lua-9d9f9c48ffea08f90768a24ceb38e551d48e17e2.tar.bz2 lua-9d9f9c48ffea08f90768a24ceb38e551d48e17e2.zip |
local variables may appear inside blocks in main code.
-rw-r--r-- | lua.stx | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 3.23 1995/10/25 14:33:25 roberto Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 3.24 1995/10/26 14:21:56 roberto Exp roberto $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -156,8 +156,6 @@ static void add_localvar (Word name) | |||
156 | 156 | ||
157 | static void store_localvar (Word name, int n) | 157 | static void store_localvar (Word name, int n) |
158 | { | 158 | { |
159 | if (*initcode == basepc) | ||
160 | yyerror("local variable outside function body"); | ||
161 | if (nlocalvar+n < MAXLOCALS) | 159 | if (nlocalvar+n < MAXLOCALS) |
162 | localvar[nlocalvar+n] = name; | 160 | localvar[nlocalvar+n] = name; |
163 | else | 161 | else |