mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
I've brought the tests up to scratch, except for compounds im the parser, because I'm too damn tired to do that over SSH. It looks like collections are right-recursive, whixh was unintended but still works just fine. I've also added the '--verbose' flag to the repl to control the debugging output. Several obscure bugs have been fixed, and comments have been tweaked. Mustfail tests are still needed, but that's a low priority. See #142. Fixed #151
18 lines
233 B
Plaintext
18 lines
233 B
Plaintext
//shadowing
|
|
var answer = 42;
|
|
print answer; //42
|
|
{
|
|
var answer = 7;
|
|
print answer; //7
|
|
}
|
|
print answer; //42
|
|
|
|
//rebinding
|
|
var question = 42;
|
|
print question; //42
|
|
{
|
|
var question = question;
|
|
print question; //42
|
|
}
|
|
print question; //42
|