-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathentry.lua
More file actions
29 lines (28 loc) · 777 Bytes
/
entry.lua
File metadata and controls
29 lines (28 loc) · 777 Bytes
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
dofile 'util.lua'
Util.dofile 'application'
Util.dofile 'typesetting'
print(JSON.stringify({
a = {"\0\a\b\f\n\r\t\v", true, false, "\" \\"},
b = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}},
c = 12345e300,
}))
local p = JSON.parse([[
{
"b" : [ null , [ null , 1 , 0 , 0 ] , [ null , 0 , 1 , 0 ] , [ null , 0 , 0 , 1 ] ] ,
"a" : [ null , "\u0000\u0007\b\f\n\r\t\u000b" , true , false , "\" \\" ] ,
"c" : 1.2345e+304,
"d" : "\uD834\udd1e\ufffd"
}
]])
print(string.format("%q", p.a[1]), p.a[2], p.a[3], p.a[4])
print(p.b[0], p.b[1][1], p.b[1][2], p.b[2][1], p.b[2][2])
print(p.d)
function on.update()
-- only for first frame as this function itself
-- will be replaced the moment it is called
if #arg >= 1 then
Util.dofile 'c/main.lua'
else
Util.dofile 'g/main.lua'
end
end