3b063dc2c9
Implement strict block scoping and distinguish between statements and expressions. This change introduces hierarchical scopes for functions and blocks, enforces that `def` is a statement with no return value, and prevents statements from appearing in expression positions or as the last element of a block. A new example `design-flaw.myc` is added to demonstrate the uninitialized variable issue solved by these changes.
8 lines
57 B
Plaintext
8 lines
57 B
Plaintext
|
|
(do
|
|
(do
|
|
(if false (def x "hh"))
|
|
)
|
|
(print x)
|
|
)
|