forked from ark-lang/ark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
big_test.ark
99 lines (76 loc) · 1.28 KB
/
big_test.ark
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
Test block comment
*/
// hello
/// test doc comment for i1
i1: i32 = 0b100010_101010; // 2218
i2: i32 = 0x39_57; // 14679
i3: i32 = 0o25_36; // 1374
i4: i32 = 1_000_005;
rune1 := 'a';
rune2: rune = '\\';
rune3: rune = '\'';
mut float: f64 = 0.2465f;
float2: f64 = 1.35d;
mut float3: f64 = 0.0004;
mut s1: str= "he\"l\nlo";
//un: i8 = !1;
t: int = int('h');
//h := i1 + 6;
bitshiftTest := 1 << i8(4);
mut bintest: int = 5 * (5 + 5) * 5;
mshifttest: int = 10 << 7;
inferenceTest := 10;
booltest := 1 == i8(0);
[packed]
struct Test {
a: i32 = 5,
b := 5
}
struct Test2 {
a: Test
}
func ten(): int {
return 0x05 + 5;
}
func _2345_test日本語てすと(と: int, un: i32): int {
}
/**
test doc comment for main()
test <html> injection
test `inline` code
test *emphasized* text
```
fenced code
```
# h1
## h2
### h3
#### h4
##### h5
###### h6
*/
func main(a: int): mut int {
// thing: int = ten();
// thing++;
//return thing - 11;
ten();
mut structTest: Test2;
structTest.a.b = 6;
duh := _2345_test日本語てすと(6, 7);
if 5 == 5 {
two := 2;
} else if 6 == 5 {
two := 2;
} else {
two := 3;
}
for {
}
for 1 == 0 {
}
num: int = 0;
var: ^int;
//var = #
return ^var;
}