Ignore:
Timestamp:
Jun 21, 2012 4:39:57 PM (10 years ago)
Author:
jemian
Message:

refs #8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • specdomain/src/specdomain/sphinxcontrib/specdomain.py

    r953 r961  
    145145    Description of a SPEC variable
    146146    """
     147   
     148    # TODO: The directive that declares the variable should be the primary (bold) index.
     149    # TODO: array variables are not handled at all
    147150
    148151
     
    207210        highlighted source code blocks.
    208211        '''
    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'])
    211214        #contentnode = nodes.TextElement()
    212215        node = nodes.paragraph()
     
    224227        return sig
    225228   
    226     def XX_run(self):
     229    def run(self):
    227230        # TODO: recognize the ReST formatting in the following extended comment and it needs to be cleaned up
    228231        # nodes.TextElement(raw, text)
    229232        # 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)
    233240   
    234241    def parse_macro_file(self, filename):
     
    298305    label = 'SPEC, http://www.certif.com'
    299306    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'),
    305314    }
    306315    directives = {
     
    310319        'global':       SpecVariableObject,
    311320        'local':        SpecVariableObject,
     321        'constant':     SpecVariableObject,
    312322        'macrofile':    SpecMacroSourceObject,
    313323    }
     
    318328        'global':   SpecXRefRole(),
    319329        'local':    SpecXRefRole(),
     330        'constant': SpecXRefRole(),
    320331    }
    321332    initial_data = {
Note: See TracChangeset for help on using the changeset viewer.