securesauce / precli

Precaution CLI - command line static application security testing tool
https://precli.readthedocs.io/
Other
13 stars 3 forks source link

Fix how scoped variables accessed in symbol table #450

Closed ericwb closed 3 months ago

ericwb commented 3 months ago

Only the global (top-most) scope should have symbols visible to all inner scopes.

This changes the symbol table to no longer recursive search through parent symtabs and instead search current scope or global.

Future work should handle enclosed scope and global vs. nonlocal assignments (in Pyt have symbols visible to all inner scopes.

This changes the symbol table to no longer recursive search through parent symtabs and instead search current scope or global.

Future work should handle enclosed scope and global vs. nonlocal assignments (in Python))