Changeset 964
- Timestamp:
- Jun 22, 2012 6:36:09 PM (11 years ago)
- Location:
- specdomain/src/specdomain
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
specdomain/src/specdomain/sphinxcontrib/specdomain.py
r963 r964 20 20 import re 21 21 import string #@UnusedImport 22 import sys 22 import sys #@UnusedImport 23 23 24 24 from docutils import nodes #@UnusedImport … … 35 35 from sphinx.util.docstrings import prepare_docstring #@UnusedImport 36 36 37 from docutils.statemachine import ViewList, string2lines38 import sphinx.util.nodes37 #from docutils.statemachine import ViewList, string2lines 38 #import sphinx.util.nodes 39 39 from sphinx.ext.autodoc import Documenter, bool_option 40 from sphinx.util.inspect import getargspec, isdescriptor, safe_getmembers, \41 safe_getattr, safe_repr42 from sphinx.util.pycompat import base_exception, class_types40 #from sphinx.util.inspect import getargspec, isdescriptor, safe_getmembers, \ 41 # safe_getattr, safe_repr 42 #from sphinx.util.pycompat import base_exception, class_types 43 43 from specmacrofileparser import SpecMacrofileParser 44 44 45 45 46 # TODO: merge these with specmacrofileparser.py 46 47 match_all = r'.*' 47 48 non_greedy_filler = match_all + r'?' … … 166 167 rest = prepare_docstring(extended_comment) 167 168 168 # TODO: Another step should (like for Python) attach source code and provide169 # links from each to highlighted source code blocks.170 171 169 #self.add_line(u'', '<autodoc>') 172 170 #sig = self.format_signature() 173 171 #self.add_directive_header(sig) 172 173 # TODO: Another step should (like for Python) attach source code and provide 174 # links from each to highlighted source code blocks. 175 # This works for now. 176 self.add_line(u'', '<autodoc>') 177 line = 'source code: :download:`%s <%s>`' % (macrofile, macrofile) 178 self.add_line(line, macrofile) 179 # TODO: Add each .mac file name to the Index 180 174 181 self.add_line(u'', '<autodoc>') 175 182 for linenumber, line in enumerate(rest): -
specdomain/src/specdomain/test/cdef-examples.mac.rst
r963 r964 5 5 ==================================================== 6 6 7 source code: :download:`cdef-examples.mac <cdef-examples.mac>`8 9 7 .. autospecmacro:: cdef-examples.mac -
specdomain/src/specdomain/test/shutter.mac.rst
r963 r964 5 5 ==================================================== 6 6 7 source code: :download:`shutter.mac <shutter.mac>`8 9 7 .. caution:: This file is as-received. 10 8 No attempt to prepare it for ReST comments has been made. -
specdomain/src/specdomain/test/test-battery.mac.rst
r963 r964 5 5 ==================================================== 6 6 7 source code: :download:`test-battery.mac <test-battery.mac>`8 9 7 .. autospecmacro:: test-battery.mac
Note: See TracChangeset
for help on using the changeset viewer.