foralex / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

Local scopes are not created when defining functions #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
local scopes are not created when defining functions, so that any defined
variable ends up in the previous scope (such as the global scope). I simply
added the creation of a scope in ParseFunctionDefinition and it seems to
have fixed the problem, as expected.

Original issue reported on code.google.com by zik.sale...@gmail.com on 2 Jun 2009 at 12:40

GoogleCodeExporter commented 8 years ago
The problem was actually due to variable declarations being evaluated during 
scanning
when they should have been skipped instead.

Fixed in r315

Original comment by zik.sale...@gmail.com on 2 Jun 2009 at 6:32