added standard tparam aliases and a test target
steve donovan
11 years ago
136 | 136 |
ldoc.alias(name,{'param',modifiers={type=type}})
|
137 | 137 |
end
|
138 | 138 |
|
|
139 |
ldoc.tparam_alias 'string'
|
|
140 |
ldoc.tparam_alias 'number'
|
|
141 |
ldoc.tparam_alias 'int'
|
|
142 |
ldoc.tparam_alias 'boolean'
|
|
143 |
ldoc.tparam_alias 'function'
|
|
144 |
ldoc.tparam_alias 'table'
|
|
145 |
ldoc.tparam_alias 'thread'
|
|
146 |
|
139 | 147 |
function ldoc.add_language_extension(ext, lang)
|
140 | 148 |
lang = (lang=='c' and cc) or (lang=='lua' and lua) or quit('unknown language')
|
141 | 149 |
if ext:sub(1,1) ~= '.' then ext = '.'..ext end
|
17 | 17 |
cp ldoc.lua $(LUA_SHAREDIR)
|
18 | 18 |
cp -r ldoc $(LUA_SHAREDIR)
|
19 | 19 |
|
20 | |
uninstall:
|
|
20 |
uninstall:
|
21 | 21 |
-rm $(LUA_SHAREDIR)/ldoc.lua
|
22 | 22 |
-rm -r $(LUA_SHAREDIR)/ldoc
|
23 | 23 |
-rm $(LUA_BINDIR)/ldoc
|
|
24 |
|
|
25 |
|
|
26 |
test: test-basic test-example test-md
|
|
27 |
|
|
28 |
RUN=&& ldoc . && diff -r docs cdocs && echo ok
|
|
29 |
|
|
30 |
test-basic:
|
|
31 |
cd tests $(RUN)
|
|
32 |
|
|
33 |
test-example:
|
|
34 |
cd tests && cd example $(RUN)
|
|
35 |
|
|
36 |
test-md:
|
|
37 |
cd tests && cd md-test $(RUN)
|
0 | |
format='markdown'
|
1 | |
file = {'types.lua','classes.lua'}
|
2 | |
--file = 'classes.lua'
|
3 | |
topics = {'one.md','two.md'}
|
4 | |
tparam_alias 'string'
|
5 | |
tparam_alias ('int','number')
|
|
0 |
format='markdown'
|
|
1 |
project = 'Basic Example'
|
|
2 |
file = {'types.lua','classes.lua'}
|
|
3 |
topics = {'one.md','two.md'}
|
0 | 0 |
project = 'md-test'
|
1 | 1 |
title = 'Markdown Docs'
|
2 | 2 |
format = 'markdown'
|
|
3 |
file = 'mod2.lua'
|
|
4 |
|