Commit Graph

4 Commits

Author SHA1 Message Date
84e52b1649 lang: ast: replace var keyword with global
local variables are now created automatically when they are first assigned to.

the global keyword can be used to declare that a name refers to a global variable instead,
at which point, assigning to the name results in the assignment referencing the global variable
instead of allocating a new global variable.
2025-09-08 15:52:29 +01:00
c7aa3b422d lang: ast: fix lambdas starting with var declaration not being parsed correctly
IVY_KW_VAR is not treated as an expression start token (as variable declarations are not
strictly expressions). so the lambda parser did not create a block parser context
when it encountered this keyword.
2025-04-23 10:57:17 +01:00
143d61e329 lang: ast: add support for multiple block termination tokens 2025-01-16 13:15:18 +00:00
dba4f123d6 lang: ast: implement parsing of lambdas 2024-12-06 22:26:06 +00:00