summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-09-03 18:04:11 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-09-03 18:04:11 +0200
commit3b1ba73ad56bdcfb1ffa39ed4c8f1dddeb607adf (patch)
tree59df87bbbfd8b31b3d4195cc0f84a03ebd755d19 /test
parentd498fd2dae412054d028921f36ce42b8dfc46c0c (diff)
and/or types
Diffstat (limited to 'test')
-rw-r--r--test/test.test45
1 files changed, 37 insertions, 8 deletions
diff --git a/test/test.test b/test/test.test
index e39eae6..3778099 100644
--- a/test/test.test
+++ b/test/test.test
@@ -7,7 +7,7 @@ const new: integer = henshin * 5 + 10;
const test: integer = 1 + 1;
-function main(input: string): void {
+function main(input: string or integer): void {
const hello: string = "world!";
const bye: string = "bye!";
@@ -16,12 +16,12 @@ function main(input: string): void {
main(input = "hello!");
-const array: [integer][3] = [1, 2, 3];
+const array: [integer] = [1, 2, 3];
const map: [string][string or integer] = [
- "first": 1,
- "second": "two",
- "third": "3",
- "fourth": 4,
+ "first" = 1,
+ "second" = "two",
+ "third" = "3",
+ "fourth" = 4
];
for (array) |index, value| {
@@ -32,5 +32,34 @@ for (map) |key, value| {
ply = key;
}
-main() |> print($);
-main() |> main2($) |> print($);
+main() => print($);
+main() => main2($) => print($);
+
+//type test_type = {
+// const test_field: string = "test",
+// var another_field: integer = 4,
+//
+// function test_function(): void {
+// return test_type.test_field;
+// },
+// function_field: function = another_function(): void {
+// return test_type.another_field;
+// },
+//};
+
+// type other_int = integer;
+
+//const test_type: type = {};
+//const other_int: type = integer;
+
+//const main: function = function(input: string): void {
+// return input;
+//};
+
+//const main: function = (input: string): void {
+// return input;
+//};
+
+//iterate(array, (index: integer, value: integer) {
+//
+//});