Files
wren/test/variable
Bob Nystrom 75d9a39040 feat: allow variable declarations without explicit initializers
In the compiler, when parsing a variable declaration, the `=` token is now optional. If present, the initializer expression is compiled as before. If absent, the variable is implicitly initialized to `null` via a call to `null(compiler, false)`. This change removes the previous `TODO` comment and the unconditional `consume` of `TOKEN_EQ`.

Two new test files verify the behavior for both global and local variables without initializers, asserting that reading such a variable yields `null`.
2013-12-23 02:47:58 +00:00
..