parsav  Diff

Differences From Artifact [dd405c9e82]:

To Artifact [1d36a792dc]:


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
496
497
498
499
500
501
502





503
504
505
506
507
508
509
			for m in l:gmatch('([^:]+)') do path[#path+1]=m end
			local tgt = lib
			for i=1,#path-1 do
				if tgt[path[i]] == nil then tgt[path[i]] = {} end
				tgt = tgt[path[i]]
			end
			local chunk = terralib.loadfile(l:gsub(':','/') .. '.t')
			if chunk ~= nil then
				tgt[path[#path]:gsub('-','_')] = chunk()
				print(' \27[1m[ \27[32mok\27[;1m ]\27[m')
			else
				print(' \27[1m[\27[31mfail\27[;1m]\27[m')
				os.exit(2)
			end
		end
................................................................................
	trn = macro(function(cond, i, e)
		return quote
			var c: bool = [cond]
			var r: i.tree.type
			if c == true then r = i else r = e end
		in r end
	end);

	coalesce = macro(function(...)
		local args = {...}
		local ty = args[1].tree.type
		local val = symbol(ty)
		local empty
		if ty.ptr_basetype then empty = `[ty]{ptr=nil,ct=0}
		elseif ty.type == 'integer' then empty = `0
................................................................................

	'render:conf:profile';
	'render:conf:circles';
	'render:conf:sec';
	'render:conf:users';
	'render:conf:avi';
	'render:conf';





	'route';
}

do
	local p = string.format('parsav: %s\nbuilt on %s\n', config.build.str, config.build.when)
	terra version() lib.io.send(1, p, [#p]) end
end







|







 







>







 







>
>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
			for m in l:gmatch('([^:]+)') do path[#path+1]=m end
			local tgt = lib
			for i=1,#path-1 do
				if tgt[path[i]] == nil then tgt[path[i]] = {} end
				tgt = tgt[path[i]]
			end
			local chunk = terralib.loadfile(l:gsub(':','/') .. '.t')
			if chunk ~= nil then 
				tgt[path[#path]:gsub('-','_')] = chunk()
				print(' \27[1m[ \27[32mok\27[;1m ]\27[m')
			else
				print(' \27[1m[\27[31mfail\27[;1m]\27[m')
				os.exit(2)
			end
		end
................................................................................
	trn = macro(function(cond, i, e)
		return quote
			var c: bool = [cond]
			var r: i.tree.type
			if c == true then r = i else r = e end
		in r end
	end);
	typeof = macro(function(exp) return exp.tree.type end);
	coalesce = macro(function(...)
		local args = {...}
		local ty = args[1].tree.type
		local val = symbol(ty)
		local empty
		if ty.ptr_basetype then empty = `[ty]{ptr=nil,ct=0}
		elseif ty.type == 'integer' then empty = `0
................................................................................

	'render:conf:profile';
	'render:conf:circles';
	'render:conf:sec';
	'render:conf:users';
	'render:conf:avi';
	'render:conf';

	'api:lp:actor';
	'api:lp:tweet';
	'api:lp:outbox';
	'api:webfinger';
	'route';
}

do
	local p = string.format('parsav: %s\nbuilt on %s\n', config.build.str, config.build.when)
	terra version() lib.io.send(1, p, [#p]) end
end