Changeset 953


Ignore:
Timestamp:
Jun 20, 2012 1:24:14 PM (10 years ago)
Author:
jemian
Message:

to progress with the *autodoc* feature for specdomain, need a SPEC macro file parser class that records line numbers and other desired info

Location:
specdomain/src/specdomain
Files:
2 edited

Legend:

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

    r942 r953  
    209209        extended_comments_list = self.parse_macro_file(sig)
    210210        view = ViewList([u'TODO: recognize the ReST formatting in the following extended comment and it needs to be cleaned up'])
     211        #contentnode = nodes.TextElement()
    211212        node = nodes.paragraph()
    212213        node.document = self.state.document
    213214        self.state.nested_parse(view, 0, signode)
    214215        # TODO: recognize the ReST formatting in the following extended comment and it needs to be cleaned up
    215         for extended_comment in extended_comments_list:
    216             for line in string2lines(extended_comment):
    217                 view = ViewList([line])
    218                 nested_parse_with_titles(self.state, view, signode)
     216        # nodes.TextElement(raw, text)
     217        # sphinx.directives.__init__.py  ObjectDescription.run() method
     218        #  Summary:  This does not belong here, in the signature processing part.
     219        #            Instead, it goes at the directive.run() method.  Where's that here?
     220#        for extended_comment in extended_comments_list:
     221#            for line in string2lines(extended_comment):
     222#                view = ViewList([line])
     223#                nested_parse_with_titles(self.state, view, signode)
    219224        return sig
     225   
     226    def XX_run(self):
     227        # TODO: recognize the ReST formatting in the following extended comment and it needs to be cleaned up
     228        # nodes.TextElement(raw, text)
     229        # 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
    220233   
    221234    def parse_macro_file(self, filename):
  • specdomain/src/specdomain/test/test_doc.rst

    r942 r953  
    148148
    149149.. py:function:: test.testdoc.radius(x, y)
     150        :noindex:
    150151       
    151152        :param float x: ordinate
     
    154155       
    155156        return math.sqrt(x*x + y*y)
     157       
     158        The radius function is based on an algorithm of Pythagorus.
     159       
     160        .. note:: The Pythagorean theorem was also cited in the movie *The Wizard of Oz*.
    156161
    157162:class:`SpecVariableObject` (Python Module)
Note: See TracChangeset for help on using the changeset viewer.