File tree Expand file tree Collapse file tree 6 files changed +16
-14
lines changed Expand file tree Collapse file tree 6 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ jobs:
17
17
18
18
steps :
19
19
- uses : actions/checkout@v4
20
+ - run : rm -rf tests
20
21
- name : Format check
21
22
uses : ArkScript-lang/action-format@master
22
23
with :
23
24
folder : .
24
- exclude : tests
25
25
26
26
build :
27
27
runs-on : ubuntu-24.04
Original file line number Diff line number Diff line change 12
12
(mut _has_been_called false)
13
13
(mut _memorized_value nil)
14
14
15
- (fun (&f &_has_been_called &_memorized_value) {
15
+ (fun (&f
16
+ &_has_been_called
17
+ &_memorized_value) {
16
18
(if (not _has_been_called) {
17
19
(set _has_been_called true)
18
20
(set _memorized_value (f)) })
Original file line number Diff line number Diff line change 102
102
# (print "this will always be executed"))
103
103
# =end
104
104
# @author https://github.com/SuperFola
105
- (macro unless (cond ...body)
106
- (if (not cond) ...body))
105
+ (macro unless (cond ...body) (if (not cond) ...body))
107
106
108
107
# @brief Iterate until the condition is truthy
109
108
# @param cond condition
116
115
# (print data) # [0 1 2 3 4 5 6 7 8 9]
117
116
# =end
118
117
# @author https://github.com/SuperFola
119
- (macro until (cond body)
120
- (while (not cond) body))
118
+ (macro until (cond body) (while (not cond) body))
Original file line number Diff line number Diff line change 145
145
# =end
146
146
# @author https://github.com/SuperFola
147
147
(let complex (fun (real imag)
148
- (fun (&real &imag) ())))
148
+ (fun (&real
149
+ &imag) ())))
149
150
150
151
# @brief Compute the addition of two complex number
151
152
# @param _c0 the first complex number
Original file line number Diff line number Diff line change 28
28
(let reset (fun ()
29
29
(set i _a)))
30
30
31
- (fun (&i &_a &_b &asList &reset) {
31
+ (fun (&i
32
+ &_a
33
+ &_b
34
+ &asList
35
+ &reset) {
32
36
(if (< i _b) {
33
37
(set i (+ i 1))
34
38
(- i 1) }) }) }))
Original file line number Diff line number Diff line change 31
31
(let update_case_ptr (fun (val)
32
32
(set case_pointer val)))
33
33
34
- (let need_case? (fun ()
35
- (and (not (empty? case_desc)) (!= case_pointer (len cases)))))
34
+ (let need_case? (fun () (and (not (empty? case_desc)) (!= case_pointer (len cases)))))
36
35
37
36
(let set_active (fun (bool)
38
37
(set active bool)))
39
38
40
- (fun (
41
- &name
39
+ (fun (&name
42
40
&passed
43
41
&failed
44
42
&failures
55
53
&update_case_ptr
56
54
&need_case?
57
55
&active
58
- &set_active)
59
- ()) }))
56
+ &set_active) ()) }))
60
57
61
58
# internal, do not use
62
59
(mut _suite nil)
You can’t perform that action at this time.
0 commit comments