Changeset 961
- Timestamp:
- Jun 21, 2012 4:39:57 PM (11 years ago)
- Location:
- specdomain/src/specdomain/sphinxcontrib
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
specdomain/src/specdomain/sphinxcontrib/specdomain.py
r953 r961 145 145 Description of a SPEC variable 146 146 """ 147 148 # TODO: The directive that declares the variable should be the primary (bold) index. 149 # TODO: array variables are not handled at all 147 150 148 151 … … 207 210 highlighted source code blocks. 208 211 ''' 209 extended_comments_list = self.parse_macro_file(sig)210 view = ViewList([u'TODO: recognize the ReST formatting in the following extended comment and it needs to be cleaned up'])212 #extended_comments_list = self.parse_macro_file(sig) 213 view = ViewList([u'TODO: Just handle the macro signature, additional documentation elsewhere']) 211 214 #contentnode = nodes.TextElement() 212 215 node = nodes.paragraph() … … 224 227 return sig 225 228 226 def XX_run(self):229 def run(self): 227 230 # TODO: recognize the ReST formatting in the following extended comment and it needs to be cleaned up 228 231 # nodes.TextElement(raw, text) 229 232 # sphinx.directives.__init__.py ObjectDescription.run() method 230 # Summary: This does not belong here, in the signature processing part. 231 # Instead, it goes at the directive.run() method. This is the new place! 232 pass 233 # Summary: This belongs with the directive.run() method. This is the new place! 234 #self.content.append(u'') 235 #self.content.append(u'.. caution:: Use caution.') 236 from specmacrofileparser import SpecMacrofileParser 237 macrofile = self.arguments[0] 238 p = SpecMacrofileParser(macrofile) 239 return ObjectDescription.run(self) 233 240 234 241 def parse_macro_file(self, filename): … … 298 305 label = 'SPEC, http://www.certif.com' 299 306 object_types = { # type of object that a domain can document 300 'def': ObjType(l_('def'), 'def'), 301 'rdef': ObjType(l_('rdef'), 'rdef'), 302 'cdef': ObjType(l_('cdef'), 'cdef'), 303 'global': ObjType(l_('global'), 'global'), 304 'local': ObjType(l_('local'), 'local'), 307 'def': ObjType(l_('def'), 'def'), 308 'rdef': ObjType(l_('rdef'), 'rdef'), 309 'cdef': ObjType(l_('cdef'), 'cdef'), 310 'global': ObjType(l_('global'), 'global'), 311 'local': ObjType(l_('local'), 'local'), 312 'constant': ObjType(l_('constant'), 'constant'), 313 'macrofile': ObjType(l_('macrofile'), 'macrofile'), 305 314 } 306 315 directives = { … … 310 319 'global': SpecVariableObject, 311 320 'local': SpecVariableObject, 321 'constant': SpecVariableObject, 312 322 'macrofile': SpecMacroSourceObject, 313 323 } … … 318 328 'global': SpecXRefRole(), 319 329 'local': SpecXRefRole(), 330 'constant': SpecXRefRole(), 320 331 } 321 332 initial_data = {
Note: See TracChangeset
for help on using the changeset viewer.