-
Notifications
You must be signed in to change notification settings - Fork 9
/
quine.ast
38 lines (38 loc) · 826 Bytes
/
quine.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
load "io".
let [q, s] = escape "
global __retval__
__retval__ = ('list', [('string', chr(34)), ('string', s)])
".
let ls:[load_|io_|dot_|let1_|let2_|sp_|comma_|brk_|ns] = [
"load ",
"io",
".",
"let [q, s] = escape ",
"let ls:[load_|io_|dot_|let1_|let2_|sp_|comma_|brk_|ns] = [",
" ",
",",
"].",
"println(load_ + q + io_ + q + dot_).",
"println(let1_ + q + s + q + dot_).",
"println let2_.",
"for (l:%string) in ls do",
" println(sp_ + q + l + q + comma_)",
"end",
"println(sp_ + 0).",
"println brk_.",
"for (n:%string) in ns do",
" println n.",
"end",
0
].
println(load_ + q + io_ + q + dot_).
println(let1_ + q + s + q + dot_).
println let2_.
for (l:%string) in ls do
println(sp_ + q + l + q + comma_)
end
println(sp_ + 0).
println brk_.
for (n:%string) in ns do
println n.
end