Class-Dump#

ABI implementations may provide a class-dump feature where each parsed struct can be dumped to an output stream. There are several default options that can be configured within the dumper class.

class umbrella.dump.IDumper(**options)[source]#

Base class for all language dumpers.

Both, Swift and Objective-C will implement a dumper class that can be used to dump source code. You can pass additional formatter options as keyword arguments within the constructor of this class.

  • fmt_opts: This dictionary will store additional formatter options

  • lex_opts: To support lexer options, this dictionary can be set in the keyword arguments

In order to provide a simple-to-use interface, this class implements special features:

>>> d = IDumper()
>>> d._start()          # start a dumping process
>>> d <<= "Hello World" # create a new line
>>> d << "!"            # append to the current line
>>> d._finish()
'Hello World!'
lexer: Type[Lexer]#

lexer type to use

formatter#

The formatter type to use

alias of NullFormatter

indent = 0#

The current indentation level (0 is default)