diff options
Diffstat (limited to 'sphinx/parsers.py')
-rw-r--r-- | sphinx/parsers.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sphinx/parsers.py b/sphinx/parsers.py new file mode 100644 index 000000000..b7ca89aa5 --- /dev/null +++ b/sphinx/parsers.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +""" + sphinx.parsers + ~~~~~~~~~~~~~~ + + A Base class for additional parsers. + + :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import docutils.parsers + + +class Parser(docutils.parsers.Parser): + """ + A base class of parsers. + """ + + def set_application(self, app): + """set_application will be called from Sphinx to set app and other instance variables + + :param sphinx.application.Sphinx app: Sphinx application object + """ + self.app = app + self.config = app.config + self.env = app.env + self.warn = app.warn + self.info = app.info |