-
Notifications
You must be signed in to change notification settings - Fork 0
/
while.ast
42 lines (42 loc) · 935 Bytes
/
while.ast
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
(program,
(fn, p,
(fn_param, c),
(stmt,
(expr,
(fn_call, putchar,
(fn_arg,
(expr,
(ident, U64, c@8)))))),
(stmt,
(expr,
(fn_call, putchar,
(fn_arg,
(expr,
(number_literal, 10)))))))
(fn, main,
(stmt,
(expr,
(assignment,
(lvar, i@8),
(number_literal, 5))),
(while,
(expr,
(bin_op, >,
(ident, U64, i@8),
(number_literal, 0)),
(block,
(stmt,
(expr,
(fn_call, p,
(fn_arg,
(expr,
(bin_op, +,
(ident, U64, i@8),
(number_literal, 48))))))
(stmt,
(expr,
(assignment,
(lvar, i@8),
(bin_op, -,
(ident, U64, i@8),
(number_literal, 1)))))))