summary refs log tree commit diff
path: root/examples/1.src
diff options
context:
space:
mode:
authorManuel Palenzuela Merino <manuel.palenzuela@datadoghq.com>2025-01-16 22:10:36 +0100
committerManuel Palenzuela Merino <manuel.palenzuela@datadoghq.com>2025-01-16 22:10:36 +0100
commitaee5b54b09b72d7478b875ddf77bafb264b1427f (patch)
tree3f89006b69ef3732cb4d969a03e481666c8e0e61 /examples/1.src
parentEvaluator: Start working on new function-capable evaluator (diff)
downloadinterpreter-aee5b54b09b72d7478b875ddf77bafb264b1427f.tar.gz
interpreter-aee5b54b09b72d7478b875ddf77bafb264b1427f.tar.bz2
interpreter-aee5b54b09b72d7478b875ddf77bafb264b1427f.zip
Get function calls kind of working :)
Diffstat (limited to 'examples/1.src')
-rw-r--r--examples/1.src8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/1.src b/examples/1.src
index 4c6c73b..cb29345 100644
--- a/examples/1.src
+++ b/examples/1.src
@@ -1,3 +1,7 @@
-let i = 4;
+let main = () => {
+	let i = 4;
 
-print(i);
+	print(i);
+
+	return 0;
+};