1
0
Fork 0
forked from fun/fun
fun/lib
hanez 43ce9f83af parser: fix variable scoping by defaulting to local scope in functions. (0.41.0)
This change addresses a critical issue where common variable names in
library functions (like 'i', 'n', 'src') were being treated as globals
by default, leading to state collisions and unexpected side effects
across different files.

Changes:
- Modified `src/parser.c` to automatically treat new variables assigned
  within a function body as locals unless they were already declared as
  globals.
- Introduced `sym_find` in the parser to distinguish between finding
  an existing global and creating a new one.
- Reverted `lib/net/cgi.fun` to use standard, short variable names,
  confirming that they no longer interfere with the caller's scope.
- Verified that explicit global updates still work if the variable was
  already defined at the top-level scope.
2026-04-27 02:06:20 +02:00
..
async Fixed bug with wrong line numbers in error messages. Fixed permissions on examples. (0.39.14) 2026-03-30 19:10:29 +02:00
crypt Some more stdlib refactoring removing duplicate code. (0.38.10) 2026-02-09 01:43:06 +01:00
encoding URL to project update. No code changes. (0.26.5) 2025-10-09 01:59:19 +02:00
io Some arg Fun in Rust. (0.38.1) 2026-01-29 00:53:34 +01:00
net parser: fix variable scoping by defaulting to local scope in functions. (0.41.0) 2026-04-27 02:06:20 +02:00
regex Added PCRE2 support. (0.29.0) 2025-11-25 22:52:43 +01:00
test Fixed bug with wrong line numbers in error messages. Fixed permissions on examples. (0.39.14) 2026-03-30 19:10:29 +02:00
utils Some more stdlib fun and example code and cosmetic changes. (0.38.15) 2026-02-19 21:50:24 +01:00
arrays.fun URL to project update. No code changes. (0.26.5) 2025-10-09 01:59:19 +02:00
cli.fun Some CLI arg fixes. (0.37.36) 2025-12-30 17:51:25 +01:00
hello.fun URL to project update. No code changes. (0.26.5) 2025-10-09 01:59:19 +02:00
hex.fun Some more stdlib refactoring removing duplicate code. (0.38.9) 2026-02-09 01:02:49 +01:00
math.fun URL to project update. No code changes. (0.26.5) 2025-10-09 01:59:19 +02:00
README.md Added sha384.fun to std library and alot of fixes. (0.16.3) 2025-10-01 19:08:08 +02:00
regex.fun URL to project update. No code changes. (0.26.5) 2025-10-09 01:59:19 +02:00
strings.fun Fixed bug with wrong line numbers in error messages. Some examples refactoring and bug fixes. (0.39.15) 2026-03-30 20:51:04 +02:00

README

The Fun standard library.