Add support for syntax blocks.

This commit is contained in:
2024-03-06 09:50:42 -08:00
parent 8dab797c90
commit ac564e6e41
11 changed files with 39 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
x = 1;
function add_x(y) x + y
function add_x(y) x + y;
a = 3;
print x;
result = add_x(a);

View File

@@ -1,5 +1,5 @@
x = 1;
function add_x(y) x + y
function add_x(y) x + y;
a = 3;
function add_x_twice(y) add_x(y) + x
print x;

View File

@@ -0,0 +1,11 @@
x = 1u64;
function mean_x(y) {
base = x + y;
result = base / 2;
result;
};
a = 3;
mean_x_and_a = mean_x(a);
mean_x_and_9 = mean_x(9);
print mean_x_and_a;
print mean_x_and_9;

View File

@@ -1,3 +1,3 @@
x = 4u64;
function f(y) (x + y)
function f(y) (x + y);
print x;

View File

@@ -1,4 +1,4 @@
n = (49u8 + 155u8);
q = n;
function u (b) n + b
function u (b) n + b;
v = n;