-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ncss
71 lines (56 loc) · 1.29 KB
/
main.ncss
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
#main {
/* this is comment */
--num: 2.1;
transform: --num var(--num) 1.6;
content: "--num is" var(--num);
content: "";
/* if else */
.if[--num>=5] {
content: '5 <= --num';
}
.else .if [--num>=3] {
content: "3 <= --num < 5";
}
.else {
content: "--num < 3";
}
content: "";
/* while */
--i: 0;
.while[--i < 5] {
content: "while:" var(--i);
transform: --i, var(--i) + 1;
.if[--i==3] {
break: "";
}
}
content: "";
/* group */
.group {
content: "this is group.";
}
.penguin_is-cute {
content: "this is group. 'penguin_is-cute'";
}
content: "";
/* array */
--arr: 0 10 20 30 40 50;
content: "--arr is " var(--arr);
content: "--arr[2] is " arr(--arr 2);
transform: --arr push(--arr "a" "b" "c");
content: "--arr is " var(--arr);
content: "";
/* call self function */
sub: "hi";
content: "";
/* get return value */
result: --res-1 --res-2;
content: "res 1 :" var(--res-1);
content: "res 2 :" var(--res-2);
}
#sub[--arg] {
content: "sub function arg is" var(--arg);
return: "return content" 123;
/* not called */
content: "'return command' is not working.";
}