about summary refs log tree commit diff
path: root/users/tazjin/rlox/examples
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-10-03T11·20+0300
committertazjin <mail@tazj.in>2021-10-19T12·58+0000
commitc318f42c119f3dd13bf0cfd7917bfdd41fea7085 (patch)
tree19ab277a770dc12fd0ca7b7615b3ba0df38723f8 /users/tazjin/rlox/examples
parentad7e591c8046d6e179476192ef9928d5fae78422 (diff)
feat(tazjin/rlox): Support local variables r/2978
WIP

Change-Id: I78fbc885faaac165c380cbd9aa98b4b64a9b8274
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3685
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'users/tazjin/rlox/examples')
-rw-r--r--users/tazjin/rlox/examples/var.lox10
1 files changed, 5 insertions, 5 deletions
diff --git a/users/tazjin/rlox/examples/var.lox b/users/tazjin/rlox/examples/var.lox
index 133906ad1b2d..7af90b3f0bee 100644
--- a/users/tazjin/rlox/examples/var.lox
+++ b/users/tazjin/rlox/examples/var.lox
@@ -1,8 +1,8 @@
-{
+var a = 10;
+var b = 5;
 
 {
-  var a = 5;
-  print a;
-}
-
+  var b = 10;
+  var c = 2;
+  a * b * c;
 }