about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-01-31 01:15:16 +0100
committerBaitinq <[email protected]>2025-01-31 01:16:56 +0100
commit5aba3f29b6af2d6708ea6605d2d5c064f48d03c6 (patch)
tree44910812f45c4e79127c1e0483fb5c6f00255dbe /examples
parentCodegen: Fix function as variables (diff)
downloadpry-lang-5aba3f29b6af2d6708ea6605d2d5c064f48d03c6.tar.gz
pry-lang-5aba3f29b6af2d6708ea6605d2d5c064f48d03c6.tar.bz2
pry-lang-5aba3f29b6af2d6708ea6605d2d5c064f48d03c6.zip
Codegen: Start handling global variables
Diffstat (limited to 'examples')
-rw-r--r--examples/5.src4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/5.src b/examples/5.src
index 88c171c..5d6baaa 100644
--- a/examples/5.src
+++ b/examples/5.src
@@ -11,7 +11,7 @@ let foo = () => {
 let main = () => {
 	print(x);
 	let x = 2;
-	foo();
+	let y= foo();
 	print(x);
-	return x;
+	return x + y;
 };