about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-01-31 01:01:19 +0100
committerBaitinq <[email protected]>2025-01-31 01:01:19 +0100
commit0d683e773c4c3bda91379551cfc80884bb2b6c0e (patch)
treeaa6b8298b7cf174c8104fe3cd5eda0ed872cf666 /examples
parentMisc: Fix incorrect codegen error log (diff)
downloadpry-lang-0d683e773c4c3bda91379551cfc80884bb2b6c0e.tar.gz
pry-lang-0d683e773c4c3bda91379551cfc80884bb2b6c0e.tar.bz2
pry-lang-0d683e773c4c3bda91379551cfc80884bb2b6c0e.zip
Codegen: Fix function as variables
Diffstat (limited to 'examples')
-rw-r--r--examples/4.src10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/4.src b/examples/4.src
index b955155..b7f10d3 100644
--- a/examples/4.src
+++ b/examples/4.src
@@ -1,9 +1,9 @@
-let print_one = () => {
-	print(1);
-	return 4;
-};
-
 let main = () => {
+	let print_one = () => {
+		print(1);
+		return 4;
+	};
+
 	let y = print_one() + 2;
 
 	print(y);