Codebase list lua-ldoc / 53ed04c
added standard tparam aliases and a test target steve donovan 11 years ago
4 changed file(s) with 29 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
136136 ldoc.alias(name,{'param',modifiers={type=type}})
137137 end
138138
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
139147 function ldoc.add_language_extension(ext, lang)
140148 lang = (lang=='c' and cc) or (lang=='lua' and lua) or quit('unknown language')
141149 if ext:sub(1,1) ~= '.' then ext = '.'..ext end
1717 cp ldoc.lua $(LUA_SHAREDIR)
1818 cp -r ldoc $(LUA_SHAREDIR)
1919
20 uninstall:
20 uninstall:
2121 -rm $(LUA_SHAREDIR)/ldoc.lua
2222 -rm -r $(LUA_SHAREDIR)/ldoc
2323 -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'}
00 project = 'md-test'
11 title = 'Markdown Docs'
22 format = 'markdown'
3 file = 'mod2.lua'
4