class ASTRenderer(BaseRenderer):
Undocumented
Method | __getattr__ |
Provides a default render method for all tokens. |
Method | render |
Returns the string representation of the AST. |
Inherited from BaseRenderer
:
Method | __enter__ |
Make renderer classes into context managers. |
Method | __exit__ |
Make renderer classes into context managers. |
Method | __init__ |
Undocumented |
Method | render_inner |
Recursively renders child tokens. Joins the rendered strings with no space in between. |
Method | render_raw_text |
Default render method for RawText. Simply return token.content. |
Instance Variable | footnotes |
Undocumented |
Instance Variable | render_map |
maps tokens to their corresponding render functions. |
Class Method | _cls_to_func |
Undocumented |
Static Method | _tokens_from_module |
Helper method; takes a module and returns a list of all token classes specified in module.__all__. Useful when custom tokens are defined in a separate module. |
Class Variable | _parse_name |
Undocumented |
Instance Variable | _extras |
a list of custom tokens to be added to the parsing process. |
Provides a default render method for all tokens.
Any token without a custom render method will simply be rendered by self.render_inner.
If name does not start with 'render_', raise AttributeError as normal, for less magic during debugging.
This method would only be called if the attribute requested has not been defined. Defined attributes will not be overridden.
I still think this is heavy wizardry. Let me know if you would like this method removed.