summaryrefslogtreecommitdiff
path: root/test/test.test
blob: 3778099ab8b43ca3cdeb7c1640f535b1d4846caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const henshin: integer = 2; // comment
// next comment
var ply: string = "cool!";
ply = "way cooler!!";

const new: integer = henshin * 5 + 10;

const test: integer = 1 + 1;

function main(input: string or integer): void {
  const hello: string = "world!";
  const bye: string = "bye!";

  return hello;
}

main(input = "hello!");

const array: [integer] = [1, 2, 3];
const map: [string][string or integer] = [
  "first" = 1,
  "second" = "two",
  "third" = "3",
  "fourth" = 4
];

for (array) |index, value| {
  ply = value;
}

for (map) |key, value| {
  ply = key;
}

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) {
//
//});